:root {
    --bg: #f8fafc;
    --paper: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --primary: #1e40af;
    --orange: #2563eb;
    --accent: #2563eb;
    --gold: #d97706;
    --purple: #475569;
    --green: #059669;
    --red: #e11d48;
    --shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}

* { box-sizing: border-box; }

body.app-body {
    font-family: 'Plus Jakarta Sans', Manrope, "Segoe UI", sans-serif;
    margin: 0;
    background: #f8fafc;
    color: var(--ink);
    min-height: 100vh;
}

body.login-body {
    font-family: Manrope, "Segoe UI", sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #FFD700 0%, #FF4500 50%, #800080 100%);
    overflow: hidden;
    position: relative;
}

.bg-circles { position: absolute; width: 100%; height: 100%; z-index: 1; overflow: hidden; }
.circle { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(40px); animation: float 8s infinite alternate ease-in-out; }
.circle-1 { width: 300px; height: 300px; top: -100px; left: -100px; }
.circle-2 { width: 400px; height: 400px; bottom: -50px; right: -50px; background: rgba(255, 255, 255, 0.1); }
.circle-3 { width: 150px; height: 150px; top: 20%; right: 20%; }

@keyframes float {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(30px) scale(1.05); }
}

.main-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 2;
    width: 100%;
    max-width: 1000px;
    padding: 28px 40px;
    gap: 40px;
    position: relative;
}

.logo-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.logo-section img {
    max-width: 310px;
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.25));
}

.logo-year {
    margin-top: 14px;
    font-family: Manrope, "Segoe UI", sans-serif;
    font-size: clamp(20px, 2.4vw, 30px);
    font-weight: 700;
    letter-spacing: 0.32em;
    text-indent: 0.32em;
    color: #8b1518;
    text-transform: uppercase;
    line-height: 1;
}

.login-side {
    flex: 0 0 400px;
    width: 400px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.login-section {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid rgba(255, 255, 255, 0.22);
    padding: 40px 36px 32px;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    text-align: center;
}

.login-section h2 { margin: 0 0 28px; color: #fff; font-size: 32px; }
.input-group { margin-bottom: 22px; text-align: left; }
.input-group label { display: block; margin-bottom: 10px; color: #fff; font-weight: 600; font-size: 15px; }
.input-group input {
    width: 100%;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 16px;
}
.input-group input::placeholder { color: rgba(255, 255, 255, 0.7); }
.login-btn {
    width: 100%;
    padding: 15px;
    margin-top: 4px;
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}
.error-message {
    background: rgba(220, 20, 60, 0.7);
    color: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: bold;
}

#main-app { min-height: 100vh; display: flex; flex-direction: row; }
.app-header {
    display: flex;
    align-items: center;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 40;
}
.header-top {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    min-width: 0;
}
.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    font-weight: 800;
    white-space: nowrap;
}
.brand img { width: 42px; height: 42px; object-fit: cover; border-radius: 10px; }
.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 12px;
    background: #fff3e6;
    padding: 10px 11px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
}
.app-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    flex: 1;
    flex-wrap: nowrap;
    min-width: 0;
    overflow: visible;
}
.app-nav .nav-item,
.app-nav a {
    text-decoration: none;
    color: var(--muted);
    font-weight: 700;
    font-size: 14px;
    padding: 7px 11px;
    border-radius: 999px;
    white-space: nowrap;
    flex: 0 0 auto;
    transition: all 0.15s ease;
}
.app-nav .nav-item:hover,
.app-nav a:hover { background: #f1f5f9; color: var(--ink); }
.app-nav .nav-item.active,
.app-nav a.active {
    background: #0f172a;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Desktop Dropdown Sekmeleri */
.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.nav-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    padding: 7px 11px;
    border-radius: 999px;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.15s ease;
}
.nav-dropdown-btn:hover {
    background: #f1f5f9;
    color: var(--ink);
}
.nav-dropdown-btn.active {
    background: #0f172a;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.dropdown-chevron {
    transition: transform 0.2s ease;
    opacity: 0.75;
}
.nav-dropdown:hover .dropdown-chevron,
.nav-dropdown.is-open .dropdown-chevron {
    transform: rotate(180deg);
}
.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 235px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.12), 0 4px 12px rgba(15, 23, 42, 0.05);
    padding: 8px;
    display: none;
    flex-direction: column;
    gap: 4px;
    z-index: 100;
}
.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}
.nav-dropdown-menu-wide {
    min-width: 280px;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
    display: flex;
    animation: navDropFade 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes navDropFade {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.dropdown-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: #1e293b;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s ease;
}
.dropdown-link:hover {
    background: #f8fafc;
    color: #ff6a1a;
}
.dropdown-link.active {
    background: #fff7ed;
    color: #ea580c;
}
.dropdown-link .d-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}
.dropdown-link .d-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}
.dropdown-link .d-text strong {
    font-size: 13px;
    font-weight: 700;
}
.dropdown-link .d-text small {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    margin-top: 1px;
}
.dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 4px 6px;
}
.dropdown-link-special {
    background: #fffbeb;
    border: 1px solid #fde68a;
}
.dropdown-link-special:hover {
    background: #fef3c7;
    color: #b45309;
}
.app-nav .nav-drawer-logout { display: none; }
.nav-backdrop { display: none; }
.header-user {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-left: auto;
    flex: 0 0 auto;
}
.user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    line-height: 1.25;
}
.user-meta strong {
    display: block;
    font-size: 13.5px;
    font-weight: 800;
    color: var(--ink);
    letter-spacing: -0.2px;
}
.user-meta span {
    display: block;
    font-size: 11px;
    color: var(--muted);
    font-weight: 600;
}
.logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #2b2038;
    color: #fff;
    padding: 7px 15px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    transition: background 0.15s ease, transform 0.1s ease;
}
.logout-btn:hover {
    background: #dc2626;
    color: #fff;
}
.page { margin: 18px auto 28px; width: min(1180px, calc(100% - 28px)); }
.bottom-nav { display: none; }

.page-head { margin-bottom: 18px; }
.page-head h2, .recete-head h2 { margin: 4px 0 6px; font-size: 28px; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 800; color: var(--orange); letter-spacing: 0.08em; text-transform: uppercase; }
.hint { color: var(--muted); font-size: 14px; margin: 0 0 16px; }

.panel, .form-card, .stat-card, .report-box, .firma-card {
    background: var(--paper);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow);
    border-radius: 18px;
}
.panel { padding: 20px; margin-bottom: 18px; }
.panel h3 { margin: 0 0 14px; font-size: 18px; }

.home-content { display: flex; flex-direction: column; align-items: center; padding: 12px 8px 28px; text-align: center; gap: 16px; }
.home-desktop { width: 100%; display: flex; flex-direction: column; align-items: center; }
.home-mobile { display: none; width: 100%; }
.home-mobile-only { display: none; }
.logo-wrapper { width: min(420px, 100%); height: 160px; display: flex; align-items: center; justify-content: center; }
.logo-wrapper img { max-width: 100%; max-height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.home-top { display: flex; align-items: center; gap: 14px; text-align: left; }
.home-logo-btn {
    border: 0;
    padding: 0;
    background: transparent;
    flex: 0 0 56px;
    cursor: pointer;
    text-decoration: none;
    display: block;
}
.home-logo { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; display: block; }
.home-title { font-size: 34px; font-weight: 800; line-height: 1.2; }
.home-subtitle { color: var(--muted); font-size: 16px; }
.welcome-text { color: var(--purple); font-size: 16px; font-weight: 700; margin: 12px 0 8px; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 12px 14px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 800;
    font-size: 15px;
    color: #fff;
}
.quick-in { background: linear-gradient(90deg, #16a34a, #0f9f6e); }
.quick-out { background: linear-gradient(90deg, #ef4444, #db2777); }
.quick-stock { background: linear-gradient(90deg, #ff8c00, #ff6a1a); }
.quick-ciro { background: linear-gradient(90deg, #6b21a8, #9333ea); }
.dashboard, .report-summary { display: flex; gap: 14px; width: 100%; flex-wrap: wrap; }
.firma-home { display: flex; gap: 14px; width: 100%; flex-wrap: wrap; margin: 0; }
.firma-home .eyebrow { margin: 0 0 2px; width: 100%; text-align: left; }
.stat-card, .report-box, .firma-card { flex: 1; min-width: 200px; padding: 22px; text-align: left; }
.stat-title, .report-box h4 { margin: 0 0 10px; color: var(--muted); font-size: 13px; font-weight: 700; }
.stat-val, .report-box .value { font-size: 26px; font-weight: 800; }
.stat-val, .value.kar { color: var(--green); }
.value.ciro { color: #2563eb; }
.value.maliyet { color: var(--red); }
.value.gider { color: var(--orange); }
.value.zarar, .stat-val.zarar, .value-zarar { color: #b91c1c; font-weight: 800; }
.report-box-loss {
    border: 1px solid #fca5a5;
    background: #fef2f2;
}
.loss-banner {
    margin-bottom: 14px;
    font-weight: 700;
}
.loss-banner .loss-formula {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.9;
}
.formula-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    align-items: center;
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    font-size: 14px;
    font-weight: 700;
    color: #9a3412;
}
.formula-strip .formula-loss { color: #b91c1c; }
.formula-strip .formula-profit { color: #15803d; }
.stat-card-loss {
    border: 1px solid #fca5a5;
    background: linear-gradient(180deg, #fff 0%, #fef2f2 100%);
}
.value.alacak, .value-alacak { color: #1d4ed8; font-weight: 800; }
.report-box-alacak {
    border: 1px solid #93c5fd;
    background: #eff6ff;
}
.alert-alacak {
    background: #dbeafe;
    color: #1e3a8a;
    border: 1px solid #93c5fd;
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-weight: 700;
}
.badge-alacak, .badge-tahsil {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}
.badge-alacak { background: #dbeafe; color: #1d4ed8; }
.badge-tahsil { background: #dcfce7; color: #166534; }
.row-alacak { background: #f8fbff; }
.hesap-row { cursor: pointer; }
.hesap-row:hover { background: #f4f7fb; }
.hesap-row.is-open { background: #e8f1ff; }
.hesap-row a { color: inherit; text-decoration: none; }
.row-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.row-actions form { margin: 0; }
.cek-fields {
    margin: 14px 0;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid #93c5fd;
    background: #eff6ff;
}
.cek-fields h4 { margin: 0 0 10px; color: #1e3a8a; }
.report-box-cek { border: 1px solid #93c5fd; background: #f0f9ff; }
.cek-badge {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}
.cek-badge.cek-gecmis, tr.cek-gecmis { background: #fef2f2; }
.cek-badge.cek-gecmis { background: #fecaca; color: #991b1b; }
.cek-badge.cek-bugun, tr.cek-bugun { background: #fff7ed; }
.cek-badge.cek-bugun { background: #fed7aa; color: #9a3412; }
.cek-badge.cek-yakin { background: #fef3c7; color: #92400e; }
.cek-badge.cek-ileri { background: #dbeafe; color: #1d4ed8; }
.cek-badge.cek-none { background: #e5e7eb; color: #374151; }
.sevkiyat-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    background: #e5e7eb;
    color: #374151;
}
.sevkiyat-badge.durum-yolda { background: #ffedd5; color: #9a3412; }
.sevkiyat-badge.durum-teslim { background: #dcfce7; color: #166534; }
.sevkiyat-badge.durum-bekliyor { background: #dbeafe; color: #1d4ed8; }
.sevkiyat-badge.durum-iptal { background: #fee2e2; color: #991b1b; }
.row-yolda { background: #fffaf5; }
.row-teslim { background: #f7fef9; }
.row-iptal { opacity: 0.65; }
.form-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}
.cek-kapat-details {
    display: inline-block;
    position: relative;
}
.cek-kapat-details > summary {
    list-style: none;
    cursor: pointer;
}
.cek-kapat-details > summary::-webkit-details-marker { display: none; }
.cek-kapat-form {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    min-width: 220px;
    padding: 12px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    display: grid;
    gap: 8px;
}
.cek-kapat-form label {
    display: grid;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
}
.cek-kapat-form input,
.cek-kapat-form select {
    font-weight: 500;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}
.owner-fatura-banner { margin-bottom: 14px; }
.sevkiyat-tabs { margin-bottom: 12px; }
.sev-panel .btn-submit { margin-top: 8px; }
@media (max-width: 900px) {
    .sev-panel .form-grid { gap: 12px; }
    .sev-panel .btn-submit { min-height: 48px; font-size: 16px; }
}
.invoice-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
}
.invoice-toolbar .btn-submit { width: auto; margin: 0; padding: 10px 18px; }
.invoice-sheet {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: var(--shadow);
    max-width: 860px;
    margin: 0 auto;
}
.invoice-head {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--ink);
    padding-bottom: 16px;
    margin-bottom: 18px;
}
.invoice-brand {
    margin: 0;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--orange);
}
.invoice-head h1 {
    margin: 4px 0 6px;
    font-size: 28px;
    letter-spacing: -0.02em;
}
.invoice-meta {
    display: grid;
    gap: 8px;
    min-width: 180px;
}
.invoice-meta span {
    display: block;
    font-size: 11px;
    color: var(--muted);
    font-weight: 700;
    text-transform: uppercase;
}
.invoice-meta strong { font-size: 15px; }
.invoice-parties {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}
.invoice-parties h3 {
    margin: 0 0 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}
.invoice-parties p { margin: 0 0 4px; }
.invoice-note {
    background: #fff7ed;
    border-radius: 10px;
    padding: 10px 12px;
    margin: 0 0 16px;
}
.invoice-table th { white-space: nowrap; }
.invoice-totals {
    margin-top: 16px;
    margin-left: auto;
    max-width: 280px;
    display: grid;
    gap: 8px;
}
.invoice-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
}
.invoice-grand {
    border-top: 2px solid var(--ink);
    padding-top: 8px;
    font-size: 16px !important;
}
.invoice-foot {
    margin-top: 28px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
    font-size: 12px;
    color: var(--muted);
}
@media print {
    body.app-body {
        background: #fff !important;
    }
    .app-header, .firma-menu, .app-footer, .bottom-nav,
    .nav-backdrop, .no-print, .invoice-toolbar { display: none !important; }
    .page { width: 100% !important; margin: 0 !important; padding: 0 !important; }
    .invoice-sheet {
        box-shadow: none;
        border: 0;
        border-radius: 0;
        padding: 0;
        max-width: none;
    }
}
.firma-card { text-decoration: none; color: #9a3412; background: linear-gradient(180deg, #fff7ed, #fff); min-height: 72px; }
.firma-card span { display: block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; }
.firma-card strong { font-size: 22px; display: block; }
.firma-card .firma-ciro {
    display: block;
    margin-top: 8px;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    color: #2563eb;
}
.firma-card small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 700; }
.firma-card.active { outline: 2px solid #ff6a1a; }

.form-card { max-width: 720px; margin: 0 auto; padding: 28px; }
.form-card h2 { text-align: left; margin-top: 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.stat-trio { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-group { margin-bottom: 0; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { display: block; margin-bottom: 6px; color: var(--muted); font-weight: 700; font-size: 13px; }
.form-group input, .form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fffaf5;
    font: inherit;
}
.form-group input:focus, .form-group select:focus {
    outline: 2px solid rgba(255, 106, 26, 0.25);
    border-color: var(--orange);
}
.btn-submit, .btn-barcode, .btn-camera {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 800;
    cursor: pointer;
    margin-top: 16px;
}
.btn-submit.green { background: linear-gradient(90deg, #16a34a, #0f9f6e); }
.btn-submit.red { background: linear-gradient(90deg, #ef4444, #db2777); }
.calc-box {
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 12px;
    padding: 12px 14px;
    color: #9a3412;
    font-size: 14px;
    font-weight: 700;
}
.calc-box strong { display: block; margin-bottom: 6px; }
.calc-box div { margin: 3px 0; }
.unit-tag {
    display: inline-block;
    margin-left: 4px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #ffedd5;
    color: #9a3412;
    font-size: 11px;
    font-weight: 800;
}
.calc-box.info-ok { background: #ecfdf5; border-color: #6ee7b7; color: #065f46; }
.calc-box.info-warn { background: #fef2f2; border-color: #fca5a5; color: #991b1b; }
.calc-note { margin-top: 6px; font-size: 12px; font-weight: 600; opacity: 0.85; }
.fatura-calc-box { font-weight: 600; }
.fatura-calc-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}
.fatura-calc-grid > div {
    background: rgba(255, 255, 255, 0.55);
    border-radius: 10px;
    padding: 10px 12px;
}
.fatura-calc-grid span {
    display: block;
    font-size: 12px;
    font-weight: 700;
    opacity: 0.8;
    margin-bottom: 4px;
}
.fatura-calc-grid b {
    display: block;
    font-size: 18px;
    font-weight: 800;
}
.fatura-calc-kdv {
    background: #fff7ed !important;
    border: 1px solid #fdba74;
    color: #9a3412;
}
.report-box-kdv {
    border: 1px solid #fdba74;
    background: #fff7ed;
}
.report-box-kdv .value { color: #c2410c; }
.report-box-kdv-save {
    border: 1px solid #6ee7b7;
    background: #ecfdf5;
}
.report-box-kdv-save .value { color: #047857; }
.kdv-ozet-panel {
    margin: 0 0 18px;
    border: 1px solid #a7f3d0;
    background: linear-gradient(180deg, #f0fdf4 0%, #fff 55%);
}
.kdv-ozet-panel .panel-head-row {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.kdv-ozet-panel h3 { margin: 0; }
.kdv-ozet-grid .report-box { min-width: 180px; }
.fatura-calc-kdv-save {
    background: #ecfdf5 !important;
    border: 1px solid #6ee7b7;
    color: #065f46;
}
.kdv-save { color: #047857; }
.invoice-totals .invoice-kdv {
    background: #fff7ed;
    border-radius: 8px;
    padding: 6px 10px;
}
@media (max-width: 720px) {
    .fatura-calc-grid { grid-template-columns: 1fr; }
}
.unit-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 18px;
}
.unit-chip {
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: #9a3412;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
}
.unit-chip b { margin-right: 4px; }
.transfer-card { max-width: 1100px; }
.transfer-tabs, .transfer-source {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}
.transfer-tab, .source-chip, .btn-file, .btn-secondary, .btn-link {
    border: 1px solid #fdba74;
    background: #fff7ed;
    color: #9a3412;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.transfer-tab.active, .source-chip.active {
    background: linear-gradient(90deg, #ff6a1a, #e11d74);
    border-color: transparent;
    color: #fff;
}
.btn-secondary, .btn-file { background: #fff; }
.transfer-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 8px; }
.transfer-meta { margin-top: 12px; }
.transfer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 16px 0 10px;
}
.transfer-toolbar-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.transfer-toolbar .btn-submit { width: auto; margin: 0; padding: 10px 18px; }
.transfer-table-wrap { max-height: 55vh; overflow: auto; border: 1px solid #fed7aa; border-radius: 12px; }
.transfer-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.transfer-table th {
    position: sticky;
    top: 0;
    background: #fff7ed;
    z-index: 1;
    text-align: left;
    padding: 8px;
    border-bottom: 1px solid #fdba74;
}
.transfer-table td { padding: 6px; border-bottom: 1px solid #ffedd5; }
.transfer-table input, .transfer-table select {
    width: 100%;
    min-width: 72px;
    border: 1px solid #fdba74;
    border-radius: 8px;
    padding: 6px 8px;
    font: inherit;
}
.btn-icon-del {
    border: none;
    background: #fee2e2;
    color: #991b1b;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 18px;
    cursor: pointer;
}
.bulk-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    background: #fff7ed;
}
.bulk-bar label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 700;
    color: var(--muted);
    font-size: 13px;
    cursor: pointer;
}
.bulk-bar .bulk-count { color: #9a3412; font-weight: 800; font-size: 13px; }
.bulk-bar .btn-secondary[disabled] { opacity: 0.45; cursor: not-allowed; }
.bulk-check { width: 16px; height: 16px; accent-color: #ea580c; cursor: pointer; }
td.bulk-cell, th.bulk-cell { width: 36px; text-align: center; }
.fatura-preview {
    margin: 10px 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #fdba74;
    background: #fff;
}
.fatura-preview img { display: block; width: 100%; max-height: 280px; object-fit: contain; }
.hint.small { font-size: 13px; }
.hint a { color: #c2410c; font-weight: 800; }
.gider-card { max-width: 820px; margin: 0 auto 18px; }
.gider-card h3 { margin: 0 0 12px; }
.panel-head-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}
.panel-head-row h3 { margin: 0; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.pkg-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.pkg-inline select {
    min-width: 120px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fffaf5;
    font: inherit;
}
.pkg-inline .btn-secondary {
    width: auto;
    padding: 8px 12px;
}
.stock-pick { margin: 16px 0 22px; }
.stock-pick-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.stock-pick-head input[type="search"] {
    min-width: 220px;
    flex: 1;
    max-width: 360px;
    border: 1px solid #fdba74;
    border-radius: 10px;
    padding: 8px 12px;
    font: inherit;
}
.stock-pick-table { max-height: 280px; overflow: auto; border: 1px solid #fed7aa; border-radius: 12px; }
.stock-row { cursor: pointer; }
.stock-row:hover { background: #fff7ed; }
.stock-row.selected { background: #ffedd5; }
.stock-row .btn-secondary { padding: 6px 12px; }
.muted { color: #9a3412; opacity: 0.75; font-size: 12px; font-weight: 600; margin-top: 2px; }
.cikis-tab-panel { margin-top: 8px; }
.stock-pick.compact { margin-top: 12px; }
.stock-pick-table.short { max-height: 200px; }
.transfer-table tr.row-bad { background: #fef2f2; }
.transfer-table tr.row-warn { background: #fff7ed; }
.transfer-table input[readonly] {
    background: #fff7ed;
    color: #9a3412;
    border-style: dashed;
}
a.report-box.report-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
a.report-box.report-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(194, 65, 12, 0.12);
}
.report-more {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 800;
    color: #c2410c;
}
.barcode-field { display: flex; gap: 8px; align-items: stretch; }
.barcode-field input { flex: 1; min-width: 0; }
.btn-camera {
    width: auto;
    min-width: 118px;
    margin-top: 0;
    padding: 0 14px;
    background: linear-gradient(90deg, #ff6a1a, #e11d74);
    font-size: 13px;
    white-space: nowrap;
}
.barcode-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(18, 10, 28, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.barcode-modal[hidden] { display: none !important; }
body.barcode-open { overflow: hidden; }
.barcode-modal-panel {
    width: min(440px, 100%);
    background: #fff;
    border-radius: 18px;
    padding: 16px;
    box-shadow: var(--shadow);
}
.barcode-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}
.barcode-modal-head strong { font-size: 18px; }
.barcode-modal-close {
    border: 0;
    background: #f3e8ff;
    color: var(--ink);
    width: 36px;
    height: 36px;
    border-radius: 999px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.barcode-modal-hint, .barcode-status {
    margin: 0 0 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}
.barcode-reader {
    width: 100%;
    min-height: 240px;
    overflow: hidden;
    border-radius: 14px;
    background: #111;
}
.barcode-reader video { border-radius: 14px !important; }
.alert { padding: 12px 14px; margin-bottom: 16px; border-radius: 12px; font-weight: 700; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-danger { background: #fee2e2; color: #991b1b; }

.filter-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    background: rgba(255, 255, 255, 0.7);
    padding: 8px;
    border-radius: 14px;
}
.filter-bar a {
    background: transparent;
    border: 0;
    padding: 8px 14px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--muted);
    font-weight: 700;
}
.filter-bar a.active,
.filter-bar .btn-secondary.active,
#stok-kritik-filtre.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.filter-select { padding: 8px 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; }

.firma-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 10px 22px;
}
.firma-label { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; }
.firma-chip {
    text-decoration: none;
    background: #fff;
    color: #9a3412;
    border: 1px solid #fdba74;
    padding: 7px 14px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
}
.firma-chip.active { background: #0f172a; color: #fff; border-color: #0f172a; }

.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; background: #fffaf5; }
tbody tr:hover { background: #fff7ed; }
tr.kritik td { background: #fff1f2; }
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: #fee2e2;
    color: #991b1b;
}
.no-data { text-align: center; color: var(--muted); font-style: italic; padding: 28px !important; }
.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.role-admin { color: var(--purple); font-weight: 800; }
.role-firma { color: var(--orange); font-weight: 800; }

.app-footer {
    margin-top: auto;
    padding: 16px 22px 22px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}
.app-footer a { color: var(--purple); font-weight: 800; text-decoration: none; }
.app-footer-sep { margin: 0 8px; opacity: 0.55; }
.login-contact {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.28);
    color: #fff;
}
.login-contact span { display: block; font-size: 13px; font-weight: 600; opacity: 0.92; margin-bottom: 6px; }
.login-contact a {
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    text-decoration: none;
    word-break: break-all;
}
.login-contact a:hover { text-decoration: underline; }
.login-contact .login-ig {
    display: block;
    margin-top: 8px;
    font-size: 14px;
}
.login-install-box {
    width: 100%;
    text-align: left;
    padding: 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.24);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.login-install-box .install-hint { color: rgba(255,255,255,0.92); font-size: 11px; margin-top: 6px; }
.login-install-box .ios-guide {
    background: rgba(0,0,0,0.18);
    border-color: rgba(255,255,255,0.2);
    color: #fff;
    padding: 8px 10px;
    margin-top: 6px;
}
.login-install-box .ios-guide ol { color: rgba(255,255,255,0.95); }
.login-install-box .ios-guide li { font-size: 11px; margin: 3px 0; }
.login-setup-link {
    display: inline-block;
    margin-top: 6px;
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    text-decoration: none;
}
.login-setup-link:hover { text-decoration: underline; }

.store-badges {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    max-width: 320px;
}
.store-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    width: 100%;
    padding: 8px 9px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    color: #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.store-badge:hover { transform: translateY(-1px); }
.store-badge:active { transform: translateY(0); }
.store-badge-android {
    background: linear-gradient(135deg, #3ddc84 0%, #0f9d58 100%);
    box-shadow: 0 5px 12px rgba(15, 157, 88, 0.24);
}
.store-badge-apple {
    background: linear-gradient(135deg, #3a3a3c 0%, #111 100%);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.24);
}
.store-badge-icon {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
}
.store-badge-icon svg { width: 22px; height: 22px; }
.store-badge-text { display: flex; flex-direction: column; gap: 0; min-width: 0; }
.store-badge-text small {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    opacity: 0.85;
}
.store-badge-text strong {
    font-size: 11px;
    font-weight: 800;
    line-height: 1.15;
}
.install-hint {
    margin: 8px 0 0;
    font-size: 12px;
    font-weight: 600;
    color: var(--muted);
    line-height: 1.35;
}
.install-hint:empty,
.install-hint[hidden] { display: none; }
.ios-guide {
    margin-top: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    color: var(--ink);
    max-width: 320px;
}
.ios-guide[hidden] { display: none !important; }
.ios-guide strong { display: block; margin-bottom: 4px; font-size: 13px; }
.ios-guide ol { margin: 0; padding-left: 16px; }
.ios-guide li { margin: 3px 0; font-size: 12px; font-weight: 600; }
.public-shell { max-width: 880px; margin: 0 auto; padding: 24px 16px 40px; text-align: left; }
.public-brand { margin-bottom: 18px; display: inline-flex; }
.public-back { text-align: left; margin-top: 24px; }
.public-back a { color: var(--purple); font-weight: 800; text-decoration: none; }
.install-page { text-align: left; max-width: 720px; }
.install-page .btn-submit { margin-left: 0; }
.install-steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 8px 0 18px;
    justify-items: start;
    max-width: 520px;
}
.install-card {
    width: 100%;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: var(--shadow);
    text-align: left;
}
.install-card ol { margin: 10px 0 0; padding-left: 18px; color: var(--ink); }
.install-card li { margin: 8px 0; }
.contact-mail { font-size: 22px; font-weight: 800; margin: 8px 0 0; }
.contact-mail a { color: var(--purple); text-decoration: none; }
.contact-social {
    margin: 12px 0 0;
    font-size: 16px;
    font-weight: 800;
}
.contact-social a { color: var(--purple); text-decoration: none; }

@media (max-width: 900px) {
    .form-grid { grid-template-columns: 1fr; }
    .main-container { flex-direction: column; padding: 20px; gap: 18px; }
    .logo-section img { max-width: 210px; }
    .login-side { flex: 0 0 auto; width: 100%; max-width: 400px; }
    .login-section { flex: 0 0 auto; width: 100%; padding: 32px 28px; }
    .store-badges { grid-template-columns: 1fr 1fr; max-width: 100%; }

    .row-actions {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 8px;
    }
    .row-actions .btn-secondary,
    .row-actions .btn-submit {
        min-height: 40px;
        padding: 8px 12px;
        font-size: 13px;
    }
    .cek-kapat-details { width: 100%; }
    .cek-kapat-form {
        position: fixed;
        left: 12px;
        right: 12px;
        top: auto;
        bottom: calc(72px + env(safe-area-inset-bottom, 0px));
        min-width: 0;
        max-height: 55vh;
        overflow: auto;
        z-index: 70;
    }
    .transfer-tabs, .transfer-source {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
    }
    .transfer-tab, .source-chip { flex: 0 0 auto; }
    .transfer-table-wrap { max-height: none; }
    .transfer-toolbar {
        position: sticky;
        bottom: calc(64px + env(safe-area-inset-bottom, 0px));
        background: rgba(255,255,255,0.96);
        padding: 8px 0;
        z-index: 5;
    }
    .invoice-parties { grid-template-columns: 1fr; }
    .invoice-sheet { padding: 18px 14px; }
    .invoice-head h1 { font-size: 22px; }
    .stat-card, .report-box, .firma-card { min-width: calc(50% - 8px); padding: 14px; }
    .stat-val, .report-box .value { font-size: 20px; }
    .filter-bar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 8px;
    }
    .filter-bar a, .filter-bar form { flex: 0 0 auto; }
    .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .panel, .form-card { border-radius: 14px; }

    /* Üstte yalnız logo. Soldaki menü açılımı yok; sayfalar alt şeritte. */
    .app-header {
        display: flex;
        flex-direction: row;
        padding: 8px 12px;
        padding-top: calc(8px + env(safe-area-inset-top, 0px));
        gap: 10px;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .header-top { flex: 1; min-width: 0; justify-content: flex-start; width: 100%; margin: 0; }
    .nav-toggle { display: none !important; }
    .app-nav, .nav-backdrop { display: none !important; }
    .header-user, .app-header .logout-btn { display: none; }
    .brand { margin-right: auto; }
    .brand img { width: 36px; height: 36px; }

    .firma-menu {
        padding: 8px 12px;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        background: transparent;
    }
    .firma-chip { flex: 0 0 auto; }

    .page {
        width: calc(100% - 20px);
        margin: 12px auto 96px;
    }
    .page-head h2, .recete-head h2 { font-size: 22px; }
    .form-card, .panel { padding: 16px; }
    .form-group input, .form-group select, .form-group textarea { font-size: 16px; }
    .stat-trio { grid-template-columns: 1fr; }
    body.nav-open .gm-ai-fab,
    body.nav-open .gm-ai-panel,
    body.sheet-open .gm-ai-fab,
    body.sheet-open .gm-ai-panel { visibility: hidden; }
    .app-footer { display: none; }

    .bottom-nav {
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 65;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid #e2e8f0;
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.05);
        gap: 0;
    }
    .bottom-nav-scroll {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        width: 100%;
        align-items: center;
        justify-items: center;
        overflow: hidden;
        gap: 0;
        padding: 0;
    }
    .bottom-nav-scroll::-webkit-scrollbar { display: none; }
    .bottom-nav a,
    .bottom-nav button {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-width: 0;
        width: 100%;
        height: 44px;
        border: none;
        background: transparent;
        color: #64748b;
        text-decoration: none;
        cursor: pointer;
        font-family: inherit;
        padding: 2px 0;
        border-radius: 8px;
        transition: all 0.15s ease;
        gap: 3px;
    }
    .bottom-nav a:hover,
    .bottom-nav button:hover {
        color: #1e293b;
    }
    .bottom-nav a:active,
    .bottom-nav button:active {
        background-color: #f1f5f9;
        transform: scale(0.96);
    }
    .bottom-nav a.active,
    .bottom-nav button.active {
        color: #1e40af;
    }
    .bottom-nav a.active::before,
    .bottom-nav button.active::before {
        content: '';
        position: absolute;
        top: -6px;
        width: 24px;
        height: 3px;
        background: #2563eb;
        border-radius: 0 0 3px 3px;
    }
    .bottom-nav .bn-svg {
        display: block !important;
        width: 21px !important;
        height: 21px !important;
        stroke-width: 2 !important;
        transition: transform 0.15s ease !important;
    }
    .bottom-nav a.active .bn-svg,
    .bottom-nav button.active .bn-svg {
        stroke-width: 2.3 !important;
        color: #2563eb !important;
        transform: translateY(-1px) !important;
    }
    .bottom-nav a span,
    .bottom-nav button span {
        display: block !important;
        font-size: 11px !important;
        font-weight: 600 !important;
        letter-spacing: -0.01em !important;
        line-height: 1 !important;
        color: inherit !important;
    }
    .bottom-nav a.active span,
    .bottom-nav button.active span {
        font-weight: 800 !important;
        color: #1e40af !important;
    }

    .home-desktop { display: none; }
    .home-mobile { display: flex; flex-direction: column; gap: 14px; text-align: left; }
    .home-mobile-only { display: block; }
    .home-content { align-items: stretch; text-align: left; }
    .home-title { font-size: 18px; }
    .welcome-text { margin: 6px 0 0; font-size: 14px; }
    .quick-btn { min-height: 56px; font-size: 16px; }
    .firma-home { display: grid; gap: 10px; }
    .firma-card { padding: 18px; }
    .firma-card strong { font-size: 24px; }
}

/* Fatura cari geçmişi / değişken fiyat */
.gm-gecmis-list { margin-top: 6px; font-size: 13px; line-height: 1.45; }
.gm-gecmis-list a { font-weight: 800; color: #9a3412; text-decoration: none; }
.gm-gecmis-list a:hover { text-decoration: underline; }
.gm-fiyat-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.gm-fiyat-chips .unit-chip {
  cursor: pointer;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
}
.gm-fiyat-chips .unit-chip:hover { background: #ffedd5; }

/* GM Asistan — hata yardımı */
.gm-ai-fab {
    position: fixed;
    right: 16px;
    bottom: 84px;
    z-index: 60;
    border: 0;
    border-radius: 999px;
    padding: 12px 16px;
    background: var(--accent, #ff6a1a);
    color: #fff;
    font-weight: 800;
    font-family: inherit;
    font-size: 13px;
    box-shadow: 0 8px 24px rgba(194, 65, 12, 0.28);
    cursor: pointer;
}
.gm-ai-fab[aria-expanded="true"] { filter: brightness(0.95); }
.gm-ai-panel {
    position: fixed;
    right: 16px;
    bottom: 140px;
    z-index: 61;
    width: min(340px, calc(100vw - 32px));
    background: #fffaf6;
    border: 1px solid #fed7aa;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(28, 25, 23, 0.16);
    padding: 14px 14px 12px;
}
.gm-ai-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.gm-ai-head strong { font-size: 14px; color: #9a3412; }
.gm-ai-close {
    border: 0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #78716c;
}
.gm-ai-body { font-size: 13px; color: #44403c; }
.gm-ai-ozet { margin: 0 0 8px; font-weight: 700; color: #7c2d12; }
.gm-ai-steps {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}
.gm-ai-steps li { line-height: 1.35; }
@media (min-width: 901px) {
    .gm-ai-fab { bottom: 24px; }
    .gm-ai-panel { bottom: 80px; }
}

/* Mobil Yönetim & Finans Sheet (Admin / Yetkili Paneli) */
.mobile-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 100;
    transition: opacity 0.25s ease;
}
.mobile-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 85vh;
    background: #ffffff;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    box-shadow: 0 -12px 42px rgba(15, 23, 42, 0.22);
    z-index: 101;
    display: flex;
    flex-direction: column;
    transform: translateY(105%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}
.mobile-sheet.is-open {
    transform: translateY(0);
}
.mobile-sheet-handle {
    width: 44px;
    height: 5px;
    background: #cbd5e1;
    border-radius: 999px;
    margin: 10px auto 4px;
    cursor: pointer;
}
.mobile-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px 14px;
    border-bottom: 1px solid #f1f5f9;
}
.mobile-sheet-user {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}
.mobile-sheet-user strong {
    font-size: 16px;
    color: #0f172a;
}
.mobile-sheet-user span {
    font-size: 12px;
    color: #64748b;
}
.mobile-sheet-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 0;
    background: #f1f5f9;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.mobile-sheet-body {
    padding: 14px 16px calc(24px + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.sheet-section-title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94a3b8;
    margin: 14px 4px 8px;
}
.sheet-section-title:first-child {
    margin-top: 0;
}
.sheet-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.sheet-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 11px 4px;
    text-decoration: none;
    color: #1e293b;
    gap: 6px;
    transition: transform 0.1s ease, background 0.15s ease;
}
.sheet-item:active {
    transform: scale(0.96);
}
.sheet-item.active {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #ea580c;
    font-weight: 800;
}
.sheet-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
}
.sheet-label {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
}
.sheet-item-highlight {
    background: #fffbeb;
    border-color: #fde68a;
}
.sheet-footer {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}
.sheet-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    background: #fee2e2;
    color: #b91c1c;
    font-weight: 800;
    font-size: 14px;
    text-decoration: none;
}
