/* ============================================
   VTU Market — Premium Custom CSS v3
   Mobile-First | Modern | Professional
   Theme colors via CSS variables from theme.php
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6; color: #1f2937; background: #f8fafc; min-height: 100vh;
    display: flex; flex-direction: column;
}
a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* --- Typography --- */
h1 { font-size: 1.75rem; font-weight: 800; color: #0f172a; letter-spacing: -0.02em; }
h2 { font-size: 1.5rem; font-weight: 700; color: #0f172a; letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; font-weight: 600; color: #0f172a; }
h4 { font-size: 1.1rem; font-weight: 600; color: #0f172a; }
@media (min-width: 768px) { h1 { font-size: 2.25rem; } h2 { font-size: 1.75rem; } }
.text-sm { font-size: 0.875rem; } .text-xs { font-size: 0.75rem; } .text-lg { font-size: 1.125rem; }
.text-muted { color: #6b7280; } .text-white { color: #fff; } .text-primary { color: var(--primary); }
.text-center { text-align: center; } .text-right { text-align: right; }
.text-success { color: #059669; } .text-danger { color: #dc2626; } .text-warning { color: #d97706; }
.font-bold { font-weight: 700; } .font-semi { font-weight: 600; }
.font-mono { font-family: 'SF Mono', 'Fira Code', monospace; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-pre { white-space: pre-line; }

/* --- Layout --- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.container-sm { width: 100%; max-width: 480px; margin: 0 auto; padding: 0 1rem; }
.container-md { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 1rem; }
.container-lg { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 1rem; }
.main-content { flex: 1; }
.section { padding: 2.5rem 0; }

/* --- Flexbox & Grid Utilities --- */
.flex { display: flex; } .flex-col { flex-direction: column; } .flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; } .items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; } .justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; } .gap-2 { gap: 0.5rem; } .gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; } .gap-6 { gap: 1.5rem; }
.flex-1 { flex: 1; } .flex-shrink-0 { flex-shrink: 0; }
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: 1fr; } .grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.col-span-2 { grid-column: span 2; }
@media (max-width: 1023px) { .col-span-2 { grid-column: span 1; } }
.layout-sidebar { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 1024px) { .layout-sidebar { grid-template-columns: 2fr 1fr; } }

/* --- Spacing --- */
.mt-1 { margin-top: 0.25rem; } .mt-2 { margin-top: 0.5rem; } .mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mt-8 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.25rem; } .mb-2 { margin-bottom: 0.5rem; } .mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; } .mb-8 { margin-bottom: 2rem; }
.ml-2 { margin-left: 0.5rem; } .mr-2 { margin-right: 0.5rem; }
.p-2 { padding: 0.5rem; } .p-3 { padding: 0.75rem; } .p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; } .p-6 { padding: 1.5rem; } .p-8 { padding: 2rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; } .px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; } .px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; } .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; } .py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; } .py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-10 { padding-top: 2.5rem; padding-bottom: 2.5rem; } .py-16 { padding-top: 4rem; padding-bottom: 4rem; }

/* --- Cards --- */
.card {
    background: #fff; border-radius: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    overflow: hidden; border: 1px solid #f1f5f9; transition: box-shadow 0.2s, transform 0.2s;
}
.card-body { padding: 1.25rem; }
.card-hover:hover { box-shadow: 0 10px 25px rgba(0,0,0,0.08); transform: translateY(-2px); }
.border-b { border-bottom: 1px solid #e5e7eb; } .border-t { border-top: 1px solid #e5e7eb; }
.divide-y > * + * { border-top: 1px solid #e5e7eb; }
.rounded { border-radius: 0.5rem; } .rounded-lg { border-radius: 0.75rem; }
.rounded-xl { border-radius: 1rem; } .rounded-full { border-radius: 9999px; }

/* --- Buttons --- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.625rem 1.25rem; border-radius: 0.625rem; font-weight: 600; font-size: 0.875rem;
    border: none; cursor: pointer; transition: all 0.2s ease; text-decoration: none; line-height: 1.4;
    position: relative; overflow: hidden;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 4px rgba(var(--primary-rgb), 0.3); }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.4); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-white { background: #fff; color: #111827; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.btn-white:hover { background: #f8fafc; color: #111827; }
.btn-danger { background: #dc2626; color: #fff; } .btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-success { background: #059669; color: #fff; } .btn-success:hover { background: #047857; color: #fff; }
.btn-warning { background: #d97706; color: #fff; } .btn-warning:hover { background: #b45309; color: #fff; }
.btn-ghost { background: #f1f5f9; color: #374151; } .btn-ghost:hover { background: #e2e8f0; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; border-radius: 0.5rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; border-radius: 0.75rem; }
.btn-block { display: flex; width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 0.625rem; }

/* --- Forms --- */
.form-group { margin-bottom: 1.125rem; }
.form-label { display: block; font-size: 0.8125rem; font-weight: 600; color: #374151; margin-bottom: 0.375rem; letter-spacing: 0.01em; }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 0.75rem 1rem; border: 1.5px solid #e2e8f0; border-radius: 0.625rem;
    font-size: 0.9375rem; color: #0f172a; background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12);
}
.form-input::placeholder { color: #94a3b8; }
.form-textarea { resize: vertical; min-height: 120px; }
.form-hint { font-size: 0.75rem; color: #94a3b8; margin-top: 0.25rem; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.form-error { font-size: 0.75rem; color: #dc2626; margin-top: 0.25rem; }

/* Password toggle wrapper */
.password-wrap { position: relative; }
.password-wrap .form-input { padding-right: 3rem; }
.password-toggle {
    position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: #94a3b8; padding: 4px;
    display: flex; align-items: center; justify-content: center;
    transition: color 0.2s;
}
.password-toggle:hover { color: #475569; }
.password-toggle svg { width: 20px; height: 20px; }

/* Radio card selector */
.radio-card { position: relative; cursor: pointer; }
.radio-card input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-card-label {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 1rem;
    border: 2px solid #e2e8f0; border-radius: 0.75rem; font-weight: 600; font-size: 0.875rem;
    transition: all 0.2s; background: #fff;
}
.radio-card-label img { width: 32px; height: 32px; border-radius: 6px; object-fit: contain; }
.radio-card input[type="radio"]:checked + .radio-card-label {
    border-color: var(--primary); background: rgba(var(--primary-rgb), 0.04); color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

/* Toggle switch */
.toggle-wrap { display: flex; align-items: center; gap: 0.75rem; }
.toggle {
    position: relative; width: 48px; height: 26px; -webkit-appearance: none; appearance: none;
    background: #cbd5e1; border-radius: 13px; cursor: pointer; transition: background 0.3s; border: none;
}
.toggle:checked { background: var(--primary); }
.toggle::before {
    content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
    background: #fff; border-radius: 50%; transition: transform 0.3s; box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle:checked::before { transform: translateX(22px); }

/* --- Navbar --- */
.navbar {
    background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    position: sticky; top: 0; z-index: 100; backdrop-filter: blur(8px);
    background: rgba(255,255,255,0.95);
}
.navbar-inner {
    display: flex; align-items: center; justify-content: space-between;
    height: 64px; max-width: 1200px; margin: 0 auto; padding: 0 1rem;
}
.navbar-brand { font-size: 1.375rem; font-weight: 800; color: var(--primary); letter-spacing: -0.02em; }
.navbar-brand:hover { color: var(--primary); }
.navbar-links { display: none; align-items: center; gap: 0.25rem; }
.navbar-links a {
    color: #475569; font-size: 0.9375rem; font-weight: 500; padding: 0.5rem 0.75rem;
    border-radius: 0.5rem; transition: all 0.2s;
}
.navbar-links a:hover { color: var(--primary); background: rgba(var(--primary-rgb), 0.05); }
.navbar-toggle {
    display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
    border: none; background: #f1f5f9; cursor: pointer; color: #475569; border-radius: 0.625rem;
    transition: all 0.2s;
}
.navbar-toggle:hover { background: #e2e8f0; }
.navbar-toggle svg { width: 22px; height: 22px; }
@media (min-width: 768px) { .navbar-links { display: flex; } .navbar-toggle { display: none; } }

/* Notification badge in nav */
.nav-badge {
    position: absolute; top: -4px; right: -4px; background: #ef4444; color: #fff;
    font-size: 0.625rem; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* --- Sidebar Mobile Menu (Modern Slide-in) --- */
.sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 199;
    opacity: 0; transition: opacity 0.3s ease;
}
.sidebar-overlay.active { display: block; opacity: 1; }
.sidebar-menu {
    position: fixed; top: 0; left: -300px; width: 300px; height: 100vh;
    background: #fff; z-index: 200; box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1); overflow-y: auto;
    display: flex; flex-direction: column;
}
.sidebar-menu.active { left: 0; }
.sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1.25rem 1.5rem; border-bottom: 1px solid #f1f5f9;
}
.sidebar-header h3 { font-size: 1.125rem; color: var(--primary); }
.sidebar-close {
    width: 36px; height: 36px; border: none; background: #f1f5f9; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: #64748b; font-size: 1.25rem; transition: all 0.2s;
}
.sidebar-close:hover { background: #e2e8f0; color: #0f172a; }
.sidebar-user {
    display: flex; align-items: center; gap: 0.75rem; padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08), rgba(var(--primary-rgb), 0.02));
    border-bottom: 1px solid #f1f5f9;
}
.sidebar-user .avatar { width: 44px; height: 44px; font-size: 1rem; }
.sidebar-user-info h4 { font-size: 0.9375rem; color: #0f172a; margin: 0; }
.sidebar-user-info p { font-size: 0.75rem; color: #64748b; margin: 0; }
.sidebar-nav { flex: 1; padding: 0.75rem 0; }
.sidebar-nav a, .sidebar-nav button {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.5rem;
    color: #475569; font-size: 0.9375rem; font-weight: 500; transition: all 0.2s;
    text-decoration: none; width: 100%; border: none; background: none; cursor: pointer; text-align: left;
}
.sidebar-nav a:hover, .sidebar-nav button:hover { background: #f8fafc; color: var(--primary); }
.sidebar-nav a.active { color: var(--primary); background: rgba(var(--primary-rgb), 0.06); font-weight: 600; }
.sidebar-nav svg { width: 20px; height: 20px; flex-shrink: 0; }
.sidebar-divider { height: 1px; background: #f1f5f9; margin: 0.5rem 1.5rem; }
.sidebar-section-title { font-size: 0.6875rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.75rem 1.5rem 0.25rem; }

/* --- Hero Section --- */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; padding: 3.5rem 0; position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: -50%; right: -20%; width: 60%; height: 200%;
    background: rgba(255,255,255,0.05); border-radius: 50%; transform: rotate(-15deg);
}
@media (min-width: 768px) { .hero { padding: 5rem 0; } }
.hero h1 { color: #fff; font-size: 1.875rem; margin-bottom: 1rem; position: relative; }
@media (min-width: 768px) { .hero h1 { font-size: 3rem; } }
.hero p { font-size: 1.1rem; opacity: 0.9; margin-bottom: 1.75rem; max-width: 600px; position: relative; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; position: relative; }

/* --- Stat Cards --- */
.stat-card {
    background: #fff; border-radius: 1rem; padding: 1.5rem; border: 1px solid #f1f5f9;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04); transition: all 0.2s;
}
.stat-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.06); }
.stat-card .stat-icon {
    width: 44px; height: 44px; border-radius: 0.75rem; display: flex; align-items: center;
    justify-content: center; margin-bottom: 0.75rem;
}
.stat-card .stat-label { font-size: 0.8125rem; color: #64748b; margin-bottom: 0.25rem; }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 800; color: #0f172a; }
.stat-card .stat-value.green { color: #059669; } .stat-card .stat-value.red { color: #dc2626; }
.stat-card .stat-value.yellow { color: #d97706; }

/* --- Quick Action Grid --- */
.action-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
@media (min-width: 768px) { .action-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .action-grid { grid-template-columns: repeat(4, 1fr); } }
.action-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 1.25rem 0.75rem; border-radius: 1rem; text-align: center; font-weight: 600;
    font-size: 0.8125rem; transition: all 0.25s ease; text-decoration: none; border: 1px solid transparent;
}
.action-card:active { transform: scale(0.96); }
.action-card .action-icon {
    width: 48px; height: 48px; border-radius: 0.875rem; display: flex;
    align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 0.25rem;
}
.action-card-primary { background: var(--primary); color: #fff; }
.action-card-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.3); }
.action-card-outline { background: #fff; color: var(--primary); border: 1.5px solid rgba(var(--primary-rgb), 0.2); }
.action-card-outline:hover { background: rgba(var(--primary-rgb), 0.04); border-color: var(--primary); }
.action-card-ghost { background: #fff; color: #374151; border: 1px solid #e2e8f0; }
.action-card-ghost:hover { background: #f8fafc; border-color: #cbd5e1; }

/* Network logo in service cards */
.network-logo { width: 40px; height: 40px; border-radius: 8px; object-fit: contain; }

/* --- Ad/Listing Card --- */
.listing-card {
    background: #fff; border-radius: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    overflow: hidden; transition: all 0.3s ease; text-decoration: none; color: inherit;
    display: block; border: 1px solid #f1f5f9;
}
.listing-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,0.08); transform: translateY(-3px); color: inherit; }
.listing-img {
    aspect-ratio: 4/3; background: #f1f5f9; overflow: hidden;
    display: flex; align-items: center; justify-content: center; position: relative;
}
.listing-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.listing-card:hover .listing-img img { transform: scale(1.06); }
.listing-img .placeholder-icon { color: #cbd5e1; }
.listing-img .placeholder-icon svg { width: 48px; height: 48px; }
.listing-img .listing-badge {
    position: absolute; top: 0.75rem; left: 0.75rem; padding: 0.25rem 0.625rem;
    background: var(--primary); color: #fff; border-radius: 0.375rem;
    font-size: 0.6875rem; font-weight: 700; text-transform: uppercase;
}
.listing-img .listing-type-badge {
    position: absolute; top: 0.75rem; right: 0.75rem; padding: 0.25rem 0.625rem;
    background: rgba(0,0,0,0.6); color: #fff; border-radius: 0.375rem;
    font-size: 0.6875rem; font-weight: 600; backdrop-filter: blur(4px);
}
.listing-body { padding: 1rem; }
.listing-body .category-tag {
    display: inline-block; font-size: 0.6875rem; background: #f1f5f9;
    color: #64748b; padding: 0.125rem 0.5rem; border-radius: 9999px;
}
.listing-body h3 { font-size: 0.9375rem; margin-top: 0.5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.listing-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 0.625rem; }
.listing-price { font-weight: 800; color: var(--primary); font-size: 1rem; }
.listing-time { font-size: 0.6875rem; color: #94a3b8; }
.listing-seller { display: flex; align-items: center; gap: 0.375rem; margin-top: 0.5rem; font-size: 0.75rem; color: #64748b; }
.listing-seller .avatar { width: 20px; height: 20px; font-size: 0.5rem; }

/* --- Service Icon Box --- */
.service-box { display: flex; align-items: flex-start; gap: 1rem; background: #fff; border-radius: 1rem; padding: 1.5rem; border: 1px solid #f1f5f9; transition: all 0.2s; }
.service-box:hover { border-color: rgba(var(--primary-rgb), 0.2); box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.service-icon { width: 52px; height: 52px; border-radius: 0.875rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.service-icon svg { width: 24px; height: 24px; }
.service-icon.blue { background: #dbeafe; color: #2563eb; } .service-icon.green { background: #d1fae5; color: #059669; }
.service-icon.purple { background: #ede9fe; color: #7c3aed; } .service-icon.orange { background: #ffedd5; color: #ea580c; }
.service-icon.red { background: #fee2e2; color: #dc2626; } .service-icon.yellow { background: #fef3c7; color: #d97706; }

/* --- Badges --- */
.badge { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.125rem 0.625rem; border-radius: 9999px; font-size: 0.6875rem; font-weight: 600; }
.badge-success { background: #dcfce7; color: #166534; } .badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; } .badge-info { background: #dbeafe; color: #1e40af; }
.badge-purple { background: #ede9fe; color: #5b21b6; } .badge-gray { background: #f1f5f9; color: #475569; }
.badge-primary { background: rgba(var(--primary-rgb), 0.1); color: var(--primary); }

/* --- Alerts --- */
.alert { padding: 0.875rem 1rem; border-radius: 0.75rem; font-size: 0.875rem; margin-bottom: 1rem; display: flex; align-items: flex-start; gap: 0.75rem; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* --- Tables --- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 0.75rem; }
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table thead { background: #f8fafc; }
.table th { padding: 0.75rem 1rem; text-align: left; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; color: #64748b; letter-spacing: 0.05em; }
.table td { padding: 0.75rem 1rem; border-top: 1px solid #f1f5f9; color: #334155; }
.table tbody tr:hover { background: #f8fafc; }

/* --- Avatar --- */
.avatar { display: flex; align-items: center; justify-content: center; border-radius: 50%; font-weight: 700; color: #fff; background: var(--primary); flex-shrink: 0; }
.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-md { width: 40px; height: 40px; font-size: 0.875rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1.125rem; }
.avatar-xl { width: 64px; height: 64px; font-size: 1.5rem; }
.avatar-xxl { width: 96px; height: 96px; font-size: 2.25rem; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* --- Chat/Messages --- */
.chat-container { min-height: 350px; max-height: 500px; overflow-y: auto; padding: 1rem; background: #f8fafc; scroll-behavior: smooth; }
.chat-bubble { max-width: 75%; padding: 0.75rem 1rem; border-radius: 1.25rem; font-size: 0.875rem; box-shadow: 0 1px 2px rgba(0,0,0,0.04); margin-bottom: 0.5rem; }
.chat-bubble.mine { margin-left: auto; background: var(--primary); color: #fff; border-bottom-right-radius: 0.25rem; }
.chat-bubble.theirs { margin-right: auto; background: #fff; color: #1e293b; border-bottom-left-radius: 0.25rem; border: 1px solid #f1f5f9; }
.chat-bubble .chat-time { font-size: 0.625rem; margin-top: 0.25rem; opacity: 0.7; }
.chat-bubble.mine .chat-time { color: rgba(255,255,255,0.7); }
.chat-bubble.voice-note { display: flex; align-items: center; gap: 0.75rem; }
.chat-bubble .voice-btn { background: none; border: none; cursor: pointer; color: inherit; font-size: 1.25rem; }
.invoice-card { background: #fffbeb; border: 2px solid #fbbf24; border-radius: 1rem; padding: 1.25rem; max-width: 80%; margin-bottom: 0.5rem; }
.invoice-card.mine { margin-left: auto; } .invoice-card.theirs { margin-right: auto; }
.invoice-card .invoice-label { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; color: #92400e; letter-spacing: 0.05em; }
.invoice-card .invoice-amount { font-size: 1.375rem; font-weight: 800; color: #0f172a; margin: 0.5rem 0; }
.chat-input-wrap { display: flex; gap: 0.5rem; padding: 1rem; background: #fff; border-top: 1px solid #f1f5f9; align-items: flex-end; }
.chat-input-wrap .form-input { border-radius: 9999px; }
.chat-input-wrap .btn { border-radius: 9999px; padding-left: 1.25rem; padding-right: 1.25rem; }
.chat-input-wrap .btn-voice {
    width: 44px; height: 44px; border-radius: 50%; background: #f1f5f9; border: none;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    color: #64748b; transition: all 0.2s; flex-shrink: 0;
}
.chat-input-wrap .btn-voice:hover { background: #e2e8f0; color: var(--primary); }
.chat-input-wrap .btn-voice.recording { background: #fecaca; color: #dc2626; animation: pulse-record 1s infinite; }
@keyframes pulse-record { 0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); } 50% { box-shadow: 0 0 0 8px rgba(220,38,38,0); } }

/* --- Breadcrumb --- */
.breadcrumb { font-size: 0.875rem; color: #64748b; margin-bottom: 1rem; display: flex; align-items: center; flex-wrap: wrap; gap: 0.25rem; }
.breadcrumb a { color: #64748b; } .breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { margin: 0 0.375rem; color: #cbd5e1; }

/* --- Pagination --- */
.pagination { display: flex; justify-content: center; gap: 0.375rem; margin-top: 2rem; flex-wrap: wrap; }
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px;
    padding: 0 0.75rem; border: 1px solid #e2e8f0; border-radius: 0.625rem; font-size: 0.875rem;
    color: #475569; background: #fff; text-decoration: none; font-weight: 500; transition: all 0.2s;
}
.pagination a:hover { background: #f8fafc; border-color: var(--primary); color: var(--primary); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* --- Category Pills --- */
.pill-group { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.pill {
    display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.5rem 1rem; border-radius: 9999px;
    font-size: 0.8125rem; font-weight: 500; background: #f1f5f9; color: #475569;
    text-decoration: none; transition: all 0.2s; border: 1px solid transparent;
}
.pill:hover { background: #e2e8f0; color: #0f172a; }
.pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* --- Footer --- */
.footer { background: #0f172a; color: #94a3b8; margin-top: 3rem; padding: 3rem 0 1.5rem; }
.footer h3, .footer h4 { color: #f1f5f9; }
.footer a { color: #94a3b8; font-size: 0.875rem; } .footer a:hover { color: #e2e8f0; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-bottom { border-top: 1px solid #1e293b; margin-top: 2rem; padding-top: 1.5rem; text-align: center; font-size: 0.8125rem; }
.footer-social { display: flex; gap: 0.75rem; margin-top: 1rem; }
.footer-social a {
    width: 36px; height: 36px; border-radius: 50%; background: #1e293b; color: #94a3b8;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.footer-social a:hover { background: var(--primary); color: #fff; }

/* --- CTA Banner --- */
.cta-banner { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; border-radius: 1.5rem; padding: 2.5rem; text-align: center; position: relative; overflow: hidden; }
.cta-banner::before { content: ''; position: absolute; top: -30%; right: -10%; width: 40%; height: 160%; background: rgba(255,255,255,0.05); border-radius: 50%; }
@media (min-width: 768px) { .cta-banner { padding: 3.5rem; } }
.cta-banner h2 { color: #fff; margin-bottom: 0.75rem; position: relative; }
.cta-banner p { opacity: 0.9; margin-bottom: 1.5rem; max-width: 480px; margin-left: auto; margin-right: auto; position: relative; }

/* --- Wallet Card --- */
.wallet-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; border-radius: 1.25rem; padding: 1.75rem; position: relative; overflow: hidden;
}
.wallet-card::before {
    content: ''; position: absolute; top: -30%; right: -15%; width: 50%; height: 160%;
    background: rgba(255,255,255,0.06); border-radius: 50%;
}
.wallet-card .wallet-label { font-size: 0.8125rem; opacity: 0.8; }
.wallet-card .wallet-balance { font-size: 2rem; font-weight: 800; margin: 0.375rem 0; position: relative; letter-spacing: -0.02em; }
.wallet-card .wallet-actions { display: flex; gap: 0.5rem; margin-top: 1rem; position: relative; }

/* Virtual Account Card */
.vaccount-card { background: rgba(255,255,255,0.12); border-radius: 0.75rem; padding: 1rem; margin-top: 1rem; position: relative; }
.vaccount-card .vaccount-label { font-size: 0.6875rem; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.08em; }
.vaccount-card .vaccount-number { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.08em; margin: 0.25rem 0; }
.vaccount-card .vaccount-bank { font-size: 0.8125rem; opacity: 0.85; }

/* --- Safety Tips --- */
.safety-box { background: #fffbeb; border-radius: 1rem; padding: 1.5rem; border: 1px solid #fde68a; }
.safety-box h3 { color: #92400e; font-size: 0.9375rem; margin-bottom: 0.5rem; }
.safety-box ul { font-size: 0.875rem; color: #92400e; }
.safety-box ul li { padding: 0.25rem 0; padding-left: 1.25rem; position: relative; }
.safety-box ul li::before { content: ''; position: absolute; left: 0; top: 0.6rem; width: 6px; height: 6px; border-radius: 50%; background: #f59e0b; }

/* --- Blog Article --- */
.article-content { line-height: 1.8; color: #334155; font-size: 1.0625rem; }
.article-content p { margin-bottom: 1.25rem; } .article-content h2 { margin: 2rem 0 0.75rem; } .article-content h3 { margin: 1.5rem 0 0.5rem; }
.article-content ul, .article-content ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.article-content ul { list-style: disc; } .article-content ol { list-style: decimal; } .article-content li { margin-bottom: 0.25rem; }
.article-content img { border-radius: 0.75rem; margin: 1rem 0; }
.article-content blockquote { border-left: 4px solid var(--primary); padding: 1rem 1.5rem; background: #f8fafc; border-radius: 0 0.5rem 0.5rem 0; margin: 1.5rem 0; color: #475569; font-style: italic; }

/* --- Aspect & Search --- */
.aspect-video { aspect-ratio: 16/10; overflow: hidden; background: #f1f5f9; }
.aspect-video img { width: 100%; height: 100%; object-fit: cover; }
.search-bar { display: flex; flex-direction: column; gap: 0.75rem; }
@media (min-width: 768px) { .search-bar { flex-direction: row; } }
.search-bar .form-input, .search-bar .form-select { flex: 1; }

/* --- Tabs --- */
.tab-group { display: flex; border-bottom: 2px solid #e2e8f0; gap: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tab {
    padding: 0.75rem 1.25rem; font-size: 0.875rem; font-weight: 600; color: #64748b;
    border-bottom: 2px solid transparent; margin-bottom: -2px; cursor: pointer; white-space: nowrap;
    background: none; border-top: none; border-left: none; border-right: none; transition: all 0.2s;
}
.tab:hover { color: #0f172a; } .tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; padding-top: 1.5rem; } .tab-content.active { display: block; }

/* --- Modal --- */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 300; align-items: center; justify-content: center; padding: 1rem; backdrop-filter: blur(4px); }
.modal-overlay.active { display: flex; }
.modal { background: #fff; border-radius: 1rem; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; animation: modal-in 0.25s ease; }
@keyframes modal-in { from { opacity: 0; transform: scale(0.95) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 1.5rem; border-bottom: 1px solid #f1f5f9; }
.modal-header h3 { font-size: 1.0625rem; }
.modal-close { width: 34px; height: 34px; border: none; background: #f1f5f9; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #64748b; font-size: 1.25rem; transition: all 0.2s; }
.modal-close:hover { background: #e2e8f0; color: #0f172a; }
.modal-body { padding: 1.5rem; }

/* --- Empty State --- */
.empty-state { text-align: center; padding: 3rem 1rem; }
.empty-state svg { width: 64px; height: 64px; margin: 0 auto 1rem; color: #cbd5e1; }
.empty-state h3 { color: #64748b; margin-bottom: 0.375rem; } .empty-state p { color: #94a3b8; }

/* --- Reviews & Stars --- */
.stars { display: flex; gap: 2px; }
.stars .star { color: #d1d5db; font-size: 1rem; }
.stars .star.active { color: #f59e0b; }
.review-item { padding: 1rem 0; border-bottom: 1px solid #f1f5f9; }
.review-item:last-child { border-bottom: none; }

/* --- Post List (Admin) --- */
.post-list-item { display: flex; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9; transition: background 0.15s; }
.post-list-item:hover { background: #f8fafc; } .post-list-item:last-child { border-bottom: none; }
.post-list-thumb { width: 64px; height: 48px; border-radius: 0.5rem; object-fit: cover; flex-shrink: 0; }
.post-list-thumb-placeholder { width: 64px; height: 48px; background: #f1f5f9; border-radius: 0.5rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #cbd5e1; }
.post-list-info { flex: 1; min-width: 0; }
.post-list-info a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- Notification Item --- */
.notif-item { display: flex; gap: 0.75rem; padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9; transition: background 0.15s; }
.notif-item:hover { background: #f8fafc; }
.notif-item.unread { background: #eff6ff; border-left: 3px solid var(--primary); }
.notif-icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.125rem; }

/* --- Verification Card --- */
.verify-card { background: linear-gradient(135deg, #fef3c7, #fef9c3); border: 1px solid #fde68a; border-radius: 1rem; padding: 1.5rem; }
.verify-card h3 { color: #92400e; } .verify-card p { color: #a16207; font-size: 0.875rem; }

/* --- Quill Editor --- */
.ql-toolbar { border-radius: 0.625rem 0.625rem 0 0 !important; border-color: #e2e8f0 !important; background: #f8fafc; }
.ql-container { border-radius: 0 0 0.625rem 0.625rem !important; border-color: #e2e8f0 !important; min-height: 200px; font-size: 0.9375rem; }
.ql-editor { min-height: 200px; }

/* --- Misc / Utility --- */
.hidden { display: none; } .block { display: block; } .inline { display: inline; }
.inline-block { display: inline-block; } .overflow-hidden { overflow: hidden; }
.relative { position: relative; } .sticky-sidebar { position: sticky; top: 76px; }
.w-full { width: 100%; } .max-w-full { max-width: 100%; }
.object-cover { object-fit: cover; } .object-contain { object-fit: contain; }
.cursor-pointer { cursor: pointer; } .no-underline { text-decoration: none; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.opacity-70 { opacity: 0.7; } .opacity-50 { opacity: 0.5; }
input[type="color"] { width: 48px; height: 40px; border: 1px solid #d1d5db; border-radius: 0.5rem; cursor: pointer; padding: 2px; }
input[type="file"] { width: 100%; padding: 0.5rem; border: 1.5px dashed #cbd5e1; border-radius: 0.625rem; font-size: 0.875rem; background: #f8fafc; cursor: pointer; transition: border-color 0.2s; }
input[type="file"]:hover { border-color: var(--primary); }

/* Skeleton loader */
.skeleton { background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%); background-size: 200% 100%; animation: skeleton-loading 1.5s infinite; border-radius: 0.5rem; }
@keyframes skeleton-loading { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Fade-in animation */
.fade-in { animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* --- Gradient Stat Cards --- */
.stat-card-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; }
.stat-card-success { background: linear-gradient(135deg, #059669, #047857); color: #fff; }
.stat-card-warning { background: linear-gradient(135deg, #d97706, #b45309); color: #fff; }
.stat-card-danger { background: linear-gradient(135deg, #dc2626, #b91c1c); color: #fff; }
.stat-card-purple { background: linear-gradient(135deg, #7c3aed, #6d28d9); color: #fff; }
.stat-number { font-size: 2rem; font-weight: 800; line-height: 1.2; }
.stat-label { font-size: 0.8125rem; opacity: 0.85; margin-top: 4px; }

/* --- Referral Page --- */
.referral-code-display { font-size: 1.5rem; font-weight: 800; letter-spacing: 3px; color: var(--primary); font-family: 'SF Mono', 'Fira Code', monospace; }
.share-btn-whatsapp { background: #25D366; color: #fff; }
.share-btn-whatsapp:hover { background: #1fa951; color: #fff; }
.share-btn-facebook { background: #1877F2; color: #fff; }
.share-btn-facebook:hover { background: #1562cc; color: #fff; }
.share-btn-twitter { background: #1DA1F2; color: #fff; }
.share-btn-twitter:hover { background: #1a8cd8; color: #fff; }

/* --- Avatar Initials --- */
.avatar-initials {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(var(--primary-rgb), 0.15);
    display: flex; align-items: center; justify-content: center;
    color: var(--primary); font-weight: 700; font-size: 0.875rem;
    flex-shrink: 0;
}
.avatar-md { width: 48px; height: 48px; font-size: 1.125rem; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.375rem; }
.avatar-img { border-radius: 50%; object-fit: cover; }

/* --- How it Works Steps --- */
.step-icon {
    width: 56px; height: 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 12px;
}
.step-icon-primary { background: rgba(var(--primary-rgb), 0.1); }
.step-icon-primary svg { stroke: var(--primary); }
.step-icon-success { background: rgba(5, 150, 105, 0.1); }
.step-icon-success svg { stroke: #059669; }
.step-icon-warning { background: rgba(217, 119, 6, 0.1); }
.step-icon-warning svg { stroke: #d97706; }

/* --- Info Alert Box --- */
.alert-info-primary {
    background: rgba(var(--primary-rgb), 0.07);
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 0.75rem; padding: 1rem;
    display: flex; gap: 0.75rem; align-items: flex-start;
}

/* --- Table Responsive --- */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* --- Print --- */
@media print { .navbar, .footer, .sidebar-menu, .sidebar-overlay { display: none !important; } }
