/* ============================================================
   Indian Plaza CRM — Design System
   No Bootstrap. No Tailwind. Custom CSS only.
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
    --primary:       #000000;
    --white:         #ffffff;
    --sidebar-width: 220px;
    --topbar-height: 56px;

    --gray-50:  #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    --font:       'Segoe UI', system-ui, -apple-system, sans-serif;
    --shadow-sm:  0 1px 2px rgba(0,0,0,0.05);
    --shadow-md:  0 4px 6px -1px rgba(0,0,0,0.07);
    --shadow-lg:  0 10px 15px -3px rgba(0,0,0,0.08);
    --radius:     10px;
    --radius-sm:  8px;
    --radius-xs:  6px;
    --transition: all 0.15s ease;
}

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

body {
    font-family: var(--font);
    font-size: 0.9375rem;
    color: var(--gray-900);
    background: #f8f9fa;
    line-height: 1.5;
}

a { text-decoration: none; color: inherit; }

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ── Topbar ─────────────────────────────────────────────────── */
.topbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--topbar-height);
    background: var(--primary);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
}

.topbar-brand {
    display: flex; align-items: center; gap: 10px;
    color: var(--white);
    font-weight: 700; font-size: 0.9375rem;
}

.topbar-brand img {
    width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
}

.hamburger-btn {
    background: none; border: none; cursor: pointer;
    color: var(--white); display: flex; align-items: center; padding: 4px;
}

.hamburger-btn i { width: 20px; height: 20px; }

.topbar-right { display: flex; align-items: center; gap: 16px; }

.topbar-user { text-align: right; }
.topbar-user-name { color: var(--white); font-size: 0.8125rem; font-weight: 600; display: block; }
.topbar-user-role { color: var(--gray-400); font-size: 0.6875rem; display: block; text-transform: capitalize; }

.topbar-logout {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 12px;
    border: 1.5px solid rgba(255,255,255,0.25);
    border-radius: var(--radius-xs);
    color: var(--white); font-size: 0.8125rem; font-weight: 500;
    cursor: pointer; background: transparent;
    transition: var(--transition);
}

.topbar-logout:hover { border-color: rgba(255,255,255,0.6); }
.topbar-logout i { width: 14px; height: 14px; }

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
    position: fixed; top: var(--topbar-height); left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--topbar-height));
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    overflow-y: auto; padding: 16px 0;
    z-index: 90;
    transition: transform 0.25s ease;
}

.sidebar-label {
    padding: 16px 20px 6px;
    font-size: 0.6875rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--gray-400);
}

.sidebar-menu { list-style: none; padding: 0 8px; }

.sidebar-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px;
    color: var(--gray-600); font-size: 0.8125rem; font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sidebar-menu a i { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-menu a:hover { background: var(--gray-50); color: var(--gray-900); }
.sidebar-menu a.active { background: var(--primary); color: var(--white); font-weight: 600; }

.notif-dot {
    width: 8px; height: 8px; min-width: 8px;
    background: #ef4444; border-radius: 50%;
    margin-left: auto; flex-shrink: 0;
}

.sidebar-menu a.active .notif-dot { background: var(--white); opacity: 0.85; }

.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.4); z-index: 89;
}

.sidebar-overlay.active { display: block; }

@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.sidebar-open { transform: translateX(0); }
    .main-content { margin-left: 0 !important; }
}

/* ── Main Content ────────────────────────────────────────────── */
.main-content {
    margin-top: var(--topbar-height);
    margin-left: var(--sidebar-width);
    min-height: calc(100vh - var(--topbar-height));
    padding: 28px 32px;
    background: #f8f9fa;
}

/* ── Page Header ─────────────────────────────────────────────── */
.page-header { margin-bottom: 24px; }

.page-title {
    font-size: 1.375rem; font-weight: 700; color: var(--gray-900);
    display: flex; align-items: center; gap: 8px;
}

.page-title i { width: 22px; height: 22px; }

.page-subtitle { font-size: 0.875rem; color: var(--gray-500); margin-top: 3px; }

.page-subtitle a {
    color: var(--gray-500);
    display: inline-flex; align-items: center; gap: 4px;
    transition: color 0.15s;
}

.page-subtitle a:hover { color: var(--gray-900); }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}

.card-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600; font-size: 0.875rem; color: var(--gray-700);
    display: flex; align-items: center; justify-content: space-between;
}

.card-body   { padding: 20px; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--gray-200); background: var(--gray-50); }

/* Stat cards */
.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px; margin-bottom: 24px;
}

.stat-card {
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius); padding: 20px;
    position: relative; overflow: hidden;
}

.stat-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--primary);
}

.stat-card .stat-icon {
    width: 40px; height: 40px;
    background: var(--gray-100); border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px;
}

.stat-card .stat-icon i { width: 18px; height: 18px; color: var(--gray-600); }
.stat-card .stat-number  { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; }
.stat-card .stat-label   { font-size: 0.75rem; color: var(--gray-500); font-weight: 500; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 18px;
    font-size: 0.8125rem; font-weight: 600; font-family: var(--font);
    border-radius: var(--radius-xs); border: 1px solid transparent;
    cursor: pointer; text-decoration: none;
    transition: var(--transition); white-space: nowrap; line-height: 1.4;
}

.btn i { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary   { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-primary:hover { background: var(--gray-800); }

.btn-secondary { background: var(--white); color: var(--gray-700); border-color: var(--gray-300); }
.btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-400); }

.btn-danger    { background: var(--white); color: var(--gray-600); border-color: var(--gray-300); }
.btn-danger:hover { background: var(--gray-900); color: var(--white); border-color: var(--gray-900); }

.btn-sm    { padding: 5px 10px; font-size: 0.75rem; border-radius: 4px; }
.btn-lg    { padding: 11px 24px; font-size: 0.9375rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Tables ──────────────────────────────────────────────────── */
.table-container { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; }

.table th {
    font-size: 0.6875rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--gray-500); background: var(--gray-50);
    padding: 12px 16px; text-align: left;
}

.table td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.8125rem; vertical-align: middle;
}

.table tbody tr:hover { background: var(--gray-50); }
.table tbody tr:last-child td { border-bottom: none; }

/* ── Forms ───────────────────────────────────────────────────── */
.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-group  { margin-bottom: 16px; }
.form-group.mb-0 { margin-bottom: 0; }

.form-label {
    display: block; font-weight: 600; font-size: 0.8125rem;
    color: var(--gray-700); margin-bottom: 5px;
}

.form-label.required::after { content: " *"; color: var(--gray-400); font-weight: 400; }

.form-input, .form-select, .form-textarea {
    width: 100%; padding: 9px 12px;
    font-size: 0.875rem; font-family: var(--font);
    color: var(--gray-900); background: var(--white);
    border: 1px solid var(--gray-300); border-radius: var(--radius-xs);
    outline: none; transition: var(--transition); appearance: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,0,0,0.05);
}

.form-input::placeholder, .form-textarea::placeholder { color: var(--gray-400); }
.form-textarea { min-height: 80px; resize: vertical; }
.form-hint { font-size: 0.8rem; color: var(--gray-500); margin-top: 4px; }

/* ── Alerts / Flash ──────────────────────────────────────────── */
.alert {
    padding: 12px 16px; border-radius: var(--radius-xs);
    font-size: 0.875rem; font-weight: 500;
    margin-bottom: 16px;
    display: flex; align-items: center; gap: 8px;
}

.alert i { width: 16px; height: 16px; flex-shrink: 0; }

.alert-success { background: var(--gray-900); color: var(--white); }
.alert-error   { background: var(--white); color: var(--gray-900); border: 1.5px solid var(--gray-900); }
.alert-info    { background: var(--gray-100); color: var(--gray-700); border: 1px solid var(--gray-200); }

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center;
    padding: 2px 8px;
    font-size: 0.625rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.04em;
    border-radius: 4px;
    background: var(--gray-100); color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.num-badge {
    padding: 2px 10px; font-size: 0.75rem; font-weight: 700;
    background: var(--gray-900); color: var(--white);
    border-radius: 4px; font-family: monospace;
}

.badge-admin   { background: var(--gray-900); color: var(--white); border-color: var(--gray-900); }
.badge-staff   { background: var(--gray-500); color: var(--white); border-color: var(--gray-500); }
.badge-danger  { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }

.status-active {
    display: inline-flex; align-items: center; gap: 5px;
    color: #16a34a; font-size: 0.8125rem; font-weight: 500;
}

.status-active::before {
    content: ''; width: 7px; height: 7px;
    background: #16a34a; border-radius: 50%; flex-shrink: 0;
}

.status-inactive {
    display: inline-flex; align-items: center; gap: 5px;
    color: var(--gray-500); font-size: 0.8125rem; font-weight: 500;
}

.status-inactive::before {
    content: ''; width: 7px; height: 7px;
    background: var(--gray-400); border-radius: 50%; flex-shrink: 0;
}

.badge-login, .badge-logout { background: var(--gray-100); color: var(--gray-600); border-color: var(--gray-200); }
.badge-create  { background: #dcfce7; color: #15803d; border-color: #bbf7d0; }
.badge-update  { background: #dbeafe; color: #1d4ed8; border-color: #bfdbfe; }
.badge-delete  { background: #fee2e2; color: #dc2626; border-color: #fecaca; }
.badge-sales   { background: #ede9fe; color: #5b21b6; border-color: #ddd6fe; }
.badge-module  { background: #ffedd5; color: #c2410c; border-color: #fed7aa; }

/* ── Pagination ──────────────────────────────────────────────── */
.pagination { display: flex; gap: 4px; justify-content: center; align-items: center; padding: 4px 0; }

.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 32px; height: 32px; padding: 0 8px;
    font-size: 0.875rem; border-radius: var(--radius-xs);
    border: 1px solid var(--gray-200); color: var(--gray-700);
    background: var(--white); transition: var(--transition);
}

.pagination a:hover { background: var(--gray-100); border-color: var(--gray-300); }
.pagination span[aria-current] {
    background: var(--primary); color: var(--white);
    border-color: var(--primary); font-weight: 600;
}

/* ── Auth Layout ─────────────────────────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary); padding: 20px;
}

.auth-card {
    width: 100%; max-width: 420px;
    background: var(--white); border-radius: 14px;
    padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.auth-header { text-align: center; margin-bottom: 28px; }

.auth-logo {
    width: 48px; height: 48px;
    background: var(--primary); border-radius: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
}

.auth-logo i { width: 24px; height: 24px; color: var(--white); }

.auth-header h1 { font-size: 1.1875rem; font-weight: 700; color: var(--gray-900); margin-bottom: 4px; }
.auth-header p  { font-size: 0.875rem; color: var(--gray-500); }

/* ── Utilities ───────────────────────────────────────────────── */
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }

.d-flex          { display: flex; }
.align-center    { align-items: center; }
.align-end       { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.flex-wrap       { flex-wrap: wrap; }
.gap-2           { gap: 8px; }

.text-muted  { color: var(--gray-500); }
.text-center { text-align: center; }

.row       { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.col-md-4  { grid-column: span 4; }
.col-md-5  { grid-column: span 5; }
.col-md-6  { grid-column: span 6; }
.col-md-7  { grid-column: span 7; }
.col-md-8  { grid-column: span 8; }
.col-md-12 { grid-column: span 12; }

@media (max-width: 768px) {
    .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8 { grid-column: span 12; }
    .main-content          { padding: 16px; }
    .form-grid-2, .form-grid-3 { grid-template-columns: 1fr; }
}

/* ── Danger Zone ─────────────────────────────────────────────── */
.danger-zone { border-color: #fca5a5; }
.danger-zone .card-header { background: #fff5f5; color: #991b1b; border-bottom-color: #fca5a5; }

/* ── Detail Table ────────────────────────────────────────────── */
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table td { padding: 10px 0; border-bottom: 1px solid var(--gray-100); font-size: 0.875rem; vertical-align: top; }
.detail-table td:first-child { width: 35%; color: var(--gray-500); font-weight: 500; padding-right: 16px; }
.detail-table tr:last-child td { border-bottom: none; }

/* ── Result Bar ──────────────────────────────────────────────── */
.result-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.result-count { font-size: 0.875rem; color: var(--gray-500); }

/* ── Password Toggle ─────────────────────────────────────────── */
.input-wrapper { position: relative; }
.input-wrapper .form-input { padding-right: 40px; }
.eye-btn {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    color: var(--gray-400); display: flex; align-items: center;
}
.eye-btn i { width: 16px; height: 16px; }

/* ── Fade In ─────────────────────────────────────────────────── */
.fade-in { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ── Checkboxes ──────────────────────────────────────────────── */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }

.checkbox-label {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 10px;
    border: 1px solid var(--gray-200); border-radius: var(--radius-xs);
    font-size: 0.8125rem; font-weight: 500; color: var(--gray-700);
    cursor: pointer; transition: var(--transition); background: var(--white);
}

.checkbox-label:hover { border-color: var(--gray-400); background: var(--gray-50); }

.checkbox-label input[type="checkbox"] { accent-color: var(--primary); width: 14px; height: 14px; }

/* ── Sales Module ────────────────────────────────────────────── */
:root {
    --sales-accent: #f97316;
    --sales-accent-light: #fff7ed;
    --sales-accent-border: #fed7aa;
    --sales-green: #16a34a;
    --sales-red: #dc2626;
    --sales-blue: #2563eb;
    --sales-teal: #0d9488;
}

/* --- Login --- */
.sales-login-bg {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary); padding: 20px;
}
.sales-login-card {
    width: 100%; max-width: 400px;
    background: var(--white); border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.35);
}
.sales-login-icon {
    width: 56px; height: 56px;
    background: var(--sales-accent-light); border: 1.5px solid var(--sales-accent-border);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 18px;
}
.sales-login-icon i { width: 26px; height: 26px; color: var(--sales-accent); }

/* --- KPI Stats --- */
.sales-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px; margin-bottom: 24px;
}
.sales-kpi {
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius); padding: 20px 20px 16px;
    position: relative; overflow: hidden;
}
.sales-kpi::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--sales-accent);
}
.sales-kpi-icon {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 12px; flex-shrink: 0;
}
.sales-kpi-icon i { width: 18px; height: 18px; }
.sales-kpi-value {
    font-size: 1.625rem; font-weight: 800; letter-spacing: -0.03em;
    color: var(--gray-900); line-height: 1.1;
}
.sales-kpi-label { font-size: 0.75rem; font-weight: 600; color: var(--gray-500); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.sales-kpi-sub   { font-size: 0.75rem; color: var(--gray-400); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.sales-kpi-sub i { width: 12px; height: 12px; }
.trend-up   { color: var(--sales-green) !important; }
.trend-down { color: var(--sales-red) !important; }

/* --- Channel Entry Cards --- */
.sales-channel-row {
    display: flex; align-items: center; gap: 16px;
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius); padding: 14px 18px;
    transition: var(--transition);
}
.sales-channel-row:hover { border-color: var(--gray-300); box-shadow: var(--shadow-sm); }
.sales-channel-row:focus-within { border-color: var(--sales-accent); box-shadow: 0 0 0 3px rgba(249,115,22,.08); }
.sales-channel-dot {
    width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
}
.sales-channel-label { flex: 1; font-weight: 600; font-size: 0.875rem; color: var(--gray-800); display: flex; align-items: center; gap: 8px; }
.sales-channel-badge-del {
    font-size: 0.6rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
    padding: 2px 6px; border-radius: 4px;
    background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe;
}
.sales-channel-input-wrap { position: relative; width: 160px; }
.sales-channel-input-wrap span {
    position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
    font-size: 0.8125rem; font-weight: 700; color: var(--gray-400); pointer-events: none;
}
.sales-channel-input {
    width: 100%; padding: 9px 12px 9px 42px;
    text-align: right; font-size: 0.9375rem; font-weight: 700;
    border: 1.5px solid var(--gray-200); border-radius: var(--radius-xs);
    outline: none; transition: var(--transition);
    color: var(--gray-900); background: var(--gray-50);
    font-family: var(--font);
}
.sales-channel-input:focus { border-color: var(--sales-accent); background: var(--white); box-shadow: 0 0 0 3px rgba(249,115,22,.08); }
.sales-channel-input::placeholder { color: var(--gray-300); font-weight: 400; }

/* --- Total Bar --- */
.sales-total-bar {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--gray-900); border-radius: var(--radius);
    padding: 18px 24px; margin: 16px 0;
}
.sales-total-bar-label { color: var(--gray-400); font-size: 0.8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.sales-total-bar-value { font-size: 2rem; font-weight: 900; color: var(--white); letter-spacing: -0.04em; }
.sales-total-bar-currency { font-size: 1rem; font-weight: 600; color: var(--gray-400); margin-right: 6px; }

/* --- Date Banner --- */
.sales-date-banner {
    display: flex; align-items: center; gap: 14px;
    background: var(--white); border: 1.5px solid var(--gray-200);
    border-radius: var(--radius); padding: 14px 20px;
    margin-bottom: 20px;
}
.sales-date-banner.is-update {
    background: #eff6ff; border-color: #bfdbfe;
}
.sales-date-banner-dot {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
    background: var(--sales-accent);
}
.sales-date-banner.is-update .sales-date-banner-dot { background: var(--sales-blue); }
.sales-date-banner-text { font-size: 0.875rem; font-weight: 600; color: var(--gray-700); }
.sales-date-banner-sub  { font-size: 0.75rem; color: var(--gray-400); margin-top: 2px; }

/* --- Channel Breakdown Progress --- */
.ch-breakdown-row { margin-bottom: 14px; }
.ch-breakdown-row:last-child { margin-bottom: 0; }
.ch-breakdown-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.ch-breakdown-name { font-size: 0.8125rem; font-weight: 600; color: var(--gray-700); display: flex; align-items: center; gap: 7px; }
.ch-breakdown-amount { font-size: 0.8125rem; font-weight: 700; color: var(--gray-800); }
.ch-breakdown-pct { font-size: 0.75rem; color: var(--gray-400); margin-left: 4px; }
.ch-progress-track { height: 6px; background: var(--gray-100); border-radius: 3px; overflow: hidden; }
.ch-progress-fill  { height: 100%; border-radius: 3px; transition: width 0.6s ease; }

/* --- Split Pill (Delivery vs In-House) --- */
.sales-split-pill {
    display: flex; border-radius: 10px; overflow: hidden;
    height: 10px; margin: 10px 0;
}
.sales-split-delivery { background: var(--sales-teal); }
.sales-split-inhouse  { background: var(--sales-blue); }

/* --- Analytics nav tabs --- */
.sales-tabs {
    display: flex; gap: 4px;
    background: var(--gray-100); border-radius: 10px; padding: 4px;
    margin-bottom: 24px;
}
.sales-tab {
    flex: 1; padding: 7px 14px; text-align: center;
    font-size: 0.8125rem; font-weight: 600; border-radius: 7px;
    border: none; cursor: pointer; transition: var(--transition);
    color: var(--gray-600); background: transparent;
    text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.sales-tab i { width: 14px; height: 14px; }
.sales-tab:hover { background: var(--white); color: var(--gray-800); }
.sales-tab.active { background: var(--white); color: var(--gray-900); box-shadow: var(--shadow-sm); }

/* --- Section title --- */
.sales-section-title {
    font-size: 0.8125rem; font-weight: 700; color: var(--gray-600);
    text-transform: uppercase; letter-spacing: 0.07em;
    margin-bottom: 14px;
}

/* --- Comparison badge --- */
.sales-cmp-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 8px; border-radius: 6px;
    font-size: 0.75rem; font-weight: 700;
}
.sales-cmp-up   { background: #dcfce7; color: #16a34a; }
.sales-cmp-down { background: #fee2e2; color: #dc2626; }
.sales-cmp-flat { background: var(--gray-100); color: var(--gray-500); }

/* --- PIN gate card --- */
.sales-pin-gate {
    max-width: 380px; margin: 60px auto 0;
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: 16px; padding: 36px; text-align: center;
}
.sales-pin-icon {
    width: 60px; height: 60px; border-radius: 50%;
    background: var(--gray-100); display: flex; align-items: center;
    justify-content: center; margin: 0 auto 18px;
}
.sales-pin-icon i { width: 26px; height: 26px; color: var(--gray-500); }
.sales-pin-input {
    width: 100%; text-align: center; font-size: 1.5rem; font-weight: 700;
    letter-spacing: 0.3em; padding: 12px;
    border: 2px solid var(--gray-200); border-radius: var(--radius-xs);
    outline: none; transition: var(--transition); font-family: monospace;
}
.sales-pin-input:focus { border-color: var(--sales-accent); box-shadow: 0 0 0 3px rgba(249,115,22,.1); }

/* --- Monthly grid --- */
.monthly-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px; margin-bottom: 24px;
}
.monthly-card {
    background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius); padding: 18px; position: relative; overflow: hidden;
}
.monthly-card.has-data { border-color: var(--gray-300); }
.monthly-card.is-future { opacity: 0.45; pointer-events: none; }
.monthly-card-month { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--gray-400); margin-bottom: 8px; }
.monthly-card-total { font-size: 1.25rem; font-weight: 800; color: var(--gray-900); letter-spacing: -0.03em; }
.monthly-card-notes { font-size: 0.75rem; color: var(--gray-500); margin-top: 6px; line-height: 1.4; }
.monthly-card-accent { position: absolute; bottom: 0; left: 0; right: 0; height: 3px; background: var(--sales-accent); }

/* --- History table improvements --- */
.history-amount { font-variant-numeric: tabular-nums; font-size: 0.8125rem; text-align: right; }
.history-amount.zero { color: var(--gray-300); }
.history-total { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; color: var(--gray-900); }

/* --- Log action badges --- */
.log-insert { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.log-update  { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* --- Chart containers --- */
.chart-wrap { position: relative; padding: 4px 0; }

/* --- PIN notice inline --- */
.pin-notice {
    display: flex; gap: 12px; align-items: flex-start;
    background: #fffbeb; border: 1.5px solid #fcd34d;
    border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px;
}
.pin-notice i { width: 18px; height: 18px; color: #d97706; flex-shrink: 0; margin-top: 1px; }
.pin-notice-text { font-size: 0.875rem; color: #92400e; font-weight: 500; }
.pin-notice-text small { display: block; font-weight: 400; color: #a16207; margin-top: 3px; font-size: 0.8rem; }

/* --- Admin channels list --- */
.channel-list-row {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--gray-100);
    transition: var(--transition);
}
.channel-list-row:last-child { border-bottom: none; }
.channel-list-row:hover { background: var(--gray-50); }
.channel-swatch { width: 32px; height: 32px; border-radius: 8px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.channel-swatch i { width: 14px; height: 14px; color: white; }

/* --- Modal overlay --- */
.sales-modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); z-index: 1000;
    align-items: center; justify-content: center; padding: 16px;
}
.sales-modal-overlay.open { display: flex; }
.sales-modal {
    background: var(--white); border-radius: 16px;
    width: 100%; max-width: 460px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    overflow: hidden; animation: fadeIn .15s ease;
}
.sales-modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex; align-items: center; justify-content: space-between;
}
.sales-modal-title { font-size: 1rem; font-weight: 700; color: var(--gray-900); display: flex; align-items: center; gap: 8px; }
.sales-modal-title i { width: 18px; height: 18px; color: var(--gray-500); }
.sales-modal-close {
    background: none; border: none; cursor: pointer;
    color: var(--gray-400); font-size: 1.25rem; line-height: 1; padding: 2px;
}
.sales-modal-close:hover { color: var(--gray-700); }
.sales-modal-body   { padding: 22px 24px; }
.sales-modal-footer { padding: 14px 24px; background: var(--gray-50); border-top: 1px solid var(--gray-100); display: flex; justify-content: flex-end; gap: 8px; }

/* --- Sales module top navigation --- */
.sales-module-nav {
    display: flex; gap: 0; flex-wrap: wrap;
    border-bottom: 2px solid var(--gray-100);
    margin-bottom: 24px;
}
.sales-module-nav a {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 9px 15px; font-size: 0.8125rem; font-weight: 600;
    color: var(--gray-500); text-decoration: none;
    border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: var(--transition); white-space: nowrap;
}
.sales-module-nav a i { width: 14px; height: 14px; flex-shrink: 0; }
.sales-module-nav a:hover { color: var(--gray-800); background: var(--gray-50); }
.sales-module-nav a.active { color: var(--primary); border-bottom-color: var(--primary); background: transparent; }
.sales-module-nav .snav-sep {
    align-self: center; width: 1px; height: 16px;
    background: var(--gray-200); margin: 0 4px; flex-shrink: 0;
}
