:root {
    --bg-main: #0b0f19;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.75);
    --border-card: rgba(255, 255, 255, 0.08);
    --text-primary: #f9fafb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --accent-emerald: #10b981;
    --accent-indigo: #6366f1;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme {
    --bg-main: #f3f4f6;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --border-card: rgba(0, 0, 0, 0.08);
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;
    --shadow-glass: 0 8px 30px 0 rgba(0, 0, 0, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.app-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-card);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1rem;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    padding: 0 0.25rem;
}

.brand-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-sidebar-collapse {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-sidebar-collapse:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.25);
    transform: scale(1.05);
}

/* Logo Wrappers & Images */
.brand-logo-wrapper {
    position: relative;
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    cursor: pointer;
    padding: 2px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.brand-logo-wrapper:hover,
.header-logo-wrapper:hover {
    border-color: rgba(99, 102, 241, 0.65);
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.35);
    transform: scale(1.04);
}

.header-logo-wrapper {
    position: relative;
    width: 44px;
    height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    cursor: pointer;
    padding: 2px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.brand-img-logo,
.header-img-logo {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    border-radius: 7px;
    image-rendering: -webkit-optimize-contrast;
    transition: transform 0.2s ease;
}

.brand-logo-wrapper.logo-fit-cover .brand-img-logo,
.header-logo-wrapper.logo-fit-cover .header-img-logo {
    object-fit: cover !important;
}

.brand-logo-wrapper.logo-bg-transparent,
.header-logo-wrapper.logo-bg-transparent {
    background: transparent !important;
}

.brand-logo-wrapper.logo-bg-white,
.header-logo-wrapper.logo-bg-white {
    background: #ffffff !important;
}

.logo-edit-badge {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.78);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s ease;
    border-radius: 8px;
    pointer-events: none;
}

.brand-logo-wrapper:hover .logo-edit-badge,
.header-logo-wrapper:hover .logo-edit-badge {
    opacity: 1;
}

body.light-theme .brand-logo-wrapper,
body.light-theme .header-logo-wrapper {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-title-wrapper {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.brand-text h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.4rem;
    letter-spacing: 1px;
}

.brand-text span {
    font-size: 0.65rem;
    color: var(--accent-emerald);
    font-weight: 700;
    letter-spacing: 1.5px;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    background: rgba(30, 41, 59, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left-width: 4px;
    border-left-style: solid;
    border-left-color: rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.nav-item:hover {
    background: rgba(51, 65, 85, 0.85);
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--text-primary);
    transform: translateX(3px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.98));
    border-color: rgba(255, 255, 255, 0.22);
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.nav-item i {
    font-size: 1.05rem;
    min-width: 22px;
    text-align: center;
    transition: transform 0.2s ease;
}

.nav-item:hover i {
    transform: scale(1.15);
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid var(--border-card);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.api-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-emerald);
    box-shadow: 0 0 10px var(--accent-emerald);
}

.store-info code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    flex: 1;
    min-width: 0;
    padding: 2rem;
    max-width: calc(100vw - 280px);
    width: calc(100vw - 280px);
    box-sizing: border-box;
    overflow-x: hidden;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1), max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Collapsed Sidebar Mode (Desktop) */
.sidebar.collapsed {
    width: 78px;
    padding: 1.5rem 0.5rem;
}

.sidebar.collapsed + .main-content,
body.sidebar-is-collapsed .main-content {
    margin-left: 78px;
    max-width: calc(100vw - 78px);
    width: calc(100vw - 78px);
}

.sidebar.collapsed .brand {
    justify-content: center;
    padding: 0;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-item span {
    display: none !important;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0.75rem 0.5rem;
}

.sidebar.collapsed .nav-item i {
    min-width: unset;
    font-size: 1.15rem;
}

.sidebar.collapsed .sidebar-footer .api-status span,
.sidebar.collapsed .sidebar-footer .store-info span,
.sidebar.collapsed .sidebar-footer .store-info code {
    display: none !important;
}

.sidebar.collapsed .sidebar-footer {
    align-items: center;
    padding-top: 0.75rem;
}

/* Header Toolbar */
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Buttons & Controls */
.period-buttons {
    display: flex;
    background-color: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-card);
}

.period-btn {
    background: transparent;
    border: none;
    padding: 0.5rem 0.85rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.period-btn.active, .period-btn:hover {
    background-color: var(--accent-indigo);
    color: #ffffff;
}

/* Custom Date Range Picker */
.custom-date-picker {
    display: flex;
    align-items: center;
    background-color: var(--bg-secondary);
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-card);
    gap: 6px;
}

.custom-date-picker .date-icon {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.date-input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    padding: 0.35rem 0.6rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    transition: var(--transition);
}

.date-input::-webkit-calendar-picker-indicator {
    filter: invert(0.8);
    cursor: pointer;
}

.date-input:focus, .date-input.active {
    border-color: var(--accent-indigo);
    background: rgba(99, 102, 241, 0.1);
}

.date-sep {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.btn-sm {
    padding: 0.35rem 0.6rem;
    font-size: 0.82rem;
}

.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.select-icon {
    position: absolute;
    left: 12px;
    color: var(--text-secondary);
}

#store-select {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-card);
    padding: 0.55rem 1rem 0.55rem 2.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-indigo), var(--accent-blue));
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-card);
    color: var(--text-secondary);
}

/* Glassmorphism Cards */
.glass {
    background: var(--bg-card);
    -webkit-backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glass);
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.kpi-card {
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    transition: var(--transition);
}

.kpi-card:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.3);
}

.kpi-card.border-rose { border-left: 4px solid var(--accent-rose); }
.kpi-card.border-amber { border-left: 4px solid var(--accent-amber); }
.kpi-card.border-indigo { border-left: 4px solid var(--accent-indigo); }

/* Card Specific Shadows, Neon Glows & Colored Left Border Accents */
.kpi-card-green {
    border-left: 5px solid #10b981 !important;
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.25), 0 4px 12px rgba(16, 185, 129, 0.12), inset 0 0 0 1px rgba(16, 185, 129, 0.25) !important;
}
.kpi-card-green:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 14px 32px -4px rgba(16, 185, 129, 0.45), 0 6px 16px rgba(16, 185, 129, 0.3), inset 0 0 0 1px rgba(16, 185, 129, 0.5) !important;
}

.kpi-card-purple {
    border-left: 5px solid #a855f7 !important;
    box-shadow: 0 10px 25px -5px rgba(168, 85, 247, 0.25), 0 4px 12px rgba(168, 85, 247, 0.12), inset 0 0 0 1px rgba(168, 85, 247, 0.25) !important;
}
.kpi-card-purple:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 14px 32px -4px rgba(168, 85, 247, 0.45), 0 6px 16px rgba(168, 85, 247, 0.3), inset 0 0 0 1px rgba(168, 85, 247, 0.5) !important;
}

.kpi-card-blue {
    border-left: 5px solid #3b82f6 !important;
    box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.25), 0 4px 12px rgba(59, 130, 246, 0.12), inset 0 0 0 1px rgba(59, 130, 246, 0.25) !important;
}
.kpi-card-blue:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 14px 32px -4px rgba(59, 130, 246, 0.45), 0 6px 16px rgba(59, 130, 246, 0.3), inset 0 0 0 1px rgba(59, 130, 246, 0.5) !important;
}

.kpi-card-amber {
    border-left: 5px solid #f59e0b !important;
    box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.25), 0 4px 12px rgba(245, 158, 11, 0.12), inset 0 0 0 1px rgba(245, 158, 11, 0.25) !important;
}
.kpi-card-amber:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 14px 32px -4px rgba(245, 158, 11, 0.45), 0 6px 16px rgba(245, 158, 11, 0.3), inset 0 0 0 1px rgba(245, 158, 11, 0.5) !important;
}

.kpi-card-rose {
    border-left: 5px solid #f43f5e !important;
    box-shadow: 0 10px 25px -5px rgba(244, 63, 94, 0.25), 0 4px 12px rgba(244, 63, 94, 0.12), inset 0 0 0 1px rgba(244, 63, 94, 0.25) !important;
}
.kpi-card-rose:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 14px 32px -4px rgba(244, 63, 94, 0.45), 0 6px 16px rgba(244, 63, 94, 0.3), inset 0 0 0 1px rgba(244, 63, 94, 0.5) !important;
}

.kpi-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.kpi-icon.revenue { background: rgba(16, 185, 129, 0.15); color: var(--accent-emerald); }
.kpi-icon.receipt { background: rgba(99, 102, 241, 0.15); color: var(--accent-indigo); }
.kpi-icon.ticket { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue); }
.kpi-icon.cash { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.kpi-icon.stock { background: rgba(139, 92, 246, 0.15); color: var(--accent-purple); }
.kpi-icon.expense-icon { background: rgba(244, 63, 94, 0.15); color: var(--accent-rose); }

.kpi-details {
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.kpi-details h3 {
    font-size: clamp(1rem, 2.2vw, 1.35rem);
    font-weight: 700;
    margin: 0.2rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-word;
}

/* Safes Cards Grid Layout & No-Truncate Styling */
#safes-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.1rem;
}

#safes-cards-grid .kpi-card {
    padding: 1.1rem 1rem;
    min-width: 0;
}

#safes-cards-grid .kpi-details {
    min-width: 0;
    overflow: visible;
}

#safes-cards-grid .kpi-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: normal;
    word-break: break-word;
    display: block;
    line-height: 1.25;
}

#safes-cards-grid .kpi-details h3 {
    font-size: clamp(0.92rem, 1.25vw, 1.15rem);
    font-weight: 700;
    margin: 0.3rem 0;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    letter-spacing: -0.2px;
}

#safes-cards-grid .kpi-details .txt-amber {
    font-size: 0.88rem;
    display: inline-block;
}

.kpi-subtext {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge.positive {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--accent-emerald);
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.chart-card {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}

.chart-card.full-width {
    grid-column: span 2;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.chart-wrapper {
    position: relative;
    height: 280px;
    width: 100%;
}

/* Tables & Grid */
.data-card {
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.grid-2-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
    min-width: 0;
    width: 100%;
}

.grid-2-col > * {
    min-width: 0;
    max-width: 100%;
}

/* Debts View Switcher Group */
.debts-view-mode-group {
    display: inline-flex;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
}

.debts-view-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.debts-view-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.debts-view-btn.active {
    background: rgba(99, 102, 241, 0.28);
    color: #ffffff;
    border-color: rgba(99, 102, 241, 0.5);
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

body.light-theme .debts-view-mode-group {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

body.light-theme .debts-view-btn {
    color: #475569;
}

body.light-theme .debts-view-btn:hover {
    color: #0f172a;
    background: #f1f5f9;
}

body.light-theme .debts-view-btn.active {
    background: #ffffff;
    color: #4f46e5;
    border-color: #c7d2fe;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Debts Tables Grid - Layout Modes */
.debts-tables-grid {
    display: grid;
    gap: 1.5rem;
    min-width: 0;
    width: 100%;
}

.debts-tables-grid > * {
    min-width: 0;
    max-width: 100%;
}

/* 1. Side-by-Side Mode */
.debts-tables-grid,
.debts-tables-grid.mode-side-by-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* 2. Full-Width Stacked Mode */
.debts-tables-grid.mode-stacked {
    grid-template-columns: 1fr !important;
}

/* 3. Single Table Focused Modes */
.debts-tables-grid.mode-payables-only {
    grid-template-columns: 1fr !important;
}
.debts-tables-grid.mode-payables-only > .card-receivables {
    display: none !important;
}

.debts-tables-grid.mode-receivables-only {
    grid-template-columns: 1fr !important;
}
.debts-tables-grid.mode-receivables-only > .card-payables {
    display: none !important;
}

/* Compact layout for 2-column mode so ALL 6 columns fit inside with NO horizontal scroll */
.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-card,
.debts-tables-grid.mode-side-by-side .data-card {
    padding: 1rem 0.65rem;
}

.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table,
.debts-tables-grid.mode-side-by-side .data-table {
    table-layout: auto;
    width: 100%;
    font-size: 0.8rem;
}

.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table th,
.debts-tables-grid.mode-side-by-side .data-table th {
    padding: 0.55rem 0.25rem;
    font-size: 0.7rem;
    letter-spacing: 0.1px;
}

.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table td,
.debts-tables-grid.mode-side-by-side .data-table td {
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
}

/* Specific column widths for 2-column mode */
.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table th:nth-child(1),
.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table td:nth-child(1),
.debts-tables-grid.mode-side-by-side .data-table th:nth-child(1),
.debts-tables-grid.mode-side-by-side .data-table td:nth-child(1) {
    width: 24px;
    max-width: 24px;
    padding-left: 0.1rem;
    padding-right: 0.1rem;
    text-align: center;
}

.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table th:nth-child(2),
.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table td:nth-child(2),
.debts-tables-grid.mode-side-by-side .data-table th:nth-child(2),
.debts-tables-grid.mode-side-by-side .data-table td:nth-child(2) {
    min-width: 95px;
    word-break: break-word;
    line-height: 1.25;
}

.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table th:nth-child(3),
.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table td:nth-child(3),
.debts-tables-grid.mode-side-by-side .data-table th:nth-child(3),
.debts-tables-grid.mode-side-by-side .data-table td:nth-child(3) {
    min-width: 60px;
    max-width: 80px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table th:nth-child(4),
.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table td:nth-child(4),
.debts-tables-grid.mode-side-by-side .data-table th:nth-child(4),
.debts-tables-grid.mode-side-by-side .data-table td:nth-child(4) {
    min-width: 95px;
    white-space: nowrap;
    font-weight: 700;
}

.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table th:nth-child(5),
.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table td:nth-child(5),
.debts-tables-grid.mode-side-by-side .data-table th:nth-child(5),
.debts-tables-grid.mode-side-by-side .data-table td:nth-child(5) {
    min-width: 75px;
    text-align: center;
}

.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table th:nth-child(6),
.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table td:nth-child(6),
.debts-tables-grid.mode-side-by-side .data-table th:nth-child(6),
.debts-tables-grid.mode-side-by-side .data-table td:nth-child(6) {
    min-width: 48px;
    text-align: center;
}

.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table .th-content,
.debts-tables-grid.mode-side-by-side .data-table .th-content {
    gap: 3px;
    font-size: 0.7rem;
    white-space: normal !important;
    line-height: 1.15;
}

.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table .th-content > span:first-child,
.debts-tables-grid.mode-side-by-side .data-table .th-content > span:first-child {
    white-space: normal !important;
}

.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table .th-filter-btn,
.debts-tables-grid.mode-side-by-side .data-table .th-filter-btn {
    width: 16px;
    height: 16px;
    font-size: 9px;
    padding: 0;
}

.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table .badge,
.debts-tables-grid.mode-side-by-side .data-table .badge {
    padding: 2px 5px !important;
    font-size: 11px !important;
    white-space: nowrap;
}

.debts-tables-grid:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table td strong,
.debts-tables-grid.mode-side-by-side .data-table td strong {
    font-size: 0.8rem;
}

/* Stacked mode and Single table modes - luxurious spacing */
.debts-tables-grid.mode-stacked .data-card,
.debts-tables-grid.mode-payables-only .data-card,
.debts-tables-grid.mode-receivables-only .data-card {
    padding: 1.4rem 1.25rem;
}

.debts-tables-grid.mode-stacked .data-table th,
.debts-tables-grid.mode-payables-only .data-table th,
.debts-tables-grid.mode-receivables-only .data-table th {
    padding: 0.75rem 0.75rem;
    font-size: 0.75rem;
}

.debts-tables-grid.mode-stacked .data-table td,
.debts-tables-grid.mode-payables-only .data-table td,
.debts-tables-grid.mode-receivables-only .data-table td {
    padding: 0.75rem 0.75rem;
}

.debts-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Specific column styles for Employee Debts in 2-column mode */
#debts-tables-grid-employees:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table th:nth-child(1),
#debts-tables-grid-employees:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table td:nth-child(1),
#debts-tables-grid-employees.mode-side-by-side .data-table th:nth-child(1),
#debts-tables-grid-employees.mode-side-by-side .data-table td:nth-child(1) {
    width: 24px;
    max-width: 24px;
    text-align: center;
    padding-left: 0.1rem;
    padding-right: 0.1rem;
}

#debts-tables-grid-employees:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table th:nth-child(2),
#debts-tables-grid-employees:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table td:nth-child(2),
#debts-tables-grid-employees.mode-side-by-side .data-table th:nth-child(2),
#debts-tables-grid-employees.mode-side-by-side .data-table td:nth-child(2) {
    min-width: 105px;
    word-break: break-word;
    line-height: 1.25;
}

#debts-tables-grid-employees:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table th:nth-child(3),
#debts-tables-grid-employees:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table td:nth-child(3),
#debts-tables-grid-employees.mode-side-by-side .data-table th:nth-child(3),
#debts-tables-grid-employees.mode-side-by-side .data-table td:nth-child(3) {
    min-width: 68px;
    white-space: nowrap;
    text-align: right;
}

#debts-tables-grid-employees:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table th:nth-child(4),
#debts-tables-grid-employees:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table td:nth-child(4),
#debts-tables-grid-employees.mode-side-by-side .data-table th:nth-child(4),
#debts-tables-grid-employees.mode-side-by-side .data-table td:nth-child(4) {
    min-width: 68px;
    white-space: nowrap;
    text-align: right;
}

#debts-tables-grid-employees:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table th:nth-child(5),
#debts-tables-grid-employees:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table td:nth-child(5),
#debts-tables-grid-employees.mode-side-by-side .data-table th:nth-child(5),
#debts-tables-grid-employees.mode-side-by-side .data-table td:nth-child(5) {
    min-width: 90px;
    white-space: nowrap;
    font-weight: 700;
    text-align: right;
}

#debts-tables-grid-employees:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table th:nth-child(6),
#debts-tables-grid-employees:not(.mode-stacked):not(.mode-payables-only):not(.mode-receivables-only) .data-table td:nth-child(6),
#debts-tables-grid-employees.mode-side-by-side .data-table th:nth-child(6),
#debts-tables-grid-employees.mode-side-by-side .data-table td:nth-child(6) {
    width: 36px;
    max-width: 36px;
    text-align: center;
    padding: 0.35rem 0.15rem;
}

.tfoot-highlight {
    background: rgba(15, 23, 42, 0.7) !important;
    font-weight: 700;
}

.tfoot-highlight td {
    border-top: 1px solid var(--border-card) !important;
    border-bottom: none !important;
    padding: 0.65rem 0.6rem !important;
    font-size: 0.82rem !important;
}

body.light-theme .tfoot-highlight {
    background: #f1f5f9 !important;
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
    min-width: 0;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.data-table th {
    padding: 0.75rem 0.75rem;
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 1px solid var(--border-card);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 0.75rem 0.75rem;
    border-bottom: 1px solid var(--border-card);
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Tab Management */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.txt-success { color: var(--accent-emerald); }
.txt-danger { color: var(--accent-rose); }
.txt-amber { color: var(--accent-amber); }

/* Form Group */
.gsheets-form-group .input-group {
    display: flex;
    gap: 0.5rem;
    position: relative;
}

.gsheets-form-group input {
    flex: 1;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.help-text {
    display: block;
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    -webkit-backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Toggle Button */
.sidebar-toggle-btn {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-card);
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    font-size: 1.2rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}
.sidebar-toggle-btn:hover {
    background: var(--accent-indigo);
    color: #ffffff;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar-toggle-btn {
        display: inline-flex;
    }
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        box-shadow: 0 0 35px rgba(0, 0, 0, 0.7);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        max-width: 100vw;
        padding: 1rem;
    }
    .top-header {
        gap: 0.85rem;
    }
    .header-controls {
        width: 100%;
        justify-content: space-between;
    }
    .period-buttons {
        width: 100%;
        justify-content: space-between;
    }
    .period-btn {
        flex: 1;
        text-align: center;
        padding: 0.45rem 0.25rem;
        font-size: 0.78rem;
    }
    .custom-date-picker {
        width: 100%;
        justify-content: space-between;
    }
    .charts-grid, .grid-2-col {
        grid-template-columns: 1fr;
    }
    .chart-card.full-width {
        grid-column: span 1;
    }
}

@media (max-width: 640px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    .header-title h1 {
        font-size: 1.25rem;
    }
    .subtitle {
        font-size: 0.8rem;
    }
    .kpi-details h3 {
        font-size: 1.15rem;
    }
}

/* Expandable Expenses Styles */
.category-parent-row {
    transition: background-color 0.2s ease;
}
.category-parent-row:hover {
    background-color: rgba(99, 102, 241, 0.08) !important;
}
.category-parent-row.expanded {
    background-color: rgba(99, 102, 241, 0.12) !important;
    border-bottom: none !important;
}
.btn-exp-toggle {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}
.btn-exp-toggle:hover {
    background: var(--accent-indigo);
    color: #ffffff;
    border-color: var(--accent-indigo);
    transform: scale(1.1);
}
.sub-data-table tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Nav & Icon Accent Utility Classes */
.nav-accent-indigo { border-left-color: #6366F1 !important; }
.nav-accent-blue { border-left-color: #3B82F6 !important; }
.nav-accent-red { border-left-color: #EF4444 !important; }
.nav-accent-amber { border-left-color: #F59E0B !important; }
.nav-accent-emerald { border-left-color: #10B981 !important; }
.nav-accent-teal { border-left-color: #14B8A6 !important; }
.nav-accent-purple { border-left-color: #8B5CF6 !important; }
.nav-accent-pink { border-left-color: #EC4899 !important; }
.nav-accent-cyan { border-left-color: #06B6D4 !important; }

.icon-indigo { color: #6366F1 !important; }
.icon-blue { color: #3B82F6 !important; }
.icon-red { color: #EF4444 !important; }
.icon-amber { color: #F59E0B !important; }
.icon-emerald { color: #10B981 !important; }
.icon-teal { color: #14B8A6 !important; }
.icon-purple { color: #8B5CF6 !important; }
.icon-pink { color: #EC4899 !important; }
.icon-cyan { color: #06B6D4 !important; }
.border-cyan { border-color: rgba(6, 182, 212, 0.3) !important; }
.no-underline { text-decoration: none !important; }

/* Dashboard Component & Layout Utility Classes */
.btn-lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #818cf8;
}
.col-w-36 { width: 36px !important; }
.col-w-40 { width: 40px !important; }
.col-w-110 { width: 110px !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.flex-space-between-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}
.recon-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.btn-recon-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 15px;
    border-radius: 10px;
    cursor: pointer;
}
.recon-cp-name { margin: 0; font-size: 1.3rem; }
.opacity-60 { opacity: 0.6 !important; }
.grid-3-col { grid-template-columns: repeat(3, 1fr) !important; }
.tfoot-highlight {
    background: rgba(99, 102, 241, 0.15);
    font-weight: bold;
    font-size: 15px;
    border-top: 2px solid var(--border-color);
}
.display-none { display: none; }

/* City Breakdown Grid & Cards */
.city-debts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}
.border-cyan {
    border: 1px solid rgba(6, 182, 212, 0.35) !important;
}
.border-cyan:hover {
    border-color: rgba(6, 182, 212, 0.6) !important;
    box-shadow: 0 8px 24px rgba(6, 182, 212, 0.15);
}
.border-amber {
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
}
.border-amber:hover {
    border-color: rgba(245, 158, 11, 0.6) !important;
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.15);
}
.txt-cyan {
    color: #06b6d4 !important;
}
.txt-amber {
    color: #f59e0b !important;
}
.city-card {
    padding: 1.25rem 1.5rem;
    transition: var(--transition);
}
.city-card.active-city {
    background: rgba(99, 102, 241, 0.12) !important;
    border-color: rgba(99, 102, 241, 0.7) !important;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.4);
}
.city-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.city-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.1rem;
}
.badge-city-count {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 500;
}
.btn-city-filter {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-card);
    color: var(--text-primary);
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-city-filter:hover, .btn-city-filter.active {
    background: var(--accent-indigo);
    color: #ffffff;
    border-color: var(--accent-indigo);
}
.city-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.city-stat-item {
    display: flex;
    flex-direction: column;
}
.city-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.city-stat-item h4 {
    font-size: 1.1rem;
    font-weight: 700;
}
.city-subtext {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}
.flex-center-gap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.city-pills-group {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--border-card);
}
.city-pill {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 5px 12px;
    border-radius: 7px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}
.city-pill:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}
.city-pill.active {
    background: var(--accent-indigo);
    color: #ffffff;
    font-weight: 600;
}

@media (max-width: 992px) {
    .city-debts-grid {
        grid-template-columns: 1fr;
    }
    .bank-kpi-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 576px) {
    .bank-live-banner {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    .bank-live-banner .badge-bank-live {
        align-self: flex-start !important;
    }
    .bank-kpi-grid {
        grid-template-columns: 1fr !important;
    }
    .kpi-card {
        padding: 0.8rem 1rem !important;
    }
}

.icon-empty-notice {
    display: block;
    margin: 15px auto;
}

/* Clean brand typography */
.brand-text h2 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
    color: #ffffff;
    font-size: 1.1rem;
    margin: 0;
}

.brand-text span {
    color: #fda4af;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.payment-calendar-placeholder {
    padding: 3rem 1rem;
}

.payment-calendar-placeholder .calendar-icon-lg {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    opacity: 0.8;
}

.payment-calendar-placeholder h4 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.payment-calendar-placeholder p {
    color: var(--text-muted);
}

.bank-live-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(16, 185, 129, 0.08) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.bank-live-main {
    display: flex;
    align-items: center;
    gap: 14px;
}

.bank-live-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.2);
    color: #818cf8;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.bank-live-icon .fa-vault {
    font-size: 1.1rem;
}

.bank-live-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    font-weight: 600;
}

.bank-live-amount {
    font-size: 1.6rem;
    font-weight: 800;
    color: #ffffff;
    margin: 2px 0 0 0;
}

.bank-live-subtext {
    color: #10b981;
    font-weight: 500;
    font-size: 0.78rem;
}

.badge-bank-live {
    text-align: right;
}

.badge-bank-account-live {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 16px;
}

.icon-mr-4 {
    margin-right: 4px;
}

.icon-mr-5 {
    margin-right: 5px;
}

.bank-kpi-grid .kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 0.95rem;
}

.bank-kpi-grid .kpi-icon.sales {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.bank-kpi-grid .kpi-icon.revenue {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.bank-kpi-grid .kpi-icon.expense {
    background: rgba(168, 85, 247, 0.15);
    color: #a855f7;
}

.bank-kpi-grid .kpi-icon.cash {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

#bank-type-pills {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    padding: 4px;
    border-radius: 8px;
}

/* Payment Calendar Styles */
.paycal-timeline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.paycal-date-card {
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.paycal-date-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.paycal-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

.paycal-item-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 12px 14px;
    transition: all 0.2s ease;
}

.paycal-item-card:hover {
    border-color: rgba(6, 182, 212, 0.5);
    background: rgba(6, 182, 212, 0.06);
    transform: translateY(-2px);
}

.paycal-item-card.item-overdue {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.05);
}

.paycal-item-card.item-paid {
    opacity: 0.65;
}

.paycal-amount-box {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
}

.badge-overdue {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.badge-today {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

.badge-upcoming {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-paid {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-unspecified {
    background: rgba(156, 163, 175, 0.2);
    color: #9ca3af;
    border: 1px solid rgba(156, 163, 175, 0.3);
}

.badge-usd {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.badge-uzs {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.row-overdue {
    background: rgba(239, 68, 68, 0.08) !important;
}

.row-paid {
    opacity: 0.6;
}

.paycal-date-reset-btn {
    display: none;
    padding: 2px 6px;
}

.paycal-charts-flow {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.paycal-chart-timeline-wrapper {
    height: 480px;
    position: relative;
    width: 100%;
}

.paycal-chart-suppliers-wrapper {
    height: 420px;
    position: relative;
    width: 100%;
}

.paycal-chart-wrapper {
    height: 400px;
    position: relative;
}

/* Table Column Filters & Sorting System */
.data-table th {
    position: relative;
    -webkit-user-select: none;
    user-select: none;
}

.data-table th.th-num {
    width: 36px;
    text-align: center;
}

.data-table th.th-sortable {
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.data-table th.th-sortable:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.th-content {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.text-center .th-content {
    justify-content: center;
    width: 100%;
}

.text-right {
    text-align: right !important;
}

.text-right .th-content {
    justify-content: flex-end;
    width: 100%;
}

.th-sort-icon {
    font-size: 11px;
    opacity: 0.3;
    transition: opacity 0.2s ease, color 0.2s ease;
    display: inline-block;
    vertical-align: middle;
}

.th-sortable:hover .th-sort-icon {
    opacity: 0.75;
}

.th-sort-icon.active {
    opacity: 1;
    color: #818cf8;
}

.th-filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary, #94a3b8);
    cursor: pointer;
    font-size: 10px;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 2px;
    position: relative;
    vertical-align: middle;
}

.th-filter-btn:hover {
    color: #fff;
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.4);
}

.th-filter-btn.filter-active {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.2);
    border-color: #38bdf8;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

.th-filter-btn.filter-active::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 4px #38bdf8;
}

/* Glassmorphic Dropdown for Table Filters */
.th-filter-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 1050;
    min-width: 175px;
    background: rgba(15, 23, 42, 0.96);
    -webkit-backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 6px 0;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 1px rgba(255, 255, 255, 0.2);
    text-transform: none;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: normal;
    text-align: left;
}

.th-filter-dropdown.show {
    display: block;
    animation: fadeIn 0.15s ease-out;
}

.filter-opt {
    padding: 7px 14px;
    cursor: pointer;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s ease, color 0.15s ease;
    font-size: 12px;
}

.filter-opt:hover {
    background: rgba(99, 102, 241, 0.15);
    color: #fff;
}

.filter-opt.active {
    background: rgba(99, 102, 241, 0.25);
    color: #818cf8;
    font-weight: 600;
}

.filter-opt.active::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 11px;
    color: #818cf8;
}

.table-responsive {
    overflow-x: auto;
    overflow-y: visible;
    min-height: 280px;
}

/* Debts Table Export & Action Buttons (Excel, PDF, Print) */
.debts-card-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-debts-action,
.btn-print-debts {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    -webkit-user-select: none;
    user-select: none;
    line-height: 1.4;
    border: 1px solid transparent;
}

.btn-debts-action:active,
.btn-print-debts:active {
    transform: translateY(0) !important;
}

/* 1. EXCEL BUTTON (Emerald Green Accent) */
.btn-debts-action.btn-debts-excel {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.35);
}
.btn-debts-action.btn-debts-excel:hover {
    background: rgba(16, 185, 129, 0.25);
    color: #ffffff;
    border-color: #10b981;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.3);
}

body.light-theme .btn-debts-action.btn-debts-excel {
    background: #d1fae5;
    color: #047857;
    border-color: #a7f3d0;
}
body.light-theme .btn-debts-action.btn-debts-excel:hover {
    background: #a7f3d0;
    color: #065f46;
    border-color: #34d399;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

/* 2. PDF BUTTON (Rose Red Accent) */
.btn-debts-action.btn-debts-pdf {
    background: rgba(244, 63, 94, 0.12);
    color: #fb7185;
    border-color: rgba(244, 63, 94, 0.35);
}
.btn-debts-action.btn-debts-pdf:hover {
    background: rgba(244, 63, 94, 0.25);
    color: #ffffff;
    border-color: #f43f5e;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(244, 63, 94, 0.3);
}

body.light-theme .btn-debts-action.btn-debts-pdf {
    background: #ffe4e6;
    color: #be123c;
    border-color: #fecdd3;
}
body.light-theme .btn-debts-action.btn-debts-pdf:hover {
    background: #fecdd3;
    color: #9f1239;
    border-color: #fda4af;
    box-shadow: 0 2px 8px rgba(244, 63, 94, 0.2);
}

/* 3. PRINT BUTTON (Neutral / Indigo Accent) */
.btn-debts-action.btn-debts-print,
.btn-print-debts {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
    border-color: rgba(99, 102, 241, 0.35);
}
.btn-debts-action.btn-debts-print:hover,
.btn-print-debts:hover {
    background: rgba(99, 102, 241, 0.25);
    color: #ffffff;
    border-color: #6366f1;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(99, 102, 241, 0.3);
}

body.light-theme .btn-debts-action.btn-debts-print,
body.light-theme .btn-print-debts {
    background: #e0e7ff;
    color: #4338ca;
    border-color: #c7d2fe;
}
body.light-theme .btn-debts-action.btn-debts-print:hover,
body.light-theme .btn-print-debts:hover {
    background: #c7d2fe;
    color: #3730a3;
    border-color: #a5b4fc;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
}

/* Spin animation for button loading */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.btn-debts-action.is-loading i {
    animation: spin 0.8s linear infinite;
}

/* ============================================================
   TOKEN MANAGEMENT MODAL & SIDEBAR BUTTON
   ============================================================ */
.store-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.btn-token-edit {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.btn-token-edit:hover {
    background: rgba(99, 102, 241, 0.3);
    color: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

body.light-theme .btn-token-edit {
    background: #e0e7ff;
    color: #4f46e5;
    border-color: #c7d2fe;
}

body.light-theme .btn-token-edit:hover {
    background: #c7d2fe;
    color: #3730a3;
}

.modal-hidden {
    display: none !important;
}

.token-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 15, 30, 0.75);
    -webkit-backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.token-modal-card {
    background: #111827;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 25px rgba(99, 102, 241, 0.15);
    overflow: hidden;
    animation: tokenModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes tokenModalPop {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

body.light-theme .token-modal-card {
    background: #ffffff;
    border-color: #e2e8f0;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

.token-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .token-modal-header {
    border-bottom-color: #e2e8f0;
}

.token-modal-title {
    font-size: 17px;
    font-weight: 700;
    color: #f8fafc;
    display: flex;
    align-items: center;
    gap: 10px;
}

.token-modal-title i {
    color: #818cf8;
}

body.light-theme .token-modal-title {
    color: #0f172a;
}

.token-modal-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}

.token-modal-close:hover {
    color: #f8fafc;
}

body.light-theme .token-modal-close:hover {
    color: #0f172a;
}

.token-modal-body {
    padding: 24px;
}

.token-modal-desc {
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.5;
    margin-bottom: 18px;
}

body.light-theme .token-modal-desc {
    color: #64748b;
}

.token-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.token-input-label {
    font-size: 13px;
    font-weight: 600;
    color: #e2e8f0;
}

body.light-theme .token-input-label {
    color: #334155;
}

.token-input-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.token-input {
    width: 100%;
    padding: 12px 42px 12px 14px;
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    font-family: monospace;
    font-size: 13px;
    color: #f8fafc;
    outline: none;
    transition: all 0.2s;
}

.token-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

body.light-theme .token-input {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}

body.light-theme .token-input:focus {
    background: #ffffff;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.btn-toggle-vis {
    position: absolute;
    right: 12px;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    font-size: 15px;
    padding: 4px;
}

.btn-toggle-vis:hover {
    color: #f8fafc;
}

body.light-theme .btn-toggle-vis:hover {
    color: #0f172a;
}

.token-status-msg {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
}

.token-status-msg.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid #10b981;
    color: #34d399;
}

.token-status-msg.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid #ef4444;
    color: #f87171;
}

.token-status-msg.loading {
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid #6366f1;
    color: #818cf8;
}

.token-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(15, 23, 42, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

body.light-theme .token-modal-footer {
    background: #f8fafc;
    border-top-color: #e2e8f0;
}

.btn-token-cancel {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-token-cancel:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
}

body.light-theme .btn-token-cancel {
    border-color: #cbd5e1;
    color: #64748b;
}

body.light-theme .btn-token-cancel:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-token-save {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    transition: all 0.2s;
}

.btn-token-save:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
}

.btn-token-save:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ========================================================
   COMPANY LOGO MODAL & UPLOAD STYLES
   ======================================================== */
.logo-modal-card {
    max-width: 580px;
    width: 92%;
}

.logo-dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.logo-dropzone:hover,
.logo-dropzone.dragover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
    transform: translateY(-1px);
}

.dropzone-icon {
    font-size: 34px;
    color: #818cf8;
    margin-bottom: 10px;
}

.dropzone-text {
    font-size: 14px;
    color: #f8fafc;
    margin-bottom: 4px;
}

.dropzone-text strong {
    color: #818cf8;
    text-decoration: underline;
}

.dropzone-hint {
    font-size: 12px;
    color: #94a3b8;
}

.logo-preview-section {
    margin-bottom: 16px;
}

.preview-title {
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 8px;
}

.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 600px) {
    .preview-grid {
        grid-template-columns: 1fr;
    }
}

.preview-card {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px;
}

body.light-theme .preview-card {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.preview-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.preview-logo-wrapper {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 2px;
}

.preview-logo-wrapper img {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
    border-radius: 7px;
}

.preview-logo-wrapper.logo-fit-cover img {
    object-fit: cover !important;
}

.preview-logo-wrapper.logo-bg-transparent {
    background: transparent !important;
}

.preview-logo-wrapper.logo-bg-white {
    background: #ffffff !important;
}

.header-preview-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.header-preview-text .h-title {
    font-size: 13px;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.light-theme .header-preview-text .h-title {
    color: #0f172a;
}

.header-preview-text .h-sub {
    font-size: 10px;
    color: #94a3b8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-options-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 16px 0;
}

@media (max-width: 600px) {
    .logo-options-row {
        grid-template-columns: 1fr;
    }
}

.logo-option-item .option-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #cbd5e1;
    margin-bottom: 6px;
}

body.light-theme .logo-option-item .option-label {
    color: #334155;
}

.fit-toggle-group,
.bg-toggle-group {
    display: flex;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 3px;
    gap: 3px;
}

body.light-theme .fit-toggle-group,
body.light-theme .bg-toggle-group {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.btn-fit-toggle,
.btn-bg-toggle {
    flex: 1;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-align: center;
}

.btn-fit-toggle:hover,
.btn-bg-toggle:hover {
    color: #f8fafc;
}

body.light-theme .btn-fit-toggle:hover,
body.light-theme .btn-bg-toggle:hover {
    color: #0f172a;
}

.btn-fit-toggle.active,
.btn-bg-toggle.active {
    background: #4f46e5;
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(79, 70, 229, 0.4);
}

.manual-instructions-accordion {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin-top: 14px;
    font-size: 12px;
    color: #94a3b8;
}

body.light-theme .manual-instructions-accordion {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #64748b;
}

.manual-instructions-accordion summary {
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
    color: #cbd5e1;
    -webkit-user-select: none;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

body.light-theme .manual-instructions-accordion summary {
    color: #334155;
}

.manual-instructions-accordion summary:hover {
    color: #818cf8;
}

.manual-inst-body {
    padding: 8px 14px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

body.light-theme .manual-inst-body {
    border-top-color: #e2e8f0;
}

.manual-inst-body .path-code {
    display: block;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 10px;
    border-radius: 6px;
    font-family: monospace;
    color: #38bdf8;
    margin: 6px 0;
    word-break: break-all;
}

body.light-theme .manual-inst-body .path-code {
    background: #e2e8f0;
    color: #0284c7;
}

.manual-inst-body ul {
    margin: 6px 0 6px 20px;
    line-height: 1.6;
}

.manual-inst-body code {
    color: #f43f5e;
    background: rgba(244, 63, 94, 0.1);
    padding: 1px 4px;
    border-radius: 4px;
}

.manual-inst-body .inst-note {
    color: #34d399;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.btn-align-left {
    margin-right: auto;
}

/* Bank Bridge AAB Custom Styling */
.border-teal { border: 1px solid rgba(20, 184, 166, 0.3) !important; }
.highlight-teal {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.12) 0%, rgba(59, 130, 246, 0.08) 100%) !important;
    border: 1px solid rgba(20, 184, 166, 0.35) !important;
}
.txt-teal { color: #14b8a6 !important; }

/* ========================================================
   EXPENSE TYPES 8-CARD GRID & INTERACTIVE PILLS
   ======================================================== */
.expense-types-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 1400px) {
    .expense-types-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1100px) {
    .expense-types-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .expense-types-grid {
        grid-template-columns: 1fr;
    }
}

.expense-type-card {
    padding: 0.85rem 1rem !important;
    gap: 0.85rem !important;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    user-select: none;
    border: 1px solid var(--border-card);
}

.expense-type-card:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.expense-type-card.active {
    background: rgba(255, 255, 255, 0.09) !important;
    box-shadow: 0 0 16px rgba(99, 102, 241, 0.35) !important;
    border-color: var(--accent-indigo) !important;
    transform: translateY(-2px);
}

.exp-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
}

.exp-badge {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.exp-title {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.exp-pct {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: auto;
}

.exp-sum {
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
    margin: 2px 0 3px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}

.exp-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.exp-desc {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.exp-count {
    font-weight: 600;
}

/* 8 Distinct Themes */
/* OX - Indigo (OPEX) */
.border-ox { border-left: 4px solid #6366f1 !important; }
.exp-icon-ox { background: rgba(99, 102, 241, 0.15) !important; color: #818cf8 !important; }
.badge-ox { background: rgba(99, 102, 241, 0.2); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.4); }

/* CX - Amber (CAPEX) */
.border-cx { border-left: 4px solid #f59e0b !important; }
.exp-icon-cx { background: rgba(245, 158, 11, 0.15) !important; color: #fbbf24 !important; }
.badge-cx { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }

/* CG - Emerald (COGS) */
.border-cg { border-left: 4px solid #10b981 !important; }
.exp-icon-cg { background: rgba(16, 185, 129, 0.15) !important; color: #34d399 !important; }
.badge-cg { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }

/* NX - Purple (Неоперационные) */
.border-nx { border-left: 4px solid #a855f7 !important; }
.exp-icon-nx { background: rgba(168, 85, 247, 0.15) !important; color: #c084fc !important; }
.badge-nx { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }

/* TX - Rose (Налоги) */
.border-tx { border-left: 4px solid #f43f5e !important; }
.exp-icon-tx { background: rgba(244, 63, 94, 0.15) !important; color: #fb7185 !important; }
.badge-tx { background: rgba(244, 63, 94, 0.2); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.4); }

/* FN - Sky (Финансовые) */
.border-fn { border-left: 4px solid #0ea5e9 !important; }
.exp-icon-fn { background: rgba(14, 165, 233, 0.15) !important; color: #38bdf8 !important; }
.badge-fn { background: rgba(14, 165, 233, 0.2); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.4); }

/* TR - Teal (Перемещения) */
.border-tr { border-left: 4px solid #14b8a6 !important; }
.exp-icon-tr { background: rgba(20, 184, 166, 0.15) !important; color: #2dd4bf !important; }
.badge-tr { background: rgba(20, 184, 166, 0.2); color: #2dd4bf; border: 1px solid rgba(20, 184, 166, 0.4); }

/* AD - Yellow (Корректировки) */
.border-ad { border-left: 4px solid #eab308 !important; }
.exp-icon-ad { background: rgba(234, 179, 8, 0.15) !important; color: #fde047 !important; }
.badge-ad { background: rgba(234, 179, 8, 0.2); color: #fde047; border: 1px solid rgba(234, 179, 8, 0.4); }

/* ======================================================== */
/* AURA БАЛАНС: 12 КЛЮЧЕВЫХ ПОКАЗАТЕЛЕЙ & УПРАВЛЕНЧЕСКИЙ БАЛАНС */
/* ======================================================== */
.badge-priority-critical {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.35);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.badge-priority-critical i {
    color: #f43f5e;
    animation: priority-pulse 2s infinite ease-in-out;
}

.badge-priority-high {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.badge-priority-high i {
    color: #a855f7;
}

@keyframes priority-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.15); }
}

.kpi-card.kpi-critical {
    border-left: 5px solid #f43f5e !important;
    box-shadow: 0 8px 24px -4px rgba(244, 63, 94, 0.18), inset 0 0 0 1px rgba(244, 63, 94, 0.2) !important;
}

.kpi-card.kpi-critical:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 28px -4px rgba(244, 63, 94, 0.35), inset 0 0 0 1px rgba(244, 63, 94, 0.4) !important;
}

.kpi-card.kpi-high {
    border-left: 5px solid #a855f7 !important;
    box-shadow: 0 8px 24px -4px rgba(168, 85, 247, 0.18), inset 0 0 0 1px rgba(168, 85, 247, 0.2) !important;
}

.kpi-card.kpi-high:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 28px -4px rgba(168, 85, 247, 0.35), inset 0 0 0 1px rgba(168, 85, 247, 0.4) !important;
}

.health-card {
    transition: var(--transition);
}

.health-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.balance-column {
    transition: var(--transition);
}

.balance-column:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

/* ============================================================
   TAB 11: AURA LUXURY IFRS BALANCE SHEET (EXECUTIVE EDITORIAL)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

.aura-balance-luxury-container {
    background-color: #faf8f4;
    border-radius: 20px;
    padding: 1.75rem 2rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid #ede8de;
    color: #1f1c19;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin-bottom: 2rem;
}

/* 1. Header */
.luxury-bal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ede7dc;
    margin-bottom: 1.5rem;
}

.luxury-bal-brand-group {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.luxury-bal-emblem {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-right: 1px solid #e7dfd1;
    padding-right: 2rem;
}

.luxury-crown-icon {
    width: 32px;
    height: 32px;
    color: #c59b27;
    margin-bottom: 3px;
    filter: drop-shadow(0 2px 4px rgba(197, 155, 39, 0.25));
}

.luxury-brand-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: 2px;
    color: #2c251e;
    line-height: 1.1;
}

.luxury-brand-sub {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: #8c8275;
    text-transform: uppercase;
    margin-top: 2px;
}

.luxury-bal-title-box {
    display: flex;
    flex-direction: column;
}

.luxury-bal-main-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.85rem;
    font-weight: 700;
    color: #1a1714;
    letter-spacing: -0.3px;
    margin: 0;
    line-height: 1.2;
}

.luxury-bal-subtitle {
    font-size: 0.88rem;
    color: #7d7468;
    margin: 4px 0 0 0;
    font-weight: 400;
}

.luxury-bal-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.luxury-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    border: 1px solid #ded7ca;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 500;
    color: #38322b;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    cursor: pointer;
    transition: all 0.2s ease;
}

.luxury-pill:hover {
    border-color: #c59b27;
    box-shadow: 0 3px 10px rgba(197, 155, 39, 0.12);
}

.luxury-pill-dark {
    background: #2a241f;
    border-color: #3a322b;
    color: #f7f3ec;
    font-weight: 600;
}

.luxury-pill-dark:hover {
    background: #383029;
    color: #ffffff;
}

.luxury-pill-dark i {
    color: #c59b27;
}

.luxury-currency-select {
    border: none;
    background: transparent;
    font-size: 0.84rem;
    font-weight: 600;
    color: #38322b;
    outline: none;
    cursor: pointer;
    padding-right: 4px;
}

.luxury-btn-refresh {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid #ded7ca;
    background: #ffffff;
    color: #38322b;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

.luxury-btn-refresh:hover {
    border-color: #c59b27;
    color: #c59b27;
    transform: rotate(45deg);
}

/* 2. Top KPI Cards */
.luxury-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.luxury-kpi-card {
    background: #ffffff;
    border: 1px solid #ece5da;
    border-radius: 14px;
    padding: 1.25rem 1.4rem;
    display: flex;
    align-items: center;
    gap: 1.15rem;
    box-shadow: 0 2px 8px rgba(50, 40, 30, 0.03);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.luxury-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(50, 40, 30, 0.06);
    border-color: #dfd7c9;
}

.luxury-kpi-icon-box {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 12px;
    background: #fbf5eb;
    border: 1px solid #ebdcc5;
    color: #a87e38;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.luxury-kpi-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.luxury-kpi-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #7d7367;
    margin-bottom: 2px;
}

.luxury-kpi-value-row {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.luxury-kpi-num {
    font-size: 1.85rem;
    font-weight: 800;
    color: #1a1714;
    letter-spacing: -0.5px;
    line-height: 1.15;
}

.luxury-kpi-unit {
    font-size: 0.85rem;
    font-weight: 600;
    color: #635b51;
}

.luxury-kpi-trend {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.76rem;
    font-weight: 700;
    margin-top: 3px;
}

.luxury-kpi-trend.trend-positive {
    color: #198754;
}

.trend-arrow {
    font-size: 0.65rem;
}

.trend-note {
    font-weight: 400;
    color: #8f8578;
    margin-left: 2px;
}

/* 3. Main Balance Card (3 Columns) */
.luxury-main-balance-card {
    background: #ffffff;
    border: 1px solid #ece5da;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 4px 16px rgba(50, 40, 30, 0.04);
    display: grid;
    grid-template-columns: 1.15fr 0.95fr 1.15fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.lux-bal-col {
    display: flex;
    flex-direction: column;
}

.lux-col-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding-bottom: 0.75rem;
    border-bottom: 1.5px solid #ece5da;
    margin-bottom: 1rem;
}

.lux-col-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1714;
    letter-spacing: 0.5px;
    margin: 0;
}

.lux-col-header-total {
    font-size: 1.35rem;
    font-weight: 800;
    color: #1a1714;
}

.lux-col-header-total .unit {
    font-size: 0.85rem;
    font-weight: 600;
    color: #7d7367;
}

/* Sections & Banners */
.lux-section {
    margin-bottom: 0.85rem;
}

.lux-section-banner {
    background: #f5f1e8;
    border-radius: 9px;
    padding: 9px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    font-weight: 700;
    color: #2b251e;
    margin-bottom: 7px;
}

.lux-sec-nums {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.lux-sec-val {
    font-weight: 800;
    font-size: 0.98rem;
    color: #1a1714;
}

.lux-sec-pct {
    font-weight: 700;
    font-size: 0.88rem;
    color: #3b352d;
    min-width: 34px;
    text-align: right;
}

.lux-section-equity .lux-banner-equity {
    background: #eaf4ed;
    color: #1d6e47;
}

.lux-section-equity .lux-sec-val {
    color: #1d6e47;
}

.lux-section-equity .lux-sec-pct {
    color: #1d6e47;
}

/* Row Items */
.lux-rows-list {
    display: flex;
    flex-direction: column;
}

.lux-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid #f7f3ec;
    font-size: 1.02rem;
    color: #362f28;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.lux-row:last-child {
    border-bottom: none;
}

.lux-row:hover {
    background: #faf6ef;
}

.lux-row-left {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    font-weight: 600;
}

.lux-row-label {
    font-size: 1.04rem;
    font-weight: 600;
    color: inherit;
    line-height: 1.35;
}

.lux-icon-dot {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.lux-icon-dot.color-stock {
    background: #e9f0f8;
    color: #2b5c8f;
}

.lux-icon-dot.color-cash {
    background: #e6f4ea;
    color: #1e7e48;
}

.lux-icon-dot.color-ar {
    background: #fdf3e5;
    color: #b37424;
}

.lux-icon-dot.color-advances {
    background: #fbf0f0;
    color: #b54a4a;
}

.lux-icon-dot.color-other-curr {
    background: #f2ede6;
    color: #7b7266;
}

.lux-icon-dot.color-ppe {
    background: #e8f4fc;
    color: #2072a7;
}

.lux-icon-dot.color-rou {
    background: #e6f7f8;
    color: #167a82;
}

.lux-icon-dot.color-intangible {
    background: #f1ecf9;
    color: #6a40a6;
}

.lux-icon-dot.color-other-noncurr {
    background: #f2ede6;
    color: #7b7266;
}

.lux-icon-dot.color-liab {
    background: #fdf0f0;
    color: #b53838;
}

.lux-icon-dot.color-equity {
    background: #e8f5ec;
    color: #1e7e48;
}

.lux-row-right {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.lux-row-amount {
    font-size: 1.04rem;
    font-weight: 700;
    color: #1a1714;
    min-width: 36px;
    text-align: right;
}

.lux-row-pct {
    font-size: 0.88rem;
    font-weight: 600;
    color: #786f63;
    min-width: 32px;
    text-align: right;
}

.lux-chevron {
    font-size: 0.72rem;
    color: #c7beaf;
}

/* Center Donut Column */
.lux-bal-col-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    border-left: 1px dashed #ece5da;
    border-right: 1px dashed #ece5da;
}

.lux-donut-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lux-donut-canvas-container {
    position: relative;
    width: 240px;
    height: 240px;
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.lux-donut-center-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lux-donut-center-num {
    font-size: 2.1rem;
    font-weight: 800;
    color: #1a1714;
    line-height: 1;
    letter-spacing: -0.5px;
}

.lux-donut-center-unit {
    font-size: 0.88rem;
    font-weight: 700;
    color: #595147;
    margin-top: 2px;
}

.lux-donut-center-tag {
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #9c9183;
    margin-top: 4px;
}

.lux-donut-legend-grid {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 1rem;
    font-size: 0.76rem;
}

.lux-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.lux-legend-marker {
    width: 10px;
    height: 10px;
    min-width: 10px;
    border-radius: 50%;
}

.lux-legend-marker.dot-stock { background: #243746; }
.lux-legend-marker.dot-ppe { background: #9fb3c8; }
.lux-legend-marker.dot-cash { background: #347a64; }
.lux-legend-marker.dot-rou { background: #b8cfe0; }
.lux-legend-marker.dot-ar { background: #d4b896; }
.lux-legend-marker.dot-other { background: #ebd8c3; }

.lux-legend-name {
    color: #595147;
    font-weight: 500;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lux-legend-pct {
    font-weight: 700;
    color: #1a1714;
}

/* 4. Bottom Cards: Ratios & Dynamics */
.luxury-bottom-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.luxury-bottom-card {
    background: #ffffff;
    border: 1px solid #ece5da;
    border-radius: 14px;
    padding: 1.35rem 1.5rem;
    box-shadow: 0 2px 8px rgba(50, 40, 30, 0.03);
}

.lux-card-top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.lux-card-title-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.lux-card-title-left h4 {
    font-size: 0.96rem;
    font-weight: 700;
    color: #1a1714;
    margin: 0;
}

.lux-header-icon-droplet {
    color: #c59b27;
    font-size: 1rem;
}

.lux-header-icon-chart {
    color: #8c7f6f;
    font-size: 1rem;
}

.lux-header-chevron {
    color: #c7beaf;
    font-size: 0.8rem;
    cursor: pointer;
}

/* Horizontal Ratios Grid */
.lux-ratios-horizontal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.lux-ratio-box {
    display: flex;
    flex-direction: column;
}

.lux-ratio-box-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: #fbf5eb;
    color: #a87e38;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    margin-bottom: 6px;
}

.lux-ratio-box-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: #7d7367;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.lux-ratio-box-val {
    font-size: 1.45rem;
    font-weight: 800;
    color: #1a1714;
    line-height: 1.1;
    margin-bottom: 4px;
}

.lux-ratio-box-norm {
    font-size: 0.68rem;
    font-weight: 600;
    color: #198754;
    margin-bottom: 8px;
}

.lux-ratio-indicator-bar {
    width: 100%;
    height: 4px;
    background: #eee8de;
    border-radius: 2px;
    overflow: hidden;
}

.lux-ratio-bar-fill {
    height: 100%;
    background: #198754;
    border-radius: 2px;
}

.lux-dynamics-container {
    height: 160px;
    position: relative;
    width: 100%;
}

/* 5. Verification Footer Bar */
.luxury-verification-footer {
    background: #eaf4ed;
    border: 1px solid #cce5d2;
    border-radius: 12px;
    padding: 10px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.84rem;
    color: #1d6e47;
}

.lux-footer-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.lux-footer-check-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #198754;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
}

.lux-footer-main-text {
    font-weight: 500;
}

.lux-footer-main-text strong {
    font-weight: 700;
}

.lux-footer-sep {
    color: #a4cead;
}

.lux-footer-delta {
    color: #24583b;
}

.lux-footer-right {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: #3b7c58;
}

.lux-footer-dot {
    color: #198754;
    font-size: 0.65rem;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .luxury-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .luxury-main-balance-card {
        grid-template-columns: 1fr;
    }
    .lux-bal-col-center {
        border: none;
        border-top: 1px dashed #ece5da;
        border-bottom: 1px dashed #ece5da;
        padding: 1.5rem 0;
    }
    .luxury-bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .aura-balance-luxury-container {
        padding: 1rem;
    }
    .luxury-bal-emblem {
        border-right: none;
        padding-right: 0;
    }
    .luxury-kpi-grid {
        grid-template-columns: 1fr;
    }
    .lux-ratios-horizontal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   AURA BALANCE: DARK THEME EXECUTIVE SLATE & GOLD EDITION
   ============================================================ */
body.dark-theme .aura-balance-luxury-container {
    background-color: #111827;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
    color: #f9fafb;
}

body.dark-theme .luxury-bal-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .luxury-bal-emblem {
    border-right-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .luxury-brand-name {
    color: #f9fafb;
}

body.dark-theme .luxury-brand-sub {
    color: #9ca3af;
}

body.dark-theme .luxury-bal-main-title {
    color: #ffffff;
}

body.dark-theme .luxury-pill {
    background: #1f2937;
    border-color: rgba(255, 255, 255, 0.12);
    color: #e5e7eb;
}

body.dark-theme .luxury-pill:hover {
    border-color: #f59e0b;
    box-shadow: 0 3px 12px rgba(245, 158, 11, 0.2);
}

body.dark-theme .luxury-pill-dark {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.15);
    color: #f8fafc;
}

body.dark-theme .luxury-pill-dark:hover {
    background: #1e293b;
    color: #ffffff;
}

body.dark-theme .luxury-currency-select {
    color: #f3f4f6;
    background: transparent;
}

body.dark-theme .luxury-currency-select option {
    background: #1f2937;
    color: #f3f4f6;
}

body.dark-theme .luxury-kpi-card {
    background: #161f30;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

body.dark-theme .luxury-kpi-card:hover {
    border-color: rgba(255, 255, 255, 0.16);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

body.dark-theme .luxury-kpi-icon-box {
    background: rgba(197, 155, 39, 0.15);
    border-color: rgba(197, 155, 39, 0.35);
    color: #fbbf24;
}

body.dark-theme .luxury-kpi-label {
    color: #9ca3af;
}

body.dark-theme .luxury-kpi-num {
    color: #f9fafb;
}

body.dark-theme .luxury-kpi-unit {
    color: #9ca3af;
}

body.dark-theme .trend-note {
    color: #9ca3af;
}

body.dark-theme .luxury-main-balance-card {
    background: #161f30;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

body.dark-theme .lux-col-header {
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .lux-col-title {
    color: #f9fafb;
}

body.dark-theme .lux-col-header-total {
    color: #f9fafb;
}

body.dark-theme .lux-col-header-total .unit {
    color: #9ca3af;
}

body.dark-theme .lux-section-banner {
    background: #1e283b;
    color: #e2e8f0;
}

body.dark-theme .lux-sec-val {
    color: #f9fafb;
}

body.dark-theme .lux-sec-pct {
    color: #cbd5e1;
}

body.dark-theme .lux-section-equity .lux-banner-equity {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
}

body.dark-theme .lux-section-equity .lux-sec-val,
body.dark-theme .lux-section-equity .lux-sec-pct {
    color: #34d399;
}

body.dark-theme .lux-row {
    border-bottom-color: rgba(255, 255, 255, 0.04);
    color: #e5e7eb;
}

body.dark-theme .lux-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

body.dark-theme .lux-row-amount {
    color: #f9fafb;
}

body.dark-theme .lux-row-pct {
    color: #9ca3af;
}

body.dark-theme .lux-chevron {
    color: #4b5563;
}

body.dark-theme .lux-bal-col-center {
    border-left-color: rgba(255, 255, 255, 0.08);
    border-right-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .lux-donut-center-num {
    color: #ffffff;
}

body.dark-theme .lux-donut-center-unit {
    color: #9ca3af;
}

body.dark-theme .lux-donut-center-tag {
    color: #6b7280;
}

body.dark-theme .lux-legend-name {
    color: #9ca3af;
}

body.dark-theme .lux-legend-pct {
    color: #f9fafb;
}

body.dark-theme .luxury-bottom-card {
    background: #161f30;
    border-color: rgba(255, 255, 255, 0.08);
}

body.dark-theme .lux-card-top-header h4 {
    color: #f9fafb;
}

body.dark-theme .lux-header-chevron {
    color: #6b7280;
}

body.dark-theme .lux-ratio-box {
    background: #1e283b;
    border-color: rgba(255, 255, 255, 0.06);
}

body.dark-theme .lux-ratio-box-title {
    color: #9ca3af;
}

body.dark-theme .lux-ratio-box-val {
    color: #f9fafb;
}

body.dark-theme .lux-ratio-box-norm {
    color: #10b981;
}

body.dark-theme .lux-ratio-indicator-bar {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-theme .luxury-verification-footer {
    background: #1e283b;
    border-color: rgba(255, 255, 255, 0.08);
    color: #d1d5db;
}

body.dark-theme .lux-footer-main-text {
    color: #e5e7eb;
}

body.dark-theme .lux-footer-main-text strong {
    color: #34d399;
}

body.dark-theme .lux-footer-sep {
    color: #374151;
}

body.dark-theme .lux-footer-delta {
    color: #9ca3af;
}

body.dark-theme .lux-footer-delta strong {
    color: #f9fafb;
}

body.dark-theme .lux-footer-updated {
    color: #9ca3af;
}

/* Dark Theme Specific Icons */
body.dark-theme .lux-icon-dot.color-stock {
    background: rgba(59, 130, 246, 0.16);
    color: #60a5fa;
}

body.dark-theme .lux-icon-dot.color-cash {
    background: rgba(16, 185, 129, 0.16);
    color: #34d399;
}

body.dark-theme .lux-icon-dot.color-ar {
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
}

body.dark-theme .lux-icon-dot.color-advances {
    background: rgba(244, 63, 94, 0.16);
    color: #fb7185;
}

body.dark-theme .lux-icon-dot.color-other-curr,
body.dark-theme .lux-icon-dot.color-other-noncurr {
    background: rgba(156, 163, 175, 0.14);
    color: #9ca3af;
}

body.dark-theme .lux-icon-dot.color-ppe {
    background: rgba(14, 165, 233, 0.16);
    color: #38bdf8;
}

body.dark-theme .lux-icon-dot.color-rou {
    background: rgba(20, 184, 166, 0.16);
    color: #2dd4bf;
}

body.dark-theme .lux-icon-dot.color-intangible {
    background: rgba(168, 85, 247, 0.16);
    color: #c084fc;
}

body.dark-theme .lux-icon-dot.color-liab {
    background: rgba(244, 63, 94, 0.16);
    color: #fb7185;
}

body.dark-theme .lux-icon-dot.color-equity {
    background: rgba(16, 185, 129, 0.16);
    color: #34d399;
}

/* ========================================================
   COUNTERPARTY PHONE NUMBER STYLING
   ======================================================== */
.cp-phone-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    color: #10b981;
    text-decoration: none;
    font-weight: 500;
    opacity: 0.88;
    transition: all 0.15s ease;
    padding: 1px 5px;
    border-radius: 4px;
    width: fit-content;
}

.cp-phone-link:hover {
    opacity: 1 !important;
    color: #34d399 !important;
    background: rgba(16, 185, 129, 0.14);
    text-decoration: none;
}

body.light-theme .cp-phone-link {
    color: #059669;
}

body.light-theme .cp-phone-link:hover {
    color: #047857 !important;
    background: rgba(5, 150, 105, 0.1);
}





