/* ============================================
   Instant Listing Alerts - Modern Design System
   ============================================ */

:root {
    /* Primary Colors */
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #eff6ff;
    --primary-dark: #1d4ed8;

    /* Accent Colors */
    --success: #10b981;
    --success-light: #d1fae5;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #6366f1;
    --info-light: #e0e7ff;

    /* Neutral Colors */
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* Design Tokens */
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);

    /* Transitions */
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    font-size: 14px;
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   Layout
   ============================================ */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================
   Header & Navigation
   ============================================ */

.header {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    border-bottom: none;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
}

.logo-icon {
    font-size: 22px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.logo-text {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: var(--transition);
    padding: 4px 0;
}

.nav-link:hover {
    color: white;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 16px;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.user-name {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Tier Badges in Navigation */
.tier-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tier-badge.tier-pro {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.tier-badge.tier-business {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.logout {
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 13px;
}

.logout:hover {
    color: var(--danger) !important;
}

/* ============================================
   Main Content
   ============================================ */

.main {
    padding: 10px 0;
    min-height: calc(100vh - 180px);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

/* ============================================
   Typography
   ============================================ */

h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 16px 0;
    color: var(--text-color);
    letter-spacing: -0.5px;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--text-color);
}

h3 {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   Cards
   ============================================ */

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.form-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    background: white;
    color: var(--text-color);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.btn:hover {
    background: var(--bg-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-dark) 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    border: none;
}

.btn-success:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
    border: none;
}

.btn-danger:hover {
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.btn-secondary {
    background: var(--bg-color);
    color: var(--text-color);
    border: 1px solid var(--border);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-xs {
    padding: 4px 10px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 8px;
    min-width: 36px;
}

/* ============================================
   Forms
   ============================================ */

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 6px;
    font-size: 13px;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
    width: 100%;
    height: 42px;
    padding: 10px 14px;
    font-size: 14px;
    font-family: inherit;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: white;
    color: var(--text-color);
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-light);
}

textarea {
    height: auto;
    min-height: 100px;
    resize: vertical;
}

/* Compact form inputs for inline use */
.input-compact {
    height: 36px;
    padding: 8px 12px;
    font-size: 13px;
}

/* ============================================
   Checkboxes
   ============================================ */

.checkbox-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    user-select: none;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    background: var(--bg-color);
    border: 1px solid transparent;
}

.checkbox-label:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary);
}

/* ============================================
   Tables
   ============================================ */

.table-container {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

th {
    background: var(--bg-color);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

tr {
    transition: var(--transition);
}

tbody tr:hover {
    background: var(--primary-light);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* ============================================
   Grid Helpers
   ============================================ */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* ============================================
   Flex Helpers
   ============================================ */

.row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.row:last-child {
    margin-bottom: 0;
}

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-sm { gap: 8px; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }

/* ============================================
   Utility Classes
   ============================================ */

.w-full { width: 100% !important; }
.text-muted { color: var(--text-muted); }
.text-light { color: var(--text-light); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-primary { color: var(--primary); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.small { font-size: 12px; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* ============================================
   Alerts
   ============================================ */

.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
}

.alert-success {
    background: var(--success-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: var(--danger-light);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: var(--warning-light);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.alert-info {
    background: var(--info-light);
    color: #3730a3;
    border: 1px solid #c7d2fe;
}

.alert-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.5;
    transition: var(--transition);
}

.alert-close:hover {
    opacity: 1;
}

/* ============================================
   Compact Stats Bar (Dashboard)
   ============================================ */

.dashboard-header-compact {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 16px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
}

.dashboard-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-light);
}

.dashboard-header-top .dashboard-title {
    font-size: 18px;
    margin: 0;
}

.stats-bar {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    text-decoration: none;
    color: inherit;
}

.stat-item.stat-link {
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.stat-item.stat-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.stat-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
}

.stat-value-sm {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-color);
}

.stat-link .stat-value-sm {
    color: var(--primary);
}

.stat-label-sm {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Legacy Stats Cards (kept for other pages) */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-card.primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
}

.stat-card.success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    border: none;
}

.stat-card.warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: white;
    border: none;
}

.stat-card.info {
    background: linear-gradient(135deg, var(--info) 0%, #4f46e5 100%);
    color: white;
    border: none;
}

.stat-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 13px;
    opacity: 0.8;
    font-weight: 500;
}

/* ============================================
   Status Badges
   ============================================ */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}

.badge-success {
    background: var(--success-light);
    color: #065f46;
}

.badge-warning {
    background: var(--warning-light);
    color: #92400e;
}

.badge-danger {
    background: var(--danger-light);
    color: #991b1b;
}

.badge-muted {
    background: var(--bg-color);
    color: var(--text-muted);
}

.badge-admin {
    background: #dc2626;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    margin-left: 5px;
    font-weight: bold;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.active {
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.status-dot.inactive {
    background: var(--text-light);
}

/* ============================================
   Search Cards (Dashboard)
   ============================================ */

.search-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    margin-bottom: 8px;
}

.search-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.search-card.inactive {
    opacity: 0.6;
}

.search-card-status {
    flex-shrink: 0;
}

.search-card-content {
    flex: 1;
    min-width: 0;
}

.search-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-card-title a {
    color: inherit;
    text-decoration: none;
}

.search-card-title a:hover {
    color: var(--primary);
}

.search-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--text-muted);
}

.search-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.search-card-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ============================================
   Result Cards
   ============================================ */

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.result-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}

.result-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.result-image {
    width: 100%;
    height: 200px;
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.no-image {
    color: var(--text-light);
    font-size: 14px;
}

.result-content {
    padding: 20px;
}

.result-title {
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.result-title a {
    color: var(--text-color);
    text-decoration: none;
}

.result-title a:hover {
    color: var(--primary);
}

.result-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 12px;
}

.result-meta {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 6px;
}

.meta-row:last-child {
    margin-bottom: 0;
}

.result-actions {
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.results-count {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ============================================
   Search Info Card
   ============================================ */

.search-info-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 24px;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.search-info-card h2 {
    color: white;
    margin: 0 0 12px 0;
    font-size: 24px;
}

.search-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.filter-tag {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* ============================================
   Empty States
   ============================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 2px dashed var(--border);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--text-color);
    margin: 0 0 8px 0;
    text-transform: none;
}

.empty-state p {
    color: var(--text-muted);
    margin: 0 0 20px 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Auth Pages
   ============================================ */

.auth-page {
    min-height: calc(100vh - 180px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.auth-nav {
    text-align: center;
    padding: 20px 0;
}

.auth-nav-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.auth-nav-logo:hover {
    opacity: 0.8;
}

.auth-page > .auth-footer {
    text-align: center;
    padding: 20px 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-page > .auth-footer a {
    color: var(--text-muted);
    text-decoration: none;
}

.auth-page > .auth-footer a:hover {
    color: var(--primary);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.auth-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    color: white;
    padding: 40px 32px;
    text-align: center;
}

.auth-header h1 {
    color: white;
    font-size: 28px;
    margin: 0 0 8px 0;
}

.auth-header p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 15px;
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-body {
    padding: 32px;
}

.auth-form {
    padding: 32px;
}

.auth-form .form-group {
    margin-bottom: 24px;
}

.auth-form .btn-block {
    height: 48px;
    font-size: 16px;
}

.auth-footer {
    padding: 0 32px 32px;
    text-align: center;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   Form Sections
   ============================================ */

.form-section {
    background: var(--bg-color);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 20px;
}

.form-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-row label {
    min-width: 80px;
    margin-bottom: 0;
}

.form-row input,
.form-row select {
    flex: 1;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    padding: 24px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.footer p {
    margin: 0;
}

/* ============================================
   Toggle Switch
   ============================================ */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border);
    transition: var(--transition);
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--success);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-bar {
        gap: 8px;
    }

    .stat-item {
        padding: 6px 12px;
    }

    .stat-divider {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .nav {
        flex-direction: column;
        gap: 16px;
        padding: 16px 0;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .user-menu {
        padding-left: 0;
        border-left: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-header-top {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .dashboard-header-top .dashboard-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .stats-bar {
        flex-wrap: wrap;
        gap: 4px;
    }

    .stat-item {
        padding: 4px 10px;
        flex: 0 0 auto;
    }

    .stat-value-sm {
        font-size: 16px;
    }

    .stat-label-sm {
        font-size: 11px;
    }

    .page-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .search-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .search-card-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row label {
        min-width: auto;
    }

    .form-row input,
    .form-row select {
        width: 100%;
    }
}

/* ============================================
   Scrollbar
   ============================================ */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-light);
}

/* ============================================
   Animations
   ============================================ */

/* fade-in animation handled by JS (app.js initAnimations) for staggered timing.
   CSS-only fallback removed to prevent flicker when both CSS and JS animate. */
.fade-in {
    opacity: 1;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.pulse {
    animation: pulse 2s infinite;
}

/* ============================================
   Dashboard Specific
   ============================================ */

.dashboard-page {
    background: linear-gradient(135deg, #f8fafc 0%, #f0f4ff 50%, #faf5ff 100%);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.dashboard-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.dashboard-actions {
    display: flex;
    gap: 12px;
}

.search-list {
    margin-top: 8px;
}

/* Quick filters */
.quick-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.filter-btn {
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============================================
   Raw Data Viewer
   ============================================ */

.raw-data-viewer {
    margin-top: 16px;
    border-top: 1px solid var(--border-light);
    padding-top: 12px;
}

.raw-data-viewer summary {
    cursor: pointer;
    color: var(--text-muted);
    font-size: 13px;
    user-select: none;
    padding: 4px 0;
}

.raw-data-viewer summary:hover {
    color: var(--primary);
}

.raw-data-viewer pre {
    background: var(--bg-color);
    padding: 16px;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: 12px;
    margin-top: 8px;
    color: var(--text-color);
    border: 1px solid var(--border);
}

/* ============================================
   Error Page
   ============================================ */

.error-page {
    text-align: center;
    padding: 80px 20px;
    max-width: 500px;
    margin: 0 auto;
}

.error-icon {
    font-size: 72px;
    margin-bottom: 24px;
}

.error-page h1 {
    font-size: 36px;
    margin-bottom: 12px;
}

.error-page p {
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 32px;
    line-height: 1.6;
}

/* ============================================
   Landing Page - Full Redesign
   ============================================ */

.landing-main {
    padding: 0;
}

.landing-main .container {
    padding: 0 24px;
}

/* Hero Section - Two Column Layout */
.hero {
    text-align: left;
    padding: 60px 0 80px;
    margin: 0;
    border-radius: 0;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 60px;
    align-items: center;
}

.hero-text {
    max-width: 600px;
}

.hero-title {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
    color: white;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 28px;
}

.hero-features {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
}

.hero-feature-icon {
    font-size: 18px;
}

.hero-cta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.hero-cta-note {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius);
}

/* Hero Login Card */
.hero-login .auth-card {
    max-width: 400px;
    margin: 0;
}

.hero-login .auth-header {
    padding: 28px 28px 20px;
}

.hero-login .auth-header h2 {
    font-size: 22px;
    margin-bottom: 4px;
}

.hero-login .auth-form {
    padding: 24px 28px;
}

.hero-login .auth-form .form-group {
    margin-bottom: 18px;
}

.hero-login .auth-footer {
    padding: 0 28px 24px;
}

/* Section Styling */
.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto;
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background: var(--bg-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 0;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 24px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.feature-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
    text-transform: none;
    letter-spacing: 0;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* How It Works Section */
.how-it-works-section {
    padding: 80px 0;
    background: white;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.step-card {
    text-align: center;
    position: relative;
}

.step-number {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    font-size: 24px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.step-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
    text-transform: none;
    letter-spacing: 0;
}

.step-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    max-width: 280px;
    margin: 0 auto;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.cta-content p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 28px;
}

.cta-content .btn-primary {
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.5);
}

/* Landing Page Responsive */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-text {
        text-align: center;
        max-width: 100%;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-features {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-cta {
        justify-content: center;
        flex-direction: column;
    }

    .hero-login {
        display: flex;
        justify-content: center;
    }

    .hero-login .auth-card {
        max-width: 420px;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 40px 0 60px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-features {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .features-section,
    .how-it-works-section,
    .cta-section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 26px;
    }

    .features-grid,
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .step-card {
        padding: 0 20px;
    }

    .cta-content h2 {
        font-size: 26px;
    }
}

/* ============================================
   Pricing Page
   ============================================ */

.pricing-page {
    background: linear-gradient(135deg, #f0f4ff 0%, #faf5ff 50%, #fff5f5 100%);
    min-height: calc(100vh - 140px);
}

.pricing-hero {
    text-align: center;
    padding: 48px 0 36px;
}

.pricing-hero h1 {
    font-size: 30px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
}

.pricing-hero p {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 450px;
    margin: 0 auto;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 880px;
    margin: 0 auto;
    align-items: start;
}

.pricing-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.pricing-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.pricing-card.featured {
    border: 2px solid var(--primary);
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.12);
}

.pricing-card.featured:hover {
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.18);
    transform: translateY(-2px);
}

.featured-badge {
    background: var(--primary);
    color: #fff;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 0;
}

.pricing-card-header {
    padding: 24px 20px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.pricing-card.featured .pricing-card-header {
    padding-top: 20px;
}

.pricing-card-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 12px;
}

.pricing-card-header .price {
    margin-bottom: 6px;
}

.pricing-card-header .price .amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1;
}

.pricing-card-header .price .period {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}

.pricing-card-header .description {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.pricing-card-features {
    padding: 16px 20px;
}

.pricing-card-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pricing-card-features li {
    padding: 7px 0;
    font-size: 13px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pricing-card-features li::before {
    content: "✓";
    color: var(--success);
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
}

.pricing-card-features li:last-child {
    border-bottom: none;
}

.pricing-card-features li strong {
    color: var(--text-color);
}

.pricing-card-action {
    padding: 0 20px 20px;
}

.pricing-footer-note {
    text-align: center;
    padding: 32px 0 48px;
}

.pricing-footer-note p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* Pricing Responsive */
@media (max-width: 900px) {
    .pricing-cards {
        grid-template-columns: 1fr;
        max-width: 340px;
    }

    .pricing-card.featured {
        order: -1;
    }

    .pricing-hero h1 {
        font-size: 26px;
    }

    .pricing-hero p {
        font-size: 15px;
    }
}
