:root {
    --primary: #0d9488;
    --primary-light: #ccfbf1;
    --primary-hover: #0f766e;
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --nagd-color: #0d9488;
    --pos-color: #6366f1;
    --total-color: #f59e0b;
    --danger: #ef4444;
    --success: #10b981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    padding: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Authentication Styles */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-body);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    text-align: center;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-radius: 16px;
}

.login-card .logo-icon {
    margin: 0 auto;
}

.login-card h2 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 700;
}

.login-desc {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.login-form {
    text-align: left;
}

.login-form .form-group {
    margin-bottom: 1.25rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

.login-submit {
    width: 100%;
    margin-top: 1.5rem;
    height: 48px;
    font-size: 1rem;
    font-weight: 600;
}

.login-error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.5rem;
    height: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-align: center;
}

.login-error.visible {
    opacity: 1;
}

/* User Profile in Header */
.user-profile {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: auto;
    margin-right: 20px;
}


/* ─── Base Card Panel ─── */
.ut-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

header.ut-panel {
    overflow: visible !important;
}

/* ─── Main Container — full width ─── */
.dashboard-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ─── Header ─── */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 32px;
    overflow: visible;
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    background: var(--primary);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.logo h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo .logo-badge {
    background: var(--primary);
    color: white;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: super;
    font-weight: 700;
}

/* ─── Filters ─── */
.filter-controls {
    display: flex;
    gap: 16px;
    align-items: center;
}

.date-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-group label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
}

.mirkamal-block {
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: all 0.2s;
}
.mirkamal-medaxil-block:hover { border-color: #10b981; background: #f0fdf4; }
.mirkamal-mexaric-block:hover { border-color: #ef4444; background: #fef2f2; }

/* Mirkamal action buttons */
.mk-buttons {
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
}
.mk-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s;
    -webkit-tap-highlight-color: transparent;
}
.mk-action-btn:hover { transform: translateY(-2px); }
.mk-action-btn:active { transform: scale(0.97); }
.mk-medaxil-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
}
.mk-mexaric-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.35);
}
.mk-btn-label {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

/* Mirkamal balance card */
.mk-balance-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--border-color);
}
.mk-balance-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 15px;
    border-bottom: 1px solid #f1f5f9;
}
.mk-balance-row:last-child { border-bottom: none; }
.mk-balance-total {
    padding-top: 12px;
    margin-top: 4px;
    border-top: 2px solid var(--border-color);
    font-size: 17px;
}

/* Mirkamal modal */
.mk-modal {
    max-width: 420px;
    width: 92%;
    padding: 0;
    border-radius: 16px;
    overflow: hidden;
}
.mk-modal .form-group {
    padding: 0 20px;
    margin-bottom: 14px;
}
.mk-modal .form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: block;
}
.mk-modal .custom-input {
    height: 46px;
    font-size: 16px;
    border-radius: 10px;
}
.mk-modal .primary-btn {
    margin: 0 20px 20px;
    width: calc(100% - 40px);
    border-radius: 12px;
}
.mk-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    margin-bottom: 16px;
}
.mk-modal-header h3 { color: #fff; margin: 0; font-size: 18px; }
.mk-medaxil-header { background: linear-gradient(135deg, #10b981, #059669); }
.mk-mexaric-header { background: linear-gradient(135deg, #ef4444, #dc2626); }
.mk-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 28px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

/* Payment method toggle */
.mk-payment-toggle {
    display: flex;
    gap: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.mk-pay-btn {
    flex: 1;
    padding: 12px;
    border: none;
    background: #f8fafc;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}
.mk-pay-btn.active {
    background: var(--primary);
    color: #fff;
}
.mk-pay-btn:first-child { border-right: 1px solid var(--border-color); }

/* Edit/Delete action buttons */
.mk-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
}
.mk-act-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.mk-act-btn:active { transform: scale(0.9); }
.mk-act-edit { color: #6366f1; }
.mk-act-edit:hover { background: #eef2ff; border-color: #6366f1; }
.mk-act-del { color: #ef4444; }
.mk-act-del:hover { background: #fef2f2; border-color: #ef4444; }

/* Mobile responsive for Mirkamal */
@media (max-width: 600px) {
    .mk-buttons { gap: 10px; }
    .mk-action-btn { padding: 22px 12px; }
    .mk-btn-label { font-size: 16px; }
    .mk-modal { width: 96%; max-width: none; }
    .mk-modal .custom-input { height: 50px; font-size: 17px; }
    #mirkamalTabContent { padding: 10px; }
    .company-tab-system { padding: 0 8px; overflow-x: auto; }
    .company-tab { padding: 10px 14px; font-size: 12px; white-space: nowrap; }
    /* Kassir panel mobile */
    #cashierPanel { padding: 10px; }
    #cashierPanel .mk-action-btn { padding: 18px 10px; }
    #cashierPanel .mk-btn-label { font-size: 14px; }
    /* Header mobile */
    .dashboard-header { flex-direction: column; gap: 10px; padding: 12px 16px; }
    .dashboard-header .logo h1 { font-size: 16px; }
    .user-profile { font-size: 12px; flex-wrap: wrap; }
    .filter-controls { width: 100%; }
    .date-group { flex-wrap: wrap; }
    .date-range-filter { flex-wrap: wrap; }
    .modern-month-picker { width: 100%; }
    /* Stat cards mobile */
    .top-cards { grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 10px; }
    .stat-card h2 { font-size: 16px; }
    .stat-card h3 { font-size: 11px; }
    /* Table mobile */
    .refined-table { font-size: 12px; }
    .refined-table th, .refined-table td { padding: 6px 8px; }
    /* Charts mobile */
    .charts-and-lists { padding: 10px; }
    .branch-list { padding: 0 10px; }
}

.clickable-card:hover {
    border-color: #d97706 !important;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
    transition: all 0.2s;
}

.date-range-filter input[type="date"] {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-primary);
    font-family: inherit;
}

.date-range-filter input[type="date"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* ─── Modern Month Picker ─── */
.modern-month-picker {
    position: relative;
    width: 220px;
    font-family: inherit;
}

.picker-header {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border-color);
    padding: 10px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.picker-header:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 5px rgba(26, 178, 166, 0.15);
}

.picker-header.open {
    border-color: var(--primary);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.picker-icon {
    font-size: 14px;
    margin-right: 8px;
    color: var(--text-secondary);
}

.picker-arrow {
    font-size: 10px;
    color: var(--text-secondary);
    margin-left: auto;
    transition: transform 0.2s ease;
}

.picker-header.open .picker-arrow {
    transform: rotate(180deg);
}

.picker-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.picker-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.picker-dropdown.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.month-list {
    list-style: none;
    margin: 0;
    padding: 5px 0;
}

.month-list li {
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s ease;
}

.month-list li:hover {
    background-color: rgba(26, 178, 166, 0.08);
    /* Light teal hover */
    color: var(--primary);
}

.month-list li.selected {
    background-color: rgba(26, 178, 166, 0.15);
    color: var(--primary);
    font-weight: 600;
    position: relative;
}

.month-list li.selected::after {
    content: "✓";
    position: absolute;
    right: 14px;
    color: var(--primary);
}

/* ─── Buttons ─── */
.primary-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.primary-btn:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
}

.primary-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}

/* ─── Initial Message ─── */
.initial-msg {
    text-align: center;
    padding: 80px 20px;
}

.initial-msg h2 {
    color: var(--text-primary);
    font-size: 22px;
}

.initial-msg p {
    color: var(--text-secondary);
    margin-top: 8px;
    font-size: 15px;
}

/* ─── Top Stats ─── */
.top-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    padding: 16px 24px;
}

.stat-card {
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.stat-card.highlight {
    background: var(--primary-light);
    border-color: rgba(13, 148, 136, 0.25);
}

.stat-card h3 {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.stat-card h2 {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.color-nagd {
    color: var(--nagd-color) !important;
}

.color-pos {
    color: var(--pos-color) !important;
}

.color-total {
    color: var(--total-color) !important;
}

.color-online {
    color: #8b5cf6 !important;
}

/* ─── Tab System ─── */
/* Şirkət tabları (üst səviyyə) */
.company-tab-system {
    display: flex;
    gap: 0;
    padding: 0 32px;
    background: linear-gradient(135deg, #1e293b, #334155);
}

.company-tab {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: rgba(255,255,255,0.6);
    padding: 12px 28px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: all 0.2s;
}

.company-tab:hover {
    color: rgba(255,255,255,0.9);
    background: rgba(255,255,255,0.05);
}

.company-tab.active {
    color: #fff;
    border-bottom: 3px solid #0d9488;
    background: rgba(255,255,255,0.08);
}

.tab-system {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
    padding: 0 32px;
    background: var(--bg-card);
}

.tab-btn {
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    padding: 14px 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

.tab-content {
    display: none;
    flex-direction: column;
    gap: 0;
}

.tab-content.active {
    display: flex;
}

.main-content {
    flex-direction: column;
}

/* ─── Daily Report ─── */
.daily-report-panel {
    padding: 20px 32px;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

.report-controls {
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.custom-select,
.custom-input {
    background: var(--bg-card);
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    transition: border-color 0.2s;
}

.custom-select:focus,
.custom-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* ─── Table ─── */
.table-container {
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.refined-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    table-layout: auto;
}

.refined-table th {
    padding: 12px 12px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.refined-table th:last-child {
    border-right: none;
}

/* Column group separators – visual grouping */
.refined-table th.col-sep,
.refined-table td.col-sep {
    border-left: 3px solid var(--primary) !important;
}

.refined-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid #f1f5f9;
    font-size: 15px;
    color: var(--text-primary);
    white-space: nowrap;
}

.refined-table td:last-child {
    border-right: none;
}

.refined-table tbody tr {
    transition: background 0.12s;
}

.refined-table tbody tr:hover {
    background: #f0fdfa !important;
}

.refined-table tbody tr.row-checked {
    background: #f0fdf4 !important;
}

.refined-table tbody tr.row-checked td {
    text-decoration: line-through;
    color: #94a3b8;
}

/* Zebra */
.refined-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

/* ─── Date Cell ─── */
.date-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    line-height: 1.2;
    padding: 4px 0;
}

.date-cell .date-day {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.date-cell .date-month {
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
}

.date-cell .date-year {
    font-size: 11px;
    color: var(--text-secondary);
}

/* ─── Expense Cell ─── */
.cell-expense {
    background: rgba(254, 226, 226, 0.5) !important;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    position: relative;
    font-weight: 500;
}

.cell-expense:hover {
    background-color: #eef2ff !important;
    color: #4f46e5;
}

.cell-expense::after {
    content: "👁";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.2s;
}

.cell-expense:hover::after {
    opacity: 0.5;
}

/* ─── Expenses Page ─── */
.expenses-page {
    padding: 24px 32px;
}

.expenses-row {
    display: flex;
    gap: 20px;
}

.expenses-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.2s;
}

.expenses-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
}

.expenses-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.expenses-card-header h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.expenses-card-icon {
    font-size: 28px;
    line-height: 1;
}

/* Batch category checkboxes */
.unmapped-reason-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 8px;
    transition: background 0.15s;
    cursor: pointer;
}

.unmapped-reason-item:hover {
    background: #e0f2fe;
}

.unmapped-reason-item input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--primary);
    cursor: pointer;
    flex-shrink: 0;
}

.unmapped-reason-item label {
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    flex: 1;
}

/* Expense Details Modal Table */
.expense-detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.expense-detail-table th {
    background: #f1f5f9;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.expense-detail-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-primary);
}

.expense-detail-table tr:hover td {
    background: #f0fdfa;
}

@media (max-width: 768px) {
    .expenses-row {
        flex-direction: column;
    }
    .expenses-page {
        padding: 16px;
    }
}

/* ─── Diff Colors ─── */
.row-diff-negative {
    color: var(--danger) !important;
    font-weight: 700;
}

.row-diff-positive {
    color: var(--success) !important;
    font-weight: 700;
}

/* ─── Edit Button ─── */
.circle-btn-edit {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--border-color);
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    font-size: 14px;
}

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

.circle-btn-edit-noop {
    color: #f59e0b;
    border-color: #f59e0b;
    animation: pulse-noop 2s ease-in-out infinite;
}

.circle-btn-edit-noop:hover {
    background: #f59e0b;
    color: white;
    border-color: #f59e0b;
}

@keyframes pulse-noop {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.3);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
    }
}

/* ─── Checkbox ─── */
.row-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ─── Settings ─── */
.settings-panel {
    padding: 32px;
    max-width: 550px;
    margin: 20px 32px;
}

.settings-form {
    display: grid;
    gap: 18px;
    margin-top: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ─── Modal ─── */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    width: 100%;
    max-width: 440px;
    padding: 32px;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-content h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.form-grid {
    display: grid;
    gap: 14px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.secondary-btn {
    background: var(--bg-body);
    color: var(--text-primary);
    border: 1.5px solid var(--border-color);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.secondary-btn:hover {
    background: var(--border-color);
}

/* ─── Charts & Lists ─── */

.charts-and-lists {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr)) minmax(350px, 1.2fr);
    gap: 16px;
    padding: 0 32px 20px 32px;
}


.chart-section {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.chart-section h3 {
    align-self: flex-start;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.chart-container {
    width: 100%;
    max-width: 320px;
    position: relative;
    aspect-ratio: 1;
}

/* ─── Branch List ─── */
.list-section {
    padding: 24px;
    display: flex;
    flex-direction: column;
    max-height: 480px;
}

.list-header {
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
}

.list-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 13px;
}

.branch-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding-right: 6px;
}

.branch-list::-webkit-scrollbar {
    width: 5px;
}

.branch-list::-webkit-scrollbar-track {
    background: transparent;
}

.branch-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

.branch-card {
    background: var(--bg-body);
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.branch-card:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.08);
}

.branch-info h4 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 2px;
    color: var(--text-primary);
}

.branch-info p {
    font-size: 12px;
    color: var(--text-secondary);
}

.branch-stats {
    display: flex;
    gap: 24px;
    text-align: right;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-item span.label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.stat-item span.val {
    font-size: 15px;
    font-weight: 700;
}

.val-nagd {
    color: var(--nagd-color);
}

.val-pos {
    color: var(--pos-color);
}

/* ─── Responsive ─── */
@media (max-width: 1200px) {
    .top-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .top-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-and-lists {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        padding: 12px 16px;
    }

    .top-cards {
        grid-template-columns: 1fr;
        padding: 12px 16px;
    }

    .charts-and-lists {
        padding: 0 16px 16px 16px;
    }

    .daily-report-panel {
        padding: 12px 16px;
    }

    .tab-system {
        padding: 0 16px;
    }
}

/* =========================================================================
   7. YENİ: İCMAL MODALI VƏ XƏBƏRDARLIQ (MIXUP) STİLLERİ
   ========================================================================= */

/* Header Overview Button */
.overview-btn {
    margin-right: 15px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(59, 130, 246, 0.1));
    color: var(--primary-accent);
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.overview-btn:hover {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(59, 130, 246, 0.2));
    border-color: rgba(56, 189, 248, 0.3);
    transform: translateY(-1px);
}

/* Overview Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.overview-modal {
    max-width: 600px;
    width: 90%;
    text-align: center;
}

.overview-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.overview-card {
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    background: var(--surface-bg);
    border: 1px solid var(--border-color);
}

.overview-card h4 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.overview-value {
    font-size: 24px;
    font-weight: 700;
}

.overview-charts {
    background: var(--surface-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.placeholder-chart {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    margin-top: 15px;
}

.placeholder-text {
    color: var(--text-secondary);
    font-size: 14px;
    font-style: italic;
}

/* Branch Overview Cards (Daily Tab) */
.branch-overview-cards {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 0px;
    background: #f8fafc;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

@media (max-width: 1400px) {
    .branch-overview-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .branch-overview-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

.bo-card {
    background: white;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.bo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-color);
}

.bo-card h4 {
    font-size: 10px;
    color: var(--text-secondary);
    margin: 0 0 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bo-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.bo-value.shortage {
    color: var(--danger);
}

.bo-value.excess {
    color: var(--success);
}

/* Kassa / POS Qarışdırma Xəbərdarlığı (Mixup) */
tr.warning-mixup {
    background-color: rgba(239, 68, 68, 0.05) !important;
}

td.warning-mixup-cell {
    position: relative;
    border: 1px solid rgba(239, 68, 68, 0.5) !important;
    border-radius: 4px;
}

td.warning-mixup-cell::after {
    content: "⚠️";
    position: absolute;
    top: -5px;
    right: -5px;
    font-size: 12px;
    background: white;
    border-radius: 50%;
    padding: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}