/* ==========================================================================
   AURA — Executive P&L Dashboard Stylesheet
   ========================================================================== */

:root {
    --bg-dark: #0A0F1D;
    --bg-sidebar: #070B16;
    --bg-panel: rgba(16, 24, 48, 0.92);
    --bg-panel-hover: rgba(24, 35, 68, 0.95);
    
    --border-color: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(30, 101, 255, 0.4);
    
    --text-primary: #FFFFFF;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    
    --color-blue: #1E65FF;
    --color-cyan: #00D2FF;
    --color-green: #00E676;
    --color-gold: #FFB300;
    --color-red: #FF4D4D;
    --color-purple: #7C4DFF;
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --radius-lg: 14px;
    --radius-md: 10px;
    --radius-sm: 6px;
    
    --shadow-main: 0 10px 30px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.dark-theme {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.4;
}

.max-h-500 {
    max-height: 500px;
    overflow-y: auto;
}

.dashboard-container {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* ── 1. Left Sidebar ─────────────────────────────────────────────────────── */

.sidebar {
    width: 250px;
    min-width: 250px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 16px;
    z-index: 100;
}

.brand-container {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.brand-logo-img {
    width: 54px;
    height: 44px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.4);
}

.brand-logo-img img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    border-radius: 8px;
}

.brand-text h2 {
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #FFF;
}

.brand-text span {
    font-size: 10.5px;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
}

.nav-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, #1E65FF 0%, #0052CC 100%);
    color: #FFF;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(30, 101, 255, 0.4);
}

.mini-brand-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.mini-brand-badge .badge-icon {
    width: 32px;
    height: 32px;
    background: var(--color-gold);
    color: #000;
    font-weight: 900;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.mini-brand-badge .badge-info strong {
    display: block;
    font-size: 12px;
    color: #FFF;
}

.mini-brand-badge .badge-info small {
    font-size: 10px;
    color: var(--text-muted);
}

/* ── 2. Main Content Layout ────────────────────────────────────────────── */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px 28px;
    overflow-y: auto;
    max-width: calc(100vw - 250px);
}

/* ── Tab View Switching ────────────────────────────────────────────────── */

.tab-view {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.tab-view.active {
    display: flex;
}

/* ── Top Bar ───────────────────────────────────────────────────────────── */

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    padding: 16px 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-main);
}

.page-title-block h1 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.page-title-block h1 span {
    color: var(--color-blue);
}

.period-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.controls-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.control-group label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.custom-select {
    background: #0B132B;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 7px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.custom-select:focus {
    border-color: var(--color-blue);
}

.btn-lang-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(30, 101, 255, 0.2) 0%, rgba(0, 210, 255, 0.2) 100%);
    border: 1px solid var(--color-blue);
    color: #FFF;
    padding: 9px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-lang-toggle:hover {
    background: var(--color-blue);
    box-shadow: 0 0 16px rgba(30, 101, 255, 0.5);
}

.sync-block {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.btn-refresh {
    background: transparent;
    border: none;
    color: var(--color-blue);
    cursor: pointer;
    font-size: 14px;
}

/* ── 3. KPI Scorecard Cards Grid (6 Cards) ──────────────────────────────── */

.kpi-scorecards-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}

.kpi-scorecard {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-main);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}

.kpi-scorecard::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    opacity: 0.7;
    transition: opacity 0.25s ease;
}

.kpi-scorecard:hover::before { opacity: 1; }

.kpi-scorecard:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: var(--shadow-main), 0 4px 20px rgba(0,0,0,0.3);
}

.sc-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sc-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    flex-shrink: 0;
}

.kpi-scorecard:hover .sc-icon {
    transform: scale(1.1);
}

.sc-icon.blue {
    background: linear-gradient(135deg, rgba(30, 101, 255, 0.35) 0%, rgba(30, 60, 180, 0.18) 100%);
    color: #5B9DFF;
    box-shadow: 0 0 16px rgba(30, 101, 255, 0.25), inset 0 1px 0 rgba(255,255,255,0.08);
    border: 1px solid rgba(30, 101, 255, 0.25);
}
.sc-icon.green {
    background: linear-gradient(135deg, rgba(0, 230, 118, 0.3) 0%, rgba(0, 160, 80, 0.12) 100%);
    color: #4ADE80;
    box-shadow: 0 0 16px rgba(0, 230, 118, 0.2), inset 0 1px 0 rgba(255,255,255,0.08);
    border: 1px solid rgba(0, 230, 118, 0.2);
}
.sc-icon.cyan {
    background: linear-gradient(135deg, rgba(0, 210, 255, 0.3) 0%, rgba(0, 140, 200, 0.12) 100%);
    color: #38D9FF;
    box-shadow: 0 0 16px rgba(0, 210, 255, 0.2), inset 0 1px 0 rgba(255,255,255,0.08);
    border: 1px solid rgba(0, 210, 255, 0.2);
}
.sc-icon.orange {
    background: linear-gradient(135deg, rgba(255, 145, 0, 0.3) 0%, rgba(200, 100, 0, 0.12) 100%);
    color: #FFB347;
    box-shadow: 0 0 16px rgba(255, 145, 0, 0.2), inset 0 1px 0 rgba(255,255,255,0.08);
    border: 1px solid rgba(255, 145, 0, 0.2);
}
.sc-icon.gold {
    background: linear-gradient(135deg, rgba(255, 179, 0, 0.3) 0%, rgba(200, 140, 0, 0.12) 100%);
    color: #FFD54F;
    box-shadow: 0 0 16px rgba(255, 179, 0, 0.2), inset 0 1px 0 rgba(255,255,255,0.08);
    border: 1px solid rgba(255, 179, 0, 0.2);
}
.sc-icon.red {
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.3) 0%, rgba(200, 40, 40, 0.12) 100%);
    color: #FF7B7B;
    box-shadow: 0 0 16px rgba(255, 77, 77, 0.2), inset 0 1px 0 rgba(255,255,255,0.08);
    border: 1px solid rgba(255, 77, 77, 0.2);
}

.sc-title {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.2px;
}

.sc-val {
    font-size: 22px;
    font-weight: 800;
    font-family: var(--font-sans);
    color: #FFF;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.sc-sub {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.35;
}

.sc-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    overflow: hidden;
}

.sc-progress-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.sc-pct-tag {
    font-size: 11.5px;
    font-weight: 700;
    align-self: flex-end;
    letter-spacing: 0.3px;
}

.sc-pct-tag.blue { color: #5B9DFF; }
.sc-pct-tag.green { color: #4ADE80; }
.sc-pct-tag.cyan { color: #38D9FF; }
.sc-pct-tag.orange { color: #FFB347; }
.sc-pct-tag.gold { color: #FFD54F; }
.sc-pct-tag.red { color: #FF7B7B; }

/* ── 4. Charts Row ─────────────────────────────────────────────────────── */

.charts-row {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 1fr;
    gap: 16px;
}

.dashboard-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-main);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3, .panel-header h2 {
    font-size: 15px;
    font-weight: 700;
    color: #FFF;
    display: flex;
    align-items: center;
    gap: 8px;
}

.unit-tag {
    font-size: 11px;
    color: var(--text-muted);
}

.chart-wrapper {
    position: relative;
    height: 240px;
    width: 100%;
}

.chart-legend-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 11px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.legend-dot.plan-dot { background: var(--color-blue); }
.legend-dot.fact-dot { background: var(--color-green); }

/* ── 5. Bottom Analytics Row ───────────────────────────────────────────── */

.opex-container {
    display: flex;
    align-items: center;
    gap: 20px;
    height: 220px;
}

.donut-box {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

.donut-center-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.donut-center-text .center-val {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: #FFF;
}

.donut-center-text .center-sub {
    font-size: 10px;
    color: var(--text-muted);
}

.opex-legend-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    overflow-y: auto;
    max-height: 190px;
}

.opex-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
}

.opex-left {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.opex-color-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.opex-pct {
    font-weight: 700;
    color: #FFF;
    font-family: var(--font-mono);
}

/* ── Tables ────────────────────────────────────────────────────────────── */

.table-responsive {
    overflow-x: auto;
    max-height: 220px;
}

.data-table, .pnl-details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.data-table th, .pnl-details-table th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table td, .pnl-details-table td {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.text-right { text-align: right; }
.val-bad { color: var(--color-red); font-weight: 700; }
.val-good { color: var(--color-green); font-weight: 700; }

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-left: 4px;
}
.status-dot.green { background: var(--color-green); }
.status-dot.red { background: var(--color-red); }
.status-dot.yellow { background: var(--color-gold); }

.panel-action-footer {
    padding-top: 8px;
    text-align: right;
}

.link-action {
    font-size: 12px;
    color: var(--color-blue);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.link-action:hover { text-decoration: underline; }

/* ── Tab-Specific Layouts ──────────────────────────────────────────────── */

.stores-detailed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-top: 10px;
}

.store-detail-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.store-detail-card h3 {
    font-size: 16px;
    color: #FFF;
    display: flex;
    justify-content: space-between;
}

.store-metric-row {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-secondary);
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
    padding-bottom: 4px;
}

.cashflow-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding-top: 10px;
}

.cashflow-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cashflow-card h4 {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.cashflow-card .val {
    font-size: 22px;
    font-weight: 800;
    color: #FFF;
}

.reports-hub-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    padding-top: 14px;
}

.report-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.report-card i {
    font-size: 32px;
}

.report-card i.icon-excel { color: var(--color-green); }
.report-card i.icon-pdf { color: var(--color-red); }

.report-card h3 {
    font-size: 15px;
    color: #FFF;
}

.report-card p {
    font-size: 12.5px;
    color: var(--text-secondary);
}

.btn-download {
    background: var(--color-blue);
    color: #FFF;
    border: none;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
}

.settings-box {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 600px;
    padding-top: 10px;
}

.setting-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.setting-item label {
    font-size: 12.5px;
    color: var(--text-secondary);
    font-weight: 600;
}

.status-badge.connected {
    color: var(--color-green);
    font-weight: 700;
    font-size: 13px;
}

.custom-input {
    background: #0B132B;
    border: 1px solid var(--border-color);
    color: #FFF;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
}

/* ── 6. Ratios Grid ────────────────────────────────────────────────────── */

.ratios-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ratios-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 12px;
}

.ratio-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ratio-title {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

.ratio-val {
    font-size: 17px;
    font-weight: 800;
    color: #FFF;
}

.ratio-diff {
    font-size: 10.5px;
    font-weight: 600;
}

.ratio-diff.up { color: var(--color-green); }
.ratio-diff.down { color: var(--color-red); }

/* ── 7. Executive Summary & Recommendations Footer ────────────────────── */

.executive-summary-footer {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 16px;
}

.summary-card, .recommendations-card, .files-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.card-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(30, 101, 255, 0.2);
    color: var(--color-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.card-icon.gold { background: rgba(255, 179, 0, 0.2); color: var(--color-gold); }
.card-icon.blue { background: rgba(0, 210, 255, 0.2); color: var(--color-cyan); }

.card-body h4 {
    font-size: 14px;
    font-weight: 700;
    color: #FFF;
    margin-bottom: 8px;
}

.card-body p {
    font-size: 12.5px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.card-body ul {
    padding-left: 16px;
    font-size: 12.5px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.file-links-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-link-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: var(--text-primary);
    text-decoration: none;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 6px;
    transition: background 0.2s ease;
}

.file-link-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.app-footer {
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    padding: 10px 0 20px;
}

@media (max-width: 1400px) {
    .kpi-scorecards-grid { grid-template-columns: repeat(3, 1fr); }
    .charts-row { grid-template-columns: 1fr; }
    .ratios-grid { grid-template-columns: repeat(4, 1fr); }
    .executive-summary-footer { grid-template-columns: 1fr; }
    .stores-detailed-grid { grid-template-columns: repeat(2, 1fr); }
    .cashflow-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Manual P&L Editor Console Styles ────────────────────────────────── */
.nav-item-manual {
    background: rgba(245, 158, 11, 0.12) !important;
    border: 1px solid rgba(245, 158, 11, 0.35) !important;
    color: var(--color-gold) !important;
    font-weight: 700 !important;
}

.nav-item-manual:hover {
    background: rgba(245, 158, 11, 0.25) !important;
    color: #FFF !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.3) !important;
}

.nav-item-manual.active {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
    color: #FFF !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 18px rgba(245, 158, 11, 0.5) !important;
}

.manual-editor-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.manual-editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.manual-title-block {
    display: flex;
    align-items: center;
    gap: 14px;
}

.manual-title-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: var(--color-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.manual-title-block h3 {
    font-size: 18px;
    font-weight: 800;
    color: #FFF;
}

.manual-title-block p {
    font-size: 12.5px;
    color: var(--text-secondary);
}

.manual-actions-block {
    display: flex;
    gap: 12px;
}

.btn-manual-action {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-manual-action.btn-apply {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    color: #FFF;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-manual-action.btn-apply:hover {
    background: linear-gradient(135deg, #34D399 0%, #10B981 100%);
    transform: translateY(-1px);
}

.btn-manual-action.btn-reset {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn-manual-action.btn-reset:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #FFF;
}

.manual-input-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

@media (max-width: 1400px) {
    .manual-input-grid { grid-template-columns: repeat(3, 1fr); }
}

.manual-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.manual-field-group label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.manual-field-group label i {
    color: var(--color-gold);
    font-size: 12px;
}

.manual-input {
    background: rgba(15, 23, 42, 0.9);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 9px 12px;
    color: #FFF;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 700;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.manual-input:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.manual-calc-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.calc-pill {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calc-pill.highlight {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.4);
}

.calc-pill .calc-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
}

.calc-pill .calc-val {
    font-size: 15px;
    font-weight: 800;
    color: #FFF;
    font-family: var(--font-mono);
}

.calc-pill.highlight .calc-val {
    color: #34D399;
}

/* Sub-Nav Bar inside Manual Editor */
.editor-subnav {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.editor-subnav-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.editor-subnav-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #FFF;
}

.editor-subnav-btn.active {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.5);
    color: var(--color-gold);
    font-weight: 700;
}

.editor-subpanel {
    display: none;
    margin-bottom: 20px;
}

.editor-subpanel.active {
    display: block;
}

.editor-subpanel-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #FFF;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Manual Editor Tables */
.manual-editor-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

.manual-editor-table th {
    background: rgba(15, 23, 42, 0.8);
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}

.manual-editor-table td {
    padding: 8px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    font-size: 13px;
    color: #FFF;
}

.manual-input.table-input {
    width: 110px;
    padding: 6px 8px;
    font-size: 13px;
}

/* Month Input Grid */
.manual-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

@media (max-width: 1400px) {
    .manual-month-grid { grid-template-columns: repeat(4, 1fr); }
}

.month-input-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.month-input-card.highlight {
    border-color: rgba(245, 158, 11, 0.5);
    background: rgba(245, 158, 11, 0.08);
}

.month-input-card h4 {
    font-size: 12px;
    font-weight: 700;
    color: var(--color-gold);
    margin: 0;
}

.month-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.month-field label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
}

.month-field .manual-input {
    width: 80px;
    padding: 4px 6px;
    font-size: 12.5px;
}
