/* Numune Takip - tasarım sistemi
   Koyu: Ethereal Glass / Açık: Soft Structuralism. Tek vurgu: su mavisi.
   Şekil kuralı: kabuk 29, iç yüzey 22, kontrol 14, düğme ve etiket tam yuvarlak.
   Yazı tipleri ve ikonlar kendi sunucumuzdan yüklenir (fonts.css, phosphor-light.css). */

:root {
    --bg: #05080D; --bg-2: #0A111A;
    --shell: rgb(255 255 255 / .035); --inner: #0B121B; --inner-2: #0F1823; --glass: rgb(14 22 33 / .62);
    --hair: rgb(255 255 255 / .08); --hair-2: rgb(255 255 255 / .15);
    --ink: #EEF3FA; --ink-2: #A6B1C2; --ink-3: #8793A6;
    --accent: #69B2F4; --accent-2: #3E8BD8; --on-accent: #06101C; --glow: rgb(105 178 244 / .35);
    --ok: #62D3A3; --ok-bg: rgb(98 211 163 / .12);
    --wait: #F2BB5E; --wait-bg: rgb(242 187 94 / .13);
    --bad: #F4908A; --bad-bg: rgb(244 144 138 / .13);
    --hl: inset 0 1px 0 rgb(255 255 255 / .07);
    --lift: 0 30px 60px -30px rgb(0 0 0 / .7);
    --orb-1: rgb(61 139 216 / .34); --orb-2: rgb(40 190 170 / .18);
    --grain: .05;
    --ease: cubic-bezier(.32, .72, 0, 1);
    --font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --display: 'Bricolage Grotesque', 'Geist', system-ui, sans-serif;
    --mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', monospace;
    --z-nav: 20; --z-drawer: 30; --z-menu: 35; --z-burger: 36;
    color-scheme: dark;

    /* eski adlar (satır içi stillerde geçiyor) */
    --color-ink: var(--ink); --color-ink-muted: var(--ink-2); --color-border: var(--hair); --color-border-strong: var(--hair-2);
    --color-destructive: var(--bad); --color-error: var(--bad); --color-approved: var(--ok); --color-review: var(--wait);
    --color-accent: var(--accent); --color-ring: var(--accent); --border: var(--hair);
    --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px; --space-5: 24px; --space-6: 32px; --space-8: 48px;
}
[data-theme="light"] {
    --bg: #E8ECF2; --bg-2: #F2F4F8;
    --shell: rgb(255 255 255 / .55); --inner: #FFFFFF; --inner-2: #F5F7FA; --glass: rgb(255 255 255 / .72);
    --hair: rgb(18 36 66 / .09); --hair-2: rgb(18 36 66 / .17);
    --ink: #0B1422; --ink-2: #44536A; --ink-3: #5E6C82;
    --accent: #1F62B3; --accent-2: #174D92; --on-accent: #FFFFFF; --glow: rgb(31 98 179 / .28);
    --ok: #1E7A55; --ok-bg: rgb(30 122 85 / .1);
    --wait: #8A5A00; --wait-bg: rgb(200 140 20 / .14);
    --bad: #B23A32; --bad-bg: rgb(178 58 50 / .09);
    --hl: inset 0 1px 0 rgb(255 255 255 / .9);
    --lift: 0 40px 70px -36px rgb(25 50 90 / .32);
    --orb-1: rgb(96 160 230 / .28); --orb-2: rgb(120 210 200 / .2);
    --grain: .03;
    color-scheme: light;
}

/* ---------- Temel ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink);
    font: 400 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums;
    transition: background .5s var(--ease), color .5s var(--ease);
}
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -.035em; text-wrap: balance; }
h1 { font-size: 32px; line-height: 1.1; }
h2 { font-size: 22px; line-height: 1.2; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
i.ph-light { font-size: 20px; line-height: 1; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 14px; }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--ink-2); }
.path { font-family: var(--mono); font-size: 12px; color: var(--ink-3); word-break: break-all; }
.skip { position: absolute; left: -999px; top: 12px; padding: 10px 16px; border-radius: 999px; background: var(--inner); z-index: 50; }
.skip:focus { left: 12px; }

.ambient {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(52rem 36rem at 8% -6%, var(--orb-1), transparent 62%),
        radial-gradient(44rem 34rem at 100% 108%, var(--orb-2), transparent 64%),
        linear-gradient(var(--bg), var(--bg-2));
}
.grain {
    position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: var(--grain);
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.stage { position: relative; z-index: 2; min-height: 100dvh; }

/* Sayfa girişi: yumuşak yükselme (JS yoksa görünür kalır) */
.js [data-rv] { opacity: 0; transform: translateY(22px); filter: blur(6px); transition: opacity .9s var(--ease) var(--d, 0ms), transform .9s var(--ease) var(--d, 0ms), filter .9s var(--ease) var(--d, 0ms); }
.js [data-rv].in { opacity: 1; transform: none; filter: none; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
    .js [data-rv] { opacity: 1; transform: none; filter: none; }
}

/* ---------- Yüzen cam menü ---------- */
.nav-wrap { position: sticky; top: 0; z-index: var(--z-nav); display: flex; justify-content: center; padding: 16px 16px 0; pointer-events: none; }
.nav {
    pointer-events: auto; display: flex; align-items: center; gap: 6px; height: 60px; padding: 6px; border-radius: 999px; max-width: 100%;
    background: var(--glass); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%);
    border: 1px solid var(--hair-2); box-shadow: var(--hl), 0 20px 50px -20px rgb(0 0 0 / .55);
}
.brand { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px 0 6px; font-family: var(--display); font-weight: 600; letter-spacing: -.02em; font-size: 16px; white-space: nowrap; }
.brand__mark {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--on-accent);
    background: linear-gradient(145deg, var(--accent), var(--accent-2)); box-shadow: inset 0 1px 0 rgb(255 255 255 / .4), 0 6px 18px -6px var(--glow);
}
.brand__mark i { font-size: 20px; }
.links { position: relative; display: flex; gap: 2px; }
.links a {
    position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; border-radius: 999px;
    color: var(--ink-2); font-weight: 500; white-space: nowrap; transition: color .3s var(--ease);
}
.links a:hover, .links a[aria-current="page"] { color: var(--ink); }
.ind { position: absolute; z-index: 0; top: 0; left: 0; height: 48px; width: 0; border-radius: 999px; background: var(--hair); border: 1px solid var(--hair-2); box-shadow: var(--hl); opacity: 0; transition: transform .55s var(--ease), width .55s var(--ease), opacity .3s var(--ease); }
.ind.on { opacity: 1; }
.nav__tools { display: flex; align-items: center; gap: 4px; padding-left: 6px; margin-left: 4px; border-left: 1px solid var(--hair); }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 14px; background: var(--hair); font-weight: 600; font-size: 13px; border: 1px solid var(--hair-2); }
.nav__user { display: flex; align-items: center; gap: 10px; padding: 0 8px 0 4px; font-size: 14px; line-height: 1.2; }
.nav__user small { display: block; color: var(--ink-3); font-size: 12px; }
.theme .sun { display: none; }
[data-theme="light"] .theme .sun { display: inline; }
[data-theme="light"] .theme .moon { display: none; }
.burger { display: none; position: relative; width: 48px; height: 48px; border: 0; background: transparent; cursor: pointer; }
.burger span { position: absolute; left: 14px; right: 14px; height: 1.5px; border-radius: 2px; background: var(--ink); transition: transform .5s var(--ease); }
.burger span:nth-child(1) { top: 19px; } .burger span:nth-child(2) { top: 28px; }
body.menu-open .burger span:nth-child(1) { transform: translateY(4.5px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { transform: translateY(-4.5px) rotate(-45deg); }
.menu {
    position: fixed; inset: 0; z-index: var(--z-menu); display: grid; align-content: center; justify-items: start; gap: 6px; padding: 0 10vw;
    background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(26px); -webkit-backdrop-filter: blur(26px);
    opacity: 0; pointer-events: none; transition: opacity .5s var(--ease);
}
.menu a { font-family: var(--display); font-size: clamp(30px, 8vw, 46px); letter-spacing: -.04em; font-weight: 600; opacity: 0; transform: translateY(40px); transition: opacity .6s var(--ease) calc(var(--i) * 70ms), transform .7s var(--ease) calc(var(--i) * 70ms); }
.menu form { opacity: 0; transition: opacity .6s var(--ease) .4s; margin-top: 20px; }
body.menu-open .menu { opacity: 1; pointer-events: auto; }
body.menu-open .menu a { opacity: 1; transform: none; }
body.menu-open .menu form { opacity: 1; }
body.menu-open .nav-wrap { z-index: var(--z-burger); }

/* ---------- Sayfa ---------- */
.app-main { max-width: 1320px; width: 100%; margin: 0 auto; padding: 48px 24px 96px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 36px; }
.hero > :first-child { flex: 1 1 520px; min-width: 0; }
.hero > :last-child:not(:first-child) { flex: none; }
.hero h1 { font-size: clamp(36px, 5.4vw, 64px); line-height: 1; letter-spacing: -.04em; margin-top: 16px; }
.hero h1.long { font-size: clamp(32px, 4.2vw, 52px); max-width: 22ch; }
.hero p { margin-top: 14px; max-width: 52ch; color: var(--ink-2); font-size: 17px; }
.eyebrow { display: inline-flex; align-items: center; height: 26px; padding: 0 12px; border-radius: 999px; font-size: 12px; font-weight: 500; letter-spacing: .06em; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent); }
.crumbs { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; background: var(--shell); border: 1px solid var(--hair); color: var(--ink-2); font-size: 14px; }
.crumbs i { font-size: 12px; }
.crumbs a:hover { color: var(--ink); }

/* ---------- Kartlar: çift çerçeve (kabuk halkası + iç yüzey) ---------- */
.card {
    position: relative; background: var(--inner); border-radius: 22px; padding: 26px; margin: 7px 7px 34px;
    box-shadow: var(--hl), 0 0 0 6px var(--shell), 0 0 0 7px var(--hair), var(--lift);
}
.card--accent { background: radial-gradient(120% 90% at 0% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 62%), var(--inner); }
.card--flush { padding: 0; overflow: clip; }
.card--flush > .tile-title { padding: 24px 26px 18px; margin: 0; }
.section-title { font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -.025em; color: var(--ink); margin: 0 0 18px; padding: 0; border: 0; }
.tile-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.tile-title .section-title, .tile-title h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.bento { display: grid; grid-template-columns: repeat(12, 1fr); gap: 0 18px; }
.bento > .card { margin-bottom: 25px; height: calc(100% - 25px); }
.s3 { grid-column: span 3; } .s4 { grid-column: span 4; } .s5 { grid-column: span 5; } .s6 { grid-column: span 6; }
.s7 { grid-column: span 7; } .s8 { grid-column: span 8; } .s12 { grid-column: span 12; }
.big { font-family: var(--display); font-size: clamp(72px, 9vw, 108px); line-height: .9; letter-spacing: -.045em; font-weight: 600; }
.mid { font-family: var(--display); font-size: 52px; line-height: 1; letter-spacing: -.04em; font-weight: 600; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0; border-top: 1px solid var(--hair); }
.rows li:first-child { border-top: 0; }
.rows a { display: block; transition: transform .5s var(--ease); }
.rows a:hover { transform: translateX(4px); }
.rows small { display: block; color: var(--ink-3); font-size: 13px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; position: relative; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--hair-2); }
.timeline li { position: relative; padding: 0 0 20px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -18px; top: 7px; width: 11px; height: 11px; border-radius: 50%; background: var(--inner); border: 2px solid var(--accent); }
.timeline small { color: var(--ink-3); display: block; }
.empty { padding: 56px 24px; text-align: center; color: var(--ink-2); }
.empty i { font-size: 36px; color: var(--ink-3); }
.empty h3 { margin: 10px 0 4px; color: var(--ink); font-size: 20px; }

/* ---------- Tablolar ---------- */
table { width: 100%; border-collapse: separate; border-spacing: 0; }
th, td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--hair); font-size: 15px; vertical-align: middle; }
th { color: var(--ink-3); font-weight: 500; font-size: 13px; white-space: nowrap; }
tbody tr:last-child td, table > tr:last-child td { border-bottom: 0; }
tr:hover td { background: color-mix(in srgb, var(--accent) 6%, transparent); }
th:first-child, td:first-child { padding-left: 4px; }
.card--flush th:first-child, .card--flush td:first-child { padding-left: 26px; }
.card--flush th:last-child, .card--flush td:last-child { padding-right: 26px; }
.card--flush th { background: color-mix(in srgb, var(--inner) 94%, transparent); position: sticky; top: 84px; z-index: 2; backdrop-filter: blur(10px); }
.num { text-align: right; }
a.row-link { color: var(--ink); transition: color .25s var(--ease); }
a.row-link:hover { color: var(--accent); }
.low-conf td { background: var(--wait-bg) !important; }
.diff-green td:last-child { color: var(--ok); font-weight: 600; }
.diff-yellow td:last-child { color: var(--wait); font-weight: 600; }
.diff-red td:last-child { color: var(--bad); font-weight: 600; }
.diff-new td, .diff-removed td { color: var(--ink-2); }

/* ---------- Etiketler ---------- */
.badge, .chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 500; white-space: nowrap; background: var(--shell); color: var(--ink-2); border: 1px solid var(--hair); }
.badge i, .chip i { font-size: 15px; }
.badge.ok, .badge.pending, .badge.approved, .chip--ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge.needs_review, .badge.pending_approval, .chip--wait { background: var(--wait-bg); color: var(--wait); border-color: transparent; }
.badge.rejected, .chip--bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--wait-bg); color: var(--wait); font-size: 12px; font-weight: 600; }
.stat { display: inline-block; margin-right: var(--space-6); }
.stat .n { font-family: var(--display); font-size: 36px; font-weight: 600; display: block; letter-spacing: -.03em; }
.stat .l { color: var(--ink-2); font-size: 13px; }

/* ---------- Düğmeler ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 0 20px; border-radius: 999px;
    border: 1px solid var(--hair-2); background: var(--shell); color: var(--ink); font-weight: 500; font-size: 15px; cursor: pointer; white-space: nowrap;
    transition: transform .45s var(--ease), background .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.btn:hover { background: var(--hair); border-color: var(--ink-3); }
.btn:active { transform: scale(.97); }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn--icon { width: 44px; padding: 0; }
.btn--secondary { background: var(--shell); }
.btn--ghost, .btn--quiet { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn--ghost:hover, .btn--quiet:hover { background: var(--hair); color: var(--ink); border-color: transparent; }
.btn--danger { color: var(--bad); }
.btn--primary, .btn--nav-create {
    background: var(--accent); border-color: transparent; color: var(--on-accent);
    box-shadow: 0 10px 30px -10px var(--glow), inset 0 1px 0 rgb(255 255 255 / .35);
}
.btn--primary:hover, .btn--nav-create:hover { background: var(--accent); border-color: transparent; box-shadow: 0 14px 38px -8px var(--glow), inset 0 1px 0 rgb(255 255 255 / .35); }
.btn--primary.has-ico { padding: 0 6px 0 22px; }
.btn--primary.has-ico.btn--sm { padding: 0 4px 0 16px; min-height: 38px; }
.btn__ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgb(0 0 0 / .14); transition: transform .5s var(--ease); }
[data-theme="light"] .btn__ico { background: rgb(255 255 255 / .2); }
.btn--sm .btn__ico { width: 28px; height: 28px; }
.btn--primary:hover .btn__ico { transform: translate(2px, -2px) scale(1.06); }
.btn--block { width: 100%; min-height: 50px; }

/* ---------- Formlar ---------- */
.field { display: grid; gap: 8px; margin-bottom: 18px; align-content: start; }
.field label { font-size: 13px; font-weight: 500; color: var(--ink-2); }
.field .hint, .hint { font-size: 13px; color: var(--ink-3); }
.field .error { font-size: 13px; color: var(--bad); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], select, textarea {
    width: 100%; min-height: 46px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--hair-2); background: var(--inner-2); font-size: 15px;
    box-shadow: inset 0 1px 2px rgb(0 0 0 / .14); transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
textarea { padding: 12px 16px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
input:hover, select:hover, textarea:hover { border-color: var(--ink-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
input.has-error, select.has-error { border-color: var(--bad); }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); width: 18px; height: 18px; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 15px; top: 50%; translate: 0 -50%; color: var(--ink-3); pointer-events: none; }
.input-icon input { padding-left: 44px; }

.alert { padding: 14px 18px; border-radius: 16px; font-size: 14px; margin-bottom: 20px; border: 1px solid transparent; }
.alert--success { background: var(--ok-bg); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert--error { background: var(--bad-bg); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 25%, transparent); }

/* ---------- Segment, sekme, araç çubuğu ---------- */
.seg { position: relative; display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 4px; border-radius: 999px; background: var(--shell); border: 1px solid var(--hair); }
.seg a, .seg button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font-weight: 500; font-size: 14px; cursor: pointer; white-space: nowrap; transition: color .3s var(--ease), background .3s var(--ease); }
.seg a:hover, .seg button:hover { color: var(--ink); }
.seg a.is-on, .seg button.is-on { color: var(--ink); background: var(--hair); box-shadow: var(--hl); }
.tabs { position: relative; display: flex; gap: 2px; padding: 6px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border-radius: 999px; color: var(--ink-2); font-weight: 500; white-space: nowrap; transition: color .3s var(--ease); }
.tabs a:hover, .tabs a[aria-selected="true"] { color: var(--ink); }
.tabs .ind { height: 42px; top: 6px; left: 6px; }
.toolbar { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; padding: 20px 26px; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.toolbar .field { min-width: 160px; margin: 0; }
.toolbar .grow { flex: 1; min-width: 240px; }
.switch { display: inline-flex; align-items: center; gap: 12px; min-height: 46px; cursor: pointer; font-weight: 500; color: var(--ink-2); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch i.t { position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--hair-2); transition: background .35s var(--ease); }
.switch i.t::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); transition: transform .45s var(--ease); }
.switch input:checked + i.t { background: var(--accent); }
.switch input:checked + i.t::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + i.t { outline: 2px solid var(--accent); outline-offset: 3px; }
.pager { display: flex; align-items: center; justify-content: space-between; padding: 16px 26px; border-top: 1px solid var(--hair); color: var(--ink-2); font-size: 14px; }

/* ---------- Sonuç hücreleri (mikrobiyoloji) ---------- */
.res { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 28px; padding: 0 10px; border-radius: 999px; font-family: var(--mono); font-size: 13px; }
.res--none { color: var(--ink-3); }
.res--te { color: var(--ink-3); background: var(--shell); border: 1px solid var(--hair); }
.res--val, .res--ok { background: var(--inner-2); color: var(--ink); border: 1px solid var(--hair-2); }
.res--pending { background: var(--wait-bg); color: var(--wait); font-weight: 600; box-shadow: 0 0 0 1px color-mix(in srgb, var(--wait) 32%, transparent), 0 0 20px -6px color-mix(in srgb, var(--wait) 60%, transparent); }
.res--warning { background: var(--wait-bg); color: var(--wait); border: 1px solid color-mix(in srgb, var(--wait) 40%, transparent); }
.res--danger { background: var(--bad-bg); color: var(--bad); border: 1px solid color-mix(in srgb, var(--bad) 40%, transparent); }

/* ---------- Spesifikasyon ---------- */
.meta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.meta div { padding: 10px 16px; border-radius: 18px; background: var(--shell); border: 1px solid var(--hair); }
.meta small { display: block; color: var(--ink-3); font-size: 12px; }
.meta b { font-weight: 500; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Yan panel ---------- */
.scrim { position: fixed; inset: 0; z-index: var(--z-drawer); background: rgb(2 6 12 / .5); backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .5s var(--ease); }
.drawer { position: fixed; top: 12px; right: 12px; bottom: 12px; z-index: var(--z-drawer); width: min(500px, calc(100% - 24px)); transform: translateX(calc(100% + 24px)); visibility: hidden; transition: transform .7s var(--ease), visibility .7s; }
.drawer__panel { height: 100%; display: flex; flex-direction: column; background: var(--inner); border-radius: 22px; box-shadow: var(--hl), 0 0 0 6px var(--shell), 0 0 0 7px var(--hair), var(--lift); overflow: hidden; margin: 7px; height: calc(100% - 14px); }
body.drawer-open .scrim { opacity: 1; pointer-events: auto; }
body.drawer-open .drawer { transform: none; visibility: visible; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--hair); }
.drawer__body { flex: 1; overflow: auto; padding: 24px; }
.drawer__body .card { box-shadow: none; padding: 0; margin: 0; background: transparent; }
.fieldset { display: grid; gap: 4px; margin-bottom: 20px; }
.fieldset > h3 { font-family: var(--font); font-size: 14px; letter-spacing: 0; color: var(--ink-2); font-weight: 600; margin-bottom: 10px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.drawer__foot, .form-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 16px 0 0; }
.drawer__loading { padding: 40px; text-align: center; color: var(--ink-3); }

/* ---------- Giriş ---------- */
.login { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); position: relative; z-index: 2; }
.art { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 44px 52px; }
.art h1 { font-size: clamp(44px, 5vw, 76px); line-height: 1; letter-spacing: -.04em; max-width: 12ch; }
.art p { margin-top: 22px; max-width: 38ch; font-size: 18px; color: var(--ink-2); }
.drop { position: absolute; border-radius: 50%; border: 1px solid rgb(255 255 255 / .2); animation: float 14s ease-in-out infinite;
    background: radial-gradient(circle at 28% 22%, rgb(214 236 255 / .78), rgb(150 200 255 / .16) 24%, color-mix(in srgb, var(--accent) 30%, transparent) 56%, rgb(20 60 110 / .18) 72%, transparent 74%);
    box-shadow: inset 10px 12px 34px rgb(190 225 255 / .16), inset -16px -20px 44px rgb(0 20 50 / .35), 0 30px 90px -18px var(--glow); }
[data-theme="light"] .drop { border-color: rgb(255 255 255 / .8); box-shadow: inset -14px -18px 40px rgb(30 80 150 / .16), 0 30px 80px -20px var(--glow); }
@keyframes float { 0%, 100% { transform: translate3d(0, 0, 0); } 50% { transform: translate3d(14px, -26px, 0); } }
.login__main { display: grid; place-items: center; padding: 32px; }
.login__card { width: min(440px, 100%); margin: 7px; }
.login__form { display: grid; gap: 4px; }
.login__form h2 { font-size: 30px; }
.login__form .field { margin-bottom: 14px; }
.check { display: flex; align-items: center; gap: 10px; color: var(--ink-2); margin: 4px 0 14px; }
.pw { position: relative; }
.pw button { position: absolute; right: 6px; top: 50%; translate: 0 -50%; width: 36px; height: 36px; border: 0; background: transparent; color: var(--ink-3); border-radius: 50%; cursor: pointer; }
.pw input { padding-right: 48px; }

/* ---------- Duyarlı ---------- */
@media (max-width: 1180px) {
    .links, .nav__user, .hide-m { display: none; }
    .burger { display: block; }
    .nav { width: 100%; justify-content: space-between; }
    .nav__tools { border-left: 0; margin-left: 0; }
}
@media (max-width: 960px) {
    .s3, .s4, .s5, .s6, .s7, .s8 { grid-column: span 12; }
    .login { grid-template-columns: 1fr; }
    .art { display: none; }
    .app-main { padding-top: 36px; }
    .card--flush th { top: 0; }
    .card table { display: block; overflow-x: auto; max-width: 100%; }
}
@media (max-width: 560px) {
    .cols, .cols--3 { grid-template-columns: 1fr; }
    .card { padding: 20px; }
    .app-main { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Ek bileşenler ---------- */
.fix-row { display: grid; grid-template-columns: 1fr 1fr 2fr 1fr 1fr auto; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--hair); }
.fix-row input { min-height: 40px; }
@media (max-width: 960px) { .fix-row { grid-template-columns: 1fr 1fr; } }
.modal-overlay { position: fixed; inset: 0; z-index: var(--z-menu); display: flex; align-items: center; justify-content: center; padding: 24px; background: rgb(2 6 12 / .55); backdrop-filter: blur(8px); }
.modal { width: 100%; max-width: 500px; padding: 30px; border-radius: 22px; background: var(--inner); box-shadow: var(--hl), 0 0 0 6px var(--shell), 0 0 0 7px var(--hair), var(--lift); }

/* Select2 (müşteri seçimi) bu temaya uyarlanır */
body .select2-container--default .select2-selection--single { height: 46px; border: 1px solid var(--hair-2); border-radius: 14px; background: var(--inner-2); }
body .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 44px; padding-left: 16px; color: var(--ink); }
body .select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--ink-3); }
body .select2-container--default .select2-selection--single .select2-selection__arrow { height: 44px; right: 8px; }
body .select2-container--default.select2-container--focus .select2-selection--single, body .select2-container--default.select2-container--open .select2-selection--single { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
body .select2-dropdown { background: var(--inner); border: 1px solid var(--hair-2); border-radius: 14px; overflow: hidden; color: var(--ink); z-index: var(--z-menu); }
body .select2-container--default .select2-search--dropdown .select2-search__field { background: var(--inner-2); border: 1px solid var(--hair-2); border-radius: 10px; color: var(--ink); min-height: 38px; }
body .select2-container--default .select2-results__option--highlighted[aria-selected], body .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--accent); color: var(--on-accent); }
body .select2-container--default .select2-results__option--selected { background: var(--hair); }

/* Yan panelde kaydet çubuğu görünür kalır */
.drawer__body .form-actions { position: sticky; bottom: -24px; margin: 8px -24px -24px; padding: 16px 24px; background: var(--inner); border-top: 1px solid var(--hair); z-index: 1; }

/* Geniş veri tabloları: kendi içinde kayar, başlık ve ilk sütun sabit kalır */
.tbl-scroll { overflow: auto; max-height: 74dvh; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--hair-2) transparent; }
.tbl-scroll:focus-visible { outline-offset: -3px; }
.tbl-scroll table { display: table; max-width: none; min-width: 100%; }
.tbl-scroll th { top: 0; white-space: normal; min-width: 92px; max-width: 150px; vertical-align: bottom; line-height: 1.25; padding: 12px 14px; }
.tbl-scroll td { padding: 8px 14px; }
.tbl-scroll th:first-child, .tbl-scroll td:first-child { position: sticky; left: 0; z-index: 1; padding-left: 26px; background: var(--inner); white-space: nowrap; }
.tbl-scroll th:first-child { z-index: 3; }
.tbl-scroll th:last-child, .tbl-scroll td:last-child { position: sticky; right: 0; z-index: 1; min-width: 64px; background: var(--inner); }
.tbl-scroll th:last-child { z-index: 3; }
.tbl-scroll th:first-child, .tbl-scroll td:first-child { box-shadow: 1px 0 0 var(--hair); }
.tbl-scroll th:last-child, .tbl-scroll td:last-child { box-shadow: -1px 0 0 var(--hair); }
.tbl-scroll .res { max-width: 190px; height: auto; min-height: 26px; padding: 3px 10px; white-space: normal; text-align: center; line-height: 1.25; border-radius: 14px; }

/* Çift başlıklı karşılaştırma tablosu (Kimya: Beklenen Değer) */
.tbl-scroll .group-row th { height: 44px; text-align: center; font-weight: 600; color: var(--ink-2); border-bottom: 1px solid var(--hair); max-width: none; }
.tbl-scroll .group-row th[rowspan] { text-align: left; vertical-align: bottom; }
.tbl-scroll .sub-row th { top: 44px; min-width: 76px; }
.tbl-scroll .divider { border-left: 1px solid var(--hair); }

.cols--3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 560px) { .cols--3 { grid-template-columns: 1fr; } }
