/* =====================================================
   HAYALTECH - MODERN UI
   FONTS: NUNİTO (BODY) + SYNE (BAŞLIK)
   ===================================================== */
@import url('fonts.css');
/* =====================================================
   CSS DEĞİŞKENLERİ
   ===================================================== */
:root {
    --font-body: 'Nunito', sans-serif;
    --font-heading: 'Syne', sans-serif;
    /* AÇIK MOD */
    --bg-page:        #f0f2f5;
    --bg-card:        #ffffff;
    --bg-card-alt:    #f8fafc;
    --bg-nav:         #1e293b;
    --bg-nav-hover:   rgba(255,255,255,0.08);
    --bg-input:       #ffffff;
    --bg-dropdown:    #ffffff;
    --bg-footer:      #1e293b;
    --text-primary:   #0f172a;
    --text-secondary: #64748b;
    --text-muted:     #94a3b8;
    --text-nav:       rgba(255,255,255,0.85);
    --text-heading:   #0f172a;
    --border:         #e2e8f0;
    --border-input:   #cbd5e1;
    --shadow-sm:      0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:      0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg:      0 8px 32px rgba(0,0,0,0.10);
    --radius:         12px;
    --radius-sm:      8px;
    --radius-lg:      16px;
    --accent:         #3b82f6;
    --accent-hover:   #2563eb;
}
[data-bs-theme="dark"] {
    --bg-page:        #0f1117;
    --bg-card:        #1a1d2e;
    --bg-card-alt:    #151823;
    --bg-nav:         #0d1117;
    --bg-nav-hover:   rgba(255,255,255,0.06);
    --bg-input:       #1e2130;
    --bg-dropdown:    #1a1d2e;
    --bg-footer:      #0d1117;
    --text-primary:   #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted:     #64748b;
    --text-nav:       rgba(255,255,255,0.85);
    --text-heading:   #f1f5f9;
    --border:         #1e2537;
    --border-input:   #2a3147;
    --shadow-sm:      0 1px 3px rgba(0,0,0,0.3);
    --shadow-md:      0 4px 16px rgba(0,0,0,0.4);
    --shadow-lg:      0 8px 32px rgba(0,0,0,0.5);
    /* BOOTSTRAP DARK MODE VARIABLE OVERRIDES */
    --bs-body-bg:          #0f1117;
    --bs-body-bg-rgb:      15,17,23;
    --bs-body-color:       #e2e8f0;
    --bs-light-rgb:        26,29,46;
    --bs-light:            #1a1d2e;
    --bs-white-rgb:        26,29,46;
    --bs-secondary-bg:     #1a1d2e;
    --bs-secondary-bg-rgb: 26,29,46;
    --bs-tertiary-bg:      #151823;
    --bs-tertiary-bg-rgb:  21,24,35;
    --bs-border-color:     #1e2537;
}
/* =====================================================
   TEMEL
   ===================================================== */
*, *::before, *::after { box-sizing: border-box; }
body {
    font-family: var(--font-body);
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-heading);
}
/* =====================================================
   NAVBAR
   ===================================================== */
.custom-navbar {
    background: var(--bg-nav) !important;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    padding: 0 1rem;
    min-height: 58px;
}
.custom-navbar .navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #fff !important;
}
.custom-navbar .nav-link {
    color: var(--text-nav) !important;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem !important;
    border-radius: var(--radius-sm);
    transition: background 0.15s ease, color 0.15s ease;
}
.custom-navbar .nav-link:hover,
.custom-navbar .nav-link.active {
    background: var(--bg-nav-hover);
    color: #fff !important;
}
.custom-navbar .dropdown-menu {
    background: var(--bg-dropdown);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    margin-top: 6px !important;
}
.custom-navbar .dropdown-item {
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 8px 12px;
    transition: background 0.15s ease;
}
.custom-navbar .dropdown-item:hover {
    background: var(--bg-card-alt);
    color: var(--accent);
}
.custom-navbar .dropdown-item.active {
    background: var(--accent);
    color: #fff;
}
.custom-navbar .dropdown-divider {
    border-color: var(--border);
    margin: 4px 0;
}
/* =====================================================
   TEMA TOGGLE BUTONU
   ===================================================== */
.theme-toggle-btn {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
    border-radius: 20px;
    padding: 5px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-family: var(--font-body);
}
.theme-toggle-btn:hover {
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.35);
    color: #fff;
}
/* =====================================================
   KARTLAR
   ===================================================== */
.card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-sm);
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.2s ease;
}
.card:hover {
    box-shadow: var(--shadow-md);
}
.card-header {
    background: var(--bg-card-alt) !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: var(--radius) var(--radius) 0 0 !important;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-heading) !important;
    padding: 14px 20px;
}
.card-body {
    padding: 20px;
    color: var(--text-primary);
}
.card-footer {
    background: var(--bg-card-alt) !important;
    border-top: 1px solid var(--border) !important;
    border-radius: 0 0 var(--radius) var(--radius) !important;
}
/* =====================================================
   TABLO
   ===================================================== */
.table {
    color: var(--text-primary) !important;
    --bs-table-bg: transparent;
    --bs-table-striped-bg: var(--bg-card-alt);
    --bs-table-hover-bg: var(--bg-card-alt);
    --bs-table-border-color: var(--border);
}
.table thead th {
    background: var(--bg-card-alt) !important;
    color: var(--text-secondary) !important;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border) !important;
    padding: 12px 16px;
}
.table td {
    padding: 12px 16px;
    vertical-align: middle;
    border-color: var(--border) !important;
    color: var(--text-primary);
}
.table tbody tr {
    transition: background 0.12s ease;
}
.table tbody tr:hover > td {
    background: var(--bg-card-alt) !important;
}
/* =====================================================
   LOGLAR SAYFASI HİZALAMA
   ===================================================== */
.table {
    table-layout: fixed;
    width: 100%;
}
.table td,
.table th {
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.table td:last-child,
.table th:last-child {
    width: 140px;
    white-space: nowrap;
}
/* =====================================================
   FORMLAR
   ===================================================== */
.form-control, .form-select {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-input) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-primary) !important;
    font-family: var(--font-body);
    font-size: 0.875rem;
    padding: 9px 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15) !important;
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
}
.form-control::placeholder { color: var(--text-muted) !important; }
.form-label {
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.input-group-text {
    background: var(--bg-card-alt) !important;
    border: 1px solid var(--border-input) !important;
    color: var(--text-secondary) !important;
    border-radius: var(--radius-sm) !important;
}
/* =====================================================
   BUTONLAR
   ===================================================== */
.btn {
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: var(--radius-sm) !important;
    font-size: 0.85rem;
    padding: 8px 18px;
    transition: all 0.15s ease;
}
.btn-primary {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
}
.btn-primary:hover {
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59,130,246,0.35);
}
/* =====================================================
   MODAL
   ===================================================== */
.modal-content {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg);
}
.modal-header {
    background: var(--bg-card-alt) !important;
    border-bottom: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
    padding: 16px 24px;
}
.modal-footer {
    background: var(--bg-card-alt) !important;
    border-top: 1px solid var(--border) !important;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
}
[data-bs-theme="dark"] .btn-close {
    filter: invert(1) brightness(2);
}
/* =====================================================
   LİSTE GRUBU
   ===================================================== */
.list-group-item {
    background: var(--bg-card) !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
    font-size: 0.875rem;
    transition: background 0.12s ease;
}
.list-group-item:hover,
.list-group-item-action:hover {
    background: var(--bg-card-alt) !important;
}
/* =====================================================
   ALERT
   ===================================================== */
.alert {
    border-radius: var(--radius) !important;
    border-width: 1px;
    font-size: 0.875rem;
}
[data-bs-theme="dark"] .alert-info {
    background: rgba(59,130,246,0.1) !important;
    border-color: rgba(59,130,246,0.25) !important;
    color: #93c5fd !important;
}
[data-bs-theme="dark"] .alert-success {
    background: rgba(34,197,94,0.1) !important;
    border-color: rgba(34,197,94,0.25) !important;
    color: #86efac !important;
}
[data-bs-theme="dark"] .alert-warning {
    background: rgba(234,179,8,0.1) !important;
    border-color: rgba(234,179,8,0.25) !important;
    color: #fde047 !important;
}
[data-bs-theme="dark"] .alert-danger {
    background: rgba(239,68,68,0.1) !important;
    border-color: rgba(239,68,68,0.25) !important;
    color: #fca5a5 !important;
}
/* =====================================================
   BADGE
   ===================================================== */
.badge {
    font-family: var(--font-body);
    font-weight: 600;
    border-radius: 6px;
    font-size: 0.72rem;
    padding: 4px 8px;
}
/* =====================================================
   FOOTER
   ===================================================== */
.custom-footer {
    background: var(--bg-footer) !important;
    color: rgba(255,255,255,0.7) !important;
    border-top: 1px solid rgba(255,255,255,0.06);
    position: relative;
    width: 100%;
    z-index: 1030;
    font-size: 0.85rem;
}
.custom-footer h5 {
    color: #fff !important;
    font-family: var(--font-heading);
}
.custom-footer a { color: rgba(255,255,255,0.6); }
.custom-footer a:hover { color: #fff; }
/* =====================================================
   TEXT YARDIMCI
   ===================================================== */
.text-muted { color: var(--text-muted) !important; }
.text-dark  { color: var(--text-primary) !important; }
/* =====================================================
   SAYFALAMA
   ===================================================== */
.page-link {
    background: var(--bg-card) !important;
    border-color: var(--border) !important;
    color: var(--accent) !important;
    border-radius: var(--radius-sm) !important;
}
.page-item.active .page-link {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #fff !important;
}
/* =====================================================
   SCROLLBAR
   ===================================================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
/* =====================================================
   TOAST
   ===================================================== */
.theme-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}
.theme-toast.show { opacity: 1; transform: translateY(0); }
/* =====================================================
   DROPDOWN (GENEL)
   ===================================================== */
.dropdown-menu {
    background: var(--bg-dropdown) !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 6px !important;
}
.dropdown-item {
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    padding: 8px 12px;
    transition: background 0.12s ease;
}
.dropdown-item:hover { background: var(--bg-card-alt) !important; }
.dropdown-item.active, .dropdown-item:active {
    background: var(--accent) !important;
    color: #fff !important;
}
.dropdown-divider { border-color: var(--border) !important; }
/* =====================================================
   GEÇİŞ
   ===================================================== */
body, .card, .card-header, .card-body, .card-footer,
.modal-content, .dropdown-menu, .form-control,
.form-select, .list-group-item, .table, .navbar {
    transition: background-color 0.25s ease, color 0.2s ease, border-color 0.25s ease;
}
/* =====================================================
   CARİLER BUTONLAR
   ===================================================== */
.table td .btn {
    padding: 0.25rem 0.35rem;
    font-size: 1.1rem;
}
/* =====================================================
   TEMA TOGGLE SWITCH
   ===================================================== */
.switch {
  display: inline-block;
  width: 4.5em;
  height: 2.25em;
  position: relative;
  font-size: 14px;
  user-select: none;
  cursor: pointer;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}
.switch .theme-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to right, #87ceeb, #e0f6ff);
  border-radius: 50px;
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15), inset 0 -5px 10px rgba(0,0,0,0.1);
  overflow: hidden;
}
.switch .theme-slider-inner {
  position: absolute;
  top: 0.22em;
  left: 0.22em;
  height: 1.8em;
  width: 1.8em;
  border-radius: 50%;
  background-color: #ffd700;
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2), inset 0 -2px 5px rgba(0,0,0,0.2);
  transform: translateZ(5px);
}
.switch input:checked + .theme-slider {
  background: linear-gradient(to right, #1a237e, #3949ab);
}
.switch input:checked + .theme-slider .theme-slider-inner {
  transform: translateX(2.25em) translateZ(5px) rotateY(180deg);
  background-color: #ffffff;
}
.switch input:focus + .theme-slider {
  box-shadow: 0 0 0 0.3em rgba(59,130,246,0.4);
}
.switch .theme-slider::before, .switch .theme-slider::after {
  content: "";
  position: absolute;
  width: 3px; height: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: all 0.6s ease;
  opacity: 0;
}
.switch .theme-slider::before { top: 20%; left: 30%; }
.switch .theme-slider::after  { bottom: 25%; right: 25%; }
.switch input:checked + .theme-slider::before,
.switch input:checked + .theme-slider::after { opacity: 1; animation: twinkle 2s infinite; }
.switch input:checked + .theme-slider::before { animation-delay: 0.5s; }
.switch .theme-slider-inner::before, .slider-inner::after {
  content: "";
  position: absolute;
  background-color: rgba(255,255,255,0.8);
  border-radius: 50%;
  transition: all 0.6s ease;
}
.slider-inner::before { width:0.8em; height:0.8em; top:-0.4em; left:-0.15em; }
.switch .theme-slider-inner::after  { width:0.9em; height:0.9em; bottom:-0.45em; right:-0.2em; }
.switch input:checked + .theme-slider .theme-slider-inner::before {
  width:0.45em; height:0.45em;
  background-color: rgba(0,0,0,0.2);
  top:0.22em; left:0.22em; opacity:1;
}
.switch input:checked + .theme-slider .theme-slider-inner::after {
  width:0.3em; height:0.3em;
  background-color: rgba(0,0,0,0.15);
  bottom:0.38em; right:0.38em; opacity:1;
}
@keyframes twinkle {
  0%,100% { opacity:0.2; }
  50%      { opacity:1; }
}
@keyframes sunPulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,215,0,0.7), 0 0 0 0 rgba(255,215,0,0.4); }
  50%     { box-shadow: 0 0 15px 8px rgba(255,215,0,0.7), 0 0 30px 15px rgba(255,215,0,0.4); }
}
@keyframes moonPhase {
  0%,100% { box-shadow: inset -8px -4px 0 0 #ddd, 0 0 15px rgba(255,255,255,0.5); }
  50%     { box-shadow: inset 0 0 0 0 #ddd, 0 0 15px rgba(255,255,255,0.5); }
}
.switch input:not(:checked) + .theme-slider .theme-slider-inner { animation: sunPulse 3s infinite; }
.switch input:checked + .theme-slider .theme-slider-inner { animation: moonPhase 5s infinite; }
/* RENKLİ STAT KARTLARI — custom.css'in card override'INDAN KORU */
.card.bg-primary, .card.bg-danger, .card.bg-success,
.card.bg-info, .card.bg-warning, .card.bg-secondary,
.card.bg-dark {
    border: none !important;
    color: #fff !important;
}
.card.bg-primary { background-color: #0d6efd !important; }
.card.bg-danger  { background-color: #dc3545 !important; }
.card.bg-success { background-color: #198754 !important; }
.card.bg-info    { background-color: #0dcaf0 !important; }
/* =====================================================
   GLOBAL KOYU MOD — TÜM SAYFALAR
   ===================================================== */
/* table-light thead/tfoot */
[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] .table-light > td,
[data-bs-theme="dark"] .table-light > th,
[data-bs-theme="dark"] thead.table-light > tr > th,
[data-bs-theme="dark"] tfoot.table-light > tr > td,
[data-bs-theme="dark"] tfoot.table-light > tr > th,
[data-bs-theme="dark"] tr.table-light > td,
[data-bs-theme="dark"] tr.table-light > th {
    background-color: #1e2537 !important;
    color: #e2e8f0 !important;
    border-color: #2a3147 !important;
}
/* card-header bg-light */
[data-bs-theme="dark"] .card-header.bg-light {
    background-color: #1e2537 !important;
    color: #e2e8f0 !important;
    border-bottom-color: #2a3147 !important;
}
/* list-group-item bg-light / bg-white */
[data-bs-theme="dark"] .list-group-item.bg-light,
[data-bs-theme="dark"] .list-group-item.bg-white {
    background-color: #1a1d2e !important;
    color: #e2e8f0 !important;
    border-color: #2a3147 !important;
}
/* input-group-text bg-white */
[data-bs-theme="dark"] .input-group-text.bg-white {
    background-color: #1e2130 !important;
    color: #94a3b8 !important;
    border-color: #2a3147 !important;
}
/* bg-white GENEL */
[data-bs-theme="dark"] .bg-white {
    background-color: #1a1d2e !important;
    color: #e2e8f0 !important;
}
/* p-2 bg-light rounded (RAPORLAR) */
[data-bs-theme="dark"] .bg-light {
    background-color: #1e2537 !important;
    color: #e2e8f0 !important;
}
/* body hardcoded bg */
[data-bs-theme="dark"] body {
    background-color: #0f1117 !important;
}
/* HARDCODED BEYAZ BODY OLAN SAYFALAR (cari_detay, yedek_islemi VS) */
[data-bs-theme="dark"] .hero-card {
    background: #1a1d2e !important;
    border-color: #1e2537 !important;
}
[data-bs-theme="dark"] .chip {
    background: #1e2537 !important;
    border-color: #2a3147 !important;
    color: #e2e8f0 !important;
}
[data-bs-theme="dark"] .nav-pills .nav-link:hover {
    background: #1e2537 !important;
}
/* loglar, toplu_islem, kasa_gider_makbuzlari, sirket_olustur inline bg */
[data-bs-theme="dark"] [style*="background: #f8f9fa"],
[data-bs-theme="dark"] [style*="background-color: #f8f9fa"],
[data-bs-theme="dark"] [style*="background-color: #f8f9ff"],
[data-bs-theme="dark"] [style*="background: white"],
[data-bs-theme="dark"] [style*="background-color: white"],
[data-bs-theme="dark"] [style*="background-color: #ffffff"],
[data-bs-theme="dark"] [style*="background: #ffffff"] {
    background: #1a1d2e !important;
    background-color: #1a1d2e !important;
    color: #e2e8f0 !important;
}
/* cari_ekstre card-header/footer */
[data-bs-theme="dark"] .card-header,
[data-bs-theme="dark"] .card-footer {
    border-color: #1e2537 !important;
}
/* guvenlik_kontrol rounded-3 bg-white */
[data-bs-theme="dark"] .rounded-3.bg-white,
[data-bs-theme="dark"] .rounded-3.shadow-sm {
    background-color: #1a1d2e !important;
}
/* STOK HAREKETLERİ SATIR RENKLERİ - KOYU MODDA YAZI SİYAH KALSIN */
[data-bs-theme="dark"] tr.table-success > td,
[data-bs-theme="dark"] tr.table-success > th,
[data-bs-theme="dark"] tr.table-danger > td,
[data-bs-theme="dark"] tr.table-danger > th {
    color: #1a1a1a !important;
}
/* =====================================================
   MOBİL UYUMLULUK - RESPONSIVE DÜZELTMELER
   ===================================================== */
/* TABLO OVERFLOW GLOBAL FİX */
.table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}
/* KÜÇÜK EKRANLARDA CONTAINER PADDING */
@media (max-width: 576px) {
    .container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    .card-body {
        padding: 14px !important;
    }
    .card-header {
        padding: 12px 14px !important;
    }
    /* BAŞLIK VE BUTON SATIRI */
    .d-flex.justify-content-between {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
    }
    /* ÖZET KART YAZILARI */
    .card .fs-4 { font-size: 1.1rem !important; }
    .card .fs-3 { font-size: 1rem !important; }
    .card .fs-1 { font-size: 1.5rem !important; }
    /* TABLO HÜCRE BOYUTLARI */
    .table th, .table td {
        font-size: 0.75rem;
        padding: 6px 8px;
        white-space: nowrap;
    }
    /* BUTON GRUPLARI */
    .btn-group-sm > .btn, .btn-sm {
        padding: 3px 6px;
        font-size: 0.75rem;
    }
    /* INPUT GROUP */
    .input-group {
        max-width: 100% !important;
    }
    /* MOBİL KART GÖRÜNÜMÜ - TABLO YERİNE */
    .mobile-card-list .table { display: none !important; }
    /* SAYFA BAŞLIK */
    h2 { font-size: 1.2rem !important; }
    h5 { font-size: 1rem !important; }
    /* BADGE BOYUTU */
    .badge { font-size: 0.65rem; }
    /* COLLAPSE FORM */
    .collapse .row .col-md-6 { margin-bottom: 8px; }
    /* ALERT */
    .alert { font-size: 0.82rem; padding: 10px 12px; }
    /* PAGINATION */
    .pagination .page-link { padding: 4px 8px; font-size: 0.8rem; }
    /* FORM LABEL */
    .form-label { font-size: 0.83rem; margin-bottom: 3px; }
    /* STAT KARTLARI YAN YANA */
    .row.g-3 > .col-12.col-md-3,
    .row.g-3 > .col-12.col-md-4,
    .row.g-3 > .col-12.col-md-6 {
        padding-bottom: 0;
    }
}
@media (max-width: 768px) {
    /* NAVBAR MOBILDE DAHA İYİ */
    .custom-navbar .navbar-collapse {
        border-top: 1px solid rgba(255,255,255,0.08);
        margin-top: 8px;
        padding-top: 8px;
    }
    /* TABLO BAŞLIKLARI WRAP OLMASIN */
    .table thead th {
        white-space: nowrap;
        font-size: 0.78rem;
    }
    .table tbody td {
        font-size: 0.82rem;
    }
    /* FORM ROW DÜZENLEME */
    .row.g-3 { --bs-gutter-y: 0.6rem; }
    /* BÜYÜK BUTONLAR MOBİLDE TAM GENİŞLİK */
    .d-flex.gap-2 .btn:only-child {
        width: 100%;
    }
    /* CARİ / ÜRÜN TABLOLARINDA İŞLEM BUTONLARI */
    td .d-flex.gap-1, td.d-flex {
        flex-wrap: nowrap;
    }
    /* ÖZET KARTLARI MOBİLDE 2'Lİ */
    .row.g-3 > .col-12.col-md-3 {
        flex: 0 0 auto;
        width: 50%;
    }
    /* INPUT GROUP GENİŞLİK */
    .input-group[style*="max-width"] {
        max-width: 100% !important;
    }
    /* DROPDOWN MENÜ MOBİLDE */
    .dropdown-menu { min-width: 200px; }
    /* MODAL MOBİLDE */
    .modal-dialog { margin: 10px; }
    .modal-body { padding: 14px; }
}
/* KÜÇÜK EKRANLAR İÇİN TABLO SCROLL İPUCU */
@media (max-width: 768px) {
    .table-responsive::before {
        content: '';
        display: none;
    }
    .scroll-hint {
        font-size: 0.72rem;
        color: var(--text-muted);
        text-align: right;
        padding: 2px 8px 0;
    }
}
/* MOBİL KART GÖRÜNÜMÜ (tablo yerine kart) */
.mobile-cards {
    display: none;
}
@media (max-width: 767px) {
    .mobile-cards {
        display: block;
    }
    .desktop-table {
        display: none;
    }
    .mobile-cari-card {
        border: 1px solid var(--border);
        border-radius: var(--radius);
        background: var(--bg-card);
        padding: 12px 14px;
        margin-bottom: 10px;
        box-shadow: var(--shadow-sm);
    }
    .mobile-cari-card .cari-name {
        font-weight: 700;
        font-size: 0.95rem;
        color: var(--text-heading);
    }
    .mobile-cari-card .cari-meta {
        font-size: 0.78rem;
        color: var(--text-secondary);
        margin-top: 2px;
    }
    .mobile-cari-card .cari-amounts {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        margin-top: 8px;
    }
    .mobile-cari-card .amount-box {
        background: var(--bg-card-alt);
        border-radius: var(--radius-sm);
        padding: 6px 8px;
        font-size: 0.78rem;
    }
    .mobile-cari-card .amount-box label {
        display: block;
        font-size: 0.68rem;
        color: var(--text-muted);
        margin-bottom: 1px;
    }
    .mobile-cari-card .cari-actions {
        display: flex;
        gap: 6px;
        margin-top: 10px;
        justify-content: flex-end;
    }
    /* GENEL TABLO MOBILE SCROLL */
    .table-scroll-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0 0 var(--radius) var(--radius);
    }
    /* FORM GRUPLARI MOBİLDE TAM GENİŞLİK */
    .col-md-6, .col-md-4, .col-md-3, .col-md-8, .col-md-9 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    .col-md-12 { width: 100%; }
    /* ÖZET STAT KARTLARI MOBİLDE 2X2 */
    .col-12.col-md-3 {
        width: 50% !important;
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    /* BÜYÜK RAKAMLAR KÜÇÜLSÜN */
    .fs-2, .display-6 { font-size: 1.3rem !important; }
}
/* =====================================================
   FATURA / TEKLİF PRINT DIŞINDA MOBİL
   ===================================================== */
@media screen and (max-width: 767px) {
    /* FAT SÜTUNLU TABLOLAR - YATAY SCROLL */
    .table-responsive {
        overflow-x: auto !important;
        max-width: 100%;
    }
    /* ÇOK KOLON İÇEREN FORMLAR */
    .row > [class*="col-lg-"],
    .row > [class*="col-xl-"] {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}
/* PRINT SAYFALAR ETKİLENMESİN */
@media print {
    .mobile-cards { display: none !important; }
    .desktop-table { display: block !important; }
}