/* =====================================================
   AVRUPA ABONE - ADMIN PANEL CSS
   Premium Corporate Design v5.0
   ===================================================== */

/* ─── DESIGN TOKENS ──────────────────────────────── */
:root {
    /* Brand Colors - Refined */
    --primary: #0d9255;
    --primary-rgb: 13, 146, 85;
    --primary-dark: #087a47;
    --primary-light: #12b86a;
    --primary-glow: rgba(13, 146, 85, 0.15);

    --accent: #e8940e;
    --accent-rgb: 232, 148, 14;
    --accent-dark: #c47d0c;
    --accent-light: #f5b84d;

    /* Semantic Colors */
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.08);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.08);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.06);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.06);

    /* Surfaces - Warm undertone */
    --bg-body: #f0f2f5;
    --bg-card: #ffffff;
    --bg-hover: #f7f8fa;
    --bg-active: #eef0f4;
    --bg-deep: #f0f2f5;
    --bg-nav: #ffffff;
    --bg-elevated: #ffffff;

    /* Text */
    --text-main: #1a1d26;
    --text-secondary: #4a5068;
    --text-dim: #8b92a5;
    --text-inverse: #ffffff;

    /* Borders */
    --border: #e4e7ec;
    --border-light: #f0f1f4;
    --border-focus: rgba(13, 146, 85, 0.45);

    /* Shadows - Refined with color tints */
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(16,24,40,0.06), 0 1px 2px rgba(16,24,40,0.03);
    --shadow-md: 0 4px 8px -2px rgba(16,24,40,0.08), 0 2px 4px -2px rgba(16,24,40,0.04);
    --shadow-lg: 0 12px 24px -4px rgba(16,24,40,0.08), 0 4px 8px -2px rgba(16,24,40,0.03);
    --shadow-xl: 0 20px 40px -8px rgba(16,24,40,0.1), 0 8px 16px -4px rgba(16,24,40,0.04);
    --shadow-card: 0 1px 3px rgba(16,24,40,0.04), 0 0 0 1px rgba(0,0,0,0.02);
    --shadow-card-hover: 0 8px 24px -4px rgba(16,24,40,0.1), 0 0 0 1px rgba(13,146,85,0.08);
    --shadow-primary: 0 4px 14px rgba(13, 146, 85, 0.25);
    --shadow-accent: 0 4px 14px rgba(232, 148, 14, 0.2);

    /* Layout */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --nav-height: 60px;

    /* Glass */
    --glass: rgba(255, 255, 255, 0.98);

    /* Transitions */
    --transition-fast: 120ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-slow: 350ms cubic-bezier(0.25, 0.1, 0.25, 1);
    --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ─── RESET & BASE ───────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.006em;
}

.hidden { display: none !important; }
.show { display: block !important; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--primary-dark); }

::selection { background: rgba(var(--primary-rgb), 0.15); color: var(--text-main); }

/* ─── SCROLLBAR ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c1c7d0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a1a8b4; }

/* ─── ANIMATIONS ─────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.96) translateY(4px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes pulse-red {
    0%, 100% { border-color: rgba(239,68,68,0.15); box-shadow: 0 0 0 0 rgba(239,68,68,0.2); }
    50% { border-color: rgba(239,68,68,0.35); box-shadow: 0 0 0 6px rgba(239,68,68,0); }
}
@keyframes gentlePulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.animate-in { animation: fadeIn 0.3s ease forwards; }
.overdue-pulse { animation: pulse-red 2.5s infinite; border-width: 2px !important; }

/* ─── GRID SYSTEM ────────────────────────────────── */
.grid-cols-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.grid-cols-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid-cols-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.grid-cols-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.grid-cols-6 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }

/* ─── ADMIN LAYOUT ───────────────────────────────── */
.admin-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    background: var(--bg-body);
}

/* ─── TOP NAVIGATION ─────────────────────────────── */
.top-nav {
    background: var(--bg-nav);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    min-height: var(--nav-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    gap: 0.5rem;
    backdrop-filter: blur(12px);
}

.top-nav-brand {
    margin-right: 1.25rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.nav-logo-img {
    height: 34px;
    width: auto;
    object-fit: contain;
    transition: transform var(--transition-base);
}

.top-nav-brand:hover .nav-logo-img { transform: scale(1.04); }

.top-nav-brand h3 {
    color: var(--primary);
    font-size: 1.05rem;
    letter-spacing: 0.3px;
    margin: 0;
    font-weight: 800;
}

.top-nav-brand small {
    color: var(--text-dim);
    text-transform: uppercase;
    font-size: 8px;
    letter-spacing: 1.2px;
    margin-top: -1px;
    font-weight: 600;
}

/* ─── NAV LINKS ──────────────────────────────────── */
.top-nav-links {
    display: flex;
    gap: 2px;
    flex: 1;
    align-items: center;
    padding-left: 0.25rem;
    flex-wrap: wrap;
    overflow: visible;
}

.nav-link {
    padding: 0.45rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    white-space: nowrap;
    position: relative;
    line-height: 1.4;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary-glow);
    color: var(--primary);
    font-weight: 600;
}

/* ─── DROPDOWN MENU ──────────────────────────────── */
.nav-item.dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 1px;
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    animation: slideDown 0.18s ease forwards;
}

.nav-item.dropdown:hover .dropdown-menu { display: flex; }

/* Invisible bridge to keep hover continuous */
.nav-item.dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 10px;
}

.dropdown-item {
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    text-decoration: none;
}

.dropdown-item:hover {
    background: var(--primary-glow);
    color: var(--primary);
    padding-left: 1rem;
}

/* ─── NAV ACTIONS (RIGHT) ────────────────────────── */
.top-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
    margin-left: auto;
}

.user-display { display: flex; align-items: center; gap: 0.55rem; }

#user-display-name { font-weight: 600; font-size: 0.8rem; color: var(--text-main); }

#user-avatar-circle {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--text-inverse);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.78rem;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.2);
}

/* ─── GOOGLE TRANSLATE ───────────────────────────── */
.goog-te-gadget { font-family: inherit !important; font-size: 0 !important; }
.goog-te-gadget .goog-te-combo {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.75rem !important;
    font-weight: 600;
    padding: 0.3rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-hover);
    color: var(--text-secondary);
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition-fast);
}
.goog-te-gadget .goog-te-combo:hover { border-color: var(--primary); }
.goog-te-banner-frame { display: none !important; }
body { top: 0 !important; }
.skiptranslate iframe { display: none !important; }
.VIpgJd-ZVi9od-ORHb-OEVmcd { display: none !important; }

/* ─── MAIN CONTENT ───────────────────────────────── */
.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bg-body);
    min-width: 0;
}

.content-area {
    max-width: 100%;
    margin: 0 auto;
    padding: 1.25rem 1.75rem;
    width: 100%;
    overflow-x: hidden;
}

.top-bar-minimal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
}

#current-page-title {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: -0.3px;
    color: var(--text-main);
}

#breadcrumb { color: var(--text-dim); font-size: 0.78rem; font-weight: 500; }

/* ─── CARDS ──────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    margin-bottom: 1.15rem;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.card:hover { box-shadow: var(--shadow-card-hover); }

.accent-card { border-left: 3px solid var(--accent); }
.success-card { border-left: 3px solid var(--success); }
.warning-card { border-left: 3px solid var(--error); }
.info-card { border-left: 3px solid var(--info); }

/* ─── BUTTONS ────────────────────────────────────── */
.btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 0.8rem;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    line-height: 1.4;
    font-family: inherit;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--text-inverse);
    border-color: var(--primary-dark);
    box-shadow: 0 1px 2px rgba(var(--primary-rgb), 0.2);
}
.btn-primary:hover {
    box-shadow: var(--shadow-primary);
    transform: translateY(-1px);
    filter: brightness(1.05);
}

.btn-outline {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}
.btn-outline:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.06);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: var(--text-inverse);
    box-shadow: 0 1px 2px rgba(16,185,129,0.2);
}
.btn-success:hover { box-shadow: 0 4px 14px rgba(16,185,129,0.3); transform: translateY(-1px); }

.btn-warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: var(--text-inverse);
}
.btn-warning:hover { box-shadow: 0 4px 14px rgba(245,158,11,0.3); transform: translateY(-1px); }

.btn-ghost {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-dim);
}
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-main); }

.btn-outline-danger { background: transparent; border: 1px solid rgba(239,68,68,0.2); color: var(--error); }
.btn-outline-danger:hover { background: var(--error-bg); border-color: var(--error); box-shadow: 0 0 0 3px rgba(239,68,68,0.06); }

.btn-white { background: #fff; color: var(--text-main); border: 1px solid var(--border); }
.btn-white:hover { background: var(--bg-hover); box-shadow: var(--shadow-sm); }
.btn-outline-white { background: transparent; border: 1px solid rgba(255,255,255,0.25); color: #fff; }
.btn-outline-white:hover { background: rgba(255,255,255,0.08); }

.btn-block { display: flex; width: 100%; text-align: center; }
.btn-lg { padding: 0.65rem 1.4rem; font-size: 0.88rem; border-radius: var(--radius-md); }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.76rem; border-radius: var(--radius-sm); }
.btn-xs { padding: 0.2rem 0.45rem; font-size: 0.7rem; border-radius: var(--radius-xs); }

.btn-action-group { display: flex; gap: 0.35rem; width: 100%; }
.btn-icon-only {
    width: 34px; height: 34px; padding: 0;
    background: var(--bg-hover); border: 1px solid var(--border); color: var(--text-dim);
    border-radius: var(--radius-md);
}
.btn-icon-only:hover { background: var(--primary-glow); color: var(--primary); border-color: rgba(var(--primary-rgb), 0.2); }

/* ─── FORM CONTROLS ──────────────────────────────── */
.form-group { margin-bottom: 0.85rem; }

.form-input {
    width: 100%;
    padding: 0.55rem 0.8rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-main);
    margin-bottom: 0.65rem;
    outline: none;
    transition: all var(--transition-base);
    font-size: 0.84rem;
    font-family: inherit;
    line-height: 1.5;
}

.form-input:hover { border-color: #c8cdd5; }
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.1);
}

.form-input::placeholder { color: var(--text-dim); font-weight: 400; }
textarea.form-input { resize: vertical; min-height: 80px; }

select.form-input {
    background-color: var(--bg-card);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b92a5' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    padding-right: 2rem;
    appearance: none;
    -webkit-appearance: none;
}

select.form-input option { background-color: var(--bg-card); color: var(--text-main); padding: 8px; }

/* ─── TABLES ─────────────────────────────────────── */
table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 0.82rem;
}

thead th {
    text-align: left;
    padding: 0.6rem 0.8rem;
    color: var(--text-dim);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    border-bottom: 2px solid var(--border);
    background: var(--bg-hover);
    white-space: nowrap;
}

tbody td {
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-main);
    vertical-align: middle;
    line-height: 1.5;
}

tbody tr { transition: background var(--transition-fast); }
tbody tr:nth-child(even) { background: rgba(240, 242, 245, 0.4); }
tbody tr:hover td { background: rgba(var(--primary-rgb), 0.035) !important; }
tbody tr:last-child td { border-bottom: none; }

.hover-row:hover td { background: rgba(var(--primary-rgb), 0.04) !important; }
.dropdown-content a:hover { background: var(--bg-hover) !important; }
.dropdown-actions .btn:focus + .dropdown-content { display: block; }

/* ─── BADGES ─────────────────────────────────────── */
.badge {
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.2px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    line-height: 1.4;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: #b45309; }
.badge-danger { background: var(--error-bg); color: var(--error); }
.badge-pending { background: rgba(232,148,14,0.08); color: #92600a; }
.badge-outline { background: var(--bg-hover); color: var(--text-secondary); border: 1px solid var(--border); }
.badge-error { background: var(--error-bg); color: var(--error); }

/* ─── TAGS ───────────────────────────────────────── */
.tag {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: rgba(var(--primary-rgb), 0.04);
    color: var(--text-main);
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    padding: 0.2rem 0.55rem;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 600;
    margin: 0.15rem;
    transition: all var(--transition-fast);
}
.tag:hover { background: rgba(var(--primary-rgb), 0.08); }
.tag-primary { color: var(--primary); border-color: rgba(var(--primary-rgb), 0.15); }
.tag .remove {
    cursor: pointer; width: 15px; height: 15px; border-radius: 50%;
    background: rgba(0,0,0,0.05); display: flex; align-items: center;
    justify-content: center; font-size: 9px; transition: all var(--transition-fast);
}
.tag .remove:hover { background: var(--error); color: white; }
.tag-primary .remove { background: rgba(var(--primary-rgb), 0.1); color: var(--primary); }
#active-filters-bar { border: 1px dashed var(--border) !important; background: rgba(var(--primary-rgb), 0.015) !important; }

/* ─── STATS ──────────────────────────────────────── */
.stats-label {
    color: var(--text-dim);
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
}

.stats-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    margin-top: 0.3rem;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px; height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.stat-card:hover {
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-2px);
}
.stat-card:hover::before { opacity: 1; }

.stat-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; flex-shrink: 0;
}

.stat-content { display: flex; flex-direction: column; min-width: 0; }
.stat-content small {
    color: var(--text-dim);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    font-weight: 600;
    margin-bottom: 0.1rem;
}
.stat-content h3 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.66rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.6px; color: var(--text-dim); margin-bottom: 0.1rem;
}
.stat-card .stat-value {
    font-size: 1.5rem; font-weight: 800; color: var(--text-main);
    line-height: 1.15; letter-spacing: -0.3px;
}

/* ─── CUSTOMER PANEL STATS ───────────────────────── */
.stats-card { display: flex; align-items: center; gap: 1rem; padding: 1.15rem 1.4rem; }
.stats-card-vertical {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 0.15rem; padding: 1rem 1.15rem !important;
}
.stats-card-vertical .stats-value {
    font-size: 1.4rem; font-weight: 800; margin-top: 0.1rem;
    letter-spacing: -0.3px; display: block; line-height: 1.2;
}
.card-icon {
    width: 42px; height: 42px; border-radius: var(--radius-md);
    background: rgba(var(--primary-rgb), 0.06);
    display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}

/* ─── MODALS ─────────────────────────────────────── */
.login-overlay, .modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(10px);
    display: flex; justify-content: center; align-items: center;
    z-index: 10000; padding: 20px;
}

.login-card, .modal-card {
    background: var(--bg-card);
    padding: 2.25rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    width: 100%; max-width: 460px; max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    position: relative;
    animation: fadeInScale 0.3s ease;
}
.modal-card { max-width: 900px; }

.login-header h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.3rem; color: var(--text-main); }
.login-header p { color: var(--text-secondary); margin-bottom: 1.75rem; font-size: 0.88rem; }

.modal-close {
    position: absolute; top: 1rem; right: 1rem;
    background: var(--bg-hover); border: 1px solid var(--border);
    color: var(--text-dim); width: 32px; height: 32px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    font-size: 1rem; transition: all var(--transition-fast);
}
.modal-close:hover { background: var(--error-bg); color: var(--error); border-color: rgba(239,68,68,0.15); }

.error-msg { color: var(--error); font-size: 0.84rem; }

/* ─── PROGRESS BAR ───────────────────────────────── */
.progress-container {
    background: var(--bg-active); height: 5px; border-radius: 3px;
    margin-top: 8px; overflow: hidden;
}
.progress-bar {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    height: 100%; border-radius: 3px; transition: width 0.6s ease;
}

/* ─── CLICKABLE CARDS ────────────────────────────── */
.clickable { cursor: pointer; transition: all var(--transition-base); }
.clickable:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); border-color: rgba(var(--primary-rgb), 0.15); }

/* ─── REGIONS ────────────────────────────────────── */
.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 1.25rem; margin-top: 0.85rem;
}

.region-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    cursor: pointer;
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between;
    box-shadow: var(--shadow-card);
}

.region-card::before {
    content: '';
    position: absolute; top: 0; left: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity var(--transition-base);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.region-card:hover::before { opacity: 1; }
.region-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(var(--primary-rgb), 0.12);
}

.region-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.region-name { font-size: 1.2rem; font-weight: 800; color: var(--text-main); }
.region-status {
    font-size: 0.68rem; padding: 0.15rem 0.55rem;
    background: var(--success-bg); color: var(--success);
    border-radius: 20px; font-weight: 700;
}

.region-charts { display: flex; justify-content: space-around; margin-bottom: 1.25rem; }
.chart-item { text-align: center; }
.chart-item label { display: block; font-size: 0.68rem; color: var(--text-dim); margin-top: 0.35rem; font-weight: 600; }

.circular-progress {
    width: 76px; height: 76px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    position: relative; box-shadow: inset 0 0 6px rgba(0,0,0,0.06);
}

.inner-circle {
    width: 62px; height: 62px;
    background: var(--bg-card); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 0.88rem; color: var(--text-main);
    box-shadow: var(--shadow-xs);
}

.region-stats {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.65rem;
    padding: 0.85rem 0; border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light); margin-bottom: 0.85rem;
}

.stat-box { text-align: center; }
.stat-val { display: block; font-size: 1.2rem; font-weight: 800; color: var(--primary); }
.stat-label { font-size: 0.66rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; }

.region-info-footer { font-size: 0.78rem; color: var(--text-secondary); }
.info-row { margin-bottom: 0.3rem; display: flex; gap: 0.35rem; }
.info-row strong { color: var(--text-main); min-width: 42px; }

/* ─── REPORT STYLES ──────────────────────────────── */
.report-filter-bar {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 1.15rem 1.35rem;
    margin-bottom: 1.15rem; box-shadow: var(--shadow-card);
}
.report-filter-bar .filter-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.report-filter-bar .form-group { margin: 0; flex: 1; min-width: 130px; }
.report-filter-bar label {
    font-size: 0.66rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.6px; color: var(--text-dim); display: block; margin-bottom: 0.25rem;
}
.report-filter-bar .form-input { margin-bottom: 0; background: var(--bg-hover); font-size: 0.82rem; }
.report-filter-bar .form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.08); }

.rep-table thead th {
    background: var(--bg-hover); color: var(--text-dim);
    font-size: 0.66rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.6px; padding: 0.65rem 0.85rem; border-bottom: 2px solid var(--border);
}
.rep-table tbody td {
    padding: 0.65rem 0.85rem; color: var(--text-main);
    font-size: 0.82rem; border-bottom: 1px solid var(--border-light); vertical-align: middle;
}
.rep-table tbody tr:hover td { background: rgba(var(--primary-rgb), 0.025); }
.rep-table tbody tr:last-child td { border-bottom: none; }

.report-tab-btn {
    padding: 0.45rem 0.9rem; border-radius: 20px;
    border: 1px solid var(--border); background: transparent;
    color: var(--text-dim); font-weight: 600; font-size: 0.8rem;
    cursor: pointer; transition: all var(--transition-base); font-family: inherit;
}
.report-tab-btn:hover { background: var(--primary-glow); color: var(--primary); border-color: rgba(var(--primary-rgb), 0.15); }
.report-tab-btn.active {
    background: var(--primary); color: var(--text-inverse); border-color: var(--primary);
    box-shadow: var(--shadow-primary);
}

/* ─── CUSTOMER PANEL ─────────────────────────────── */
.welcome-banner-modern {
    background: linear-gradient(135deg, var(--primary) 0%, #0d7c5a 50%, #065f46 100%);
    padding: 2.25rem;
    border-radius: var(--radius-xl);
    color: var(--text-inverse);
    margin-bottom: 1.75rem;
    display: flex; justify-content: space-between; align-items: center;
    position: relative; overflow: hidden;
    box-shadow: 0 8px 30px rgba(var(--primary-rgb), 0.2);
}

.welcome-banner-modern::after {
    content: '';
    position: absolute; right: -30px; top: -30px;
    width: 160px; height: 160px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.welcome-banner-modern::before {
    content: '';
    position: absolute; right: 80px; bottom: -50px;
    width: 120px; height: 120px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}

.banner-content h1 { font-size: 1.85rem; font-weight: 800; margin-bottom: 0.3rem; letter-spacing: -0.5px; }
.banner-content p { font-size: 0.95rem; opacity: 0.8; margin-bottom: 1.35rem; }
.banner-actions { display: flex; gap: 0.65rem; }

.banner-stats { display: flex; gap: 1.25rem; text-align: right; }
.mini-stat {
    background: rgba(0,0,0,0.12); padding: 0.85rem 1.25rem;
    border-radius: var(--radius-lg); backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.05);
}
.mini-stat .label { display: block; font-size: 0.65rem; text-transform: uppercase; opacity: 0.7; margin-bottom: 0.15rem; font-weight: 700; letter-spacing: 0.3px; }
.mini-stat .value { font-size: 1.35rem; font-weight: 800; }

/* Rep Banner */
.welcome-banner-rep {
    background: linear-gradient(135deg, var(--primary) 0%, #1e5c36 100%);
    color: white; border-radius: var(--radius-lg);
    padding: 1.6rem 1.85rem; margin-bottom: 1.35rem;
    position: relative; overflow: hidden;
    box-shadow: 0 6px 20px rgba(var(--primary-rgb), 0.15);
}
.welcome-banner-rep::before {
    content: ''; position: absolute; right: -25px; top: -25px;
    width: 130px; height: 130px;
    background: rgba(255,255,255,0.05); border-radius: 50%;
}

/* Subscription Cards */
.subscription-card-modern {
    display: flex; flex-direction: column; padding: 1.35rem;
    border-radius: var(--radius-lg);
    background: var(--bg-card); border: 1px solid var(--border);
    transition: all var(--transition-base); box-shadow: var(--shadow-card);
}
.subscription-card-modern:hover { box-shadow: var(--shadow-card-hover); border-color: rgba(var(--primary-rgb), 0.15); }
.sub-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.35rem; }
.sub-id { color: var(--text-dim); font-size: 0.73rem; font-weight: 600; }
.sub-title { font-size: 1.05rem; margin-top: 0.12rem; font-weight: 700; }
.sub-body { display: flex; gap: 1.75rem; align-items: center; flex-wrap: wrap; }
.sub-detail { display: flex; flex-direction: column; }
.sub-detail .label { font-size: 0.64rem; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.12rem; font-weight: 700; letter-spacing: 0.4px; }
.sub-detail .value { font-size: 0.88rem; font-weight: 600; }
.sub-actions { margin-left: auto; display: flex; gap: 0.6rem; }

/* Profile */
.profile-nav-btn {
    text-align: left; justify-content: flex-start;
    padding: 0.65rem 1.1rem; border-radius: var(--radius-md);
    border: 1px solid transparent; color: var(--text-secondary); background: transparent;
    transition: all var(--transition-base);
}
.profile-nav-btn:hover { background: var(--primary-glow); color: var(--primary); border-color: rgba(var(--primary-rgb), 0.08); }
.profile-nav-btn.active { background: var(--primary-glow); border-color: var(--primary); color: var(--primary); font-weight: 600; }

.payment-method-card {
    transition: all var(--transition-base);
    background: var(--bg-card); border: 1px solid var(--border);
}
.payment-method-card:hover { border-color: var(--primary) !important; background: rgba(var(--primary-rgb), 0.02) !important; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.profile-tab { animation: fadeIn 0.25s ease forwards; }

/* ─── NOTIFICATIONS ──────────────────────────────── */
#notif-dropdown {
    background: var(--bg-card) !important;
    color: var(--text-main) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-xl) !important;
}
#notif-list { background: var(--bg-card) !important; }

/* ─── CASH BANNER ────────────────────────────────── */
.cash-pending-banner {
    background: rgba(var(--accent-rgb), 0.05);
    border: 1px solid rgba(var(--accent-rgb), 0.15);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1.15rem;
    color: var(--text-main);
    display: flex; align-items: center; gap: 0.65rem;
    margin-bottom: 1.15rem;
}

/* ─── CHART ──────────────────────────────────────── */
.chart-container {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.15rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-card);
}

/* ─── SCROLLABLE TABLES ──────────────────────────── */
.table-responsive {
    display: block; width: 100%; max-width: 100%;
    overflow-x: auto !important; overflow-y: auto;
    max-height: 65vh;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    scrollbar-width: thin;
    scrollbar-color: #c1c7d0 var(--bg-hover);
}
.table-responsive::-webkit-scrollbar { height: 6px; width: 6px; }
.table-responsive::-webkit-scrollbar-track { background: var(--bg-hover); border-radius: 3px; }
.table-responsive::-webkit-scrollbar-thumb { background-color: #c1c7d0; border-radius: 3px; }
.table-responsive::-webkit-scrollbar-thumb:hover { background-color: #a1a8b4; }

.table-responsive table { width: 100% !important; border-collapse: collapse !important; }
.table-responsive th {
    position: sticky !important; top: 0 !important;
    background: var(--bg-hover) !important;
    z-index: 10 !important;
    box-shadow: inset 0 -2px 0 var(--border);
}

/* ─── HOME / HERO (SHARED) ───────────────────────── */
.home-layout {
    height: 100vh; overflow-y: auto;
    background: radial-gradient(circle at 0% 0%, #1e293b 0%, #020617 100%);
}

.site-header {
    padding: 1rem 0; border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 100;
}
.container {
    max-width: 1600px; margin: 0 auto; padding: 0 2rem;
    display: flex; justify-content: space-between; align-items: center;
}

.hero-section { padding: 5rem 2rem 3rem; text-align: center; }
.hero-badge {
    background: rgba(var(--accent-rgb), 0.08); color: var(--primary);
    padding: 5px 12px; border-radius: 20px; font-size: 0.73rem;
    font-weight: 700; margin-bottom: 1.15rem; display: inline-block;
    border: 1px solid rgba(var(--accent-rgb), 0.12);
}
.hero-section h1 {
    font-size: 3.2rem; font-weight: 800; margin-bottom: 1.15rem;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    letter-spacing: -1px;
}
.hero-section p { font-size: 1.1rem; color: var(--text-dim); max-width: 660px; margin: 0 auto 2.25rem; }
.hero-image {
    max-width: 860px; width: 100%;
    border-radius: 1.75rem; box-shadow: 0 20px 50px rgba(0,0,0,0.4);
    border: 1px solid var(--border); margin-top: 2.5rem;
}

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; padding: 3rem 2rem; max-width: 1200px; margin: 0 auto; }
.feature-card {
    background: var(--bg-card); padding: 1.75rem; border-radius: var(--radius-xl);
    border: 1px solid var(--border); transition: all var(--transition-base);
}
.feature-card:hover { border-color: rgba(var(--primary-rgb), 0.15); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature-icon { font-size: 1.6rem; margin-bottom: 0.65rem; display: block; }

/* ─── PRODUCT CARDS ──────────────────────────────── */
.product-card-modern {
    width: 225px; flex-shrink: 0;
    background: var(--bg-card); border-radius: var(--radius-lg);
    overflow: hidden; border: 1px solid var(--border);
    transition: all var(--transition-base);
    cursor: pointer; position: relative; box-shadow: var(--shadow-card);
}
.product-card-modern:hover { transform: translateY(-4px); box-shadow: var(--shadow-xl); border-color: rgba(var(--accent-rgb), 0.2); }
.product-card-modern img { width: 100%; height: 290px; object-fit: cover; transition: transform 0.5s ease; }
.product-card-modern:hover img { transform: scale(1.03); }
.product-overlay { padding: 0.9rem; background: var(--bg-card); }
.product-overlay h3 {
    font-size: 0.88rem; font-weight: 700; margin: 0.35rem 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-main);
}
.product-price-tag {
    background: var(--primary); color: white;
    padding: 0.18rem 0.55rem; border-radius: var(--radius-sm);
    font-weight: 700; font-size: 0.82rem; display: inline-block;
}

.section-divider {
    display: flex; justify-content: space-between; align-items: center;
    margin: 2.5rem 0 1.15rem; border-left: 3px solid var(--accent); padding-left: 0.75rem;
}
.section-divider h2 { font-size: 1.4rem; font-weight: 800; color: var(--text-main); }

.campaign-banner {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08) 0%, rgba(var(--primary-rgb), 0.25) 100%);
    border-radius: var(--radius-xl); padding: 2.25rem;
    display: flex; align-items: center; justify-content: space-between;
    margin: 1.75rem 0; position: relative; overflow: hidden;
    box-shadow: var(--shadow-md); border: 1px solid rgba(var(--primary-rgb), 0.1);
}
.campaign-content { z-index: 2; max-width: 60%; }
.campaign-image {
    position: absolute; right: 25px; top: 50%; transform: translateY(-50%);
    height: 125%; filter: drop-shadow(0 12px 20px rgba(0,0,0,0.2));
}

/* ─── SCROLL TRACKS ──────────────────────────────── */
.auto-scroll-container { width: 100%; overflow: hidden; padding: 1rem 0 2.25rem; position: relative; }
.full-width-scroll {
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}
.static-products-container { padding: 1rem 0 2.25rem; overflow: visible; }
.static-track { display: flex; gap: 1.15rem; flex-wrap: wrap; }
.scroll-track { display: flex; gap: 1.15rem; width: max-content; animation: marquee 120s linear infinite; }
.scroll-track:hover { animation-play-state: paused; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes slideOut { from { transform: translateX(0); opacity: 1; } to { transform: translateX(100%); opacity: 0; } }

/* ─── UTILITIES ──────────────────────────────────── */
.mt-2 { margin-top: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }

/* ─── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 1200px) {
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-5 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 992px) {
    .grid-cols-2, .grid-cols-3, .grid-cols-4, .grid-cols-5, .grid-cols-6, .region-grid {
        grid-template-columns: 1fr !important;
    }

    .top-nav {
        padding: 0.45rem 0.85rem;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .top-nav-links {
        width: 100%;
        overflow-x: auto;
        overflow-y: visible;
        flex-wrap: nowrap;
        padding-bottom: 0.3rem;
        -webkit-overflow-scrolling: touch;
        gap: 2px;
        scrollbar-width: none;
    }
    .top-nav-links::-webkit-scrollbar { display: none; }

    .nav-item.dropdown .dropdown-menu {
        position: fixed;
        top: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .top-nav-actions { width: auto; justify-content: flex-end; }
    .content-area { padding: 0.85rem; }
    .card { padding: 1.05rem; }

    .welcome-banner-modern {
        padding: 1.35rem;
        flex-direction: column;
        text-align: center;
        gap: 1.1rem;
    }
    .welcome-banner-modern::after, .welcome-banner-modern::before { display: none; }
    .banner-content h1 { font-size: 1.4rem; }

    .top-bar-minimal { flex-direction: column; gap: 0.65rem; align-items: flex-start; }
    .btn-action-group { flex-wrap: wrap; }
    table th, table td { padding: 0.5rem 0.6rem; font-size: 0.76rem; }
}

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-card { padding: 0.8rem; gap: 0.55rem; }
    .stats-value { font-size: 1.4rem; }
    .modal-card { border-radius: var(--radius-lg); padding: 1.15rem; }
    .banner-stats { flex-direction: column; gap: 0.65rem; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .grid-cols-2 { grid-template-columns: 1fr !important; }
    .content-area { padding: 0.65rem; }
    #current-page-title { font-size: 1.15rem; }
}
