:root {
    --bg-color: #050505; /* Solid Black/Dark */
    --panel-bg: rgba(18, 18, 18, 0.7); /* Dark gray glass */
    --border-color: rgba(255, 255, 255, 0.08);
    --text-main: #f3f4f6; /* Off-white for elegance */
    --text-muted: #9ca3af;
    --primary: #4b5563; /* Sleek Gray */
    --primary-hover: #6b7280; /* Lighter Gray hover */
    --accent: #d1d5db; /* Silver Accent */
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
    --glass-blur: blur(16px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(255, 255, 255, 0.03) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(255, 255, 255, 0.02) 0px, transparent 50%);
    color: var(--text-main);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    min-width: 260px;
    height: 100vh;
    max-height: 100vh;
    box-sizing: border-box;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: var(--glass-blur);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 1.25rem 3rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.settings-subnav {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
    flex-wrap: wrap;
}

.settings-subnav .tab-btn {
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.settings-subnav .tab-btn:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.25);
}

.settings-subnav .tab-btn.active-tab-btn {
    background: var(--accent);
    color: #0a0a0a;
    font-weight: 700;
    border-color: var(--accent);
}

.logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo p {
    font-size: 0.8rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.2rem;
}

.nav-section h3 {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    letter-spacing: 1.5px;
}

.nav-btn, .platform-btn {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.nav-btn:hover, .platform-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

.nav-btn.active, .platform-btn.active {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-weight: 500;
}

/* Main Content */
.content {
    flex: 1;
    padding: 3rem 4rem;
    overflow-y: auto;
}

header {
    margin-bottom: 2.5rem;
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-muted);
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--glass-shadow);
    margin-bottom: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.input-group input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #6b7280;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.input-group select {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1rem;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.input-group select:focus {
    outline: none;
    border-color: #6b7280;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.input-group select option {
    background: #1a1a1a;
    color: var(--text-main);
}

.submit-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px 0 rgba(0, 0, 0, 0.5);
}

.submit-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.result-panel h3 {
    margin-bottom: 1.5rem;
    color: var(--text-main);
    font-weight: 500;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.result-row:last-child {
    border-bottom: none;
}

.result-row .label {
    color: var(--text-muted);
}

.result-row .value {
    font-weight: 600;
    color: var(--text-main);
}

.result-row.highlight .value {
    color: var(--accent);
    font-size: 1.1rem;
}
/* Add to the end of style.css */
.loader {
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.bot-card {
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.2), rgba(17, 24, 39, 0.6));
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
}

.bot-card h4 {
    color: var(--accent);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Journal Table Styles */
.journal-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.9em;
}

.journal-table th, .journal-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.journal-table th {
    background-color: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-weight: 500;
}

.journal-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.journal-table td {
    color: var(--text-main);
}

/* ---- Aylık özet, sistem durumu ve rapor arşivi ---- */
.panel-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.ghost-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--text-main);
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ghost-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.ghost-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.month-input {
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
}

.section-title {
    margin: 22px 0 12px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-main);
}

.section-title span {
    font-weight: 400;
    font-size: 0.8em;
    color: var(--text-muted);
    margin-left: 6px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 14px 16px;
}

.stat-card .stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-bottom: 6px;
}

.stat-card .stat-value {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-main);
    word-break: break-word;
}

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

.stat-card.pos { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.3); }
.stat-card.pos .stat-value { color: #10b981; }
.stat-card.neg { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.3); }
.stat-card.neg .stat-value { color: #ef4444; }
.stat-card.warn { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.3); }
.stat-card.warn .stat-value { color: #f59e0b; }

.hint-text {
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.6;
    margin-top: 8px;
    word-break: break-all;
}

.two-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.alert-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 18px;
    color: #fbbf24;
    font-size: 0.88rem;
    line-height: 1.5;
}

.sync-banner {
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    line-height: 1.45;
}

.sync-banner.ok { background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.25); color: #6ee7b7; }
.sync-banner.warn { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.35); color: #fbbf24; }

.saved-reports {
    display: grid;
    gap: 8px;
}

.saved-report-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.88rem;
}

.saved-report-row .meta {
    color: var(--text-muted);
    font-size: 0.78rem;
}

.dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    background: var(--text-muted);
}

.dot.ok { background: #10b981; }
.dot.bad { background: #ef4444; }
.dot.warn { background: #f59e0b; }

.num { text-align: right; font-variant-numeric: tabular-nums; }
.clickable-row { cursor: pointer; }

/* Mobile Topbar & Backdrop - Desktop Hidden */
.mobile-topbar {
    display: none;
}

.mobile-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.mobile-backdrop.open {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.sidebar-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.sidebar-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s ease;
}

.sidebar-close-btn:hover {
    color: var(--text-main);
}

/* ==========================================================
   MOBILE & RESPONSIVE BREAKPOINTS (iOS & Android Optimized)
   ========================================================== */
@media (max-width: 768px) {
    body {
        overflow-y: auto;
        height: auto;
        min-height: 100vh;
        -webkit-tap-highlight-color: transparent;
    }

    .app-container {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    /* Sticky Mobile Topbar with Dynamic Safe Area Protection */
    .mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        width: 100% !important;
        z-index: 990;
        min-height: calc(56px + env(safe-area-inset-top, 0px)) !important;
        height: auto !important;
        padding-top: env(safe-area-inset-top, 0px) !important;
        padding-bottom: 4px !important;
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
        background: rgba(10, 10, 10, 0.96) !important;
        backdrop-filter: blur(24px) !important;
        -webkit-backdrop-filter: blur(24px) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
        box-sizing: border-box !important;
    }

    .mobile-menu-btn {
        background: transparent;
        border: none;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 40px;
        height: 40px;
        padding: 6px;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .mobile-menu-btn .bar {
        width: 22px;
        height: 2px;
        background-color: var(--text-main);
        border-radius: 2px;
        transition: all 0.2s ease;
    }

    .mobile-brand {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        flex: 1;
        overflow: hidden;
        padding: 4px 8px;
    }

    .mobile-brand .brand-title {
        font-size: 0.95rem !important;
        font-weight: 700 !important;
        color: #ffffff !important;
        line-height: 1.2 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }

    .mobile-brand .brand-sub {
        font-size: 0.65rem !important;
        color: var(--primary) !important;
        font-weight: 600 !important;
        letter-spacing: 0.8px !important;
        text-transform: uppercase;
        line-height: 1 !important;
    }

    .mobile-topbar-spacer {
        width: 40px;
        flex-shrink: 0;
    }

    /* Off-canvas Sliding Sidebar Drawer */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        max-width: 84vw;
        height: 100vh;
        z-index: 1000;
        background: rgba(10, 10, 10, 0.96);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-right: 1px solid rgba(255, 255, 255, 0.12);
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
        padding: 1.5rem;
        padding-top: calc(1.5rem + env(safe-area-inset-top, 0px));
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        gap: 1.5rem;
        box-shadow: none;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 12px 0 40px rgba(0, 0, 0, 0.85);
    }

    .sidebar-close-btn {
        display: block;
    }

    /* Main Content Adjustments */
    .content {
        padding: 0.95rem 0.75rem calc(3rem + env(safe-area-inset-bottom, 0px)) 0.75rem !important;
        overflow-y: visible !important;
        overflow-x: hidden !important;
        height: auto !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
    }

    header {
        margin-top: 0.35rem !important;
        margin-bottom: 1.25rem !important;
        padding: 0 0.15rem !important;
    }

    header h1 {
        font-size: 1.45rem !important;
        font-weight: 700 !important;
        color: #ffffff !important;
        line-height: 1.25 !important;
        word-break: break-word !important;
    }

    header p {
        font-size: 0.82rem !important;
        line-height: 1.4 !important;
        color: var(--text-muted) !important;
        margin-top: 4px !important;
    }

    .glass-panel {
        padding: 0.95rem 0.75rem !important;
        border-radius: 12px !important;
        margin-bottom: 1rem !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        overflow-x: hidden;
    }

    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 0.85rem !important;
        margin-bottom: 1rem !important;
        width: 100% !important;
    }

    .form-grid .input-group {
        grid-column: span 1 !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Stack flex forms cleanly on mobile */
    #add-expense-form,
    #add-income-form,
    #returns-form {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px !important;
        width: 100% !important;
    }

    #add-expense-form .input-group,
    #add-income-form .input-group,
    #returns-form .input-group {
        flex: 1 1 100% !important;
        min-width: 0 !important;
        width: 100% !important;
    }

    #add-expense-form button[type="submit"],
    #add-income-form button[type="submit"],
    #returns-form button[type="submit"] {
        width: 100% !important;
        min-height: 44px !important;
        margin: 4px 0 0 0 !important;
        flex: 1 1 100% !important;
    }

    /* Orders filter bar */
    #orders-list-section > div:first-child {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        width: 100% !important;
    }

    #order-date-filter,
    #btn-fetch-orders,
    #btn-order-scan {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 44px !important;
        box-sizing: border-box !important;
    }

    #btn-order-scan {
        justify-content: center !important;
    }

    /* Total Summaries Stacking */
    #journal-totals,
    #incomes-totals,
    #product-analytics-summary {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        width: 100% !important;
    }

    #journal-totals > div,
    #incomes-totals > div,
    #product-analytics-summary > div {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .bot-card {
        padding: 1rem 0.85rem !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .result-row {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .result-row .value {
        word-break: break-all !important;
    }

    /* Input & Touch Target Enhancements (Prevents iOS Safari Auto-Zoom) */
    .input-group input,
    .input-group select,
    textarea {
        font-size: 16px !important; /* Apple Safari ignores zoom if >= 16px */
        padding: 0.85rem 1rem;
        min-height: 44px;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    .submit-btn,
    .nav-btn,
    button {
        min-height: 44px; /* Apple HIG 44pt minimum touch target */
        box-sizing: border-box !important;
    }

    .submit-btn:active,
    .nav-btn:active,
    button:active {
        transform: scale(0.98);
    }

    /* Horizontal Table Scroll for Mobile */
    table {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        box-sizing: border-box !important;
    }

    /* Stat Grid for Mobile (Aylık Özet, Bakiye & Sistem Panelleri) */
    .stat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .stat-card {
        padding: 10px 12px !important;
        border-radius: 8px !important;
        box-sizing: border-box !important;
    }

    .stat-card .stat-label {
        font-size: 0.72rem !important;
        margin-bottom: 3px !important;
        line-height: 1.2 !important;
    }

    .stat-card .stat-value {
        font-size: 0.98rem !important;
        word-break: break-word !important;
        line-height: 1.25 !important;
    }

    .stat-card .stat-sub {
        font-size: 0.68rem !important;
        margin-top: 2px !important;
    }

    /* Panel Toolbar Mobile Stacking */
    .panel-toolbar {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
        width: 100% !important;
    }

    .panel-toolbar h3,
    .panel-toolbar h4 {
        font-size: 1.15rem !important;
        text-align: left !important;
    }

    .toolbar-actions {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        gap: 8px !important;
    }

    .toolbar-actions .ghost-btn,
    .toolbar-actions .month-input {
        width: 100% !important;
        text-align: center !important;
        min-height: 44px !important;
        box-sizing: border-box !important;
    }

    /* Masaüstü Finder klasör butonlarını mobilde gizle */
    #btn-open-reports-folder,
    #btn-open-data-folder {
        display: none !important;
    }

    /* İki kolonlu tabloları tek kolona düşür */
    .two-col {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
        width: 100% !important;
    }

    .saved-report-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .saved-report-row .open-report-btn {
        width: 100%;
        text-align: center;
    }

    /* Muhasebe kod sütununu mobilde gizle (mobil ekranı sade ve temiz tut) */
    .col-account-code {
        display: none !important;
    }
}

@media (max-width: 380px) {
    .stat-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Scanner & Dialog Modals */
.scanner-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.scanner-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.scanner-content {
    position: relative;
    z-index: 2001;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    margin-bottom: 0 !important;
}

.scanner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.scanner-header h3 {
    font-size: 1.15rem;
    font-weight: 600;
}

.scanner-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    padding: 4px;
}

.scanner-close-btn:hover {
    color: #fff;
}

.scanner-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

#barcode-reader {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    min-height: 240px;
}

#barcode-reader video {
    border-radius: 10px;
    width: 100% !important;
}

.scanner-result-box {
    margin-top: 1rem;
    padding: 1rem;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.scanner-result-box .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.scanner-result-box strong {
    font-size: 1.1rem;
    color: #6ee7b7;
    word-break: break-all;
    font-family: monospace;
}

.scanner-actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

/* ==========================================================================
   Executive Dashboard (Ana Sayfa) & KPI Widgets
   ========================================================================== */
.dashboard-topbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-store-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    border-radius: 9999px;
    padding: 6px 14px;
    font-size: 0.82rem;
    color: var(--text-main);
}

.dashboard-store-pill .live-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
    animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.executive-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

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

@media (max-width: 560px) {
    .executive-kpi-grid {
        grid-template-columns: 1fr;
    }
}

.executive-kpi-card {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    padding: 20px 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.executive-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--card-accent, rgba(255,255,255,0.4)), transparent);
    opacity: 0.7;
}

.executive-kpi-card:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6);
}

.executive-kpi-card.card-orders { --card-accent: #38bdf8; }
.executive-kpi-card.card-revenue { --card-accent: #a78bfa; }
.executive-kpi-card.card-ebitda { --card-accent: #34d399; }
.executive-kpi-card.card-visits { --card-accent: #fbbf24; }

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

.kpi-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}

.kpi-icon-pill {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.kpi-value {
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #ffffff;
    margin-bottom: 6px;
    line-height: 1.2;
}

.executive-kpi-card.card-ebitda .kpi-value.positive {
    color: #10b981;
}

.executive-kpi-card.card-ebitda .kpi-value.negative {
    color: #ef4444;
}

.kpi-subtext {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.kpi-badge-trend {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
}

/* Zero State Banner */
.zero-state-banner {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.05) 0%, rgba(16, 185, 129, 0.04) 100%);
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.zero-state-content {
    flex: 1;
    min-width: 260px;
}

.zero-state-title {
    font-size: 0.98rem;
    font-weight: 600;
    color: #f3f4f6;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.zero-state-desc {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.zero-state-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Bizimle İletişime Geçin (Contact Us) */
.contact-banner-card {
    background: linear-gradient(135deg, rgba(209, 213, 219, 0.07) 0%, rgba(17, 24, 39, 0.5) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 22px 24px;
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 18px;
}

.contact-info-block {
    flex: 1;
    min-width: 280px;
}

.contact-info-block h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #f9fafb;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-info-block p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

.contact-email-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 8px;
    padding: 7px 14px;
    font-family: monospace;
    font-size: 0.95rem;
    color: #ffffff;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.contact-actions-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-contact-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-contact-action.primary {
    background: var(--text-main);
    color: #050505;
    border: 1px solid transparent;
}

.btn-contact-action.primary:hover {
    background: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}

.btn-contact-action.secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-contact-action.secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   Hesap Planı & Alt Hesaplar (Chart of Accounts)
   ========================================================================== */
.account-badge {
    display: inline-block;
    padding: 2px 7px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
    color: #e5e7eb;
    font-weight: 600;
}

.accounting-search-container {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.accounting-search-input-wrap {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.accounting-search-input-wrap input {
    width: 100%;
    padding: 11px 16px 11px 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.92rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.accounting-search-input-wrap input:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(209, 213, 219, 0.15);
}

.accounting-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
}

.account-filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.account-chip {
    padding: 5px 12px;
    border-radius: 9999px;
    font-size: 0.8rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.account-chip:hover {
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.2);
}

.account-chip.active {
    background: var(--text-main);
    color: #050505;
    font-weight: 600;
    border-color: var(--text-main);
}

.accounting-category-group {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
}

.accounting-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid var(--border-color);
}

.accounting-group-header strong {
    font-size: 0.95rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.subaccount-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.15s ease;
    flex-wrap: wrap;
    gap: 8px;
}

.subaccount-item:last-child {
    border-bottom: none;
}

.subaccount-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

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

.subaccount-code-pill {
    padding: 3px 9px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 0.85rem;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #f3f4f6;
}

.subaccount-code-pill.cogs {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
    color: #38bdf8;
}

.subaccount-code-pill.vat {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
    color: #fbbf24;
}

.subaccount-code-pill.bank {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.subaccount-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.subaccount-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.subaccount-badge-type {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 3px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
}

