/* ============================================================
   EKINAI Muhasebe — custom.css
   Mobil-first, native app hissi veren responsive tasarım
   ============================================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

/* ---- Design Tokens ---- */
:root {
    --sidebar-w:        240px;
    --topbar-h:         56px;
    --sidebar-bg:       #0f1f35;
    --sidebar-bg2:      #0a1726;
    --sidebar-text:     #c8d8ea;
    --sidebar-muted:    #6b8aaa;
    --sidebar-active:   #1a3a5c;
    --sidebar-accent:   #fbbf24;
    --primary:          #1a3a5c;
    --primary-hover:    #0f2540;
    --primary-light:    #e8f0f9;
    --accent:           #fbbf24;
    --success:          #16a34a;
    --danger:           #dc2626;
    --warning:          #d97706;
    --info:             #0891b2;
    --bg:               #f0f4f9;
    --surface:          #ffffff;
    --border:           #e2e8f0;
    --text:             #1e293b;
    --text-muted:       #64748b;
    --radius:           12px;
    --radius-sm:        8px;
    --shadow-sm:        0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.06);
    --shadow:           0 4px 12px rgba(15,23,42,.10);
    --shadow-lg:        0 10px 30px rgba(15,23,42,.14);
    --transition:       .2s ease;

    /* Bottom nav height (sadece mobilde) */
    --bottom-nav-h:     64px;
}

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ================================================================
   LAYOUT
   ================================================================ */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* Mobilde bottom nav için padding */
    padding-bottom: 0;
}

/* ================================================================
   SIDEBAR — Desktop
   ================================================================ */
.sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg2) 100%);
    color: var(--sidebar-text);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 300;
    transition: transform var(--transition);
    box-shadow: 4px 0 20px rgba(0,0,0,.15);
    overflow: hidden;
}

/* Sidebar brand */
.sidebar-brand {
    padding: 20px 16px 16px;
    border-bottom: 1px solid rgba(255,255,255,.07);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.brand-logo-wrap {
    width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.brand-logo {
    width: 100%;
    max-height: 48px;
    object-fit: contain;
}
.brand-company {
    color: #fff;
    font-size: .82rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
    word-break: break-word;
    opacity: .85;
}

/* Sidebar nav */
.sidebar-nav {
    flex: 1;
    padding: 10px 8px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.1) transparent;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-track { background: transparent; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 4px; }

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    margin-bottom: 2px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: .88rem;
    font-weight: 500;
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
    overflow: hidden;
}
.sidebar-nav .nav-item i {
    width: 18px;
    text-align: center;
    font-size: .9rem;
    color: var(--sidebar-muted);
    flex-shrink: 0;
    transition: color var(--transition);
}
.sidebar-nav .nav-item span {
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-nav .nav-item:hover {
    background: rgba(255,255,255,.07);
    color: #fff;
}
.sidebar-nav .nav-item:hover i { color: rgba(255,255,255,.8); }
.sidebar-nav .nav-item.active {
    background: var(--sidebar-active);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--sidebar-accent);
}
.sidebar-nav .nav-item.active i { color: var(--sidebar-accent); }

/* Nav section label */
.sidebar-nav .nav-section {
    padding: 12px 12px 4px;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--sidebar-muted);
    margin-top: 4px;
}

.sidebar-foot {
    padding: 12px 16px;
    border-top: 1px solid rgba(255,255,255,.07);
    font-size: .75rem;
    color: var(--sidebar-muted);
    flex-shrink: 0;
}

/* Sidebar overlay (mobil) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 299;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity var(--transition);
}
.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ================================================================
   TOPBAR
   ================================================================ */
.topbar {
    height: var(--topbar-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 200;
    box-shadow: var(--shadow-sm);
}
.topbar-title {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sidebar-toggle {
    display: none; /* Masaüstünde gizli */
    background: none;
    border: none;
    padding: 8px;
    border-radius: var(--radius-sm);
    color: var(--text);
    cursor: pointer;
    transition: background var(--transition);
    flex-shrink: 0;
}
.sidebar-toggle:hover { background: var(--bg); }
.sidebar-toggle i { font-size: 1.1rem; }

/* Topbar sağ kısım */
.topbar .topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.topbar-date {
    font-size: .8rem;
    color: var(--text-muted);
}

/* ================================================================
   CONTENT AREA
   ================================================================ */
.content {
    padding: 20px;
    flex: 1;
}

.app-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: var(--surface);
    text-align: center;
    font-size: .78rem;
    color: var(--text-muted);
}

/* ================================================================
   CARDS
   ================================================================ */
.card {
    background: var(--surface);
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 0;
}
.card + .card { margin-top: 16px; }
.card-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 14px 18px;
    font-weight: 700;
    font-size: .92rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-body {
    padding: 18px;
}
.card-footer {
    background: #f8fafc;
    border-top: 1px solid var(--border);
    padding: 10px 18px;
    font-size: .82rem;
    color: var(--text-muted);
}

/* ================================================================
   STAT CARDS (Dashboard KPI)
   ================================================================ */
.stat-card {
    border-radius: var(--radius);
    padding: 18px 20px;
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.stat-card::after {
    content: '';
    position: absolute;
    right: -20px;
    bottom: -20px;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
}
.stat-card .stat-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    opacity: .2;
}
.stat-card .stat-label {
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    opacity: .85;
}
.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 6px;
    letter-spacing: -.02em;
}
.stat-card .stat-sub {
    font-size: .75rem;
    opacity: .75;
    margin-top: 2px;
}

.stat-blue   { background: linear-gradient(135deg, #2563eb, #1e40af); }
.stat-green  { background: linear-gradient(135deg, #16a34a, #14532d); }
.stat-orange { background: linear-gradient(135deg, #d97706, #92400e); }
.stat-red    { background: linear-gradient(135deg, #dc2626, #991b1b); }
.stat-purple { background: linear-gradient(135deg, #7c3aed, #4c1d95); }
.stat-teal   { background: linear-gradient(135deg, #0891b2, #164e63); }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
    font-family: inherit;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-size: .85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: .45rem .9rem;
    cursor: pointer;
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    color: #fff;
}
.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}
.btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}

/* Mobilde buton tam genişlik yardımcısı */
.btn-mobile-full { width: 100%; justify-content: center; }

/* FAB — Floating Action Button (mobil liste sayfaları için) */
.fab {
    position: fixed;
    bottom: calc(var(--bottom-nav-h) + 16px);
    right: 20px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(26,58,92,.4);
    display: none; /* Sadece mobilde görünür */
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    z-index: 100;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition);
}
.fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(26,58,92,.5);
    color: #fff;
}

/* ================================================================
   FORMS
   ================================================================ */
.form-label {
    font-weight: 600;
    font-size: .83rem;
    color: var(--text);
    margin-bottom: 5px;
    display: block;
}
.form-label.required::after {
    content: ' *';
    color: var(--danger);
}
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    font-family: inherit;
    font-size: .9rem;
    padding: .5rem .85rem;
    transition: border-color var(--transition), box-shadow var(--transition);
    background: var(--surface);
    color: var(--text);
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,58,92,.12);
    outline: none;
}
.form-control::placeholder { color: #a0aec0; }
.form-text {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Input group */
.input-group-text {
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    background: #f8fafc;
    color: var(--text-muted);
    font-size: .85rem;
}

/* ================================================================
   TABLES
   ================================================================ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-sm);
}
.table {
    font-size: .875rem;
    margin-bottom: 0;
}
.table thead th {
    background: #f8fafc;
    color: var(--primary);
    font-weight: 700;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    border-bottom: 2px solid var(--border);
    padding: 10px 14px;
    white-space: nowrap;
}
.table tbody td {
    padding: 12px 14px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}
.table tbody tr:hover { background: #f8fafc; }
.table tbody tr:last-child td { border-bottom: none; }

/* Mobil kart tablosu — satırları karta dönüştür */
/* Tabloların içinde kullanılabilecek mobil liste kartı */
.table-card-row {
    display: block;
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    transition: box-shadow var(--transition), transform var(--transition);
}
.table-card-row:active {
    transform: scale(.99);
    box-shadow: var(--shadow);
}

/* ================================================================
   FILTER BAR
   ================================================================ */
.filter-bar {
    background: var(--surface);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.filter-bar .row { --bs-gutter-y: .6rem; }

/* ================================================================
   BADGES & STATUS
   ================================================================ */
.badge {
    font-family: inherit;
    font-weight: 600;
    font-size: .72rem;
    padding: 4px 10px;
    border-radius: 999px;
    letter-spacing: .02em;
}

/* ================================================================
   ACTION BUTTONS (tablo satır işlemleri)
   ================================================================ */
.table-actions {
    white-space: nowrap;
    text-align: right;
}
.table-actions .btn {
    padding: .28rem .55rem;
    font-size: .78rem;
    border-radius: 6px;
    min-width: 30px;
    min-height: 30px;
}
.table-actions > * { margin-left: 4px; }
.table-actions > *:first-child { margin-left: 0; }
.table-actions form { display: inline; margin: 0; }

/* ================================================================
   FATURA / TEKLİF KALEM TABLOSU
   ================================================================ */
.items-table input.form-control,
.items-table select.form-select {
    font-size: .87rem;
    padding: .38rem .6rem;
}
.items-table tbody tr { vertical-align: middle; }
.items-table .row-total { font-weight: 700; color: var(--primary); }
.btn-remove-row {
    color: var(--danger);
    background: #fff0f0;
    border: 1.5px solid #fecaca;
    border-radius: 6px;
    padding: .3rem .55rem;
}
.btn-remove-row:hover { background: #fee2e2; }

/* Totals box */
.totals-box {
    background: #f8fafc;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
}
.totals-box .total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: .9rem;
    color: var(--text-muted);
}
.totals-box .total-row span:last-child {
    font-weight: 600;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.totals-box .total-row.grand {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary);
    border-top: 2px solid var(--primary);
    margin-top: 10px;
    padding-top: 12px;
}
.totals-box .total-row.grand span { color: var(--primary); }

/* ================================================================
   LOGIN SAYFASI
   ================================================================ */
.login-body {
    background: linear-gradient(135deg, #0f1f35 0%, #1a3a5c 60%, #0a1726 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-wrapper { width: 100%; max-width: 400px; }
.login-card {
    background: var(--surface);
    border-radius: 18px;
    padding: 36px 32px;
    box-shadow: var(--shadow-lg);
}
.login-logo {
    text-align: center;
    margin-bottom: 20px;
}
.login-logo i {
    background: var(--primary);
    color: var(--accent);
    width: 64px; height: 64px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 20px rgba(26,58,92,.3);
}

/* ================================================================
   MISC UTILS
   ================================================================ */
.text-money { font-variant-numeric: tabular-nums; font-weight: 600; }
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; margin-bottom: 12px; opacity: .35; display: block; }
.empty-state p { font-size: .9rem; }

/* Divider */
.section-divider {
    height: 1px;
    background: var(--border);
    margin: 20px 0;
}

/* Info list (view sayfaları) */
.info-list { list-style: none; padding: 0; }
.info-list li {
    display: flex;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: .9rem;
}
.info-list li:last-child { border-bottom: none; }
.info-list .info-label {
    color: var(--text-muted);
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    min-width: 120px;
    flex-shrink: 0;
}

/* Chip/tag */
.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary-light);
    color: var(--primary);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
}

/* Print */
.print-only { display: none; }
@media print {
    .sidebar, .topbar, .app-footer, .no-print,
    .bottom-nav, .fab, .more-menu, .more-menu-overlay,
    .sidebar-overlay { display: none !important; }
    body { padding-bottom: 0 !important; }
    .app-main { margin-left: 0 !important; padding-bottom: 0 !important; }
    .print-only { display: block; }
    .content { padding: 0; }
}

/* Select2 */
.select2-container--bootstrap-5 .select2-selection {
    min-height: 40px;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
    font-family: inherit;
}
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    padding: .5rem .85rem;
    line-height: 1.5;
}
.select2-container--bootstrap-5.select2-container--focus .select2-selection {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,58,92,.12);
}

/* ================================================================
   BOTTOM NAVIGATION — Sadece Mobil (≤ 767px)
   ================================================================ */
.bottom-nav {
    display: none; /* Masaüstünde gizli */
}

/* "Daha Fazla" popup menüsü (mobil) */
.more-menu {
    display: none;
    position: fixed;
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 8px);
    left: 0; right: 0;
    background: var(--surface);
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 30px rgba(15,23,42,.15);
    z-index: 250;
    padding: 16px;
    max-height: 70vh;
    overflow-y: auto;
}
.more-menu.show { display: block; }
.more-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 249;
}
.more-menu-overlay.show { display: block; }
.more-menu-title {
    font-size: .9rem;
    color: var(--primary);
    font-weight: 700;
}
.more-menu-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.more-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text);
    font-size: .75rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background var(--transition);
}
.more-menu-item:active { background: #e2e8f0; color: var(--text); }
.more-menu-item i { font-size: 1.3rem; color: var(--primary); }

/* Login sayfası bottom-nav padding'inden etkilenmesin */
.login-body { padding-bottom: 0 !important; }

/* ================================================================
   RESPONSIVE — Tablet (≤ 1024px)
   ================================================================ */
@media (max-width: 1024px) {
    :root { --sidebar-w: 220px; }
}

/* ================================================================
   RESPONSIVE — Tablet/Mobil (≤ 991px)
   ================================================================ */
@media (max-width: 991.98px) {

    /* Sidebar: canvas olarak kayar */
    .sidebar {
        transform: translateX(-100%);
        width: 260px;
        transition: transform .28s cubic-bezier(.4,0,.2,1);
    }
    .sidebar.show { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .sidebar-toggle { display: flex; }

    /* Content padding azalt */
    .content { padding: 16px; }

    /* Grid: 2 sütun → 1 sütun */
    .col-md-3, .col-md-4 { flex: 0 0 50%; max-width: 50%; }

    /* Tablo font küçüt */
    .table { font-size: .82rem; }
    .table tbody td, .table thead th { padding: 10px 10px; }

    /* Filter bar yığınla */
    .filter-bar .col-md-2,
    .filter-bar .col-md-3,
    .filter-bar .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* ================================================================
   RESPONSIVE — Mobil (≤ 767px) — Ana Breakpoint
   ================================================================ */
@media (max-width: 767.98px) {

    html { font-size: 14px; }

    /* Body bottom padding (bottom nav + iOS safe-area) */
    body { padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px)); }
    .app-main { padding-bottom: 0; }

    /* Content */
    .content { padding: 12px; }

    /* ---- Topbar ---- */
    .topbar { padding: 0 14px; height: 52px; }
    .topbar-date { display: none; }
    .topbar-title { font-size: .92rem; }

    /* ---- Card ---- */
    .card-header { padding: 12px 14px; font-size: .88rem; }
    .card-body { padding: 14px; }

    /* ---- Stat Cards — 2 kolon ---- */
    .stat-card { padding: 14px 14px; }
    .stat-card .stat-value { font-size: 1.3rem; }
    .stat-card .stat-label { font-size: .7rem; }
    .stat-card .stat-icon { font-size: 1.7rem; right: 10px; top: 10px; transform: none; }

    /* ---- Grid tam genişlik ---- */
    .col-md-2, .col-md-3, .col-md-4,
    .col-md-5, .col-md-6, .col-lg-3,
    .col-lg-4, .col-lg-6, .col-lg-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    /* Stat kartları 2 kolon kal */
    .stat-grid .col-6 { flex: 0 0 50%; max-width: 50%; }

    /* ---- Filtreler ---- */
    .filter-bar { padding: 12px; }
    .filter-bar .col-md-2,
    .filter-bar .col-md-3,
    .filter-bar .col-md-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    /* Filtre butonları tam genişlik */
    .filter-bar .btn { width: 100%; justify-content: center; }

    /* ---- Tablolar: yatay scroll + küçük font ---- */
    .table { font-size: .78rem; }
    .table thead th { font-size: .68rem; padding: 8px 8px; }
    .table tbody td { padding: 10px 8px; }

    /* Bazı kolonları mobilde gizle */
    .hide-mobile { display: none !important; }

    /* ---- Action butonlar (tablo) ---- */
    .table-actions .btn {
        min-width: 28px;
        min-height: 28px;
        padding: .22rem .45rem;
    }

    /* ---- Form ---- */
    .form-control, .form-select { font-size: .9rem; }

    /* ---- Kalem tablosu mobil scroll ---- */
    .items-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -14px;
        padding: 0 14px;
    }
    .items-table { min-width: 700px; }

    /* ---- Totals box ---- */
    .totals-box { padding: 12px 14px; }
    .totals-box .total-row { font-size: .85rem; }
    .totals-box .total-row.grand { font-size: 1.05rem; }

    /* ---- Page header butonlar ---- */
    .page-header-actions .btn { font-size: .78rem; padding: .38rem .7rem; }

    /* ---- Card header küçük ekranda ---- */
    .card-header .btn { font-size: .75rem; padding: .3rem .6rem; }

    /* ---- FAB göster ---- */
    .fab { display: inline-flex; }

    /* ---- Bottom Navigation göster ---- */
    .bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: var(--surface);
        border-top: 1px solid var(--border);
        z-index: 200;
        box-shadow: 0 -4px 20px rgba(15,23,42,.1);
        align-items: stretch;
    }
    .bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        text-decoration: none;
        color: var(--text-muted);
        font-size: .62rem;
        font-weight: 600;
        padding: 6px 4px;
        border-radius: 0;
        transition: color var(--transition), background var(--transition);
        position: relative;
        -webkit-tap-highlight-color: transparent;
    }
    .bottom-nav-item i { font-size: 1.1rem; }
    .bottom-nav-item span { line-height: 1; }
    .bottom-nav-item.active { color: var(--primary); }
    .bottom-nav-item.active i { color: var(--primary); }
    .bottom-nav-item.active::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 32px;
        height: 3px;
        background: var(--primary);
        border-radius: 0 0 4px 4px;
    }
    .bottom-nav-item:active { background: var(--bg); }

    /* ---- Login sayfası ---- */
    .login-card { padding: 28px 20px; border-radius: 14px; }

    /* ---- Modal ---- */
    .modal-dialog { margin: 8px; }
    .modal-content { border-radius: var(--radius); }

    /* ---- DataTables pagination küçük ---- */
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 4px 8px !important;
        font-size: .78rem !important;
    }
    .dataTables_wrapper .dataTables_filter input { width: 140px; }

    /* ---- Tab navlar scroll edilebilir ---- */
    .nav-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .nav-tabs::-webkit-scrollbar { display: none; }
    .nav-tabs .nav-link { white-space: nowrap; font-size: .8rem; padding: .5rem .8rem; }

    /* ---- Dropdown menu ---- */
    .dropdown-menu { font-size: .85rem; }
}

/* ================================================================
   RESPONSIVE — Küçük Mobil (≤ 374px)
   ================================================================ */
@media (max-width: 374px) {
    .content { padding: 10px; }
    .stat-card .stat-value { font-size: 1.15rem; }
    .bottom-nav-item span { display: none; }
    .bottom-nav-item i { font-size: 1.2rem; }
}
