/* Additional component styles - imported after app.css */

/* Alert / Flash Messages */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
}
.alert-success { background: #d1fae5; color: #065f46; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #dbeafe; color: #1e40af; }

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}
.badge-primary { background: #dbeafe; color: var(--primary); }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-verified { background: #d1fae5; color: #065f46; }

/* Table */
.table { width: 100%; border-collapse: collapse; }
.table th,
.table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; }
.table th { background: var(--bg-light); font-weight: 600; }
.table tr:hover { background: #f1f5f9; }

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); }

/* Tabs */
.tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.tab {
    padding: 12px 20px;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 14px;
}
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* Tom Select custom overrides */
.ts-wrapper { border: none !important; }
.ts-wrapper .ts-control {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: auto !important;
    font-size: 14px;
    cursor: pointer;
}
.ts-wrapper .ts-control > input { font-size: 14px !important; }

/* Dropdown styles (works both inline and appended to body) */
.ts-wrapper .ts-dropdown,
.ts-dropdown {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12) !important;
    margin-top: 4px;
    z-index: 9999 !important;
    background: white !important;
}
.ts-wrapper .ts-dropdown .option,
.ts-dropdown .option {
    padding: 10px 14px !important;
    font-size: 14px;
}
.ts-wrapper .ts-dropdown .option.active,
.ts-dropdown .option.active {
    background: #EFF6FF !important;
    color: var(--primary) !important;
}
.ts-wrapper .ts-dropdown .no-results,
.ts-dropdown .no-results {
    padding: 10px 14px;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}
.ts-wrapper.focus .ts-control { box-shadow: none !important; }

/* Tom Select inside search bar (category select if used) */
.search-bar-select .ts-wrapper { min-width: 140px; }
.search-bar-select .ts-wrapper .ts-control { color: var(--text-primary); }

/* SweetAlert2 custom overrides */
.swal2-popup { border-radius: 12px !important; font-family: inherit !important; }
.swal2-title { font-size: 20px !important; }
.swal2-html-container { font-size: 14px !important; color: var(--text-primary) !important; }
.swal2-confirm { border-radius: var(--radius) !important; font-weight: 600 !important; }
.swal2-cancel { border-radius: var(--radius) !important; }
.swal2-toast { font-size: 14px !important; }
.swal2-toast .swal2-title { font-size: 14px !important; }

/* ══════════════════════════════════════════
   Static / Info Pages
   ══════════════════════════════════════════ */

/* Page hero banner */
.page-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 60%, #0f2557 100%);
    color: white;
    padding: 64px 0 56px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -25%;
    width: 150%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(255,255,255,0.06) 0%, transparent 70%);
    pointer-events: none;
}
.page-hero-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 12px;
    letter-spacing: -0.3px;
    position: relative;
}
.page-hero-sub {
    font-size: 16px;
    opacity: 0.85;
    max-width: 580px;
    margin: 0 auto;
    line-height: 1.6;
    position: relative;
}

/* Breadcrumb inside hero */
.page-hero .breadcrumb {
    justify-content: center;
    color: rgba(255,255,255,0.6);
    margin-bottom: 16px;
    font-size: 13px;
    position: relative;
}
.page-hero .breadcrumb a {
    color: rgba(255,255,255,0.6);
    transition: color 0.2s;
}
.page-hero .breadcrumb a:hover { color: white; }
.page-hero .breadcrumb .current { color: white; font-weight: 500; }

/* Simple search inside page-hero */
.page-hero-search {
    max-width: 520px;
    margin: 20px auto 0;
    position: relative;
}
.page-hero-search input {
    width: 100%;
    padding: 12px 48px 12px 18px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    background: rgba(255,255,255,0.15);
    color: white;
    backdrop-filter: blur(4px);
    outline: none;
    transition: background 0.2s;
}
.page-hero-search input::placeholder { color: rgba(255,255,255,0.6); }
.page-hero-search input:focus { background: rgba(255,255,255,0.25); }
.page-hero-search button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background 0.2s;
}
.page-hero-search button:hover { background: var(--primary-dark); }

/* Content wrapper for text-heavy pages (terms, privacy) */
.page-content {
    max-width: 780px;
    margin: 0 auto;
    padding: 48px 0;
}
.page-content h2 {
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 36px 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.page-content h2::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
    flex-shrink: 0;
}
.page-content h2:first-child { margin-top: 0; }
.page-content p {
    font-size: 15px;
    line-height: 1.85;
    color: #475569;
    margin-bottom: 16px;
}
.page-content ul {
    margin: 12px 0 20px 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
    line-height: 1.85;
    color: #475569;
}
.page-content ul li {
    margin-bottom: 8px;
    padding-left: 24px;
    position: relative;
}
.page-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.3;
}

/* Info cards grid (services, about) */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}
.info-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 32px 28px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), #3B82F6);
    opacity: 0;
    transition: opacity 0.3s;
}
.info-card:hover {
    box-shadow: 0 12px 32px rgba(30,64,175,0.1);
    transform: translateY(-4px);
    border-color: transparent;
}
.info-card:hover::before { opacity: 1; }
.info-card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    font-size: 24px;
    color: var(--primary);
    margin-bottom: 20px;
}
.info-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.info-card p {
    font-size: 14px;
    color: #64748B;
    line-height: 1.7;
    margin: 0;
}

/* Step cards (how-it-works) */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 32px;
    counter-reset: step;
}
.step-card {
    text-align: center;
    position: relative;
    counter-increment: step;
    padding: 20px 12px;
}
.step-card-number {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #3B82F6);
    color: white;
    font-size: 18px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 12px rgba(30,64,175,0.25);
}
.step-card-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    font-size: 30px;
    color: var(--primary);
    margin: 0 auto 20px;
}
.step-card h3 {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}
.step-card p {
    font-size: 14px;
    color: #64748B;
    line-height: 1.7;
}

/* How-it-works section headers */
.hiw-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 36px;
    padding: 20px 24px;
    border-radius: 16px;
}
.hiw-section-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}
.hiw-section-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
}
.hiw-section-sub {
    font-size: 14px;
    margin: 0;
    opacity: 0.8;
}

/* Buyer theme */
.hiw-buyer { background: linear-gradient(135deg, #EFF6FF, #DBEAFE); }
.hiw-buyer .hiw-section-icon { background: var(--primary); color: white; }
.hiw-buyer .hiw-section-title { color: var(--primary); }
.hiw-buyer .hiw-section-sub { color: #1E40AF; }
.step-card-buyer { border: 1px solid #DBEAFE; border-radius: 16px; background: white; }
.step-card-buyer:nth-child(1) .step-card-number { background: #3B82F6; }
.step-card-buyer:nth-child(1) .step-card-icon { background: #EFF6FF; color: #3B82F6; }
.step-card-buyer:nth-child(2) .step-card-number { background: #8B5CF6; }
.step-card-buyer:nth-child(2) .step-card-icon { background: #F5F3FF; color: #8B5CF6; }
.step-card-buyer:nth-child(3) .step-card-number { background: #F59E0B; }
.step-card-buyer:nth-child(3) .step-card-icon { background: #FFFBEB; color: #F59E0B; }
.step-card-buyer:nth-child(4) .step-card-number { background: #EC4899; }
.step-card-buyer:nth-child(4) .step-card-icon { background: #FDF2F8; color: #EC4899; }

/* Seller theme */
.hiw-seller { background: linear-gradient(135deg, #F0FDF4, #DCFCE7); }
.hiw-seller .hiw-section-icon { background: var(--success); color: white; }
.hiw-seller .hiw-section-title { color: #15803D; }
.hiw-seller .hiw-section-sub { color: #166534; }
.step-card-seller { border: 1px solid #DCFCE7; border-radius: 16px; background: white; }
.step-card-seller:nth-child(1) .step-card-number { background: #16A34A; }
.step-card-seller:nth-child(1) .step-card-icon { background: #F0FDF4; color: #16A34A; }
.step-card-seller:nth-child(2) .step-card-number { background: #0EA5E9; }
.step-card-seller:nth-child(2) .step-card-icon { background: #F0F9FF; color: #0EA5E9; }
.step-card-seller:nth-child(3) .step-card-number { background: #F97316; }
.step-card-seller:nth-child(3) .step-card-icon { background: #FFF7ED; color: #F97316; }
.step-card-seller:nth-child(4) .step-card-number { background: #8B5CF6; }
.step-card-seller:nth-child(4) .step-card-icon { background: #F5F3FF; color: #8B5CF6; }
.step-card-seller:nth-child(5) .step-card-number { background: #EAB308; }
.step-card-seller:nth-child(5) .step-card-icon { background: #FEFCE8; color: #EAB308; }
.step-card-seller:nth-child(6) .step-card-number { background: #EC4899; }
.step-card-seller:nth-child(6) .step-card-icon { background: #FDF2F8; color: #EC4899; }

/* FAQ accordion */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    background: white;
    transition: var(--transition);
}
.faq-item:hover { border-color: #CBD5E1; }
.faq-item.open {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(30,64,175,0.08);
}
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 22px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: left;
    gap: 12px;
    transition: all 0.2s;
}
.faq-question:hover { background: var(--bg-light); }
.faq-question i {
    font-size: 12px;
    color: var(--text-muted);
    transition: transform 0.3s;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-light);
}
.faq-item.open .faq-question i {
    transform: rotate(180deg);
    background: #EFF6FF;
    color: var(--primary);
}
.faq-item.open .faq-question { color: var(--primary); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.faq-answer-inner {
    padding: 0 22px 20px;
    font-size: 14px;
    line-height: 1.75;
    color: #475569;
    border-top: 1px solid var(--border);
    padding-top: 16px;
    margin: 0 22px;
    padding-left: 0;
    padding-right: 0;
}

/* Contact form */
.contact-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: start;
}
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    border-radius: 12px;
    transition: background 0.2s;
}
.contact-info-item:hover { background: var(--bg-light); }
.contact-info-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    font-size: 20px;
    color: var(--primary);
    flex-shrink: 0;
}
.contact-info-item h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text-primary);
}
.contact-info-item p { font-size: 14px; color: #64748B; line-height: 1.5; }

/* Stats row */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 40px 0;
    padding: 36px 24px;
    background: white;
    border-radius: 16px;
    border: 1px solid var(--border);
}
.stat-item {
    text-align: center;
    padding: 12px 28px;
    flex: 1;
    min-width: 120px;
}
.stat-item + .stat-item { border-left: 1px solid var(--border); }
.stat-number {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary);
    display: block;
    letter-spacing: -0.5px;
}
.stat-label {
    font-size: 13px;
    color: #64748B;
    margin-top: 6px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Values grid (about page) */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 20px;
}
.value-card {
    text-align: center;
    padding: 32px 20px;
    border-radius: 16px;
    background: white;
    border: 1px solid var(--border);
    transition: var(--transition);
}
.value-card:hover {
    border-color: transparent;
    box-shadow: 0 8px 24px rgba(30,64,175,0.08);
    transform: translateY(-2px);
}
.value-card i {
    font-size: 28px;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    margin: 0 auto 16px;
}
.value-card h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}
.value-card p { font-size: 13px; color: #64748B; line-height: 1.6; }

/* Notification list */
.notif-list { max-width: 700px; margin: 0 auto; }
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    transition: all 0.2s;
    border-radius: 12px;
    margin-bottom: 4px;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-light); }
.notif-item.unread {
    background: #EFF6FF;
    border-left: 3px solid var(--primary);
}
.notif-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    color: var(--primary);
    font-size: 18px;
    flex-shrink: 0;
}
.notif-body { flex: 1; min-width: 0; }
.notif-body p { font-size: 14px; color: var(--text-primary); line-height: 1.6; }
.notif-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    display: block;
}
.notif-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 700px;
    margin: 0 auto 16px;
}
.notif-header .badge {
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 20px;
}
.notif-title-link { font-weight: 600; color: var(--text-primary); }
.notif-title-link:hover { color: var(--primary); }
.notif-user-tag {
    font-size: 12px;
    color: var(--primary);
    font-weight: 500;
    margin-top: 2px;
    display: block;
}
.notif-item a.notif-link { text-decoration: none; color: inherit; display: flex; align-items: flex-start; gap: 16px; flex: 1; min-width: 0; }

/* Contact reply page */
.contact-reply-wrapper { max-width: 700px; margin: 0 auto; }
.contact-msg-card,
.contact-reply-card,
.contact-reply-form-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
}
.contact-msg-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.contact-msg-header h3 { margin: 0; font-size: 16px; color: var(--text-primary); }
.contact-msg-avatar { font-size: 36px; color: var(--primary); line-height: 1; }
.contact-msg-email { font-size: 13px; color: var(--text-muted); text-decoration: none; }
.contact-msg-email:hover { color: var(--primary); }
.contact-msg-header .badge { margin-left: auto; }
.badge-success { background: #22c55e; color: #fff; font-size: 12px; padding: 4px 12px; border-radius: 20px; }
.badge-warning { background: #f59e0b; color: #fff; font-size: 12px; padding: 4px 12px; border-radius: 20px; }
.contact-msg-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.contact-msg-body p { color: var(--text-primary); line-height: 1.7; font-size: 14px; margin: 0; }
.contact-reply-card { background: #eff6ff; border-color: #bfdbfe; }
.contact-reply-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--primary);
}
.contact-reply-meta { font-size: 12px; color: var(--text-muted); margin-left: auto; }
.contact-reply-form-card h3 { font-size: 16px; margin: 0 0 8px 0; color: var(--text-primary); }
.contact-reply-form-card .text-muted { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }

/* Last updated note */
.page-updated {
    margin-top: 48px;
    padding: 16px 20px;
    border-radius: 8px;
    background: var(--bg-light);
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-updated::before {
    content: '\F177';
    font-family: 'bootstrap-icons';
    font-size: 14px;
}

/* Responsive rules moved to responsive.css */

/* FAQ category headers */
.faq-category {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 32px 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}
.faq-category:first-child { margin-top: 0; }
.faq-category i {
    font-size: 18px;
    color: var(--primary);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #EFF6FF;
}

/* Contact form spacing */
.contact-form { margin-top: 24px; }
.contact-form .form-group { margin-bottom: 20px; }
.contact-form label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: block;
}
.contact-info-list { margin-top: 24px; }

/* ══════════════════════════════════════════
   Auth Pages (Login / Register)
   ══════════════════════════════════════════ */

/* Auth card (centered form card in main layout) */
.auth-card {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}
.auth-card-header {
    text-align: center;
    margin-bottom: 28px;
}
.auth-card-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    color: var(--primary);
    font-size: 28px;
    margin: 0 auto 20px;
}
.auth-card-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.auth-card-title i { color: var(--primary); }
.auth-card-desc {
    font-size: 14px;
    color: #64748B;
    line-height: 1.6;
    max-width: 380px;
    margin: 0 auto;
}
.auth-card .form-group { margin-bottom: 18px; }
.auth-card label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: block;
}

/* Google button */
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 12px;
    border: 1px solid var(--border); border-radius: var(--radius);
    background: white; font-size: 14px; font-weight: 500;
    color: var(--text-primary); cursor: pointer;
    transition: var(--transition); text-decoration: none;
}
.btn-google:hover { background: var(--bg-light); border-color: #cbd5e1; box-shadow: var(--shadow); }

/* Divider */
.auth-divider { display: flex; align-items: center; margin: 20px 0; gap: 12px; }
.auth-divider::before,
.auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-divider span { font-size: 12px; color: var(--text-muted); text-transform: uppercase; font-weight: 500; }

/* Input with icon */
.input-icon-wrapper { position: relative; }
.input-icon {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); font-size: 16px; pointer-events: none;
}
.input-with-icon { padding-left: 38px !important; }
.input-toggle-pw {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 16px; padding: 0;
}
.input-toggle-pw:hover { color: var(--text-primary); }

/* Form row (side by side) */
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* Auth options */
.auth-options { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.auth-check {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 13px; color: var(--text-primary); cursor: pointer;
}
.auth-check input[type="checkbox"] { width: 16px; height: 16px; margin-top: 1px; accent-color: var(--primary); flex-shrink: 0; }
.auth-check a { color: var(--primary); font-weight: 500; }
.auth-link { font-size: 13px; color: var(--primary); font-weight: 500; }
.auth-link:hover { text-decoration: underline; }

/* Submit */
.auth-submit { width: 100%; justify-content: center; padding: 12px; font-size: 15px; font-weight: 600; }

/* Switch link */
.auth-switch { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-muted); }
.auth-switch a { color: var(--primary); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* ══════════════════════════════════════════
   Error Pages (404 / 403 / 500)
   ══════════════════════════════════════════ */
.error-card {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px 36px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.04);
}
.error-card-icon {
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    color: var(--primary);
    font-size: 42px;
    margin: 0 auto 24px;
}
.error-card-danger .error-card-icon {
    background: linear-gradient(135deg, #FEF2F2, #FECACA);
    color: var(--danger);
}
.error-card-warning .error-card-icon {
    background: linear-gradient(135deg, #FFFBEB, #FDE68A);
    color: var(--warning);
}
.error-card-code {
    font-size: 80px;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -3px;
}
.error-card-danger .error-card-code { color: var(--danger); }
.error-card-warning .error-card-code { color: var(--warning); }
.error-card-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}
.error-card-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 28px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}
.error-card-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}
.error-card-links {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
}
.error-card-links span { color: var(--text-muted); font-weight: 500; }
.error-card-links a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
    font-weight: 500;
}
.error-card-links a:hover { text-decoration: underline; }

/* Auth info box */
.auth-info-box {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    border-radius: 10px;
    margin: 20px 0;
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.6;
}
.auth-info-box > i {
    font-size: 20px;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}
.auth-info-box strong {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
}
.auth-info-box ol,
.auth-info-box ul {
    margin: 0;
    padding-left: 18px;
}
.auth-info-box li { margin-bottom: 2px; }

/* Password strength indicator */
.pw-strength { margin-top: 8px; }
.pw-strength-bar {
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}
.pw-strength-bar span {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.3s, background 0.3s;
}
.pw-match-msg {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    min-height: 16px;
}

/* FAQ Accordion */
.sub-faq-item {
    border-bottom: 1px solid var(--border);
}
.sub-faq-item:last-child {
    border-bottom: none;
}
.sub-faq-toggle {
    width: 100%;
    background: none;
    border: none;
    padding: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    text-align: left;
}
.sub-faq-toggle i {
    transition: transform 0.2s;
    color: var(--text-muted);
}
.sub-faq-item.open .sub-faq-toggle i {
    transform: rotate(180deg);
}
.sub-faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}
.sub-faq-item.open .sub-faq-content {
    max-height: 200px;
}
.sub-faq-content p {
    padding: 0 0 16px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Bottom Nav Popup */
.bottom-nav-dropdown {
    position: relative;
    cursor: pointer;
}
.bottom-nav-popup {
    display: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
    min-width: 210px;
    padding: 8px 0;
    z-index: 110;
}
.bottom-nav-popup::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 12px;
    height: 12px;
    background: white;
    box-shadow: 2px 2px 4px rgba(0,0,0,0.05);
}
.bottom-nav-popup a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}
.bottom-nav-popup a:hover {
    background: var(--bg-light);
    color: var(--primary);
}
.bottom-nav-popup a i {
    font-size: 16px;
    color: var(--primary);
}
.bottom-nav-dropdown.open .bottom-nav-popup {
    display: block;
    animation: btmPopup 0.2s ease;
}
@keyframes btmPopup {
    from { opacity: 0; transform: translateX(-50%) translateY(8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Category page — subcategory cards */
.cat-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.subcat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.subcat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}
.subcat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}
.subcat-card-img {
    width: 100%;
    height: 120px;
    overflow: hidden;
    background: var(--bg-light);
}
.subcat-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.subcat-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--text-muted);
}
.subcat-card-body { padding: 12px; }
.subcat-card-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
}
.subcat-card-count {
    font-size: 12px;
    color: var(--text-muted);
}

/* Auth responsive rules moved to responsive.css */

/* ============================================================
   Skeleton Loaders
   ============================================================ */
@keyframes skeletonPulse {
    0% { background-position: -400px 0; }
    100% { background-position: calc(400px + 100%) 0; }
}

.skeleton {
    background: #dfe6ed;
    background-image: linear-gradient(90deg, #dfe6ed 0%, #f0f4f8 40%, #dfe6ed 80%);
    background-size: 400px 100%;
    background-repeat: no-repeat;
    border-radius: 8px;
    animation: skeletonPulse 1.2s ease-in-out infinite;
    display: block;
}

.skeleton-text { height: 14px; width: 100%; margin-bottom: 10px; border-radius: 4px; }
.skeleton-text-sm { height: 11px; width: 60%; margin-bottom: 8px; border-radius: 4px; }
.skeleton-text-xs { height: 9px; width: 40%; margin-bottom: 6px; border-radius: 3px; }
.skeleton-title { height: 18px; width: 75%; margin-bottom: 12px; border-radius: 6px; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; }
.skeleton-avatar-sm { width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0; }
.skeleton-img { width: 100%; height: 140px; border-radius: 0; }
.skeleton-btn { height: 40px; width: 120px; border-radius: 8px; }

.skeleton-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.skeleton-card-body { padding: 12px; }

.skeleton-ad-card {
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.skeleton-ad-card .skeleton-img { border-radius: 0; }
.skeleton-ad-card-body { padding: 10px; }

/* Page-level skeleton wrapper */
.skeleton-page { padding: 16px; }
.skeleton-page-hero {
    height: 100px;
    margin-bottom: 20px;
    border-radius: 12px;
}
.skeleton-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.skeleton-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 10px;
}
.skeleton-list-item-body { flex: 1; }
.skeleton-stat {
    background: white;
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

/* Section skeleton for AJAX-loaded content */
.skeleton-section {
    padding: 16px 0;
}

@media (max-width: 639px) {
    .skeleton-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .skeleton-ad-card .skeleton-img { height: 120px; }
}
@media (min-width: 640px) and (max-width: 899px) {
    .skeleton-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .skeleton-ad-card .skeleton-img { height: 150px; }
}
