﻿/* ===============================================
   Ø­Ø³Ø§Ø¨â€ŒØ¢Ù‡Ù† - Ø§Ø³ØªØ§ÛŒÙ„ Ø§ØµÙ„ÛŒ Ù†Ø³Ø®Ù‡ Û².Û°
   Classic Accounting Theme
   =============================================== */

@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Vazirmatn';
    src: url('../fonts/Vazirmatn-Black.woff2') format('woff2');
    font-weight: 900;
    font-display: swap;
}

:root {
    --bg-primary: #0b0f16;
    --bg-secondary: #0f141d;
    --bg-card: #151c28;
    --bg-card-hover: #1a2332;
    --bg-input: #1a2332;
    --bg-sidebar: #111722;
    
    --text-primary: #e6ebf2;
    --text-secondary: #93a0b4;
    --text-muted: #5c6a7e;
    
    --accent-gold: #ff6b1a;
    --accent-gold-light: #ff8a42;
    --accent-gold-dark: #d4500a;
    --accent-blue: #4a8ab8;
    --accent-blue-light: #6aa8d4;
    
    --success: #2fd08a;
    --success-bg: rgba(47, 208, 138, 0.12);
    --danger: #ff4d5e;
    --danger-bg: rgba(255, 77, 94, 0.12);
    --warning: #ffc53d;
    --warning-bg: rgba(255, 197, 61, 0.12);
    --info: #4a8ab8;
    --info-bg: rgba(74, 138, 184, 0.14);
    
    --border: #232e40;
    --border-light: #1a2332;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 10px;
    
    --topbar-height: 60px;
    --transition: 0.18s ease;
}

body.light-mode {
    --bg-primary: #f4f5f7;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f1f3f6;
    --bg-input: #ffffff;
    --bg-sidebar: #ffffff;
    
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    
    --accent-gold: #ea580c;
    --accent-gold-light: #f97316;
    --accent-gold-dark: #c2410c;
    --accent-blue: #2563eb;
    
    --success: #16a34a;
    --success-bg: rgba(22, 163, 74, 0.1);
    --danger: #dc2626;
    --danger-bg: rgba(220, 38, 38, 0.1);
    --warning: #d97706;
    --warning-bg: rgba(217, 119, 6, 0.1);
    --info: #0284c7;
    --info-bg: rgba(2, 132, 199, 0.1);
    
    --border: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

::selection { background: var(--accent-gold); color: #000; }

html { font-size: clamp(12px, 0.19vw + 11.3px, 14px); scroll-behavior: smooth; }

body {
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.8;
}

/* ===============================================
   LAYOUT
   =============================================== */

#app {
    display: flex;
    min-height: 100vh;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-right: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-inner {
    padding: 24px;
    padding-bottom: 88px;
    flex: 1;
}

/* Topbar */
.topbar {
    height: var(--topbar-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.topbar-title {
    font-size: 1.143rem;
    font-weight: 700;
    color: var(--accent-gold);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    font-size: 1.143rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}

.topbar-btn:hover {
    background: var(--accent-gold);
    color: #000;
    border-color: var(--accent-gold);
}

.topbar-user {
    font-size: 0.857rem;
    color: var(--text-secondary);
    padding: 6px 14px;
    background: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
}

.topbar-clock {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.25;
    padding: 0 4px;
    white-space: nowrap;
}

.topbar-clock .clock-time {
    font-size: 1rem;
    font-weight: 900;
    color: var(--accent-gold);
    font-variant-numeric: tabular-nums;
    direction: ltr;
    letter-spacing: 1px;
}

.topbar-clock .clock-date {
    font-size: 0.714rem;
    color: var(--text-muted);
}

/* ===============================================
   PAGE HEADER
   =============================================== */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header h1 {
    font-size: 1.143rem;
    font-weight: 800;
    color: var(--text-primary);
}

.page-header h1 span {
    color: var(--accent-gold);
}

.help-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.help-close {
    background: none;
    border: none;
    font-size: 1.286rem;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}
.help-scroll {
    max-height: 60vh;
    overflow-y: auto;
    padding-left: 4px;
}
.help-group {
    margin-bottom: 16px;
    padding: 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    border-right: 3px solid var(--accent-gold);
}
.help-group h4 {
    margin: 0 0 6px;
    font-size: 1rem;
    color: var(--text-primary);
}
.help-group p {
    margin: 0;
    font-size: 0.893rem;
    line-height: 1.8;
    color: var(--text-muted);
}

/* ===============================================
   CARDS
   =============================================== */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    transition: all var(--transition);
    overflow: hidden;
}

.card:hover {
    border-color: var(--accent-gold-dark);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.card-header h2 {
    font-size: 0.929rem;
    font-weight: 800;
    color: var(--text-primary);
}

.card-header .badge {
    font-size: 0.786rem;
    padding: 3px 12px;
    border-radius: 6px;
    background: var(--warning-bg);
    color: var(--warning);
    font-weight: 700;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition);
    overflow: hidden;
    position: relative;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
}

.stat-card:has(.stat-icon.buy)::before { background: var(--danger); }
.stat-card:has(.stat-icon.sell)::before { background: var(--success); }
.stat-card:has(.stat-icon.profit)::before { background: var(--warning); }
.stat-card:has(.stat-icon.total)::before { background: var(--accent-blue); }
.stat-card:has(.stat-icon.checks)::before { background: var(--warning); }
.stat-card:has(.stat-icon.customers)::before { background: var(--accent-blue); }

.stat-card:hover {
    border-color: var(--accent-gold-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

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

.stat-icon.buy { background: var(--danger-bg); }
.stat-icon.sell { background: var(--success-bg); }
.stat-icon.profit { background: var(--warning-bg); }
.stat-icon.total { background: var(--info-bg); }
.stat-icon.checks { background: var(--warning-bg); }
.stat-icon.customers { background: var(--info-bg); }

.stat-info { flex: 1; }

.stat-value {
    font-size: 1.429rem;
    font-weight: 900;
    line-height: 1.2;
    direction: ltr;
    display: inline-block;
    text-align: left;
    word-break: break-all;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-value.buy { color: var(--danger); }
.stat-value.sell { color: var(--success); }
.stat-value.profit { color: var(--accent-gold); }
.stat-value.total { color: var(--accent-blue); }

.stat-label {
    font-size: 0.786rem;
    color: var(--text-muted);
    font-weight: 400;
}

.stat-sub {
    font-size: 0.714rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ===============================================
   TABLES
   =============================================== */

.table-container {
    overflow-x: auto;
    overflow-y: hidden;
    border-radius: var(--radius-sm);
    -webkit-overflow-scrolling: touch;
    margin-bottom: 4px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.857rem;
    min-width: 600px;
}

thead th {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 10px 6px;
    text-align: center;
    font-size: 0.786rem;
    font-weight: 700;
    white-space: nowrap;
    border-bottom: 2px solid var(--border);
}

tbody td {
    padding: 8px 6px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 0.857rem;
    vertical-align: middle;
}

td .num {
    direction: ltr;
    display: inline-block;
    text-align: right;
    unicode-bidi: embed;
}

tbody tr:hover {
    background: var(--bg-card-hover);
}

/* ===============================================
   BADGES
   =============================================== */

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.714rem;
    font-weight: 700;
}

.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-gold { background: rgba(200, 164, 92, 0.2); color: var(--accent-gold); }

/* ===============================================
   FORMS
   =============================================== */

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.857rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Arial, sans-serif;
    font-size: 0.929rem;
    transition: all var(--transition);
    outline: none;
    box-sizing: border-box;
    max-width: 100%;
}

.form-control:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.15);
}

.form-control::placeholder { color: var(--text-muted); }

.form-control[data-format="number"] {
    direction: ltr;
    text-align: left;
    font-size: 0.857rem;
    overflow-x: auto;
}

input[type="text"], input[type="tel"], input[type="number"], select.form-control {
    max-width: 100%;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-left: 36px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    min-width: 0;
}

.form-row > * {
    min-width: 0;
}

.form-readonly {
    background: var(--bg-card);
    cursor: not-allowed;
    opacity: 0.7;
}

.form-hint {
    font-size: 0.714rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ===============================================
   BUTTONS
   =============================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 15px;
    border: none;
    border-radius: var(--radius);
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Arial, sans-serif;
    font-size: 0.857rem;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
    color: #fff;
    box-shadow: 0 4px 12px rgba(255, 107, 26, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold));
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(255, 107, 26, 0.4);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover { background: #219a52; transform: translateY(-1px); }

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover { background: #c0392b; transform: translateY(-1px); }

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.btn-warning {
    background: linear-gradient(135deg, #f6a821, #e08a00);
    color: #fff;
}

.btn-warning:hover { background: linear-gradient(135deg, #ffb93a, #f6a821); transform: translateY(-1px); }

.btn-info {
    background: linear-gradient(135deg, #4a90d9, #357abd);
    color: #fff;
}

.btn-info:hover { background: linear-gradient(135deg, #5aa0e8, #4a90d9); transform: translateY(-1px); }

.btn-sm {
    padding: 6px 12px;
    font-size: 0.786rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.071rem;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ===============================================
   ACTION BUTTONS (Table actions)
   =============================================== */

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.929rem;
    text-decoration: none;
    transition: all var(--transition);
    margin: 0 2px;
}

.action-btn.edit { background: var(--warning-bg); color: var(--warning); }
.action-btn.edit:hover { background: var(--warning); color: #000; }
.action-btn.delete { background: var(--danger-bg); color: var(--danger); }
.action-btn.delete:hover { background: var(--danger); color: #fff; }
.action-btn.view { background: var(--info-bg); color: var(--info); }
.action-btn.view:hover { background: var(--info); color: #fff; }
.action-btn.success { background: var(--success-bg); color: var(--success); }
.action-btn.success:hover { background: var(--success); color: #fff; }
.action-btn.sell { background: var(--success-bg); color: var(--success); }
.action-btn.sell:hover { background: var(--success); color: #fff; }

/* ============ Quick Add (FAB) ============ */
.fab-quick {
    position: fixed;
    bottom: 78px;
    left: 18px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    background: var(--accent-gold);
    color: #000;
    font-size: 2rem;
    font-weight: 900;
    box-shadow: 0 4px 16px rgba(0,0,0,.35);
    cursor: pointer;
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s ease, background .2s ease;
}
.fab-quick:hover { transform: scale(1.08); }
.fab-menu {
    position: fixed;
    bottom: 142px;
    left: 18px;
    z-index: 901;
    display: none;
    flex-direction: column;
    gap: 8px;
}
.fab-menu.show { display: flex; }
.fab-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 800;
    padding: 10px 16px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.fab-item.buy { border-right: 3px solid var(--danger); }
.fab-item.sell { border-right: 3px solid var(--success); }
.fab-item:hover { background: var(--bg-card-hover); }

/* ============ Inventory picker (sell form) ============ */
.inv-picker-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 55vh;
    overflow-y: auto;
    margin: 10px 0;
}
.inv-picker-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: right;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.inv-picker-item:hover { border-color: var(--accent-gold); background: var(--bg-card-hover); }
.inv-picker-item .ip-name { font-weight: 800; font-size: 1rem; }
.inv-picker-item .ip-meta { font-size: 0.857rem; color: var(--text-secondary); margin-top: 3px; }

/* ===============================================
   ALERTS & MESSAGES
   =============================================== */

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.929rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(39, 174, 96, 0.3); }
.alert-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(231, 76, 60, 0.3); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(243, 156, 18, 0.3); }
.alert-info { background: var(--info-bg); color: var(--info); border: 1px solid rgba(52, 152, 219, 0.3); }

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===============================================
   MODAL
   =============================================== */

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show { display: flex; }

.modal-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-box h3 {
    font-size: 1.286rem;
    color: var(--accent-gold);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.fk-intro {
    font-size: 0.929rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 4px;
}

.fk-features {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    text-align: right;
}

.fk-features li {
    font-size: 0.929rem;
    color: var(--text-secondary);
    padding: 7px 0;
    border-bottom: 1px dashed var(--border);
    line-height: 1.7;
}

.fk-features li:last-child { border-bottom: none; }

.fk-admin-link {
    margin: 14px 0 12px;
    font-size: 0.857rem;
    color: var(--text-secondary);
}

.fk-admin-link a {
    color: var(--accent-gold);
    font-weight: bold;
}

/* ===============================================
   SEARCH
   =============================================== */

.search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Arial, sans-serif;
    font-size: 0.929rem;
    outline: none;
    transition: all var(--transition);
}

.search-box input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(200, 164, 92, 0.1);
}

/* ===============================================
   TABS
   =============================================== */

.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 4px;
    border: 1px solid var(--border);
}

.tab {
    padding: 8px 18px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.857rem;
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Arial, sans-serif;
    transition: all var(--transition);
    white-space: nowrap;
}

.tab:hover { color: var(--text-primary); background: var(--bg-card-hover); }

.tab.active {
    background: var(--accent-gold);
    color: #000;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===============================================
   PAGINATION
   =============================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 20px;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.857rem;
    font-weight: 700;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all var(--transition);
}

.page-link:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.page-link.active {
    background: var(--accent-gold);
    color: #000;
    border-color: var(--accent-gold);
}

/* ===============================================
   VOICE OVERLAY
   =============================================== */

.voice-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 3000;
    display: none;
    align-items: center;
    justify-content: center;
}

.voice-overlay.show { display: flex; }

.voice-modal {
    background: var(--bg-card);
    border: 1px solid var(--accent-gold);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    animation: modalIn 0.3s ease;
}

.voice-icon {
    font-size: 4.571rem;
    margin-bottom: 16px;
    animation: voicePulse 1.5s ease infinite;
}

@keyframes voicePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.voice-status {
    font-size: 1rem;
    color: var(--accent-gold);
    margin-bottom: 12px;
}

.voice-result {
    font-size: 0.929rem;
    color: var(--text-secondary);
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin: 12px 0;
    min-height: 40px;
    white-space: pre-line;
}

.voice-close {
    margin-top: 16px;
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.286rem;
    cursor: pointer;
}

/* ===============================================
   INVOICE
   =============================================== */

.invoice-box {
    background: #eef3f9;
    color: #0f172a;
    border-radius: var(--radius);
    padding: 32px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.invoice-header {
    text-align: center;
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.invoice-header h1 {
    font-size: 1.857rem;
    font-weight: 900;
    color: #12284a;
}

.invoice-header .sub {
    font-size: 0.929rem;
    font-weight: 600;
    color: #334155;
}

.invoice-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 20px;
}

.invoice-meta .item {
    padding: 10px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.invoice-meta .item strong {
    display: block;
    font-size: 0.786rem;
    font-weight: 700;
    color: #334155;
}

.invoice-meta .item span {
    font-size: 1.071rem;
    font-weight: 800;
    color: #0f172a;
}

.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.invoice-table th {
    background: #f0a500;
    color: #000;
    padding: 12px;
    font-size: 0.929rem;
    font-weight: 800;
}

.invoice-table td {
    padding: 12px;
    border-bottom: 1px solid #d7e0ec;
    text-align: center;
    font-size: 0.929rem;
    font-weight: 600;
    color: #0f172a;
}

.invoice-total {
    text-align: center;
    font-size: 1.357rem;
    font-weight: 900;
    color: #12284a;
    padding: 16px;
    background: #ffffff;
    border-radius: 8px;
    margin: 16px 0;
}

.invoice-footer {
    text-align: center;
    font-size: 0.786rem;
    color: #94a3b8;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.invoice-branded { position: relative; }

.invoice-branded::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(26, 58, 92, 0.07) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
    opacity: 0.6;
}

.invoice-brand-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 10px 0 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.invoice-brand-partner { padding: 4px 12px; }

.invoice-brand-partner .brand-logo img { width: 34px; height: 34px; }
.invoice-brand-partner .brand-name { font-size: 0.786rem; color: #0f172a !important; }

.invoice-footer-brands {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 10px;
}

.invoice-footer-brands .brand-logo img { width: 28px; height: 28px; border-radius: 8px; }
.invoice-footer-brands .brand-name { font-size: 0.714rem; color: #0f172a; }

.invoice-footer-text {
    font-size: 0.786rem;
    font-weight: 700;
    color: #1a3a5c;
}

/* Ø­Ø³Ø§Ø¨ Ø¨Ø§Ù†Ú©ÛŒ Ø¯Ø§Ø®Ù„ ÙØ§Ú©ØªÙˆØ± */
.invoice-bank-added {
    background: #ffffff;
    border: 1px solid var(--accent-gold);
    border-radius: 10px;
    padding: 16px;
    text-align: right;
}
.invoice-bank-added h4 {
    margin: 0 0 12px;
    font-size: 0.93rem;
    font-weight: 800;
    color: #12284a;
}
.invoice-bank-added .bank-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.93rem;
    line-height: 2.1;
    color: #334155;
}
.invoice-bank-added .bank-line span { font-weight: 600; color: #475569; }
.invoice-bank-added .bank-line b { font-weight: 800; color: #0f172a; }

.bank-select-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
    max-height: 340px;
    overflow-y: auto;
}
.bank-select-item {
    text-align: right;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}
.bank-select-item:hover {
    border-color: var(--accent-gold);
    background: rgba(200, 164, 92, 0.08);
}
.bank-select-item .bs-name {
    font-weight: 800;
    font-size: 0.93rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.bank-select-item .bs-detail {
    font-size: 0.79rem;
    color: var(--text-muted);
    direction: ltr;
    text-align: right;
}

/* ===============================================
   ACTION CARDS (Dashboard quick actions)
   =============================================== */

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

.action-card {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: all 0.3s;
    overflow: hidden;
}

.action-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.action-card-buy { border-right: 4px solid var(--danger); }
.action-card-sell { border-right: 4px solid var(--success); }
.action-card-buy:hover { border-color: var(--danger); }
.action-card-sell:hover { border-color: var(--success); }

.action-icon { font-size: 2.286rem; flex-shrink: 0; }
.action-title { font-size: 1.071rem; font-weight: 900; }
.action-card-buy .action-title { color: var(--danger); }
.action-card-sell .action-title { color: var(--success); }
.action-desc { font-size: 0.786rem; color: var(--text-muted); margin-top: 2px; }

/* ===============================================
   EMPTY STATE
   =============================================== */

.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}

.empty-state .icon {
    font-size: 3.429rem;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 0.929rem;
}

/* ===============================================
   BOTTOM BAR + HAMBURGER MENU
   =============================================== */

.bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 500;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.bottom-btn {
    flex: 1;
    max-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 16px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-primary);
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition);
}

.bottom-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.bottom-btn:active { transform: scale(0.96); }

/* Menu sheet */
.menu-sheet {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    visibility: hidden;
    pointer-events: none;
}

.menu-sheet.show {
    visibility: visible;
    pointer-events: all;
}

.menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 15, 0.72);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-sheet.show .menu-backdrop { opacity: 1; }

.menu-panel {
    position: relative;
    width: 100%;
    max-width: 560px;
    max-height: 82vh;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 22px 22px 0 0;
    padding: 18px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.menu-sheet.show .menu-panel { transform: translateY(0); }

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.143rem;
    font-weight: 900;
    color: var(--accent-gold);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
}

.menu-close {
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 1.071rem;
    cursor: pointer;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.menu-grid a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 6px;
    font-size: 0.786rem;
    font-weight: 700;
    text-align: center;
    transition: all var(--transition);
    cursor: pointer;
}

.menu-grid a .icon { font-size: 1.571rem; }

.menu-grid a:hover,
.menu-grid .menu-help-btn:hover {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    transform: translateY(-2px);
}

.menu-grid .menu-help-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    color: var(--text-primary);
    background: var(--bg-card-hover);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 6px;
    font-size: 0.786rem;
    font-weight: 700;
    text-align: center;
    transition: all var(--transition);
}

.menu-grid .menu-help-btn .icon { font-size: 1.571rem; }

.menu-footer {
    text-align: center;
    font-size: 0.714rem;
    color: var(--text-muted);
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

/* ===============================================
   RESPONSIVE
   =============================================== */

@media (max-width: 768px) {
    html, body { overflow-x: hidden; }

    .main-content {
        margin-right: 0;
        width: 100%;
    }

    .content-inner { padding: 12px; }
    
    .topbar { padding: 0 8px; height: 56px; gap: 6px; overflow: hidden; }
    .topbar-title { font-size: 0.929rem; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .topbar-btn { width: 34px; height: 34px; font-size: 1rem; flex-shrink: 0; }
    .topbar-actions { gap: 4px; flex-shrink: 0; overflow: hidden; }
    .topbar-clock { max-width: 90px; overflow: hidden; }
    .topbar-clock .clock-time { font-size: 0.786rem; }
    .topbar-clock .clock-date { font-size: 0.571rem; }
    .topbar-user { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .stat-card { padding: 10px; gap: 8px; }
    .stat-icon { width: 34px; min-width: 34px; height: 34px; font-size: 1.143rem; }
    .stat-value { font-size: 1rem; }
    .stat-label { font-size: 0.714rem; }
    .stat-sub { font-size: 0.643rem; }
    
    .action-grid { gap: 10px; grid-template-columns: 1fr 1fr; }
    .action-card { padding: 12px; flex-direction: column; text-align: center; gap: 6px; }
    .action-icon { font-size: 1.714rem; }
    .action-title { font-size: 0.929rem; }
    .action-desc { font-size: 0.714rem; }
    
    .bottom-btn { font-size: 0.929rem; padding: 9px 10px; gap: 6px; }
    .menu-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .menu-grid a { padding: 12px 4px; font-size: 0.714rem; }
    .menu-grid a .icon { font-size: 1.429rem; }
    .menu-grid .menu-help-btn { padding: 12px 4px; font-size: 0.714rem; }
    .menu-grid .menu-help-btn .icon { font-size: 1.429rem; }
    
    .content-inner { padding-bottom: 85px; }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .page-header h1 { font-size: 1.143rem; }
    
    .modal-box { padding: 16px; margin: 8px; max-width: 95vw; }
    
    .invoice-box { padding: 12px; }
    
    .card { padding: 12px; margin-bottom: 12px; }
    .card-header { margin-bottom: 10px; padding-bottom: 8px; }
    .card-header h2 { font-size: 0.929rem; }
    
    table { font-size: 0.786rem; min-width: 480px; }
    thead th { padding: 8px 4px; font-size: 0.714rem; }
    tbody td { padding: 6px 4px; font-size: 0.786rem; }

    .btn { padding: 9px 14px; font-size: 0.857rem; }
    .btn-sm { padding: 5px 10px; font-size: 0.714rem; }
    .btn-lg { padding: 12px 20px; font-size: 0.929rem; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .action-grid { grid-template-columns: 1fr 1fr; }
    .topbar-user { font-size: 0.714rem; padding: 4px 8px; }
    .tabs { padding: 3px; overflow-x: auto; flex-wrap: nowrap; }
    .tab { font-size: 0.714rem; padding: 5px 10px; }
    .stat-value { font-size: 0.929rem; }
    table { min-width: 400px; font-size: 0.714rem; }
    thead th { padding: 6px 3px; font-size: 0.643rem; }
    tbody td { padding: 5px 3px; font-size: 0.714rem; }
    .search-box { flex-direction: column; }
    .search-box input { width: 100%; }
}

/* ===============================================
   UTILITIES
   =============================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-gold { color: var(--accent-gold); }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.786rem; }
.text-xs { font-size: 0.714rem; }
.font-bold { font-weight: 700; }
.font-black { font-weight: 900; }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }
.mt-2 { margin-top: 8px; }
.mb-2 { margin-bottom: 8px; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* ===============================================
   CHECKBOX TOGGLE
   =============================================== */

.toggle-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.toggle-label {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.857rem;
    font-weight: 500;
    transition: all var(--transition);
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Arial, sans-serif;
}

.toggle-label:hover {
    border-color: var(--accent-gold-dark);
}

.toggle-label.active {
    background: var(--accent-gold);
    color: #000;
    border-color: var(--accent-gold);
}

/* ===============================================
   CHECKS SECTION
   =============================================== */

.checks-section {
    background: rgba(200, 164, 92, 0.05);
    border: 1px dashed var(--accent-gold-dark);
    border-radius: var(--radius);
    padding: 16px;
    margin-top: 12px;
    display: none;
}

.checks-section.show { display: block; }

.check-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.check-row input {
    flex: 1;
    min-width: 80px;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: 'Vazirmatn', 'Segoe UI', Tahoma, Arial, sans-serif;
    font-size: 0.857rem;
}

/* ===============================================
   BRANDING
   =============================================== */

.brand-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: calc(8px + env(safe-area-inset-top)) 16px 8px;
    background: linear-gradient(135deg, var(--bg-sidebar), var(--bg-card));
    border-bottom: 1px solid var(--border);
}

.brand-bar-title {
    font-size: 1.143rem;
    font-weight: 900;
    color: var(--accent-gold);
    white-space: nowrap;
}

.brand-bar-spacer { flex: 1; }

.brand-bar-sep {
    width: 1px;
    height: 24px;
    background: var(--border);
    margin: 0 2px;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.brand-logo:hover { transform: scale(1.05); }

.brand-logo img {
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

.brand-badge {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.286rem;
    flex-shrink: 0;
}

.brand-name {
    font-size: 0.929rem;
    font-weight: 900;
    white-space: nowrap;
}

.brand-accent { color: var(--accent-gold); }

.brand-zayaruz .brand-badge { background: rgba(39, 174, 96, 0.15); border: 1px solid #27ae60; }
.brand-zayaruz .brand-name { color: #e8edf5; }
.brand-zayaruz .brand-accent { color: #4ade80; }

.brand-bamanahan .brand-badge { background: rgba(249, 115, 22, 0.15); border: 1px solid #f97316; }
.brand-bamanahan .brand-name { color: #e8edf5; }
.brand-bamanahan .brand-accent { color: #fb923c; }

body.light-mode .brand-zayaruz .brand-name,
body.light-mode .brand-bamanahan .brand-name { color: #0f172a; }

/* ===============================================
   SPLASH / LOADING SCREEN
   =============================================== */

.splash-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(160deg, #081220 0%, #0a1729 55%, #0f1f36 100%);
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.splash-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.splash-screen {
    text-align: center;
    max-width: 320px;
    width: 90%;
    padding: 30px;
}

.splash-logo { margin-bottom: 16px; }
.splash-logo .brand-logo img {
    width: 84px;
    height: 84px;
    border-radius: 22px;
    box-shadow: 0 8px 32px rgba(249, 115, 22, 0.4);
    animation: splashBounce 2s ease infinite;
}

@keyframes splashBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.splash-title {
    font-size: 2rem;
    font-weight: 900;
    color: #fff;
    margin-bottom: 24px;
    text-shadow: 0 2px 16px rgba(249, 115, 22, 0.4);
}

.splash-progress {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 12px;
}

.splash-progress-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #f97316, #fb923c);
    border-radius: 20px;
    transition: width 0.2s linear;
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.6);
}

.splash-status {
    font-size: 0.857rem;
    color: #9fb0c3;
    margin-bottom: 20px;
}

.splash-slogan-top {
    font-size: 1.143rem;
    font-weight: 700;
    color: #fb923c;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.splash-partners {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 28px;
}

.splash-partners .brand-logo {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 14px;
    border-radius: 12px;
}

.splash-slogan-bottom {
    font-size: 0.929rem;
    color: #e8edf5;
    font-weight: 700;
    opacity: 0.85;
    letter-spacing: 0.5px;
}

/* ===============================================
   LOGIN / REGISTER
   =============================================== */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(160deg, #081220 0%, #0a1729 55%, #0f1f36 100%);
    padding: calc(20px + env(safe-area-inset-top)) 20px calc(20px + env(safe-area-inset-bottom));
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 36px 30px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, #f97316, #fb923c, #3b82f6);
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
}

.auth-brand .brand-logo img {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    box-shadow: 0 6px 24px rgba(249, 115, 22, 0.4);
}

.auth-brand h1 {
    font-size: 1.714rem;
    font-weight: 900;
    color: #fff;
    margin-top: 12px;
    background: linear-gradient(90deg, #fb923c, #f97316);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-tagline {
    font-size: 0.786rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.auth-divider {
    width: 48px;
    height: 3px;
    background: linear-gradient(90deg, #f97316, #3b82f6);
    border-radius: 3px;
    margin: 14px auto;
}

.auth-partners {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 18px 0 4px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.auth-slogan {
    text-align: center;
    font-size: 0.929rem;
    font-weight: 700;
    color: #fb923c;
    margin-top: 16px;
}

.auth-slogan-bottom {
    text-align: center;
    font-size: 0.786rem;
    color: var(--text-muted);
    margin-top: 6px;
}

.auth-footer {
    text-align: center;
    margin-top: 18px;
    font-size: 0.714rem;
    color: var(--text-muted);
}

/* ===============================================
   SECTION BUTTONS (Dashboard bottom)
   =============================================== */

.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.section-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.857rem;
    font-weight: 700;
    transition: all 0.25s ease;
}

.section-btn .icon { font-size: 1.714rem; }

.section-btn:hover {
    border-color: var(--accent-gold);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* ===============================================
   SPLASH SCREEN
   =============================================== */

.splash-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg-primary);
}

.splash-box {
    text-align: center;
    animation: splashIn 0.8s ease;
}

@keyframes splashIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.splash-box .logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
    border-radius: 20px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.571rem;
    font-weight: 900;
    color: #000;
    box-shadow: 0 8px 32px rgba(200, 164, 92, 0.3);
}

.splash-box h1 {
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-gold);
    margin-bottom: 4px;
}

.splash-box p {
    color: var(--text-muted);
    font-size: 0.929rem;
    margin-bottom: 8px;
}

.splash-divider {
    width: 60px;
    height: 2px;
    background: var(--accent-gold);
    margin: 12px auto;
}

.splash-footer {
    font-size: 0.714rem;
    color: var(--text-muted);
    margin-top: 20px;
}

/* ===============================================
   JALALI DATE PICKER
   =============================================== */
.jdate-wrap {
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
}
.jdate-text {
    flex: 1 1 auto;
    min-width: 0;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--input-bg, var(--card-bg));
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1.071rem;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.jdate-text:focus, .jdate-text:hover {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}
.jdate-btn {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--input-bg, var(--card-bg));
    color: var(--accent-gold);
    cursor: pointer;
    transition: all 0.2s;
}
.jdate-btn:hover { background: rgba(212, 175, 55, 0.12); }
.jdate-pop {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    z-index: 4000;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
    padding: 10px;
    display: none;
    min-width: 280px;
}
.jdate-pop.open { display: block; }
.jdate-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.jdate-nav {
    width: 34px;
    height: 34px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 1.429rem;
    cursor: pointer;
    line-height: 1;
}
.jdate-nav:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.jdate-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-primary);
}
.jdate-wks {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 4px;
}
.jdate-wd {
    text-align: center;
    font-size: 0.786rem;
    font-weight: 700;
    color: var(--accent-gold);
    padding: 4px 0;
}
.jdate-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.jdate-blank { padding: 6px; }
.jdate-cell {
    text-align: center;
    padding: 7px 0;
    border-radius: 8px;
    font-size: 0.929rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.15s;
}
.jdate-cell:hover { background: rgba(212, 175, 55, 0.15); color: var(--accent-gold); }
.jdate-cell.today { border: 1px solid rgba(212, 175, 55, 0.6); }
.jdate-cell.sel { background: var(--accent-gold); color: #0a1729; font-weight: 700; }
.jdate-foot {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}
.jdate-act {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.929rem;
}
.jdate-act:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.jdate-clear { color: #e74c3c; }
.jdate-clear:hover { border-color: #e74c3c; color: #e74c3c; }

/* ===============================================
   MICROPHONE ICON
   =============================================== */
.topbar-btn .mic-icon {
    display: block;
    transition: all 0.25s;
}
#voiceBtn.is-listening {
    background: var(--danger, #e74c3c);
    border-color: var(--danger, #e74c3c);
    animation: micPulse 1.2s ease-in-out infinite;
}
#voiceBtn.is-listening .mic-icon { filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.7)); }
@keyframes micPulse {
    0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.55); }
    70% { box-shadow: 0 0 0 12px rgba(231, 76, 60, 0); }
    100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}
.voice-icon .mic-icon {
    width: 64px;
    height: 64px;
    color: var(--accent-gold);
}
.voice-hint {
    margin-top: 10px;
    padding: 8px 12px;
    background: rgba(212, 175, 55, 0.10);
    border: 1px dashed rgba(212, 175, 55, 0.35);
    border-radius: 10px;
    font-size: 0.821rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.7;
    max-width: 280px;
}

/* ===============================================
   VOICE GUIDE CARD
   =============================================== */
.voice-guide {
    border: 1px solid rgba(212, 175, 55, 0.35);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.10), rgba(212, 175, 55, 0.03));
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
}
.voice-guide-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.voice-guide-mic {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    color: #0a1729;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
    position: relative;
}
.voice-guide-mic.is-listening { animation: micPulse 1.2s ease-in-out infinite; }
.voice-guide-title { font-weight: 700; font-size: 1rem; color: var(--text-primary); }
.voice-guide-sub { font-size: 0.857rem; color: var(--text-muted); }
.voice-guide-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.voice-guide-chip {
    border: 1px solid var(--border);
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.857rem;
    cursor: pointer;
    transition: all 0.2s;
}
.voice-guide-chip:hover, .voice-guide-chip:focus {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.08);
}

/* ===============================================
   PROFILE / TOPBAR AVATAR
   =============================================== */

.topbar-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    margin-left: 4px;
    border: 2px solid var(--accent-gold);
    background: var(--bg-secondary);
}

.profile-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.profile-row .profile-avatar {
    width: 76px;
    min-width: 76px;
    height: 76px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--accent-gold);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-row .profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===============================================
   INLINE FORMS (delete buttons in tables)
   =============================================== */

.inline-form {
    display: inline-block;
    margin: 0;
    vertical-align: middle;
}

.inline-form .action-btn {
    vertical-align: middle;
}

/* ===============================================
   INVOICE RESPONSIVE (swipe on phones)
   =============================================== */

.invoice-holder {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
}

.invoice-holder .invoice-box {
    min-width: 470px;
}

.invoice-brand-top,
.invoice-footer-brands {
    flex-wrap: wrap;
}

/* ===============================================
   SHARE MODAL (5 apps)
   =============================================== */

.m-share-hint {
    margin: 0 0 14px;
    font-size: 0.929rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(62px, 1fr));
    gap: 10px;
    margin: 16px 0;
}

.share-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 6px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    color: var(--text-primary);
    font-size: 0.857rem;
    font-weight: 700;
}

.share-app:hover {
    border-color: var(--accent-gold);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.share-app.selected {
    border-color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.1);
    box-shadow: inset 0 0 0 1.5px var(--accent-gold);
}

.share-send-btn {
    margin-bottom: 12px;
    font-size: 1rem;
    padding: 12px;
}

.share-app img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.share-app.file-share {
    flex-direction: column;
    justify-content: center;
    min-height: 74px;
    text-align: center;
    background: var(--bg-card);
}
.share-app.file-share .fs-icon {
    font-size: 1.714rem;
    line-height: 1;
}
.share-app.file-share small {
    display: block;
    font-size: 0.714rem;
    color: var(--text-muted);
    margin-top: 3px;
    font-weight: 500;
}
.share-file-grid {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
}

.share-note {
    margin: 0 0 14px;
    font-size: 0.786rem;
    color: var(--text-muted);
    line-height: 2;
}

.share-error {
    margin-top: 10px;
}

/* ===============================================
   PRINT STYLES
   =============================================== */

@media print {
    @page { size: A4 portrait; margin: 8mm; }
    .topbar, .bottom-bar, .menu-sheet, .btn, .action-btn, .fab-quick, .fab-menu, .modal-overlay { display: none !important; }
    .main-content { margin-right: 0 !important; margin: 0 !important; padding: 0 !important; }
    .content-inner { padding: 0 !important; }
    body { background: #fff !important; color: #000 !important; }
    .invoice-holder { overflow: visible !important; }
    .invoice-holder .invoice-box { min-width: 0 !important; max-width: 100% !important; margin: 0 !important; box-shadow: none !important; border-radius: 0 !important; }
    .invoice-box { padding: 12px !important; }
    .invoice-brand-top { padding: 6px 0 10px !important; margin-bottom: 8px !important; gap: 10px !important; }
    .invoice-brand-partner { padding: 2px 8px !important; }
    .invoice-brand-partner .brand-logo img { width: 24px !important; height: 24px !important; }
    .invoice-header { padding-bottom: 10px !important; margin-bottom: 10px !important; }
    .invoice-header h1 { font-size: 1.286rem !important; }
    .invoice-header .sub { font-size: 0.786rem !important; }
    .invoice-meta { gap: 5px !important; margin-bottom: 10px !important; }
    .invoice-meta .item { padding: 5px 8px !important; }
    .invoice-meta .item strong { font-size: 0.643rem !important; }
    .invoice-meta .item span { font-size: 0.857rem !important; }
    .invoice-table { margin: 8px 0 !important; }
    .invoice-table th { padding: 6px !important; font-size: 0.786rem !important; }
    .invoice-table td { padding: 6px !important; font-size: 0.786rem !important; }
    .invoice-total { font-size: 1.071rem !important; padding: 10px !important; margin: 10px 0 !important; }
    .invoice-bank-added { padding: 10px !important; }
    .invoice-bank-added .bank-line { font-size: 0.857rem !important; line-height: 1.8 !important; }
    .invoice-bank-added .bank-line b, .invoice-bank-added h4 { color: #000 !important; }
    .invoice-footer { margin-top: 10px !important; padding-top: 8px !important; }
    .invoice-footer-brands { gap: 10px !important; margin-bottom: 6px !important; }
    .invoice-footer-brands .brand-logo img { width: 22px !important; height: 22px !important; }
    .invoice-footer-text { font-size: 0.714rem !important; }
    .invoice-branded::before { display: none !important; }
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}
