/* =========================================================
   Yükleme Planı - mobil öncelikli stil (v2)
   ========================================================= */

/* ── Global overflow fix ──
   overflow-x:clip yerine hidden kullanmak html'de dikey scroll'u kilitler
   (özellikle iOS Safari). clip kullan: yatay taşmayı keser ama scroll eksenini etkilemez. */
html { overflow-x: clip; scroll-behavior: smooth; }
body { overflow-x: clip; position: relative; }
* { -webkit-tap-highlight-color: transparent; }

:root {
    --bg: #f4f6fa;
    --card: #ffffff;
    --border: #e3e7ee;
    --border-strong: #c7cdd9;
    --text: #1c2230;
    --muted: #6b7385;
    --primary: #1d6cf0;
    --primary-dark: #1655c4;
    --primary-soft: #eaf1ff;
    --danger: #d94343;
    --danger-soft: #fdecec;
    --success: #1f9d5b;
    --success-soft: #e7f6ee;
    --warn: #d18a13;
    --warn-soft: #fcf2dc;
    --shadow: 0 1px 3px rgba(20,30,60,0.06), 0 4px 12px rgba(20,30,60,0.04);
    --radius: 10px;
    --radius-sm: 6px;
    /* "Gömülü yüzey" — kart içinde biraz daha koyu bir alt-kutu (pasif tab,
       son hareket kutusu, mini filtre çubuğu). Koyu karşılığı dark bloğunda. */
    --surface-2: #f8fafc;
    /* Aşağıdaki 5 tanesi GERÇEK renk değil, var olan tokenların takma adı —
       önceden hiç tanımlanmamışlardı; var(--x, #fallback) hep fallback'e
       düşüyordu (data-theme farketmeksizin HER ZAMAN #fallback). Alias
       oldukları için dark bloğunda ayrıca tanımlanmalarına gerek yok, işaret
       ettikleri token zaten temayla değişiyor. */
    --text-muted: var(--muted);
    --primary-light: var(--primary-soft);
    --bg-alt: var(--surface-2);
    --success-dark: var(--success);
    --bg-subtle: var(--surface-2);
    --bg-soft: var(--surface-2);
}

* { box-sizing: border-box; }

html, body {
    margin: 0; padding: 0;
    background: var(--bg); color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    font-size: 15px; line-height: 1.45;
    -webkit-text-size-adjust: 100%;
    overscroll-behavior-y: contain;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1 { font-size: 1.55rem; margin: 0 0 4px; font-weight: 700; }
h2 { font-size: 1.15rem; margin: 0; font-weight: 600; }
h3 { font-size: 1rem; margin: 16px 0 8px; font-weight: 600; }

.muted { color: var(--muted); font-size: .9em; }
.strong { font-weight: 700; }
.center { text-align: center; }
.right  { text-align: right; }
.num    { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Topbar ---------- */
.topbar {
    background: var(--text); color: #fff;
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    border-bottom: 3px solid var(--depot-accent, transparent);
    transition: border-bottom-color .2s ease;
}
.topbar-inner {
    max-width: 1500px; margin: 0 auto;
    padding: 10px 14px;
    display: flex; align-items: center;
    justify-content: space-between; gap: 12px;
}
.brand {
    color: #fff; font-weight: 700; font-size: 1.1rem;
    display: flex; align-items: center; gap: 8px;
}
.brand:hover { text-decoration: none; }
.brand-logo { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.brand-depot {
    min-width: 0;
    max-width: 280px;
}
.brand-depot-icon { font-size: 1.05rem; flex-shrink: 0; }
.brand-depot .brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.brand-depot-caret { font-size: .7rem; opacity: .72; flex-shrink: 0; }
.topnav { display: flex; gap: 4px; }
.topnav a {
    color: #fff; padding: 8px 14px;
    border-radius: var(--radius-sm); font-weight: 500;
}
.topnav a:hover { background: rgba(255,255,255,0.1); text-decoration: none; }
.topnav a.active { background: rgba(255,255,255,0.18); }

.topnav-user-wrap {
    display: flex; align-items: center; gap: 8px;
    margin-left: 12px; flex-shrink: 0;
}
.topnav-user-info {
    display: flex; flex-direction: column; align-items: flex-end;
    gap: 2px; max-width: 140px;
}
.topnav-user-name {
    color: rgba(255,255,255,0.9); font-size: .82rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px;
}
.topnav-user-role {
    color: rgba(255,255,255,0.55); font-size: .72rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px;
}
.topnav-logout {
    color: rgba(255,255,255,0.65); text-decoration: none;
    padding: 6px 10px; border-radius: var(--radius-sm);
    border: 1px solid rgba(255,255,255,0.2);
    font-size: 1rem; transition: background .15s, color .15s;
    display: flex; align-items: center;
}
.topnav-logout:hover { background: rgba(255,255,255,0.12); color: #fff; text-decoration: none; }

.container { max-width: 1500px; margin: 0 auto; padding: 16px 14px calc(80px + env(safe-area-inset-bottom, 0px)); }
/* Mobil alt çubuk yüksekliği (dok ~84px + alt boşluk 8px; güvenli alan HARİÇ).
   Çubuğa göre yer bırakan her kural bunu kullanır — bkz. Bottom Navigation. */
:root { --bn-h: 92px; }
@media (min-width: 900px) { :root { --bn-h: 0px; } }
@media (max-width: 899px) {
    .container { padding-bottom: calc(var(--bn-h) + 12px + env(safe-area-inset-bottom, 0px)); }
}

.page-head {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px; margin-bottom: 14px;
}
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 6px; padding: 10px 16px;
    background: #fff; color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: .95rem; font-weight: 500; cursor: pointer;
    text-decoration: none;
    transition: background .15s, border-color .15s, transform .05s;
    min-height: 42px;
}
.btn:hover { background: #f7f8fb; text-decoration: none; }
.btn:active { transform: translateY(1px); }
/* Pasif buton — GLOBAL. Bu kural yokken `disabled` bir buton aktif olanla
   BİREBİR aynı görünüyordu: kullanıcı tıklıyor, hiçbir şey olmuyor, sebebini
   anlamıyordu (yalnız title ipucu vardı, mobilde o da görünmez). Etkilenen
   yerler: _form.php palet uygula, beyan_view bildirim/eşleşme, beyanlar toplu
   kaydet, audit onay butonları. */
.btn:disabled,
.btn[disabled] {
    opacity: .45;
    cursor: not-allowed;
    box-shadow: none;
    filter: grayscale(35%);
}
.btn:disabled:hover, .btn[disabled]:hover { background: #fff; }
.btn:disabled:active, .btn[disabled]:active { transform: none; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #b53535; border-color: #b53535; }
.btn-secondary { background: var(--success); color: #fff; border-color: var(--success); }
.btn-secondary:hover { background: #17824c; border-color: #17824c; color: #fff; }
/* v297-C: "ghost" artık düz yazı DEĞİL — açık dolgulu, çerçeveli gerçek buton
   (sayfa zeminiyle aynı renkte buton yok). */
.btn-ghost { background: #fff; color: var(--text); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--primary-soft); border-color: var(--primary); }
.btn-geri {
    background: linear-gradient(180deg, #2878f2, var(--primary));
    color: #fff; font-weight: 700; border-color: var(--primary-dark);
    border-radius: 14px; padding-left: 14px;
    box-shadow: 0 2px 6px rgba(29,108,240,.32), inset 0 1px 0 rgba(255,255,255,.22);
}
.btn-geri:hover { background: linear-gradient(180deg, var(--primary), var(--primary-dark)); color: #fff; border-color: var(--primary-dark); }
.btn-geri:disabled:hover, .btn-geri[disabled]:hover { background: linear-gradient(180deg, #2878f2, var(--primary)); }
.btn-sm { padding: 6px 10px; font-size: .85rem; min-height: 34px; }
.btn-lg { padding: 12px 22px; font-size: 1rem; min-height: 48px; }
.btn-block { display: flex; width: 100%; margin: 12px 0; }
.btn-icon { width: 38px; padding: 0; min-height: 38px; font-size: 1.1rem; }

/* ---------- Cards ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}
.card-head {
    display: flex; justify-content: space-between; align-items: center;
    gap: 10px; margin-bottom: 12px; flex-wrap: wrap;
}

/* ---------- Açılır/kapanır kart ---------- */
.collapsible-card .card-head-toggle {
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
    padding: 4px 0;
}
.collapsible-card .toggle-arrow {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--muted);
    cursor: pointer;
    transition: transform .2s ease;
    padding: 0 8px;
    line-height: 1;
}
.collapsible-card.collapsed .toggle-arrow { transform: rotate(-90deg); }
.collapsible-card .card-body {
    overflow: hidden;
    max-height: 3000px;
    transition: max-height .3s ease, opacity .2s, margin-top .2s, padding-top .2s;
    margin-top: 12px;
}
.collapsible-card.collapsed .card-body {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    pointer-events: none;
}
.collapsible-card .card-head-toggle:hover h2 { color: var(--primary); }

/* ---------- Forms ---------- */
.grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

/* Sprint ÜrünSahibi-01: Ürün Sahibi seçilince kırmızı vurgu */
select.urun-sahibi-selected {
    border-color: #c00000;
    color: #c00000;
    font-weight: 700;
}

/* Sprint 34: Marka segmented seçim (ASYA / URAL / URAS) */
.grid label.span-2 { grid-column: span 1; }
.grid label, .form-foot {
    font-size: .85rem; color: var(--muted); font-weight: 500;
}
/* label blok: metin + .req yıldızı inline akar, input/select altta */
.grid label {
    display: block;
}
.grid label > input, .grid label > select, .grid label > textarea, .grid label > small {
    display: block; margin-top: 4px;
}
/* Genel form label/control yardımcıları (users.php vb.) */
.form-label {
    display: block; font-size: .83rem; color: var(--muted);
    font-weight: 500; margin-bottom: 4px;
}
.form-foot {
    display: flex; flex-direction: column; gap: 4px;
}
input[type="text"], input[type="search"], input[type="tel"],
input[type="date"], input[type="number"], input[type="email"], input[type="password"], select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 1rem; color: var(--text); background: #fff;
    font-family: inherit; min-height: 42px;
}
/* Select: native ok gizlenir, custom SVG ok eklenir (iOS/Android/desktop uyumu) */
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}
select:focus {
    outline: 2px solid var(--primary);
    outline-offset: -1px;
    border-color: var(--primary);
}
select option[value=""] { color: var(--muted, #6b7280); }
input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--primary);
    outline-offset: -1px;
    border-color: var(--primary);
}
/* iOS zoom önleme: input font-size min 16px */
@media (max-width: 767px) {
    input[type="text"], input[type="search"], input[type="tel"],
    input[type="date"], input[type="number"], input[type="email"], input[type="password"], select, textarea {
        font-size: 16px;
    }
    .topnav { display: none; }
    /* Tablet'te olduğu gibi ad/rol metni gizlenir, sadece çıkış ikonu kalır —
       aksi halde brand + tema + depo rozeti + ad/rol dar ekranda sığmayıp
       birbirine biniyordu (bkz. .topbar-inner altındaki 400px bloğu). */
    .topnav-user-info { display: none; }
}
/* Dar telefon ekranları (≤430px): genel marka metni gizlenir; ancak aktif
   depo artık topbar'ın ana başlığı olduğu için depo adı görünür kalır. */
@media (max-width: 430px) {
    .brand-text { display: none; }
    .brand-depot { flex: 1; max-width: none; }
    .brand-depot .brand-text { display: block; }
    .topbar-inner { gap: 6px; padding: 8px 10px; }
}
input.error, select.error {
    border-color: var(--danger) !important;
    background: var(--danger-soft);
    outline-color: var(--danger);
}
input.num, select.num { text-align: right; }
.search-row { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.search-row input[type="search"] { flex: 1; min-width: 180px; }
.form-foot {
    flex-direction: row; justify-content: flex-end; gap: 8px; margin-top: 16px;
    flex-wrap: wrap;
    /* app.js yeni palet eklenince buraya scrollIntoView({block:'end'}) yapar —
       [data-record-id] ile aynı desen, yoksa Kaydet düğmesi alt çubuğun arkasında kalır */
    scroll-margin-bottom: calc(var(--bn-h) + 12px + env(safe-area-inset-bottom, 0px));
}
.form-foot.inline { margin-top: 8px; }

.flash {
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    font-weight: 500;
    border: 1px solid;
}
.flash-success { background: var(--success-soft); color: var(--success); border-color: #b6e1c8; }
.flash-error   { background: var(--danger-soft);  color: var(--danger);  border-color: #f0c0c0; }

.warn { color: var(--danger); font-weight: 500; }
.empty {
    text-align: center; padding: 50px 20px;
    background: #fff;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius);
}

/* ---------- Ana Sayfa / Dashboard ---------- */

.home-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}
@media (min-width: 500px)  { .home-grid { grid-template-columns: repeat(3, 1fr); } }
/* 900px+: sidebar var, 3 kolon daha dengeli; 1280px'de Sprint32 bloğu 4 kolona geçer */
@media (min-width: 900px)  { .home-grid { grid-template-columns: repeat(3, 1fr); } }

.home-card {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 10px;
    padding: 28px 16px 22px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none; color: var(--text);
    transition: box-shadow .15s ease, transform .12s ease;
    position: relative;
}
.home-card:hover,
.home-card:focus,
.home-card:focus-visible {
    text-decoration: none;
}
.home-card:hover {
    box-shadow: 0 6px 24px rgba(20,30,60,.10);
    transform: translateY(-3px);
}
.home-card:hover * { text-decoration: none; }
.home-card:active { transform: translateY(-1px); }

.home-card-icon {
    font-size: 2.4rem; line-height: 1;
    width: 72px; height: 72px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 20px;
}
.home-card-title {
    font-size: .96rem; font-weight: 700;
    text-align: center; color: var(--text);
}
.home-card-sub {
    font-size: .78rem; color: var(--muted);
    text-align: center; margin-top: 2px;
}
.home-card-badge {
    display: inline-block;
    background: var(--primary); color: #fff;
    font-size: .72rem; font-weight: 700;
    padding: 2px 9px; border-radius: 999px;
    min-width: 22px; text-align: center;
}

/* ── Ana sayfa karoları: kabartma / derinlik katmanı (Sprint Dashboard-3D-01) ──
   KAPSAM, .home-grid ile SINIRLI ve .pdks-dashboard-grid HARİÇ tutulur:
   Personel Takibi (personel_takip.php) kendi sprite ikonlu tasarımını
   assets/pdks.css'te taşır ve bu katmanın DIŞINDADIR.

   Neden :not() — "üstünü ezme" değil "hiç eşleşmeme": daha önce bu kurallar
   çıplak .home-card / .home-card-icon üzerine yazılıp pdks.css'ten ezilmeye
   çalışıldı ve iki kez SIZDI (hover'daki transform'u pdks.css hiç set etmiyor;
   koyu tema ::after katmanı ise html[data-theme] ön ekiyle pdks.css'in
   nötrleyicisinden DAHA ÖZGÜL kalıyordu). Eşleşmeyi baştan kurmamak bu
   yarışı tamamen bitirir — pdks tarafında nötrleyici kural GEREKMEZ.

   Kart yüzeyi + ikon "karo"su ayrı görsel katmanlardır: kart hafif kabartma,
   ikon kendi içinde raised bir yüzey (sheen ::before + emboss box-shadow).
   Inline style="background:#hex" (modül rengi) box-shadow'u ETKİLEMEZ —
   ayrı CSS özelliği olduğu için üzerine güvenle katman eklenebiliyor. */
.home-grid:not(.pdks-dashboard-grid) .home-card {
    border-radius: var(--radius-lg, var(--radius));
    box-shadow: var(--tile-shadow);
    transition: box-shadow .22s ease, transform .22s ease, border-color .22s ease;
}
.home-grid:not(.pdks-dashboard-grid) .home-card:hover {
    box-shadow: var(--tile-shadow-hover);
    transform: translateY(-4px) scale(1.012);
    border-color: var(--border-strong);
}
.home-grid:not(.pdks-dashboard-grid) .home-card:active {
    transform: translateY(-1px) scale(1.004);
    transition-duration: .1s;
}
.home-grid:not(.pdks-dashboard-grid) .home-card:focus-visible {
    outline: 2px solid var(--primary); outline-offset: 2px;
}
/* v580: ana sayfa ikonlarında karo arka planı/gölge/kenarlık yok — yalnız 3B ikon, sabit boyut */
.home-grid:not(.pdks-dashboard-grid) .home-card-icon {
    position: relative;
    width: 54px;
    height: 54px;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0;
    overflow: visible;
}
.home-grid:not(.pdks-dashboard-grid) .home-card-icon::before,
.home-grid:not(.pdks-dashboard-grid) .home-card-icon::after {
    content: none;
    display: none;
}
.home-grid:not(.pdks-dashboard-grid) .home-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.home-grid:not(.pdks-dashboard-grid) .home-card-badge {
    box-shadow: 0 1px 3px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.25);
}

.home-section-title {
    grid-column: 1 / -1;
    font-size: .72rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    padding-top: 6px;
    border-top: 1px solid var(--border);
    margin-top: 2px;
}
.home-section-title:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

/* ---------- Tablo (PC liste) ---------- */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}
.data-table th, .data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}
.data-table th {
    background: #f7f9fc;
    font-weight: 600;
    color: var(--muted);
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    position: sticky; top: 0;
}
.data-table tr:hover td { background: #fafbfd; }
.data-table.small td { padding: 6px 10px; }
.data-table .actions-col { white-space: nowrap; text-align: right; }

/* Scroll restore: kart/satır topbar ve bottomnav arkasına gizlenmesin */
[data-record-id] {
    scroll-margin-top: 72px;
    scroll-margin-bottom: calc(var(--bn-h) + 24px + env(safe-area-inset-bottom, 0px));
}

/* ---------- Liste mobil kart ---------- */
.card-list { display: flex; flex-direction: column; gap: 10px; }
.record-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow);
}
.record-card-head { display: flex; justify-content: space-between; }
.record-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
    margin: 8px 0;
    font-size: .9rem;
}
.record-card-body .lbl { color: var(--muted); font-size: .8rem; }
.record-card-totals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: var(--primary-soft);
    padding: 8px;
    border-radius: var(--radius-sm);
    margin: 8px 0;
}
.record-card-totals > div {
    display: flex; flex-direction: column; text-align: center; font-size: .82rem;
}
.record-card-totals span { color: var(--muted); font-size: .75rem; }
.record-card-totals strong { font-size: .95rem; }
.record-card-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Kart firma satırı */
.record-card-firma {
    font-size: 1rem; font-weight: 700; color: var(--text); margin: 2px 0 1px;
}

/* ── Düzenleme sayfası durum kartı ── */
.durum-btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

.durum-opt { border: 2px solid var(--border-strong); color: var(--muted); background: var(--bg); }
.durum-opt:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

.durum-opt-active.durum-opt-beklemede { border-color: var(--border-strong); color: var(--text); background: #fff; font-weight: 700; }
.durum-opt-active.durum-opt-islendi  { border-color: #f59e0b; color: #fff; background: #f59e0b; font-weight: 700; }
.durum-opt-active.durum-opt-yuklendi { border-color: #10b981; color: #fff; background: #10b981; font-weight: 700; }

.durum-edit-badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 20px;
    font-size: .78rem; font-weight: 700; letter-spacing: .02em;
}
.durum-edit-badge-beklemede { background: var(--bg); border: 1px solid var(--border-strong); color: var(--muted); }
.durum-edit-badge-islendi   { background: #fef3c7; border: 1px solid #f59e0b; color: #92400e; }
.durum-edit-badge-yuklendi  { background: #d1fae5; border: 1px solid #10b981; color: #065f46; }

/* ── Kart durum renkleri ── */
.record-card.durum-islendi {
    border-color: #f59e0b;
    background: #fffbeb;
}
.record-card.durum-islendi .record-card-totals {
    background: rgba(245,158,11,.12);
}
.record-card.durum-yuklendi {
    border-color: #10b981;
    background: #f0fdf4;
}
.record-card.durum-yuklendi .record-card-totals {
    background: rgba(16,185,129,.12);
}

/* ── PC tablo durum satırı ── */
.data-table tr.tr-islendi > td { background: #fffbeb; }
.data-table tr.tr-yuklendi > td { background: #f0fdf4; }
.data-table tr.tr-taslak > td { background: #f5f3ff; }
.record-card.durum-taslak { border-color: #7c3aed; background: #f5f3ff; }
.badge-taslak { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: .72rem; font-weight: 600; background: #ede9fe; color: #6d28d9; white-space: nowrap; }

/* ── Durum butonları ── */
.btn-durum-islendi {
    background: #f59e0b; color: #fff;
    border-color: #f59e0b;
}
.btn-durum-islendi:hover:not(:disabled) { background: #d97706; border-color: #d97706; }
.btn-durum-islendi.durum-done {
    background: #d97706; border-color: #d97706;
    opacity: .85;
}
.btn-durum-yuklendi {
    background: #10b981; color: #fff;
    border-color: #10b981;
}
.btn-durum-yuklendi:hover:not(:disabled) { background: #059669; border-color: #059669; }
.btn-durum-yuklendi.durum-done {
    background: #059669; border-color: #059669;
    opacity: .85;
}

/* =========================================================
   Palet listesi (form)
   Mobil: kart, PC: tek satır tablo
   ========================================================= */

/* Materyaller */
.materials-block { margin-top: 10px; }
.materials-block-head {
    display: flex; justify-content: space-between; align-items: center;
    font-size: .85rem; color: var(--muted); margin-bottom: 6px;
}
.material-row {
    display: grid;
    grid-template-columns: 1fr 100px auto;
    gap: 6px;
    align-items: center;
}
.material-row select { min-height: 38px; padding: 6px 8px; font-size: .9rem; }
.material-row input { min-height: 38px; padding: 6px 8px; font-size: .9rem; text-align: right; }

/* Zorunlu alanlar — arka plan vurgusu */
input.kasa-adeti { background-color: #e8f4fd !important; }
input.brut-kg    { background-color: #fff3e0 !important; }

/* Toplamlar (mavi alan) */
.totals {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    background: var(--primary);
    color: #fff;
    padding: 14px;
    border-radius: var(--radius);
    margin-top: 16px;
}
.totals > div { display: flex; flex-direction: column; align-items: center; }
.totals span { opacity: .8; font-size: .8rem; }
.totals strong { font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.totals .strong { font-size: 1.3rem; }

/* ---------- Filter pills ---------- */
.filter-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pill {
    padding: 6px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border-strong);
    color: var(--text);
    font-size: .85rem;
}
.pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.pill.active-islendi { background: #f59e0b; color: #fff; border-color: #f59e0b; }
.pill.active-yuklendi { background: #10b981; color: #fff; border-color: #10b981; }
.pill.active-taslak { background: #7c3aed; color: #fff; border-color: #7c3aed; }
.pill:hover { text-decoration: none; }

.switch { display: inline-flex; align-items: center; gap: 8px; }
.switch input[type="checkbox"] { width: 20px; height: 20px; }

.info-list { list-style: none; padding: 0; margin: 0 0 12px; }
.info-list li { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.info-list li:last-child { border-bottom: none; }

/* =========================================================
   Görüntüleme (record_view) sayfası
   ========================================================= */
.print-sheet {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}
.print-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    border-bottom: 2px solid var(--text);
    padding-bottom: 10px; margin-bottom: 14px; gap: 16px;
    flex-wrap: wrap;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 14px;
    margin-bottom: 10px;
    font-size: .9rem;
}
.info-grid > div {
    border-bottom: 1px dashed var(--border);
    padding: 4px 0;
    display: flex; flex-direction: column;
    word-break: break-word;
}
.info-grid .lbl { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; }
.info-grid .span-2 { grid-column: span 2; }

/* record_view: Genel Bilgiler / Nakliye Bilgileri — mobilde alt alta,
   tablet+'ta (≥768px) yan yana + aradaki dikey çizgi. Nakliye bölümü hiç
   yoksa (çıkma kaydı veya nakliye verisi boş) .view-info-cols-single ile
   tek sütun kalır, sağda boşluk açılmaz. */
.view-info-col + .view-info-col { margin-top: 18px; }
@media (min-width: 768px) {
    .view-info-cols:not(.view-info-cols-single) {
        display: grid;
        grid-template-columns: 1fr 1fr;
        column-gap: 28px;
        align-items: start;
    }
    .view-info-cols:not(.view-info-cols-single) .view-info-col + .view-info-col {
        margin-top: 0;
        padding-left: 28px;
        border-left: 1px solid var(--border);
    }
}

/* Sıralanabilir tablo başlıkları */
.th-sortable a {
    color: inherit; text-decoration: none; white-space: nowrap; display: block;
}
.th-sortable a:hover { color: var(--primary, #2563eb); }
.th-sort-active { background: #eef2ff !important; }
.th-sort-active a { color: var(--primary, #2563eb); font-weight: 700; }

/* Tarih hücresi — tarih + son düzenleme */
.td-tarih-cell { white-space: nowrap; }
.td-son-duz { font-size: .72rem; color: var(--muted, #6b7280); margin-top: 2px; }

/* Renkli sütunlar — records listesi */
.td-urun-sahibi { color: #2563eb; }
.td-casus-no { color: #dc2626; font-weight: 700; }

.section-title {
    font-weight: 700; font-size: 1rem;
    margin: 10px 0 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--border);
}

/* PC tablo — mobilde kesinlikle gizle */
.view-table-wrap { display: none !important; }
.view-cards { display: flex; flex-direction: column; gap: 12px; }

.print-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .85rem;
}
.print-table th, .print-table td {
    border: 1px solid var(--border-strong);
    padding: 6px 8px;
    word-break: break-word;
}
.print-table th {
    background: #f3f5fa;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.print-table .totals-row td { background: #fff7d6; font-weight: 700; }

/* Mobil view kartları */
.view-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    background: #fff;
}
.vc-head {
    display: flex; justify-content: space-between; align-items: center;
    padding-bottom: 8px; margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
}
.vc-no { font-weight: 700; color: var(--primary); }
.vc-kasa { font-size: .9rem; color: #f97316; font-weight: 700; }
.vc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    font-size: .85rem;
    margin-bottom: 8px;
}
.vc-grid > div { display: flex; flex-direction: column; word-break: break-word; }
/* Etiket ve değerin alt alta görünmesi için zorunlu */
.vc-grid > div > span,
.vc-grid > div > strong { display: block; }
.vc-grid > .span-2 { grid-column: span 2; }
.vc-grid span { color: var(--muted); font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; }
.vc-grid strong { font-size: .92rem; }

.vc-materials {
    background: #fafbfd;
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    margin-bottom: 8px;
}
.vc-mat-title {
    font-size: .75rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: 4px;
}
.vc-mat {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: .82rem;
    padding: 3px 0;
    border-bottom: 1px dashed var(--border);
}
.vc-mat:last-child { border-bottom: none; }
.vc-mat span { flex: 1; color: var(--text); }
.vc-mat strong { white-space: nowrap; font-variant-numeric: tabular-nums; }
.vc-mat-del {
    background: none; border: none; cursor: pointer; padding: 2px 5px;
    border-radius: 4px; color: var(--muted); font-size: .72rem; line-height: 1;
    flex-shrink: 0; transition: color .15s, background .15s;
}
.vc-mat-del:hover { color: var(--danger, #dc2626); background: rgba(220,38,38,.1); }

.vc-totals {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    background: var(--primary-soft);
    padding: 8px;
    border-radius: var(--radius-sm);
}
.vc-totals > div {
    display: flex; flex-direction: column; align-items: center; text-align: center;
}
.vc-totals span { color: var(--muted); font-size: .72rem; }
.vc-totals strong { font-variant-numeric: tabular-nums; font-size: .95rem; }
.vc-totals .strong { color: var(--success); font-size: 1.05rem; }
.vc-totals > div:first-child strong { color: #ef4444; }

.view-totals-mobile { margin-top: 4px; }

/* Toplam Dara / Net — turuncu vurgu */
.totals .tot-orange { background: rgba(245, 158, 11, 0.88); border-radius: 8px; padding: 6px 4px; margin: -6px -4px; }

/* ── İşaretli / İşaretsiz Ayrım Paneli ── */
#islendiOzetWrap { margin-top: 10px; }
.islendi-ozet-toggle {
    width: 100%; background: none; border: none; text-align: left;
    cursor: pointer; font-size: .82rem; color: var(--muted);
    padding: 5px 8px; border-radius: 6px; transition: background .15s;
}
.islendi-ozet-toggle:hover { background: rgba(0,0,0,.06); }
.islendi-ozet-panel {
    margin-top: 4px; padding: 8px;
    background: var(--card); border-radius: 8px;
    border: 1px solid var(--border);
}
.islendi-ozet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.islendi-ozet-section { border-radius: 6px; overflow: hidden; border: 1px solid var(--border); }
.islendi-ozet-head { padding: 6px 8px; font-size: .8rem; font-weight: 700; text-align: center; }
.islendi-ozet-done .islendi-ozet-head { background: rgba(34,197,94,.15); color: var(--success,#22c55e); }
.islendi-ozet-pending .islendi-ozet-head { background: rgba(245,158,11,.15); color: #d97706; }
.islendi-ozet-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 3px 8px; font-size: .82rem;
}
.islendi-ozet-row:nth-child(odd) { background: rgba(0,0,0,.025); }
.islendi-ozet-row span { color: var(--muted); }
.islendi-ozet-row strong { font-variant-numeric: tabular-nums; }
.print-table .totals-row .tot-orange { background: #f59e0b !important; color: #fff; }

/* View ekranı başlık kartı */
.view-hdr-card {
    padding-bottom: 8px;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--text);
}
.view-hdr-firma {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.2;
}
.view-hdr-parti {
    font-size: .95rem;
    color: var(--muted);
    margin-top: 3px;
}
.view-hdr-parti strong { color: var(--text); }
.view-hdr-meta {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 2px 20px;
    font-size: .78rem;
    color: var(--muted);
}
.view-hdr-meta span { font-weight: 600; color: var(--text); }

.print-actions { margin-bottom: 14px; display: flex; gap: 8px; }

/* ---------- Görünürlük yardımcıları ---------- */
.pc-only { display: none; }
.mobile-only { display: block; }

/* =========================================================
   TABLET / Geniş mobil (≥720px)
   ========================================================= */
@media (min-width: 720px) {
    .grid { grid-template-columns: repeat(3, 1fr); }
    .grid label.span-2 { grid-column: span 2; }
    .info-grid { grid-template-columns: repeat(3, 1fr); }
    .totals { grid-template-columns: repeat(4, 1fr); }
    .vc-grid { grid-template-columns: repeat(3, 1fr); }
    .vc-grid > .span-2 { grid-column: span 1; }
}

/* =========================================================
   PC (≥1024px) — Excel benzeri tek satır
   ========================================================= */
@media (min-width: 1024px) {
    .pc-only { display: block; }
    .mobile-only { display: none; }
    .grid { grid-template-columns: repeat(4, 1fr); }
    .info-grid { grid-template-columns: repeat(4, 1fr); }
    /* Nakliye Bilgileri: 7 alan var (Gideceği Ülke eklendi) — 4 sütunda
       4+3 dağılır (yalnız 1 boş hücre), 3 sütunda 3+3+1 kalırdı (2 boş
       hücre) → 4 sütun daha dengeli, ana .grid ile aynı değeri kullanır. */
    .grid-nakliye { grid-template-columns: repeat(4, 1fr); }

    /* Görüntüleme: PC'de tablo, mobil kart yerine */
    .view-table-wrap { display: block !important; overflow-x: auto; }
    .view-cards { display: none; }

    /* Materyaller PC'de açılır blok olarak */
    .materials-block {
        margin-top: 6px;
        margin-left: 70px; /* palet no genişliği kadar boşluk */
        padding: 6px 8px;
        background: #fafbfd;
        border-radius: var(--radius-sm);
        border: 1px dashed var(--border);
    }
    .material-row {
        grid-template-columns: 1fr 110px 38px;
    }
}

/* =========================================================
   YAZDIRMA
   ========================================================= */
/* Global @page kuralı kaldırıldı (Sprint Print-Arch-01).
   Her yazdırma sayfası kendi @page kuralını kendi <style> bloğunda tanımlar.
   Yeni print sayfaları için bkz: assets/print_base.css */

@media print {
    body { background: #fff; }
    .topbar, .page-head, .page-head-actions, .no-print, .filter-pills,
    .form-foot, .topnav, .beyan-filter-form { display: none !important; }
    .container { padding: 0; max-width: none; }
    .print-sheet { border: none; box-shadow: none; padding: 0; }
    .print-table { font-size: 9.5pt; }
    .print-table th { background: #eef2f8 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .print-table .totals-row td { background: #fff5cc !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    /* Yazdırmada tablo göster, kartları gizle */
    .view-table-wrap { display: block !important; }
    .view-cards { display: none !important; }
    /* Sprint Print-Arch-01: Standart görünürlük kuralları */
    .mobile-only { display: none !important; }
    .print-only  { display: block !important; }
    .print-hide  { display: none !important; }
}

body.print-mode .topbar { display: none; }

/* =========================================================
   ASYA FRESH yazdırma şablonu
   ========================================================= */
.asya-sheet {
    background: #fff;
    color: #000;
    font-family: Arial, sans-serif;
    font-size: 9pt;
    width: 100%;
    box-sizing: border-box;
    padding: 4mm;
}
.asya-sheet table {
    border-collapse: collapse;
    width: 100%;
}
.asya-sheet th, .asya-sheet td {
    border: 1px solid #000;
    padding: 2px 4px;
    vertical-align: middle;
    background: #fff;
    color: #000;
}
.asya-sheet .num { text-align: right; font-variant-numeric: tabular-nums; }
.asya-sheet .strong { font-weight: 700; }

.th-banner {
    background: #d9d9d9 !important;
    text-align: center;
    font-weight: 700;
    font-size: 10pt;
    letter-spacing: .04em;
    padding: 4px;
}

/* ====== Üst blok ====== */
.asya-top {
    border: 1px solid #ccc;
    margin-bottom: 0;
}
.asya-brand-full {
    text-align: center;
    font-size: 14pt;
    font-weight: 900;
    letter-spacing: .05em;
    color: #c00000;
    padding: 4px;
    border-bottom: 1px solid #ccc;
}
.asya-top-body {
    display: grid;
    grid-template-columns: 55% 45%;
    gap: 0;
}

.asya-info { width: 100%; font-size: 9.5pt; border: none; }
.asya-info th {
    background: #fff;
    font-weight: 700;
    text-align: left;
    padding: 3px 6px;
    font-size: 9.5pt;
    white-space: nowrap;
}
.asya-info td {
    padding: 3px 6px;
    min-height: 16px;
    font-size: 10pt;
    color: #0f2f5f;
    font-weight: 700;
}
/* Sprint 37: nakliye bedeli + avans değer alanları daralmasın */
.asya-info tr > td:first-of-type { min-width: 90px; }
/* ai-emph: 2pt büyük (ekran: 10pt+2=12pt) */
.asya-info td.ai-emph { font-size: 12pt; }
/* ai-casus: 2pt büyük + açık mavi */
.asya-info td.ai-casus { font-size: 12pt; color: #3b9ee8; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

.asya-right-top {
    display: flex;
    flex-direction: column;
    border-left: 1px solid #ccc;
}
/* ALICI + ÜRÜN yan yana tek satır */
.asya-alici-urun-row {
    display: grid;
    grid-template-columns: 60% 40%;
    border-bottom: 1px solid #ccc;
}
.asya-alici-cell {
    border-bottom: none;
    border-right: 1px solid #ccc;
}
.asya-urun-cell {
    border-bottom: none;
    border-right: none;
}

.cell-pair {
    display: flex;
    flex-direction: column;
    padding: 3px 6px;
    border-right: 1px solid #ccc;
    min-height: 20px;
}
.asya-alici-cell { border-right: 1px solid #ccc; }
.asya-urun-cell  { border-right: none; }
.cell-pair span {
    font-size: 7pt;
    color: #444;
    font-weight: 700;
    letter-spacing: .03em;
}
.cell-pair strong {
    font-size: 8.5pt;
    min-height: 14px;
    padding-top: 2px;
}
.asya-alici-cell strong, .asya-urun-cell strong {
    font-size: 10.5pt;
    font-weight: 800;
}
.asya-alici-cell strong {
    font-size: 11.5pt;
    color: #1a7a1a;
}
.asya-info td.parti-no-val {
    font-size: 11pt;
    color: #c00000;
    font-weight: 700;
}
/* Sprint 34: seçili marka — koyu çerçeve + ✓ (printte de net görünür) */

.asya-etiket {
    flex: 1 1 0;
    min-height: 0;        /* flex overflow fix — kritik */
    padding: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}
.etiket-img {
    flex: 1 1 0;
    min-height: 0;        /* flex overflow fix */
    width: 100%;
    object-fit: contain;
    -webkit-user-drag: none;
    user-select: none;
}
.etiket-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18pt;
    font-weight: 800;
    letter-spacing: .1em;
    color: #bbb;
    flex: 1;
    width: 100%;
}
.etiket-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    padding-top: 4px;
    width: 100%;
    justify-content: center;
    flex-shrink: 0;
}
.etiket-upload-btn {
    cursor: pointer;
    font-size: .78rem;
    padding: 4px 10px;
    border-radius: 4px;
    background: var(--primary-soft);
    color: var(--primary);
    border: 1px solid var(--primary);
    font-weight: 600;
    white-space: nowrap;
}
.etiket-clear-btn {
    cursor: pointer;
    font-size: .78rem;
    padding: 4px 8px;
    border-radius: 4px;
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid var(--danger);
    font-weight: 600;
}

/* =========================================================
   ETİKET Crop Overlay
   ========================================================= */
#etiketCropOverlay, #kantarCropOverlay {
    position: fixed; inset: 0; z-index: 3000;
    background: #000;
    display: flex; flex-direction: column;
}

/* ── Kantar View sayfası ── */
.kv-photo-card { padding: 0; overflow: hidden; }
.kv-photo-wrap { width: 100%; background: #111; min-height: 200px; display: flex; align-items: center; justify-content: center; }
.kv-photo { width: 100%; max-height: 70vh; object-fit: contain; display: block; }
.kv-photo-ph {
    color: #aaa; text-align: center; padding: 40px 20px;
    font-size: .95rem; line-height: 1.8;
}
.kv-photo-ph span { font-size: .82rem; color: #888; }
.kv-tartim-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.kv-tartim-row {
    display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
    padding: 8px 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}
.kv-tartim-label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; min-width: 80px; }
.kv-tartim-val { font-size: 1.1rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.kv-tartim-unit { font-size: .82rem; font-weight: 400; color: var(--muted); }
.kv-tartim-alibi { font-size: .8rem; color: var(--muted); margin-left: auto; }
.kv-net-box {
    display: flex; align-items: center; justify-content: space-between;
    background: #e85d04; color: #fff;
    border-radius: var(--radius);
    padding: 7px 14px;
}
.kv-net-label { font-size: .78rem; opacity: .85; letter-spacing: .06em; font-weight: 600; }
.kv-net-val { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; }

.kantar-img-area {
    width: 100%; min-height: 180px;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; margin-bottom: 12px;
    background: var(--bg); cursor: pointer;
    transition: border-color .15s;
}
.kantar-img-area:hover { border-color: var(--primary); }
.kantar-img-display { max-width: 100%; max-height: 400px; display: block; }
.kantar-img-ph {
    color: var(--muted); font-size: .9rem;
    text-align: center; padding: 24px; pointer-events: none;
}
.kantar-img-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crop-img-area {
    flex: 1; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    padding: 8px;
}
.crop-img-wrap {
    position: relative;
    display: inline-block; /* sizes to image */
    line-height: 0;
    max-width: 100%; max-height: 100%;
}
.crop-src-img {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 72px);
    -webkit-user-drag: none; user-select: none;
}
.crop-box {
    position: absolute;
    border: 2px solid #fff;
    box-shadow: 0 0 0 9999px rgba(0,0,0,.6);
    touch-action: none;
}
.crop-handle {
    position: absolute;
    width: 28px; height: 28px;
    background: #fff;
    border: 2px solid #333;
    border-radius: 50%;
    touch-action: none;
}
.crop-handle[data-c="tl"] { top: -14px; left: -14px; cursor: nw-resize; }
.crop-handle[data-c="tr"] { top: -14px; right: -14px; cursor: ne-resize; }
.crop-handle[data-c="bl"] { bottom: -14px; left: -14px; cursor: sw-resize; }
.crop-handle[data-c="br"] { bottom: -14px; right: -14px; cursor: se-resize; }
.crop-footer {
    padding: 12px 16px;
    display: flex; gap: 12px; justify-content: center;
    background: #111; flex-shrink: 0;
}
.crop-btn {
    padding: 11px 28px; border: none; border-radius: 8px;
    font-size: 1rem; font-weight: 700; cursor: pointer;
}
.crop-btn-ok { background: var(--primary); color: #fff; }
.crop-btn-ok:hover { background: var(--primary-dark); }
.crop-btn-no { background: #333; color: #ccc; }
.crop-btn-no:hover { background: #444; }

@media print { #etiketCropOverlay, #kantarCropOverlay { display: none !important; } }

/* Not kutusu — ekran ve yazdırma */
.print-note-box {
    margin-top: 6px;
    border: 1px solid #111;
    padding: 5px 6px;
    font-size: 9.5pt;
    line-height: 1.3;
}
.print-note-title {
    font-weight: 800;
    font-size: 10pt;
    margin-bottom: 3px;
    letter-spacing: .02em;
}
.print-note-text {
    white-space: pre-wrap;
    font-weight: 700;
    color: #c00000;
}

/* ====== Orta blok — 2 sütun: palet | stok+toplamlar ====== */
.asya-middle {
    display: grid;
    grid-template-columns: 59% 41%;
    gap: 0;
    margin-top: 0;
    align-items: stretch;
}

/* Sağ sütun: stok çıkışları üstte, genel toplam altta */
.asya-right-col {
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-left: 1px solid #000;
}

/* Palet tablosu */
.asya-pallets {
    font-size: 8pt;
    table-layout: fixed;
}
.asya-pallets th {
    background: #fff !important;
    font-size: 7.5pt;
    text-align: center;
    padding: 2px;
    line-height: 1.1;
}
.asya-pallets td {
    height: 16px;
    padding: 1px 3px;
    font-size: 8pt;
    text-align: center !important;
}
.asya-pallets td.small { font-size: 7pt; }
.asya-pallets .row-no {
    text-align: center;
    font-weight: 700;
    background: #f6f6f6 !important;
    width: 22px;
}
.asya-pallets .w-no   { width: 22px; }
.asya-pallets .w-kasa { width: 36px; }
.asya-pallets .w-size { width: 38px; }
.asya-pallets .w-brut { width: 46px; }
.asya-pallets .w-dara { width: 40px; }
.asya-pallets .w-net  { width: 46px; }

/* Stok çıkışları */
.asya-stok { font-size: 9.5pt; vertical-align: top; height: 100%; }
.asya-stok th {
    font-size: 9.5pt;
    text-align: center;
    padding: 2px;
    background: #fff !important;
}
.asya-stok .stok-name {
    color: #b00020;
    font-weight: 600;
    font-size: 9pt;
    padding: 2px 4px;
    width: 68%;
}
.asya-stok .stok-val {
    text-align: right;
    height: 13px;
    font-size: 9.5pt;
    padding: 1px 3px;
    width: 32%;
}

/* Genel toplam */
.asya-totals {
    margin-top: 0;
    font-size: 12pt;
    vertical-align: top;
    height: auto;
    align-self: start;
}
.asya-totals th {
    background: #fff !important;
    font-weight: 800;
    text-align: left;
    padding: 4px 6px;
    width: 38%;
    font-size: 12pt;
    letter-spacing: .02em;
}
.asya-totals td {
    text-align: right;
    padding: 4px 6px;
    height: 18px;
    font-size: 13pt;
    font-weight: 800;
    color: #0f2f5f;
}
.asya-totals .urun-banner {
    background: #f0f0f0 !important;
    text-align: center;
    font-size: 11pt;
    padding: 4px 2px;
    font-weight: 800;
    height: 28px;
    min-height: 28px;
    box-sizing: border-box;
    letter-spacing: .03em;
}

/* ====== Alt blok ====== */
.asya-bottom {
    margin-top: 0;
    font-size: 7.5pt;
    table-layout: fixed;
}
.asya-bottom th {
    background: #f0f0f0 !important;
    text-align: center;
    font-weight: 700;
    padding: 3px;
    font-size: 7.5pt;
}
.asya-bottom td {
    height: 18px;
    text-align: center !important;
    padding: 2px 4px;
}
.asya-bottom .bot-label {
    background: #fff !important;
    width: 60px;
}

.asya-signatures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 30px;
    padding: 0 20px;
}
.asya-signatures > div { text-align: center; font-size: 9pt; }
.asya-signatures span { display: block; margin-bottom: 30px; font-weight: 700; letter-spacing: .03em; }
.asya-signatures .line { border-top: 1px solid #000; height: 1px; }

/* Ekranda da düzgün gösterim için */
body.print-mode .container {
    overflow-x: auto;
    padding-left: 0;
    padding-right: 0;
}
body.print-mode .asya-sheet {
    max-width: 1100px;
    min-width: 750px; /* dar ekranda yatay kaydırma sağlar */
    margin: 0 auto;
    border: 1px solid #ccc;
    box-shadow: var(--shadow);
}

/* =========================================================
   Yazdırma — ASYA FRESH şablonu için
   ========================================================= */
@media print {
    .asya-sheet {
        padding: 0;
        font-size: 7.5pt;
        height: calc(297mm - 6mm); /* A4 - 3mm üst - 3mm alt */
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    /* Üst ve alt bloklar sabit yükseklik */
    .asya-top        { flex: 0 0 auto; }
    .asya-middle     { flex: 1 1 0; min-height: 0; overflow: hidden; }
    .asya-bottom     { flex: 0 0 auto; }
    .asya-signatures { flex: 0 0 auto; }
    /* Palet tablosu orta bölümü tamamen doldursun */
    .asya-pallets    { height: 100%; }
    /* CSS dağılım numarası: tbody tr height:1px → tablo yüksekliğini 26 eşit parçaya böl */
    .asya-pallets tbody tr { height: 1px; }
    .asya-sheet th, .asya-sheet td { border-color: #000; padding: 1px 3px; }
    .th-banner {
        background: #d9d9d9 !important;
        -webkit-print-color-adjust: exact; print-color-adjust: exact;
        font-size: 8.5pt;
        padding: 2px;
    }
    .asya-totals .urun-banner, .asya-bottom th {
        background: #f0f0f0 !important;
        -webkit-print-color-adjust: exact; print-color-adjust: exact;
    }
    .asya-top { border-color: #000; }
    .asya-brand-full {
        border-color: #000; font-size: 13pt; font-weight: 900;
        color: #c00000; -webkit-print-color-adjust: exact; print-color-adjust: exact;
    }
    .asya-right-top { border-color: #000; }
    .asya-alici-urun-row { border-color: #000; border-bottom-color: #000; }
    .asya-alici-cell { border-right-color: #000; }
    .asya-alici-cell, .asya-urun-cell { border-color: #000; }
    .cell-pair { border-color: #000; }
    .asya-etiket { min-height: 0; overflow: hidden; }
    /* Foto varsa (src) yazdırmada da görünür; yoksa kırık ikon çıkmasın */
    .etiket-img[src] {
        display: block !important; max-width: 100% !important; max-height: 100% !important;
        width: auto !important; height: auto !important; object-fit: contain;
        -webkit-print-color-adjust: exact; print-color-adjust: exact;
    }
    .etiket-img:not([src]) { display: none !important; }
    .etiket-placeholder { color: #ccc; }
    .asya-pallets .row-no {
        background: #f6f6f6 !important;
        -webkit-print-color-adjust: exact; print-color-adjust: exact;
    }
    .asya-info th { font-size: 10pt; padding: 0px 3px; }
    .asya-info td { font-size: 11pt; padding: 0px 3px; min-height: 0; }
    /* ai-emph: print'te 11pt+2=13pt */
    .asya-info td.ai-emph { font-size: 13pt; }
    .asya-info td.ai-casus { font-size: 13pt; color: #3b9ee8; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .asya-pallets th { font-size: 7.5pt; padding: 1px; line-height: 1; }
    .asya-pallets td { overflow: hidden; padding: 0px 2px; font-size: 7.5pt; line-height: 1.2; text-align: center !important; vertical-align: middle; }
    .asya-pallets td.num { font-size: 7.5pt; font-weight: 700; }
    .asya-pallets td.small { font-size: 6.5pt; line-height: 1.15; overflow: hidden; word-break: normal; overflow-wrap: normal; }
    /* Sağ sütun wrapper */
    .asya-right-col { gap: 3mm; border-left: none; }
    /* Stok çıkışları: +2pt */
    .asya-stok { font-size: 9.5pt; align-self: start; height: auto; }
    .asya-stok .stok-name { font-size: 11.5pt; padding: 1px 4px; font-weight: 700; }
    .asya-stok .stok-val { font-size: 12pt; padding: 1px 3px; font-weight: 700; }
    /* Genel toplam: başlıklar büyük, veriler göze çarpan */
    .asya-totals th { font-size: 11pt; padding: 1px 3px; height: 13px; font-weight: 800; letter-spacing: .02em; }
    .asya-totals td { font-size: 12pt; padding: 1px 3px; height: 13px; font-weight: 800; color: #0f2f5f; }
    .asya-totals td.strong { font-size: 13pt; font-weight: 900; }
    .asya-totals .urun-banner { font-size: 9.5pt; padding: 2px 0; font-weight: 800; height: 16px; min-height: 16px; box-sizing: border-box; }
    .asya-bottom th { font-size: 8pt; padding: 1px; }
    .asya-bottom td { height: 10px; padding: 0px 3px; font-size: 8pt; }
    .asya-etiket { min-height: 30px; padding: 2px; }
    .cell-pair span { font-size: 6pt; }
    .cell-pair strong { font-size: 7pt; }
    .asya-alici-cell strong, .asya-urun-cell strong { font-size: 11pt; font-weight: 800; }
    .asya-alici-cell strong {
        font-size: 12pt; color: #1a7a1a;
        -webkit-print-color-adjust: exact; print-color-adjust: exact;
    }
    .asya-info td.parti-no-val {
        font-size: 12pt; color: #c00000; font-weight: 700;
        -webkit-print-color-adjust: exact; print-color-adjust: exact;
    }
    .asya-signatures {
        margin-top: 2px;
        gap: 30px;
        padding: 0 10px;
        page-break-inside: avoid;
        break-inside: avoid;
    }
    .asya-signatures span { font-size: 7pt; margin-bottom: 6px; }
    .asya-sheet { page-break-after: avoid; }
    /* Not kutusu — print override */
    .print-note-box { page-break-inside: avoid; break-inside: avoid; }
    .print-note-text {
        color: #c00000;
        -webkit-print-color-adjust: exact; print-color-adjust: exact;
    }
    /* Genel toplam başlık arka planı ürün bandıyla aynı */
    .asya-totals .th-banner {
        background: #f0f0f0 !important;
        -webkit-print-color-adjust: exact; print-color-adjust: exact;
    }
}

/* =========================================================
   Kalan Palet Hesaplama — Modal
   ========================================================= */

/* ── Yükleme Tarihi Onay Modalı ── */
.ym-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 620; display: flex; align-items: center; justify-content: center; padding: 16px; }
.ym-overlay[hidden] { display: none; }
.ym-box { background: #fff; border-radius: 12px; padding: 24px 20px 20px; width: 100%; max-width: 360px; box-shadow: 0 8px 32px rgba(0,0,0,.18); }
.ym-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ym-head strong { font-size: 1.05rem; }
.ym-icon { font-size: 1.2rem; }
.ym-desc { font-size: .9rem; color: var(--muted, #6b7280); margin: 0 0 14px; }
.ym-lbl { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 600; color: var(--text, #111); margin-bottom: 10px; }
.ym-date-input { border: 1.5px solid var(--border-strong, #d1d5db); border-radius: 7px; padding: 8px 10px; font-size: 1rem; width: 100%; box-sizing: border-box; }
.ym-hint { font-size: .8rem; color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 6px; padding: 6px 10px; margin: 0 0 12px; }
.ym-actions { display: flex; gap: 8px; }
.ym-actions .btn { flex: 1; }

/* Overlay */
#kalanModal {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1000;
    display: flex; align-items: flex-start; justify-content: center;
    padding: 20px 12px 40px;
    overflow-y: auto;
}
#kalanModal[hidden] { display: none; }

/* Panel */
.kalan-panel {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: 0 8px 32px rgba(0,0,0,.2);
    width: 100%; max-width: 700px;
    padding: 24px;
    position: relative;
}

.kalan-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.kalan-header h2 { font-size: 1.15rem; font-weight: 700; margin: 0; }
.kalan-close {
    background: none; border: none; cursor: pointer;
    font-size: 1.4rem; color: var(--muted); line-height: 1;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}
.kalan-close:hover { background: var(--bg); color: var(--text); }

/* Section titles */
.kalan-section { margin-bottom: 22px; }
.kalan-section-title {
    font-size: .85rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .04em; color: var(--muted);
    margin: 0 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}

/* Target row */
.kalan-target-row {
    display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
}
.kalan-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 140px; }
.kalan-field label { font-size: .82rem; font-weight: 600; color: var(--muted); }
.kalan-input {
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    padding: 7px 10px; font-size: .95rem; width: 100%;
    background: var(--card); color: var(--text);
}
.kalan-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 2px rgba(29,108,240,.12); }

/* Status grid */
.kalan-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.kalan-stat {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    display: flex; flex-direction: column; gap: 2px;
}
.kalan-stat span  { font-size: .78rem; color: var(--muted); }
.kalan-stat strong { font-size: 1rem; font-weight: 700; }
.kalan-stat-wide { grid-column: 1 / -1; }

/* Crate table */
.kalan-table-wrap { overflow-x: auto; }
.kalan-table {
    width: 100%; border-collapse: collapse; font-size: .9rem;
}
.kalan-table th {
    background: var(--bg); font-weight: 600; font-size: .8rem;
    text-align: left; padding: 7px 10px;
    border-bottom: 2px solid var(--border);
}
.kalan-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.kalan-table tr:last-child td { border-bottom: none; }
.crate-count-cell { font-weight: 700; font-size: 1rem; }
.crate-avg-input  { width: 100px; }
.crate-actions-cell { white-space: nowrap; }
.kalan-icon-btn {
    background: none; border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 4px 8px; cursor: pointer; font-size: .9rem;
    color: var(--muted);
}
.kalan-icon-btn:hover { background: var(--bg); color: var(--text); }

/* Source badge */
.kalan-src {
    font-size: .75rem; padding: 2px 7px; border-radius: 20px; font-weight: 600;
}
.kalan-src-auto   { background: var(--primary-soft); color: var(--primary); }
.kalan-src-manual { background: var(--warn-soft);    color: var(--warn); }

/* Add-crate form */
.kalan-add-form {
    display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end;
    margin-top: 12px;
    padding: 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-strong);
}
.kalan-add-form .kalan-field { min-width: 110px; }

/* Action rows */
.kalan-actions {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-top: 12px;
}

/* Buttons */
.kalan-btn {
    padding: 8px 16px; border-radius: var(--radius-sm);
    font-size: .9rem; font-weight: 600; cursor: pointer; border: none;
    transition: background .15s, opacity .15s;
}
.kalan-btn-primary  { background: var(--primary); color: #fff; }
.kalan-btn-primary:hover { background: var(--primary-dark); }
.kalan-btn-primary:disabled { opacity: .55; cursor: default; }
.kalan-btn-ghost {
    background: var(--bg); color: var(--text);
    border: 1px solid var(--border-strong);
}
.kalan-btn-ghost:hover { background: var(--border); }

/* Best plan card */
.kalan-best-inner {
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    border-left: 4px solid currentColor;
}
.kalan-best-combo {
    font-size: 1.05rem; font-weight: 700; margin-bottom: 10px;
}
.kalan-best-stats {
    display: flex; gap: 16px; flex-wrap: wrap; font-size: .9rem;
}
.kalan-best-stats span { color: var(--muted); }
.kalan-best-stats strong { font-weight: 700; }

/* Combo cell */
.combo-part strong { font-size: 1rem; }
.combo-sep { color: var(--muted); margin: 0 2px; }

/* Pos/neg */
.kalan-pos { color: var(--success); }
.kalan-neg { color: var(--danger); }

/* Status badges */
.kalan-status-badge {
    font-size: .75rem; padding: 2px 8px; border-radius: 20px; font-weight: 700;
}
.kalan-great { background: var(--success-soft); color: var(--success); border-color: var(--success); }
.kalan-good  { background: var(--primary-soft); color: var(--primary); border-color: var(--primary); }
.kalan-ok    { background: var(--warn-soft);    color: var(--warn);    border-color: var(--warn); }
.kalan-warn  { background: var(--danger-soft);  color: var(--danger);  border-color: var(--danger); }

/* Results combos table */
.kalan-combos-table { font-size: .88rem; }
.kalan-combos-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.kalan-combos-table .combo-cell { min-width: 180px; }

/* Responsive */
@media (max-width: 480px) {
    .kalan-panel { padding: 16px; }
    .kalan-stat-grid { grid-template-columns: 1fr 1fr; }
    .kalan-target-row { flex-direction: column; }
    .kalan-best-stats { flex-direction: column; gap: 6px; }
    .kalan-combos-table .combo-cell { min-width: 120px; }
    #kalanModal { padding: 0; align-items: flex-end; }
    .kalan-panel { border-radius: var(--radius) var(--radius) 0 0; max-height: 92vh; overflow-y: auto; }
}

/* =========================================================
   PALET MODAL (v3 — modal-tabanlı ekleme/düzenleme)
   ========================================================= */

/* Overlay */
.pm-overlay[hidden] { display: none !important; }
.pm-overlay {
    position: fixed; inset: 0; z-index: 600;
    background: rgba(0,0,0,0.6);
    display: flex; align-items: flex-end; justify-content: center;
    animation: pmFadeIn .15s ease;
}
@keyframes pmFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Dialog — mobil: alttan kayarak açılır */
.pm-dialog {
    background: var(--card);
    border-radius: var(--radius) var(--radius) 0 0;
    width: 100%;
    max-height: 92vh;
    display: flex; flex-direction: column;
    overflow: hidden; /* hiçbir çocuk yuvarlatılmış köşeleri taşmasın */
    box-shadow: 0 -6px 32px rgba(0,0,0,0.13);
    animation: pmSlideUp .22s cubic-bezier(.32,.72,0,1);
}
/* KRİTİK — SİLME. .pm-dialog native <dialog> öğesinde de kullanılıyor
   (gunluk_isci_puantaj_detay.php Düzenle/İptal). Yukarıdaki display:flex
   tarayıcının dialog:not([open]){display:none} varsayılanını EZER (yazar
   stili her zaman tarayıcı varsayılanından önce gelir): KAPALI dialog'ların
   hepsi sayfada üst üste görünür ve en üstteki form (son satırın İptal'i)
   gerçekten gönderilebilir. Test: node scripts/pdks_puantaj_dialog_smoke.js */
dialog.pm-dialog:not([open]) { display: none; }
/* KRİTİK — dialog ile .pm-body arasında <form> sarmalayıcı varsa
   (users.php, personel_form.php, roles.php) flex zinciri kırılır: form
   normal blok olduğu için .pm-body'nin "flex:1 + overflow:auto" kuralının
   dayanacağı bir yükseklik kalmaz, gövde içeriği kadar uzar ve dialog'un
   max-height'ini aşan kısım overflow:hidden ile KESİLİR — gövde hiç
   kaydırılamaz, alttaki alanlar ve Kaydet/İptal düğmeleri erişilemez olur.
   (Roller ekranındaki 51 yetki kutusunda bu yaşandı.) Kısa modallerde
   etkisizdir: dialog zaten içerik boyundadır.
   min-height:0 ŞART — flex öğesinin varsayılan min-height:auto değeri
   küçülmeyi engeller. Test: node scripts/roles_modal_smoke.js */
.pm-dialog > form {
    display: flex; flex-direction: column;
    flex: 1 1 auto; min-height: 0;
}
@keyframes pmSlideUp {
    from { transform: translateY(56px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* Desktop: ortada açılır */
@media (min-width: 640px) {
    .pm-overlay { align-items: center; padding: 20px; }
    .pm-dialog {
        border-radius: var(--radius);
        max-width: 700px;
        max-height: 90vh;
        animation: pmScaleIn .18s cubic-bezier(.32,.72,0,1);
    }
}
@keyframes pmScaleIn {
    from { transform: scale(.95); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.pm-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0;
}
.pm-title { font-size: 1.05rem; font-weight: 700; margin: 0; }
.pm-close {
    background: none; border: none; cursor: pointer;
    padding: 6px 10px; font-size: 1.2rem;
    color: var(--muted); border-radius: var(--radius-sm); line-height: 1;
}
.pm-close:hover { background: var(--bg); color: var(--text); }

.pm-body {
    flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px 20px;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
}

.pm-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex; gap: 10px; justify-content: flex-end;
    flex-shrink: 0;
    background: var(--bg);
    border-radius: 0 0 var(--radius) var(--radius);
}
.pm-footer .pm-del-btn {
    margin-right: auto;
}
@media (max-width: 639px) {
    .pm-footer { border-radius: 0; flex-wrap: wrap; gap: 8px; }
    .pm-footer .btn { flex: 1 1 auto; justify-content: center; }
    .pm-footer .pm-del-btn { flex: 0 0 auto; margin-right: auto; }
}

/* Canlı hesap şeridi */
.pm-calc {
    display: flex; gap: 24px;
    background: var(--primary-soft);
    border: 1px solid #c3d9fc;
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    margin-bottom: 14px;
}
.pm-calc-item { flex: 1; }
.pm-calc-label {
    font-size: .7rem; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: .05em;
}
.pm-calc-val {
    font-size: 1.3rem; font-weight: 800;
    font-variant-numeric: tabular-nums; color: var(--text);
    margin-top: 1px;
}
.pm-calc-net { color: var(--primary); }

/* 2-kolonlu grid (modal içi) */
.pm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.pm-label {
    display: flex; flex-direction: column; gap: 4px;
    font-size: .83rem; color: var(--muted); font-weight: 500;
    min-width: 0; /* grid hücresinin içeriğe göre taşmasını engelle */
}
.pm-label span { line-height: 1.2; }
/* Modal içindeki select/input asla kabı taşırmasın (uzun malzeme adları vb.) */
.pm-label select, .pm-label input { max-width: 100%; box-sizing: border-box; }
.pm-span2 { grid-column: 1 / -1; }
.pm-label input.error, .pm-label select.error {
    border-color: var(--danger);
    outline: 2px solid rgba(217,67,67,0.18);
    outline-offset: -1px;
}
@media (max-width: 360px) {
    .pm-grid { grid-template-columns: 1fr; }
    .pm-span2 { grid-column: 1; }
}

/* ── Ortak Malzeme Seçim Tablosu (Palet Modal + Toplu Malzeme + Yapıştır) ── */
.mat-table-wrap {
    margin-top: 8px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
    overflow-x: auto;
    background: var(--card);
}
.mat-pick-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .84rem;
    table-layout: fixed;
}
.mat-pick-table thead th {
    padding: 6px 8px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted);
    background: var(--surface-2, #f8fafc);
    text-align: left;
    white-space: nowrap;
}
.mat-pick-table thead th:nth-child(1) { width: 30%; }
.mat-pick-table thead th:nth-child(2) { width: 46%; }
.mat-pick-table thead th:nth-child(3) { width: 18%; min-width: 72px; text-align: right; }
.mat-pick-table thead th.mat-col-act,
.mat-pick-table thead th:nth-child(4) { width: 6%; min-width: 30px; text-align: center; padding: 6px 2px; }
.mat-pick-table td {
    padding: 5px 6px;
    vertical-align: middle;
    border-top: 1px solid var(--border, #e2e8f0);
}
.mat-pick-table td.mat-col-act {
    width: 30px;
    text-align: center;
    padding: 4px 2px;
}
.mat-pick-table select.mat-pick-type,
.mat-pick-table select.mat-pick-name,
.mat-pick-table input.mat-pick-qty {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 6px 8px;
    border-radius: 6px;
    font-size: .84rem;
    box-sizing: border-box;
}
.mat-pick-table select.mat-pick-type,
.mat-pick-table select.mat-pick-name {
    padding-right: 26px;
    text-overflow: ellipsis;
}
.mat-pick-table input.mat-pick-qty {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.mat-pick-table tr.mat-pick-row {
    transition: background-color .15s ease;
}
.mat-pick-table tr.mat-pick-row.is-selected {
    background-color: rgba(37, 99, 235, 0.08);
}
.mat-row-del {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease;
}
.mat-row-del:hover,
.mat-row-del:focus-visible {
    color: var(--danger);
    background: var(--danger-soft);
    outline: none;
}
.mat-table-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px 8px;
    border-top: 1px solid var(--border, #e2e8f0);
    background: var(--surface-2, #f8fafc);
}
.mat-selected-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.mat-selected-list:empty {
    display: none;
    margin-top: 0;
}
.mat-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 500;
    background: rgba(37, 99, 235, .1);
    color: var(--primary, #1d4ed8);
    border: 1px solid rgba(37, 99, 235, .2);
    max-width: 100%;
}
.mat-chip-rm {
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: .95rem;
    line-height: 1;
    padding: 0 2px;
    opacity: .75;
    transition: opacity .15s ease;
}
.mat-chip-rm:hover,
.mat-chip-rm:focus-visible {
    opacity: 1;
    outline: none;
}
.yp-mat-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border, #cbd5e1);
}
@media (max-width: 767px) {
    .mat-pick-table {
        table-layout: auto;
        min-width: 440px;
    }
    .mat-pick-table select.mat-pick-type,
    .mat-pick-table select.mat-pick-name,
    .mat-pick-table input.mat-pick-qty {
        font-size: 16px;
        min-height: 38px;
    }
    .mat-pick-table input.mat-pick-qty {
        min-width: 72px;
    }
}

/* ── Palet kart listesi ── */
.pallet-cards {
    display: flex; flex-direction: column; gap: 8px;
    margin: 8px 0 4px;
    min-height: 56px;
}
.pallet-card {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    display: flex; align-items: flex-start; gap: 12px;
    box-shadow: var(--shadow);
    transition: border-color .15s;
}
.pallet-card:hover { border-color: var(--primary); }
.pallet-card.pc-clickable {
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.pallet-card.pc-clickable:hover {
    border-color: var(--primary, #2563eb);
    box-shadow: 0 2px 8px rgba(37, 99, 235, .08);
}
.pallet-card.pc-clickable:focus-visible {
    outline: 2px solid var(--primary, #2563eb);
    outline-offset: 2px;
}
.pc-num-wrap {
    display: flex; flex-direction: column; align-items: center;
    gap: 4px; flex-shrink: 0;
}
.pc-num {
    background: var(--primary); color: #fff;
    border-radius: 50%;
    width: 34px; height: 34px; min-width: 34px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .82rem; flex-shrink: 0;
    transition: background .18s;
}
.pc-num.pc-num-done { background: #ea580c; }
.pc-isle-btn {
    width: 22px; height: 22px; border-radius: 50%;
    border: 1.5px solid #d1d5db; background: none;
    cursor: pointer; font-size: .62rem; color: #9ca3af;
    display: flex; align-items: center; justify-content: center;
    padding: 0; line-height: 1;
    transition: border-color .15s, background .15s, color .15s;
    touch-action: manipulation;
}
.pc-isle-btn.active {
    border-color: #ea580c; background: #ea580c; color: #fff;
}
.pc-body { flex: 1; min-width: 0; }
.pc-title {
    font-weight: 700; font-size: .95rem; margin-bottom: 4px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pc-stats {
    display: flex; flex-wrap: wrap; gap: 4px 14px;
    font-size: .83rem; color: var(--muted);
}
.pc-stats + .pc-stats { margin-top: 2px; }
.pc-stats strong { color: var(--text); font-weight: 600; }
.pc-stats strong.pc-warn { color: #ef4444; font-weight: 700; }
.pc-meta { font-size: .78rem; color: var(--muted); margin-top: 3px; }
.pc-mat-desktop {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 6px;
    margin-top: 5px;
}
.pc-mat-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: .74rem;
    background: var(--surface-2, #f1f5f9);
    color: var(--text, #334155);
    border: 1px solid var(--border, #e2e8f0);
}
.pc-mat-mobile {
    display: none;
}
@media (max-width: 767px) {
    .pc-mat-desktop { display: none; }
    .pc-mat-mobile { display: inline; }
}

/* Palet aksiyon butonları */
.pallet-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: stretch;
    min-width: 0;
}
.pallet-sec-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.pallet-sec-btns .btn {
    flex: 1;
    min-height: 40px;
    font-size: .82rem;
    white-space: nowrap;
    text-align: center;
}
/* Mobil: 3 ikincil buton eşit 3 sütun ızgara, 44px dokunma hedefi */
@media (max-width: 767px) {
    .pallet-sec-btns {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }
    .pallet-sec-btns .btn {
        width: 100%;
        min-height: 44px;
        padding-left: 4px;
        padding-right: 4px;
        font-size: .78rem;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
.pallet-add-main {
    width: 100%;
    min-height: 48px;
    font-size: 1rem;
    border-radius: 12px;
    background: #16a34a !important;
    border-color: #16a34a !important;
}
.pallet-add-main:hover,
.pallet-add-bottom:hover { background: #15803d !important; border-color: #15803d !important; }
.pallet-add-bottom { background: #16a34a !important; border-color: #16a34a !important; }
@media (min-width: 768px) {
    .pallet-card-head { align-items: flex-start; }
    .pallet-actions { flex-direction: row; align-items: center; }
    .pallet-add-main { width: auto; min-height: 36px; font-size: .875rem; border-radius: var(--radius); }
    .pallet-sec-btns .btn { flex: none; min-height: 32px; }
}
.pc-kebab-wrap {
    position: relative;
    flex-shrink: 0;
    align-self: flex-start;
    display: inline-block;
    vertical-align: middle;
}
.pc-kebab {
    background: none; border: none; cursor: pointer;
    font-size: 1.4rem; line-height: 1; letter-spacing: .05em;
    color: var(--muted); padding: 0 6px;
    border-radius: var(--radius-sm);
}
.pc-kebab:hover { background: var(--bg); color: var(--text); }
.pc-dropdown {
    position: absolute; right: 0; top: calc(100% + 4px);
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 200;
    min-width: 140px;
    overflow: hidden;
}
.pc-dropdown button, .pc-dropdown a {
    display: flex; align-items: center; gap: 8px;
    width: 100%; padding: 11px 14px;
    background: none; border: none; cursor: pointer;
    font-size: .9rem; text-align: left;
    color: var(--text); font-family: inherit;
    text-decoration: none;
}
.pc-dropdown button:hover, .pc-dropdown a:hover { background: var(--bg); }
.pc-drop-danger { color: var(--danger) !important; }
.pc-drop-danger:hover { background: var(--danger-soft) !important; }
.pc-drop-success { color: #059669 !important; }
.pc-drop-success:hover { background: rgba(5,150,105,.08) !important; }
.pc-drop-disabled { display: block; padding: 8px 14px; color: var(--muted); font-size: .85rem; cursor: default; }

/* "⬇ Excel İndir ▾" menüsü — export_menu() (config/xlsx_export.php).
   Açılır liste .pc-dropdown'ı kullanır; app.js position:fixed ile açar. */
.dl-menu { align-self: center; }
.dl-menu-btn { white-space: nowrap; }
.dl-caret { font-size: .75em; opacity: .7; margin-left: 2px; }
.dl-menu-list { min-width: 210px; }
.dl-menu-list a { flex-wrap: wrap; row-gap: 1px; }
.dl-menu-list small { flex-basis: 100%; padding-left: 26px; color: var(--muted); font-size: .74rem; }
@media (max-width: 767px) { .dl-menu-list a { min-height: 44px; } }

/* Kilitli kayıt rozeti */
.badge-locked {
    display: inline-block;
    font-size: .72rem; font-weight: 600;
    background: #fff3cd; color: #856404;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 1px 5px;
    vertical-align: middle;
    margin-left: 4px;
}

/* Kilit banner (record_view.php) */
.lock-banner {
    display: flex; align-items: center; gap: 10px;
    background: #fff8e1; border: 1px solid #ffc107;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 12px;
    font-size: .9rem;
}
.lock-banner-icon { font-size: 1.2rem; flex-shrink: 0; }
.lock-banner-body { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.lock-banner-detail { color: var(--muted); font-size: .82rem; }
.lock-banner-reason { color: #92400e; font-size: .82rem; font-style: italic; }

/* Boş durum */
.pc-empty {
    text-align: center; padding: 36px 20px;
    color: var(--muted);
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius);
    cursor: pointer;
    transition: border-color .15s, color .15s;
    user-select: none;
}
.pc-empty:hover, .pc-empty:focus { border-color: var(--primary); color: var(--primary); outline: none; }
.pc-empty-icon { font-size: 2.2rem; margin-bottom: 6px; }
.pc-empty-text { font-size: .9rem; line-height: 1.5; }

@media print { .pm-overlay { display: none !important; } }

/* ── Toplu malzeme çıkışı modal ── */
.bm-pallets-head {
    border-top: 1px solid var(--border);
    padding-top: 10px;
    margin-bottom: 4px;
}
.bm-pallet-list {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}
.bm-check-label {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px; cursor: pointer;
    font-size: .9rem; user-select: none;
}
.bm-check-label:hover { background: var(--bg); }

/* Sprint 36: Eklenenleri Sil — accordion tasarımı */
.bm-rm-all-wrap { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.bm-acc-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    overflow: hidden;
}
.bm-acc-header {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px;
    cursor: pointer; user-select: none;
    background: var(--bg);
    transition: background .1s;
}
.bm-acc-header:hover { background: var(--border); }
.bm-acc-arrow { font-size: .75rem; color: var(--muted); flex-shrink: 0; width: 14px; text-align: center; }
.bm-acc-name { font-weight: 600; font-size: .9rem; flex: 1; min-width: 0; }
.bm-acc-meta { font-size: .78rem; flex-shrink: 0; text-align: right; }
.bm-acc-body {
    padding: 10px 12px 12px;
    border-top: 1px solid var(--border);
    background: var(--card);
}
.bm-acc-selall { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.bm-acc-pallets { max-height: 200px; overflow-y: auto; margin-bottom: 10px; -webkit-overflow-scrolling: touch; }
.bm-acc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.bm-acc-actions .btn { flex: 1 1 auto; }
.bm-check-label input[type="checkbox"] {
    width: 17px; height: 17px; min-height: unset;
    flex-shrink: 0; accent-color: var(--primary);
}
.bm-check-label span.muted { margin-left: auto; font-size: .8rem; }
.bm-dara-preview {
    font-size: .85rem; color: var(--primary);
    font-weight: 600; align-self: flex-end; padding-bottom: 10px;
}
.bm-status { font-size: .85rem; min-height: 1.4em; margin-top: 2px; }

/* ── BM Tabs — 3 eşit genişlikte sekme, taşma yok ── */
.bm-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
    flex-shrink: 0;
}
.bm-tab-btn {
    flex: 1 1 0; min-width: 0;
    background: none; border: none; cursor: pointer;
    padding: 12px 6px; font-size: .85rem; font-weight: 600;
    text-align: center;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    color: var(--muted); border-bottom: 2px solid transparent;
    margin-bottom: -1px; font-family: inherit;
    transition: color .15s, border-color .15s, background .15s;
}
.bm-tab-btn:hover { background: rgba(0,0,0,.025); }
.bm-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
#bmRmCount { font-size: .82em; opacity: .7; font-weight: 500; }
@media (max-width: 400px) {
    .bm-tab-btn { font-size: .78rem; padding: 11px 4px; }
}
.bm-panel { margin-bottom: 4px; }

/* ── Şablon listesi ── */
.bm-tpl-list { margin-bottom: 10px; }
.bm-tpl-empty { padding: 16px 0; color: var(--muted); font-size: .88rem; }
.bm-tpl-card {
    display: flex; align-items: flex-start; gap: 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 11px 13px;
    margin-bottom: 7px;
}
.bm-tpl-info  { flex: 1; min-width: 0; }
.bm-tpl-name  { font-weight: 600; font-size: .92rem; margin-bottom: 3px; }
.bm-tpl-items { font-size: .8rem; color: var(--muted); line-height: 1.4; }
.bm-tpl-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: flex-start; }

/* ── Şablon oluşturma formu ── */
.bm-create-form {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-top: 10px;
}
.bm-create-form h4 { margin: 0 0 12px; font-size: .92rem; }
.bm-tpl-mat-rows { margin-bottom: 8px; }
.bm-tpl-mat-row {
    display: grid;
    grid-template-columns: 1fr 90px 34px;
    gap: 6px; margin-bottom: 6px; align-items: center;
}
.bm-tpl-mat-row select, .bm-tpl-mat-row input { min-height: 36px; font-size: .88rem; }
.tpl-row-del { padding: 0; width: 34px; text-align: center; }

@media print { #kalanModal { display: none !important; } }

/* =========================================================
   Kantar Hesaplama
   ========================================================= */

/* Grup satırı */
.kantar-grup-row {
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}
.kantar-grup-row:last-child { border-bottom: none; padding-bottom: 0; }

.kantar-grup-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px;
}
.kantar-grup-no { font-size: .82rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

.kantar-grup-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}
.kantar-grup-body .kantar-lbl:first-child { grid-column: span 2; }
@media (min-width: 560px) {
    .kantar-grup-body { grid-template-columns: 2fr 1fr 1fr; }
    .kantar-grup-body .kantar-lbl:first-child { grid-column: auto; }
}

.kantar-lbl { display: flex; flex-direction: column; gap: 4px; }
.kantar-lbl > span { font-size: .82rem; font-weight: 600; color: var(--muted); }
.kantar-lbl input { margin-top: 0; }

/* Uyarı */
.kantar-uyari {
    color: var(--danger); font-size: .86rem; font-weight: 600;
    background: #fdecea; border-radius: var(--radius-sm);
    padding: 8px 12px; margin-top: 12px;
}

/* Özet kutusu (palet başı ortalama) */
.kantar-ozet {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px;
    background: var(--primary-soft); border-radius: var(--radius);
    padding: 14px 18px; margin: 16px 0 12px;
}
.kantar-ozet-lbl { font-weight: 600; color: var(--text); font-size: .92rem; }
.kantar-ozet-val { font-size: 1.2rem; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }

/* Tablo net sütunu */
.kantar-net { color: var(--primary); font-weight: 700; }

/* Toplam satırı */
.kantar-toplam-row td { background: var(--bg); border-top: 2px solid var(--border-strong); }

/* Gruplandırma (form) */
.grup-toggle-bar { margin: 4px 0 8px; }
.grup-form-row {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
}
.grup-row-inputs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px 10px;
    background: #fff;
}
.grup-row-inputs .grup-ad {
    width: 100%;
    margin-top: 0 !important;
}
.grup-row-numfields {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.grup-row-numfields label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    flex: 1;
    min-width: 100px;
    margin: 0;
}
.grup-row-numfields label input {
    flex: 1;
    min-width: 0;
    text-align: right;
    margin-top: 0 !important;
}
@media (max-width: 479px) {
    .grup-row-numfields label:not(.grup-ozel-lbl):not(.grup-brut-lbl) { flex: 0 0 calc(50% - 4px); }
    .grup-ozel-lbl { flex: 1; }
}
.grup-calc-bar {
    display: flex;
    align-items: center;
    gap: 0;
    background: #f8faff;
    border-top: 1px solid var(--border);
    padding: 6px 10px;
}
.grup-calc-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}
.grup-calc-lbl {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    line-height: 1.2;
}
.grup-calc-val {
    font-size: .92rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #374151;
}
.grup-calc-op {
    font-size: 1.1rem;
    color: var(--muted);
    padding: 0 4px;
    line-height: 1;
    align-self: flex-end;
    padding-bottom: 2px;
}
.grup-calc-net-item { }
.grup-calc-net-val {
    color: var(--primary) !important;
    font-size: 1rem !important;
}
.grup-sum-row {
    border: 1px solid var(--primary);
    border-radius: var(--radius);
    padding: 8px 10px;
    margin-top: 4px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    gap: 0;
}
.grup-sum-row .grup-sum-lbl {
    font-size: .8rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: .04em;
    flex: 0 0 auto;
    margin-right: 8px;
}
.grup-sum-row .grup-calc-item { flex: 1; }
.grup-sum-row .grup-calc-val { color: var(--primary); }

/* Brüt label (grup row) */
.grup-brut-lbl {
    flex: 0 0 auto !important;
    min-width: 80px;
    color: var(--primary) !important;
    font-size: .82rem !important;
}
@media (max-width: 479px) {
    .grup-brut-lbl { flex: 0 0 calc(50% - 4px) !important; }
}

/* Sapma satırı */
.grup-sapma-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 7px 14px;
    background: #fffbeb;
    border-top: 1px solid #fde68a;
    font-size: .82rem;
}
.grup-sapma-lbl { color: var(--text); }
.grup-sapma-sep { color: var(--muted); }
.grup-sapma-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 700;
}
.sapma-fazla { background: #fee2e2; color: #991b1b; }
.sapma-eksik { background: #dbeafe; color: #1e40af; }

.grup-del-btn {
    background: none;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    color: #ef4444;
    line-height: 1;
    flex-shrink: 0;
}
.grup-del-btn:hover { background: #fee2e2; }
.grup-ozel-lbl {
    flex: 0 0 auto !important;
    font-size: .78rem !important;
    color: var(--primary) !important;
    cursor: pointer;
    user-select: none;
    margin-left: auto !important;
    gap: 4px !important;
}
.grup-ozel-lbl input[type=checkbox] {
    width: auto !important;
    flex: none !important;
    cursor: pointer;
    accent-color: var(--primary);
    margin-top: 0 !important;
}
.grup-ozel-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #f0f4ff;
    border-top: 1px dashed var(--primary);
}
.grup-ozel-inputs label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    flex: 1;
    margin: 0;
}
.grup-ozel-inputs label input {
    flex: 1;
    min-width: 0;
    text-align: right;
    margin-top: 0 !important;
}
.grup-ozel-inputs label small {
    color: var(--muted);
    font-weight: normal;
    font-size: .72rem;
}

/* Gruplandırma hesap tablosu (view sayfası) */
.kv-grup-table { width: 100%; border-collapse: collapse; font-size: 8pt; }
.kv-grup-table th, .kv-grup-table td { padding: 3px 6px; border-bottom: 1px solid #e5e7eb; }
.kv-grup-table th { font-size: 6.5pt; text-transform: uppercase; letter-spacing:.04em; color:#555; font-weight:700; text-align:right; }
.kv-grup-table th:first-child, .kv-grup-table td:first-child { text-align:left; }
.kv-grup-table td { text-align:right; font-variant-numeric:tabular-nums; }
.kv-grup-table td:first-child { text-align:left; font-weight:600; }
.kv-grup-table tfoot td { border-top: 2px solid #374151; font-weight:700; background:#f9fafb; }
.kv-grup-net { color: var(--primary, #1a56db); font-weight:800 !important; }

/* Tartım satırları */
.kantar-tartim-wrap {
    margin-top: 20px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.kantar-tartim-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}
.kantar-tartim-no {
    font-size: .82rem; font-weight: 700; color: var(--muted);
    min-width: 72px; white-space: nowrap;
}
.kantar-tartim-fields {
    display: flex; align-items: center; gap: 8px; flex: 1;
}
.kantar-tartim-input {
    flex: 1; max-width: 140px;
    font-size: 1.1rem !important; font-weight: 600;
    text-align: right;
}
.kantar-tartim-unit {
    font-size: .85rem; color: var(--muted); font-weight: 500; min-width: 20px;
}
.kantar-net-satir {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px;
    background: var(--primary-soft);
}
.kantar-net-lbl {
    font-size: .85rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: .06em;
}
.kantar-net-val {
    font-size: 1.4rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums;
}
.kantar-net-pozitif { color: var(--primary) !important; }

/* ── Hesaplama modal bölüm başlıkları ── */
.kh-section { margin-bottom: 20px; }
.kh-gruplar-header {
    display: flex; align-items: center; justify-content: space-between; margin-bottom: 0;
}
.kh-section-title {
    font-size: .78rem; font-weight: 700;
    color: var(--muted); text-transform: uppercase; letter-spacing: .05em;
    margin-bottom: 10px;
}

/* ── Yazdırma: sadece hesaplama sonucu ── */
@media print {
    body.kh-print > *:not(#kantarModal) { display: none !important; }
    body.kh-print #kantarModal {
        display: block !important;
        position: static !important;
        background: white !important;
        z-index: auto !important;
        animation: none !important;
    }
    body.kh-print .pm-dialog {
        box-shadow: none !important;
        max-width: 100% !important;
        max-height: none !important;
        border-radius: 0 !important;
        animation: none !important;
    }
    body.kh-print .pm-close { display: none !important; }
    body.kh-print .pm-body > .kh-section { display: none !important; }
    body.kh-print #mSonucAlani { display: block !important; }
    body.kh-print #kantarModalFooter,
    body.kh-print #kantarPrintFooter { display: none !important; }
    body.kh-print .pm-body { overflow: visible !important; padding: 24px !important; }
}

/* =========================================================
   Bottom Navigation — mobil alt çubuk (Sprint Alt-Menü-01)
   "Kabartma Karo": yüzen yuvarlak dok, her sekme renkli 3B karo (SVG,
   assets/nav-icons/). Ana Sayfa solda sabit, "Diğer" sağda, arada
   kullanıma göre dolan slotlar (390px altında 3, üstünde 4).
   ---------------------------------------------------------
   .bottomnav  = tam genişlik, ekranın altına yapışık, şeffaf KAPSAYICI
                 (z-index 500). Kenar boşluğu + güvenli alan onun padding'i.
   .bn-dock    = görünen yüzen dok. Depo şeridi .bottomnav::before.
   --bn-h      = kapsayıcının yüksekliği (dok ~84px + alt boşluk 8px),
                 güvenli alan HARİÇ. Çubuğa göre yer bırakan HER kural
                 calc(var(--bn-h) + env(safe-area-inset-bottom, 0px)) kullanır;
                 sabit px YAZMA. Çubuk yoksa (≥768px, body.bn-yok) 0'dır.
   Dokunma: karo ≥ 48px yüksek; basınca .9, aktif karo yükselir.
   ========================================================= */
.bottomnav {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    z-index: 500;
    padding: 0 8px calc(8px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;            /* dokun: yalnız dok; kenar boşluğu içeriği bloklamaz */
    --bn-dock: #ffffff;
    --bn-dock-border: #e3e7ee;
    --bn-label: #6b7385;
    --bn-label-on: #1c2230;
    --ni-idle: saturate(.62) brightness(1.03);
}
@media (max-width: 899px) {
    .bottomnav { display: block; }
}
/* Aktif depo şeridi — dokun üst kenarında, depo rengi DEĞİŞKENİNİ izler */
.bottomnav::before {
    content: '';
    position: absolute; z-index: 1;
    top: 0; left: 30px; right: 30px; height: 3px;
    border-radius: 0 0 4px 4px;
    background-color: var(--depot-accent, #64748b);
    box-shadow: 0 2px 10px rgba(var(--depot-accent-rgb, 100,116,139), .6);
    transition: background-color .2s ease;
    pointer-events: none;
}
.bn-dock {
    position: relative;
    display: flex; align-items: stretch;
    pointer-events: auto;
    background: var(--bn-dock);
    border: 1px solid var(--bn-dock-border);
    border-radius: 24px;
    padding: 9px 3px 7px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 16px 30px -12px rgba(16,24,40,.45), 0 3px 8px rgba(16,24,40,.12);
}
.bottomnav .bn-item {
    flex: 1 1 0; min-width: 0; min-height: 48px; position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    font: inherit; background: none; border: 0; padding: 4px 1px; margin: 0;
    cursor: pointer; text-decoration: none; color: inherit;
    -webkit-tap-highlight-color: transparent;
}
.bottomnav .bn-item[hidden] { display: none; }
.bottomnav .bn-item:hover, .bottomnav .bn-item:focus { text-decoration: none; }
.bottomnav .bn-item:focus-visible { outline: 2px solid var(--depot-accent, var(--primary)); outline-offset: -2px; border-radius: 12px; }
/* 390px altında 3 slot: sunucu hep 4 çizer, 4.'yü CSS gizler (o sayfa "Diğer"e düşer) */
@media (max-width: 389px) { .bottomnav .bn-4 { display: none; } }
/* Tam 4 izinli sayfa varsa "Diğer" yalnız dar ekranda gerekir */
@media (min-width: 390px) { .bottomnav .bn-more-dar { display: none; } }
.bn-sep { align-self: center; width: 1px; height: 34px; flex: 0 0 1px; background: var(--bn-dock-border); }
.bn-item .ni-wrap { position: relative; width: 42px; height: 42px; flex-shrink: 0; transition: transform .32s cubic-bezier(.34,1.56,.64,1); }
.bn-item .ni { width: 100%; height: 100%; display: block; object-fit: contain; filter: var(--ni-idle); transition: filter .25s ease; }
.bn-item .bn-label {
    font-size: 10.5px; line-height: 1.1; font-weight: 600; color: var(--bn-label);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
    transition: color .2s, transform .3s;
}
.bn-item .bn-label.tight { font-size: 9.5px; letter-spacing: -.02em; }   /* en küçük etiket 9.5px */
.bn-item .bn-label.xs-hide { display: none; }
.bn-item.is-active .ni-wrap { transform: translateY(-10px) scale(1.14); }
.bn-item.is-active .ni {
    filter: drop-shadow(0 7px 7px rgba(16,24,40,.28));
    filter: drop-shadow(0 7px 7px color-mix(in srgb, var(--c2) 60%, transparent));
}
.bn-item.is-active .bn-label { color: var(--bn-label-on); font-weight: 700; transform: translateY(-4px); }
.bn-item.is-active::after { content: ''; position: absolute; bottom: 0; width: 18px; height: 3px; border-radius: 2px; background: var(--c2); }
.bn-item.is-press .ni-wrap { transform: translateY(2px) scale(.9); transition-duration: .08s; }
.bn-item .more-badge { position: absolute; right: -4px; bottom: -3px; width: 18px; height: 18px; border-radius: 6px; box-shadow: 0 0 0 2px var(--bn-dock); }
.bn-item .more-badge[hidden] { display: none; }
.bn-item .more-badge img { width: 100%; height: 100%; display: block; }
@keyframes bnSlotIn { from { transform: translateY(14px) scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.bn-item.slot-new .ni { animation: bnSlotIn .45s cubic-bezier(.34,1.56,.64,1); }

/* Çubuk basılmayan rol (Ana Sayfa hedefi de izinli sayfa da yok) */
body.bn-yok { --bn-h: 0px; }

/* ── "Diğer" alt sayfası — z-index 600 (modal katmanı, çubuğun üstünde) ── */
.bn-sheet-ovl {
    position: fixed; inset: 0; z-index: 600;
    background: rgba(8,12,20,.45);
    display: flex; align-items: flex-end;
    animation: bnFadeIn .2s ease;
    overscroll-behavior: contain;
}
.bn-sheet-ovl[hidden] { display: none !important; }
@media (min-width: 900px) { .bn-sheet-ovl { display: none !important; } }
.bn-sheet {
    width: 100%; max-height: 84vh; max-height: 84dvh; overflow-y: auto; overscroll-behavior: contain;
    background: var(--card); color: var(--text);
    border-radius: 24px 24px 0 0;
    padding: 0 14px calc(16px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -12px 30px rgba(0,0,0,.25);
    animation: bnSheetUp .28s cubic-bezier(.2,.9,.3,1.1);
    display: grid; gap: 12px;
}
.bn-sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: var(--border); margin: 8px auto 0; }   /* üst boşluk burada: yapışkan başlığın üstünde içerik görünmesin (v552) */
.bn-sheet-head { display: flex; align-items: center; gap: 8px; }
/* v552: uzun içerikte (12 grup) Kapat/Sabitle hep erişilebilir — başlık kaydırmada üstte kalır */
.bn-sheet { scroll-padding-top: 64px; }
.bn-sheet-head { position: sticky; top: 0; z-index: 3; background: var(--card); padding: 4px 0; margin: -4px 0; }
.bn-sheet-head h2 { margin: 0; font-size: 1.05rem; flex: 1; min-width: 0; }
.bn-depo-chip {
    display: inline-flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 700;
    padding: 4px 10px; border-radius: 999px; color: var(--text);
    background: rgba(var(--depot-accent-rgb, 100,116,139), .14);
    border: 1px solid rgba(var(--depot-accent-rgb, 100,116,139), .4);
}
.bn-depo-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--depot-accent, #64748b); }
.bn-x-btn {
    width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border);
    background: var(--card); color: var(--text); font-size: 1.1rem; cursor: pointer; font-family: inherit;
}
.bn-edit-btn {
    font: inherit; font-size: .8rem; font-weight: 600; min-height: 44px; padding: 0 14px;
    border-radius: 12px; border: 1px solid var(--border); background: var(--card); color: var(--text); cursor: pointer;
}
.bn-edit-btn[aria-pressed="true"] { background: var(--depot-accent, var(--primary)); color: var(--depot-accent-text, #fff); border-color: transparent; }
.bn-x-btn:focus-visible, .bn-edit-btn:focus-visible, .bn-tile .go:focus-visible { outline: 2px solid var(--depot-accent, var(--primary)); outline-offset: 1px; }
/* v552: "Diğer" sayfası = sidebar ile AYNI gruplar, akordiyon (yalnız aktif grup açık). Başlık dili .sidebar-section ile aynı:
   ikon + ad (büyük harf, html lang="tr") + dönen ok; ≥44px dokunma hedefi. Renkler tema belirteçlerinden (açık/koyu otomatik). */
.bn-gruplar { display: grid; gap: 8px; min-width: 0; }
.bn-grup { min-width: 0; }
.bn-grup > summary.bn-grup-sum {
    display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 12px;
    list-style: none; cursor: pointer; user-select: none; -webkit-user-select: none;
    font-size: .8rem; font-weight: 800; letter-spacing: .09em; color: var(--text);
    background: var(--surface-2); border: 1px solid var(--border);
    border-left: 3px solid var(--depot-accent, var(--primary)); border-radius: 12px;
}
.bn-grup > summary.bn-grup-sum::-webkit-details-marker { display: none; }
.bn-grup > summary.bn-grup-sum:focus-visible { outline: 2px solid var(--depot-accent, var(--primary)); outline-offset: 1px; }
.bn-grup[open] > summary.bn-grup-sum { background: rgba(var(--depot-accent-rgb, 29,108,240), .12); }
.bn-grup-ikon { display: inline-flex; color: var(--depot-accent, var(--primary)); flex-shrink: 0; }
.bn-grup-ad { flex: 1; min-width: 0; text-transform: uppercase; overflow-wrap: anywhere; }
.bn-grup-ok {
    width: 8px; height: 8px; flex-shrink: 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); margin-top: -3px; opacity: .75; transition: transform .18s ease;
}
.bn-grup:not([open]) > summary .bn-grup-ok { transform: rotate(-45deg); margin-top: 0; }
.bn-grup > .bn-sheet-grid { padding: 12px 0 6px; }
.bn-sheet-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 6px; align-items: start; }
.bn-tile { position: relative; }
.bn-tile .go {
    display: grid; justify-items: center; gap: 6px; padding: 6px 2px; border-radius: 14px;
    color: var(--text); text-decoration: none; font-size: .72rem; font-weight: 600;
    text-align: center; line-height: 1.15; width: 100%; min-height: 48px; cursor: pointer;
}
.bn-tile .go:hover { text-decoration: none; }
.bn-tile .go > span:not(.nav-rozet), .bn-tile-ad { min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
/* Anahtarsız öğe (muhasebe sayfaları vb.): pin'siz sade karo — ikon = menü modelindeki emoji */
a.bn-tile.bn-tile-link {
    display: grid; justify-items: center; align-content: start; gap: 6px; padding: 6px 2px; border-radius: 14px;
    color: var(--text); text-decoration: none; font-size: .72rem; font-weight: 600;
    text-align: center; line-height: 1.15; min-height: 48px; cursor: pointer;
}
a.bn-tile.bn-tile-link:hover { text-decoration: none; }
a.bn-tile.bn-tile-link:focus-visible { outline: 2px solid var(--depot-accent, var(--primary)); outline-offset: 1px; }
.bn-emoji {
    width: 50px; height: 50px; display: grid; place-items: center; font-size: 1.55rem; line-height: 1;
    border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border);
}
.bn-emoji:has(img) { background: transparent; border: none; border-radius: 0; }
.bn-emoji img { width: 50px; height: 50px; object-fit: contain; display: block; }
.bn-tile-link.is-current { background: rgba(var(--depot-accent-rgb, 100,116,139), .12); box-shadow: inset 0 0 0 1.5px rgba(var(--depot-accent-rgb, 100,116,139), .5); }
.bn-sheet.editing .bn-tile-link { opacity: .4; }   /* Sabitle modunda: bu sayfalar sabitlenemez */
.bn-tile .go img { width: 50px; height: 50px; object-fit: contain; }
.bn-tile.is-current .go { background: rgba(var(--depot-accent-rgb, 100,116,139), .12); box-shadow: inset 0 0 0 1.5px rgba(var(--depot-accent-rgb, 100,116,139), .5); }
.bn-tile.in-bar .go::after { content: 'alt menüde'; font-size: .6rem; font-weight: 600; color: var(--muted); }
.bn-sheet.editing .bn-tile.in-bar .go::after { content: none; }
.bn-sheet.editing .bn-tile .go { box-shadow: inset 0 0 0 1.5px var(--border); }
.bn-sheet.editing .bn-tile.pinned .go { box-shadow: inset 0 0 0 2px var(--depot-accent, var(--primary)); }
.bn-pin-badge {
    position: absolute; top: 2px; right: 10%; width: 22px; height: 22px; border-radius: 8px;
    display: none; place-items: center;
    background: var(--depot-accent, var(--primary)); color: var(--depot-accent-text, #fff);
    box-shadow: 0 0 0 2px var(--card); pointer-events: none;
}
.bn-tile.pinned .bn-pin-badge { display: grid; }
.bn-pin-badge svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.bn-sheet-msg { margin: 0; font-size: .8rem; font-weight: 600; color: var(--text); }
.bn-sheet-msg:empty { display: none; }
.bn-sheet-foot { font-size: .74rem; color: var(--muted); border-top: 1px solid var(--border); padding-top: 10px; margin: 0; }
@keyframes bnSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes bnFadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
    .bottomnav *, .bottomnav::before, .bottomnav *::after,
    .bn-sheet-ovl, .bn-sheet-ovl * { transition-duration: 0s !important; animation: none !important; }
    .bn-item.is-active .ni-wrap, .bn-item.is-active .bn-label { transform: none; }
}

/* Print modda bottom nav gizle */
@media print { .bottomnav, .bn-sheet-ovl { display: none !important; } }

/* ── record_view.php yeni buton düzeni ── */
.rv-head { align-items: center; flex-wrap: wrap; gap: 8px; }
.rv-back { flex-shrink: 0; }
.rv-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}
.rv-actions .rv-act-btn,
.rv-act-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: .84rem;
    padding: 7px 11px;
}
.rv-ico {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    display: block;
}
@media (max-width: 767px) {
    .rv-head { flex-wrap: wrap; gap: 8px; }
    .rv-head .rv-back { font-size: .8rem; padding: 6px 10px; }
    .rv-actions { gap: 5px; max-width: 100%; }
    .rv-actions .btn { font-size: .8rem; padding: 6px 10px; }
    .rv-actions .rv-act-btn,
    .rv-act-btn {
        padding: 6px 9px;
        font-size: .78rem;
        gap: 5px;
    }
}

/* ── record_view: iki kolon düzen + malzeme sidebar ── */
.rv-layout { display: flex; flex-direction: column; overflow-x: clip; }
.rv-pallet-col { min-width: 0; overflow-x: clip; }
.rv-materials-col {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    background: #fafbfd;
    font-size: .88rem;
    align-self: start;
}
.rv-mat-section { margin-bottom: 14px; }
.rv-mat-section:last-child { margin-bottom: 0; }
.rv-mat-section-title {
    font-size: .7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .05em;
    color: var(--muted); margin-bottom: 7px;
    padding-bottom: 4px; border-bottom: 1px solid var(--border);
}
.rv-mat-row {
    display: flex; justify-content: space-between;
    padding: 4px 0; border-bottom: 1px dashed var(--border);
    gap: 8px; font-size: .86rem;
}
.rv-mat-row:last-child { border-bottom: none; }
.rv-mat-total { font-weight: 700; border-top: 1px solid var(--border-strong, #9ca3af); border-bottom: none; margin-top: 2px; padding-top: 5px; }
.rv-mat-item { padding: 5px 0; border-bottom: 1px dashed var(--border); }
.rv-mat-item:last-child { border-bottom: none; }
.rv-mat-name { font-weight: 600; font-size: .86rem; }
.rv-mat-meta { font-size: .76rem; color: var(--muted); margin-top: 1px; }
@media (min-width: 900px) {
    .rv-layout {
        display: grid;
        grid-template-columns: 1fr 260px;
        gap: 16px;
        align-items: start;
    }
    .rv-materials-col { margin-top: 0; }
}

/* ── Kantar: canlı Brüt/Dara/Net hesap ── */
.kantar-net-hesap {
    margin-top: 12px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    overflow: hidden;
}
.knh-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    font-size: .9rem;
}
.knh-row:last-child { border-bottom: none; }
.knh-net-row {
    background: #1a56db;
    color: #fff;
}
.knh-net-row strong { font-size: 1.1rem; }

/* ── kantar_view.php Brüt/Dara/Net kutusu ── */
.kv-nd-box {
    margin-top: 14px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 10px;
    overflow: hidden;
}
.kv-nd-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 14px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    font-size: .9rem;
}
.kv-nd-row:last-child { border-bottom: none; }
.kv-nd-lbl { color: var(--muted, #6b7280); }
.kv-nd-val { font-weight: 600; }
.kv-nd-net { background: #1a56db; color: #fff; padding: 14px 18px; }
.kv-nd-net .kv-nd-lbl { color: rgba(255,255,255,.8); }
.kv-nd-net-val { font-size: 1.8rem; }

@media print {
    .kv-nd-box {
        border: 1px solid #ccc !important;
        margin-top: 10px !important;
        page-break-inside: avoid;
    }
    .kv-nd-net {
        background: #1a56db !important;
        color: #fff !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ── btn-success ── */
.btn-success {
    background: #10b981; color: #fff; border-color: #10b981;
}
.btn-success:hover { background: #059669; border-color: #059669; }

/* ── Reports (reports.php) ── */
.rpt-head { align-items: flex-start; gap: 10px; }
.rpt-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rpt-title h1 { margin: 0; }
.rpt-title .muted { font-size: .85rem; margin: 0; }
.rpt-actions { display: flex; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }

.rpt-filter-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px;
}
.rpt-filter-form { display: flex; flex-wrap: wrap; gap: 10px; }
.rpt-filter-group {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end;
}
.rpt-filter-group label,
.rpt-search-label {
    display: flex; flex-direction: column; gap: 3px;
    font-size: .82rem; font-weight: 500; color: var(--muted);
}
.rpt-filter-group input,
.rpt-filter-group select {
    padding: 7px 10px; border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); font-size: .9rem;
    background: var(--bg); color: var(--text); min-width: 120px;
}
.rpt-filter-actions {
    display: flex; gap: 6px; align-items: flex-end; margin-top: auto;
}

.rpt-summary {
    display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
}
.rpt-sum-item {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 10px 14px;
    display: flex; flex-direction: column; gap: 2px; min-width: 90px;
}
.rpt-sum-item span { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.rpt-sum-item strong { font-size: 1.05rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.rpt-sum-highlight { border-color: var(--primary); }
.rpt-sum-highlight strong { color: var(--primary); }

.rpt-table td, .rpt-table th { white-space: nowrap; }
.rpt-table .totals-row td,
.rpt-table tfoot td { font-weight: 700; background: var(--bg); border-top: 2px solid var(--border-strong); }

.rpt-badge {
    display: inline-block; padding: 2px 7px;
    border-radius: 20px; font-size: .78rem; font-weight: 600; white-space: nowrap;
}
.badge-islendi  { background: #fef3c7; color: #92400e; }
.badge-yuklendi { background: #d1fae5; color: #065f46; }

@media (max-width: 767px) {
    .rpt-filter-group input,
    .rpt-filter-group select { font-size: 16px; min-width: 100px; }
    .rpt-summary { gap: 6px; }
    .rpt-sum-item { padding: 8px 10px; min-width: 80px; }
    /* Aksiyon butonları mobilde sıkışmasın — tam satır genişliği, kaydırılabilir */
    .rpt-actions { flex-shrink: 1; width: 100%; overflow-x: auto; flex-wrap: nowrap; }
    .rpt-head { flex-direction: column; align-items: flex-start; }
}

@media print {
    .topbar, .bottomnav,
    .rpt-head .rpt-actions,
    .rpt-filter-card,
    .rpt-no-print { display: none !important; }
    body, .container { background: #fff !important; padding: 0 !important; }
    .rpt-summary { border: 1px solid #ccc !important; }
    .data-table { font-size: 8pt; }
    .table-wrap { overflow: visible !important; }
}

/* ── Günlük Rapor — tip badge ── */
.dr-type-badge {
    display: inline-block; padding: 1px 8px; border-radius: 12px;
    font-size: .75rem; font-weight: 700; letter-spacing: .04em;
    vertical-align: middle;
}
.dr-type-x { background: #dbeafe; color: #1d4ed8; }
.dr-type-z { background: #dcfce7; color: #15803d; }

/* ═══════════════════════════════════════════════════════
   Tanımlar v3 — sol sabit panel + sağ akordiyon liste (def3-*)
   ═══════════════════════════════════════════════════════ */

.def3-layout {
    display: grid; grid-template-columns: 340px 1fr;
    gap: 14px; align-items: start;
}

/* ── Sol panel ── */
.def3-panel { position: sticky; top: 14px; padding: 16px; }
.def3-panel-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
}
.def3-panel-head h2 { margin: 0; font-size: 1.02rem; }
.def3-field { display: block; margin-bottom: 12px; font-size: .82rem; font-weight: 600; color: var(--muted); }
/* hidden özniteliği display:block/flex tarafından ezilmesin */
.def3-panel [hidden], .def3-list [hidden] { display: none !important; }
.def3-field input, .def3-field select {
    display: block; width: 100%; box-sizing: border-box;
    margin-top: 5px; padding: 9px 11px;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-size: .95rem; background: var(--bg); color: var(--text);
}
.def3-field input:focus, .def3-field select:focus { border-color: var(--primary); background: var(--card); }
.def3-field input:focus-visible, .def3-field select:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.def3-field select:disabled { opacity: .7; background: var(--surface-2, var(--bg)); }

/* Depo renk seçici (definitions.php sol panel) */
.def3-color-field small { display: block; margin-top: 5px; font-size: .74rem; }
.def3-color-row { display: flex; align-items: center; gap: 8px; margin-top: 5px; }
.def3-color-row input[type="color"] {
    width: 46px; height: 38px; padding: 3px;
    margin-top: 0; border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    cursor: pointer; background: var(--card);
}
.def3-color-row input[type="color"].is-auto { border-style: dashed; border-color: var(--muted); }
.def3-color-row .btn { margin-top: 0; }

/* Liste satırındaki depo renk noktası */
.def3-color-dot {
    display: inline-block; width: 10px; height: 10px; border-radius: 50%;
    margin-right: 6px; vertical-align: middle; flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0,0,0,.08);
}

.def3-active { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: .88rem; font-weight: 600; }
.def3-panel-meta {
    font-size: .78rem; color: var(--muted);
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 12px;
}
.def3-panel-actions { display: flex; gap: 8px; }
.def3-panel-actions .btn-primary { flex: 1; }
.def3-del { color: #dc2626; }
.def3-del:hover { background: rgba(220, 38, 38, .12); }

/* ── Sağ liste ── */
.def3-list { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.def3-search {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; position: sticky; top: 0; z-index: 5;
}
.def3-search input[type="search"] {
    flex: 1; padding: 9px 12px;
    border: 1.5px solid var(--border); border-radius: var(--radius-sm);
    font-size: .95rem; background: var(--bg); color: var(--text);
}
.def3-search input[type="search"]:focus { border-color: var(--primary); background: var(--card); }
.def3-search input[type="search"]:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.def3-showoff { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); white-space: nowrap; }

/* Bölüm sekmeleri — tıklanan başlığın içeriği altta listelenir */
.def3-tabs {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 8px; position: sticky; top: 58px; z-index: 4;
}
.def3-tab {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 999px;
    background: var(--surface-2, var(--bg)); border: 1.5px solid transparent;
    font: inherit; font-size: .84rem; font-weight: 700; color: var(--text);
    cursor: pointer; transition: background .12s, border-color .12s, color .12s;
}
.def3-tab:hover { border-color: var(--primary); background: var(--primary-soft, rgba(29, 108, 240, .1)); }
.def3-tab.active { background: var(--primary); color: #fff; }
.def3-tab-count {
    font-size: .7rem; font-weight: 800;
    background: rgba(0,0,0,.08); padding: 1px 8px; border-radius: 999px;
}
.def3-tab.active .def3-tab-count { background: rgba(255,255,255,.25); }

/* Bölüm panelleri: yalnız aktif sekme görünür; arama tümünü tarar */
.def3-sec { display: none; padding: 0; overflow: hidden; }
.def3-sec.active { display: block; }
.def3-sec.search-show { display: block; }
.def3-sec.search-hide { display: none; }
.def3-sec-body { padding: 8px 12px 12px; }

/* Tür grubu */
.def3-tgroup { margin-top: 8px; }
.def3-tgroup-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 5px 2px; font-size: .78rem; font-weight: 700; color: var(--muted);
    text-transform: uppercase; letter-spacing: .03em;
}
.def3-tgroup-add {
    background: none; border: 1px dashed var(--border); border-radius: 999px;
    padding: 2px 10px; font-size: .72rem; font-weight: 700;
    color: var(--primary); cursor: pointer;
}
.def3-tgroup-add:hover { border-color: var(--primary); background: #eff6ff; }
.def3-empty-type { font-size: .78rem; padding: 4px 2px 8px; }

/* Satır */
.def3-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    width: 100%; padding: 9px 10px; margin-top: 4px;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius-sm);
    cursor: pointer; text-align: left; font: inherit;
    transition: border-color .12s, background .12s;
}
.def3-row:hover { border-color: var(--primary); background: #f8fafc; }
.def3-row.sel { border-color: var(--primary); background: #eff6ff; box-shadow: 0 0 0 1px var(--primary); }
.def3-row.off .def3-row-name { color: var(--muted); text-decoration: line-through; }
.def3-row-name {
    font-weight: 600; font-size: .9rem; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.def3-row-meta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.def3-chip {
    font-size: .68rem; font-weight: 700; color: var(--muted);
    background: #f1f5f9; padding: 2px 8px; border-radius: 999px; white-space: nowrap;
}
.def3-chip-dara { color: #92400e; background: #fef3c7; }
.def3-dot { width: 9px; height: 9px; border-radius: 50%; background: #cbd5e1; }
.def3-dot.on { background: #22c55e; }

/* Operasyon salt-okunur çipler */
.def3-noresult { text-align: center; padding: 24px; }

/* Mobil / tablet: tek kolon, panel üstte */
@media (max-width: 899px) {
    .def3-layout { grid-template-columns: 1fr; }
    .def3-panel { position: static; }
    .def3-search { position: static; }
    .def3-tabs { position: static; }
    .def3-field input, .def3-field select { font-size: 16px; }
    .def3-search input[type="search"] { font-size: 16px; }
}

/* ── Pallet form — bottom add button ── */
.pallet-add-bottom {
    display: block; width: 100%; margin-top: 10px;
    padding: 12px; font-size: .95rem; text-align: center;
    border-radius: var(--radius); cursor: pointer;
}

/* ═══════════════════════════════════════════
   HESAP MODÜLÜ STİLLERİ
═══════════════════════════════════════════ */

.hesap-type-badge { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: .72rem; color: #fff; font-weight: 600; }
.text-green { color: #166534; }
.text-red   { color: #991b1b; }

.record-card-firma { font-size: .82rem; color: var(--muted); }
.record-card-tarih { font-size: .8em; font-weight: 400; color: var(--muted); }

/* ── Toplu Giriş Paneli ── */
.toplu-panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #f8fafc;
    padding: 10px 12px;
    margin: 0 0 12px;
}
.toplu-panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}
.toplu-tablo-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 4px;
}
.toplu-tablo {
    border-collapse: collapse;
    min-width: 600px;
    width: 100%;
    font-size: .88rem;
}
.toplu-tablo th {
    background: #e8edf2;
    padding: 5px 7px;
    text-align: left;
    font-weight: 600;
    font-size: .8rem;
    white-space: nowrap;
    border-bottom: 2px solid var(--border);
}
.toplu-tablo td {
    padding: 3px 4px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}
.tp-no-td { text-align: center; width: 32px; }
.tp-no { color: var(--muted); font-size: .8rem; }
.tp-cell {
    width: 100%;
    padding: 5px 7px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: .88rem;
    background: transparent;
    box-sizing: border-box;
}
.tp-cell:focus {
    border-color: var(--primary);
    background: #fff;
    outline: none;
}
.toplu-tablo input.tp-cell { min-width: 80px; }
.toplu-tablo select.tp-cell { min-width: 120px; }
.tp-num { text-align: right; white-space: nowrap; font-size: .82rem; color: var(--muted); padding-right: 8px; }
/* Sayısal sütun başlıkları da sağa dayalı olsun (th kuralı text-align:left eziyordu) */
.toplu-tablo th.tp-num { text-align: right; padding-right: 8px; }
.tp-del { opacity: .5; }
.tp-del:hover { opacity: 1; }
@media (max-width: 767px) {
    .tp-cell { font-size: 16px; }
}

/* ── Excel Import Paneli ── */
.excel-drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    color: var(--muted);
    transition: border-color .2s, background .2s;
    margin-bottom: 2px;
}
.excel-drop-zone span { font-size: .95rem; font-weight: 600; color: var(--text); }
.excel-drop-zone small { font-size: .78rem; }
.excel-drop-zone:hover,
.excel-drop-zone.drag-over { border-color: var(--primary); background: #eff6ff; }

.excel-bulk-section {
    background: #f0f4ff;
    border: 1px solid #c7d7f5;
    border-radius: var(--radius);
    padding: 10px 12px;
    margin-top: 10px;
}
.excel-bulk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 8px;
    margin-top: 8px;
}
.excel-bulk-grid label {
    display: flex;
    flex-direction: column;
    font-size: .78rem;
    color: var(--muted);
    gap: 3px;
}
.excel-bulk-grid select,
.excel-bulk-grid input {
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .88rem;
    background: #fff;
}
@media (max-width: 767px) {
    .excel-bulk-grid { grid-template-columns: repeat(2, 1fr); }
    .excel-bulk-grid select,
    .excel-bulk-grid input { font-size: 16px; }
}

/* ── Yapıştır Paneli (Excel sütunu kopyala/yapıştır) ── */
.yp-cols {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
}
.yp-cols.yp-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1023px) {
    .yp-cols.yp-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.yp-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.yp-col-head {
    font-size: .8rem; font-weight: 700; color: var(--text);
}
.yp-ops {
    font-size: .7rem; font-weight: 600; color: var(--muted);
    background: rgba(0,0,0,.05); border-radius: 999px; padding: 1px 7px; margin-left: 4px;
}
.yp-ta {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    padding: 8px 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .9rem;
    line-height: 1.5;
    min-height: 120px;
}
.yp-ta:focus { border-color: var(--primary); outline: none; box-shadow: var(--ring); }
.yp-col-info { font-size: .75rem; color: var(--muted); }
.yp-hint {
    font-size: .78rem; color: var(--muted);
    margin: 8px 0 0; line-height: 1.45;
}
.yp-uyari {
    margin-top: 10px; padding: 8px 10px;
    border: 1px solid #f0c14b; border-left-width: 4px;
    border-radius: var(--radius-sm);
    background: #fff8e6; color: #7a5300;
    font-size: .8rem; line-height: 1.5;
}
/* Önizleme yalnız 5 dar sütun — mobilde yatay kaydırma gerekmesin */
.yp-onizleme { min-width: 0; }
.yp-onizleme td { padding: 4px 7px; }
.yp-bos { color: var(--muted); }
.yp-size-td { font-size: .82rem; }
.yp-satir-hata td { background: #fdecec; }
.yp-satir-atlandi td { background: #f4f5f7; font-size: .78rem; font-style: italic; }
.yp-ozet {
    display: flex; flex-wrap: wrap; gap: 6px 16px;
    margin-top: 6px; padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: #eef4ff; border: 1px solid #c7d7f5;
    font-size: .8rem; color: var(--muted);
}
.yp-ozet strong { color: var(--text); font-size: .9rem; }
.yp-mode-row {
    display: flex; flex-wrap: wrap; gap: 8px 18px;
    margin-top: 10px;
}
.yp-mode {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .82rem; color: var(--text); cursor: pointer;
}
.yp-mode input { width: 18px; height: 18px; margin: 0; accent-color: var(--primary); }
.yp-uygula { margin-top: 10px; min-height: 44px; font-size: .95rem; }
.yp-uygula[disabled] { opacity: .5; cursor: not-allowed; }
/* Toplu Düzenle: yapıştırma bildirimi */
.tp-paste-flash { color: var(--primary) !important; font-weight: 700; }

@media (max-width: 767px) {
    /* Mobil: sütunlar alt alta, yazı 16px (iOS zoom önleme), dokunma hedefleri büyük */
    .yp-cols,
    .yp-cols.yp-cols-4 { grid-template-columns: 1fr; gap: 12px; }
    .yp-ta { font-size: 16px; min-height: 140px; }
    .yp-uygula { width: 100%; min-height: 50px; font-size: 1rem; border-radius: 12px; }
    .yp-mode-row { flex-direction: column; gap: 10px; }
    .yp-mode { min-height: 32px; }
    .yp-ozet { gap: 4px 12px; }
}

@media (max-width: 767px) {
    .pc-only  { display: none !important; }
}
@media (min-width: 1024px) {
    .mobile-only { display: none !important; }
}

/* =========================================================
   Stok Takip (stok.php)
   ========================================================= */
.stok-filter-form    { display: flex; flex-direction: column; gap: 10px; }
.stok-filter-row     { display: flex; flex-wrap: wrap; gap: 10px; }
.stok-filter-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stok-fg       { flex: 1; min-width: 140px; }
.stok-fg-wide  { flex: 1.5; min-width: 150px; }
.stok-fg-check { flex: 0 0 auto; display: flex; align-items: flex-end; padding-bottom: 2px; }
.stok-fg-check-label {
    display: flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--text);
    white-space: nowrap; cursor: pointer; user-select: none;
}
.stok-fg-check-label input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--primary); }

.stok-ozet-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}
@media (min-width: 640px)  { .stok-ozet-grid-6 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .stok-ozet-grid-6 { grid-template-columns: repeat(6, 1fr); } }

.stok-kart {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 12px 12px;
    box-shadow: var(--shadow);
    display: flex; flex-direction: column; gap: 3px;
    min-width: 0;
}
.stok-kart-label {
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; color: var(--muted);
}
.stok-kart-val {
    font-size: 1.35rem; font-weight: 800; line-height: 1.15;
    word-break: break-all;
}
.stok-kart-val small { font-size: .72rem; font-weight: 500; color: var(--muted); }
.stok-kart-sub       { font-size: .72rem; color: var(--muted); }

.stok-kart-gelen   { border-top: 3px solid var(--success); }
.stok-kart-yukleme { border-top: 3px solid var(--primary); }
.stok-kart-fire    { border-top: 3px solid #f97316; }
.stok-kart-kalan   { border-top: 3px solid #7c3aed; }
.stok-kart-sayim   { border-top: 3px solid #0891b2; }
.stok-kart-fark    { border-top: 3px solid var(--muted); }
/* legacy */

.stok-kart-gelen   .stok-kart-val { color: var(--success); }
.stok-kart-yukleme .stok-kart-val { color: var(--primary); }
.stok-kart-fire    .stok-kart-val { color: #f97316; }
.stok-kart-kalan   .stok-kart-val { color: #7c3aed; }
.stok-kart-sayim   .stok-kart-val { color: #0891b2; }

.stok-negatif { color: var(--danger)  !important; }
.stok-pozitif { color: var(--success) !important; }
.stok-sayim-gir { color: var(--muted); font-weight: 400; font-size: 1rem; }

.stok-sayim-form  { margin-top: 4px; }
.stok-sayim-label {
    display: flex; align-items: center; gap: 5px;
    white-space: nowrap; flex-wrap: nowrap;
}
.stok-sayim-input {
    width: 80px !important; padding: 4px 6px !important;
    font-size: .83rem !important; text-align: right; min-width: 0;
}

.stok-badge {
    display: inline-block;
    padding: 2px 8px; border-radius: 999px;
    font-size: .75rem; font-weight: 700; white-space: nowrap;
}
.badge-gelen { background: #d1fae5; color: #065f46; }
.badge-cikan { background: #fee2e2; color: #991b1b; }
.badge-fire  { background: #ffedd5; color: #9a3412; }

.stok-uyari-box {
    background: #fffbeb; border: 1px solid #fcd34d;
    border-radius: var(--radius); padding: 10px 14px;
    margin-bottom: 12px;
}

.stok-info-box {
    background: #f0f7ff; border: 1px solid #bfdbfe;
    border-radius: var(--radius); padding: 10px 14px;
    margin-bottom: 12px; font-size: .83rem; color: #1e40af;
    display: flex; gap: 8px; align-items: flex-start;
}
.stok-info-icon { flex-shrink: 0; }

.stok-table-head {
    padding: 12px 16px 10px;
    border-bottom: 1px solid var(--border);
    display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 8px;
}
.stok-table td, .stok-table th { padding: 8px 10px; }

@media (max-width: 767px) {
    .stok-sayim-input { font-size: 16px !important; }
    .stok-kart-val    { font-size: 1.1rem; }
    .stok-fg, .stok-fg-wide { flex: 1 1 calc(50% - 5px); min-width: 130px; }
    .stok-fg-check { flex: 1 1 100%; padding-bottom: 4px; }
}
@media (max-width: 480px) {
    .stok-fg, .stok-fg-wide { flex: 1 1 100%; }
}
@media (max-width: 599px) { .stok-hide-sm { display: none !important; } }

/* ── Malzeme Hareketleri: aksiyon butonları (Pro-07) ───── */
/* Tablo + mobil kart ortak buton stili. */
.ms-act-btn {
    padding: 3px 9px; font-size: .76rem; border-radius: 5px;
    border: 1px solid transparent; cursor: pointer; line-height: 1.4;
    white-space: nowrap;
}
.ms-act-btn.ms-move-btn { background: var(--primary-light, #e8f0fe); color: var(--primary, #1a73e8); }
.ms-act-btn.ms-edit-btn { background: var(--bg-alt, #f1f3f5); color: var(--text, #222); }
.ms-act-btn.ms-del-btn  { background: #fff5f5; color: var(--danger, #dc2626); }
.mh-act-cell .ms-act-btn { margin: 0 1px; }

/* ── Malzeme Hareketleri: mobil kart görünümü (Pro-07) ─── */
.mh-cards { display: none; }   /* ≥768px: gizli, tablo görünür */

@media (max-width: 767px) {
    .mh-desk  { display: none !important; }   /* mobilde tablo gizli */
    .mh-cards { display: block; padding: 10px; }

    .mh-card {
        border: 1px solid var(--border); border-radius: 9px;
        padding: 11px 13px; margin-bottom: 10px; background: var(--card);
    }
    .mh-card:last-child { margin-bottom: 0; }
    .mh-card-top {
        display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
        margin-bottom: 7px;
    }
    .mh-card-date { font-size: .8rem; color: var(--muted); }
    .mh-card-lock {
        margin-left: auto; font-size: .72rem; color: var(--muted);
        white-space: nowrap;
    }
    .mh-card-main { margin-bottom: 4px; }
    .mh-card-mat  { font-weight: 700; font-size: 1.02rem; line-height: 1.3; }
    .mh-card-meta { font-size: .8rem; color: var(--muted); margin-top: 1px; }
    .mh-card-qty  { font-weight: 800; font-size: 1.25rem; margin: 4px 0 2px; }
    .mh-card-qty small { font-weight: 400; font-size: .8rem; color: var(--muted); }
    .mh-card-details {
        font-size: .8rem; color: var(--text); margin-top: 7px;
        padding-top: 7px; border-top: 1px dashed var(--border);
        display: flex; flex-direction: column; gap: 2px;
    }
    .mh-card-details span { color: var(--muted); }
    .mh-card-note {
        font-size: .76rem; color: var(--muted); margin-top: 8px;
        padding-top: 7px; border-top: 1px dashed var(--border);
    }
    .mh-card-actions {
        display: flex; gap: 7px; flex-wrap: wrap; margin-top: 10px;
        padding-top: 9px; border-top: 1px dashed var(--border);
    }
    .mh-card-actions .ms-act-btn {
        flex: 1 1 auto; min-height: 40px; font-size: .82rem;
        display: inline-flex; align-items: center; justify-content: center;
    }
}

/* ── Malzeme Stok ana sayfa: tür grupları arası ayraç ───── */
.ms-type-sep { height: 1px; margin: 10px 0; background: var(--border); }
.ms-type-sep-row td { padding: 0 !important; border: none !important; }
.ms-type-sep-row .ms-type-sep { margin: 6px 0; }

/* ── Malzeme Stok ana sayfa: mobil kart görünümü (Pro-09) ─ */
.ms-stock-cards { display: none; }   /* ≥768px: gizli, tablo görünür */

@media (max-width: 767px) {
    .ms-stock-desk  { display: none !important; }   /* mobilde tablo gizli */
    .ms-stock-cards { display: block; padding: 10px; }

    .ms-scard {
        border: 1px solid var(--border); border-left-width: 4px;
        border-radius: 9px; padding: 11px 13px; margin-bottom: 10px;
        background: var(--card);
    }
    .ms-scard:last-child { margin-bottom: 0; }
    /* Durum renk şeridi (sol kenar) */
    .ms-scard-negatif { border-left-color: var(--danger, #dc2626); }
    .ms-scard-stokta  { border-left-color: var(--success, #16a34a); }
    .ms-scard-sifir   { border-left-color: var(--muted, #9ca3af); }

    .ms-scard-top {
        display: flex; align-items: flex-start; justify-content: space-between;
        gap: 8px; margin-bottom: 5px;
    }
    .ms-scard-name { font-weight: 700; font-size: 1.02rem; line-height: 1.3; }
    .ms-scard-passive {
        font-size: .64rem; font-weight: 700; color: var(--muted);
        border: 1px solid var(--border); border-radius: 4px; padding: 0 4px; margin-left: 4px;
        vertical-align: middle;
    }
    .ms-scard-meta { font-size: .8rem; color: var(--muted); margin-bottom: 4px; }
    .ms-scard-kalan { font-weight: 800; font-size: 1.5rem; margin: 2px 0 6px; }
    .ms-scard-kalan small { font-weight: 400; font-size: .8rem; color: var(--muted); }
    .ms-scard-grid {
        display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
        padding: 7px 0; border-top: 1px dashed var(--border);
        border-bottom: 1px dashed var(--border); margin-bottom: 9px;
    }
    .ms-scard-grid div { display: flex; flex-direction: column; }
    .ms-scard-grid span { font-size: .7rem; color: var(--muted); }
    .ms-scard-grid b { font-size: .9rem; }
    .ms-scard-actions { display: flex; gap: 8px; }
    .ms-scard-actions .btn { flex: 1 1 auto; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; }
}

/* ── Sayım Kaydet formu ────────────────────────────────── */
.sc-kaydet-card   { margin-top: 12px; }
.sc-kaydet-head   { padding: 12px 16px 10px; border-bottom: 1px solid var(--border); display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.sc-kaydet-ozet   { font-size: .83rem; color: var(--muted); margin-left: 6px; }
.sc-kaydet-form   { padding: 12px 16px; }
.sc-kaydet-row    { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.sc-kaydet-btn-wrap { flex: 0 0 auto; }

/* ── Geçmiş sayım fark badge ───────────────────────────── */
.sc-fark-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 8px; border-radius: 999px;
    font-size: .8rem; font-weight: 700; white-space: nowrap;
}
.sc-fark-badge small { font-weight: 500; font-size: .72rem; }
.sc-fark-fazla { background: #d1fae5; color: #065f46; }
.sc-fark-eksik { background: #fee2e2; color: #991b1b; }
.sc-fark-sifir { background: #f3f4f6; color: #6b7280; }

@media (max-width: 767px) {
    .sc-kaydet-row { gap: 8px; }
    .sc-kaydet-btn-wrap { flex: 1 1 100%; }
    .sc-kaydet-btn-wrap .btn { width: 100%; }
}

/* ── Stok Doğruluk Kontrolü Paneli ──────────────────────── */
.dkk-panel {
    border: 1px solid var(--border); border-radius: var(--radius);
    background: #fff; margin-bottom: 14px; overflow: hidden;
}
.dkk-panel-ok { border-color: #bbf7d0; background: #f0fdf4; }
.dkk-panel-head {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px;
    padding: 10px 14px; border-bottom: 1px solid var(--border);
    background: #f9fafb;
}
.dkk-panel-ok .dkk-panel-head { border-bottom: none; background: transparent; }
.dkk-panel-title { font-weight: 700; font-size: .9rem; }
.dkk-panel-badges { display: flex; gap: 5px; flex-wrap: wrap; }

.dkk-badge {
    display: inline-block; padding: 2px 9px; border-radius: 999px;
    font-size: .76rem; font-weight: 700; white-space: nowrap;
}
.dkk-badge-kritik { background: #fee2e2; color: #991b1b; }
.dkk-badge-orta   { background: #ffedd5; color: #9a3412; }
.dkk-badge-dusuk  { background: #fef9c3; color: #854d0e; }
.dkk-badge-ok     { background: #d1fae5; color: #065f46; }

.dkk-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.dkk-table th { padding: 8px 12px; text-align: left; font-size: .78rem; color: var(--muted); border-bottom: 1px solid var(--border); }
.dkk-table td { padding: 8px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.dkk-table tr:last-child td { border-bottom: none; }
.dkk-row-kritik { background: #fff8f8; }
.dkk-row-orta   { background: #fffcf5; }
.dkk-label  { font-weight: 600; }
.dkk-detail { font-size: .8rem; color: var(--muted); }
.dkk-count  { font-weight: 700; font-size: 1rem; color: var(--danger); }

.dkk-card-list { display: flex; flex-direction: column; gap: 0; }
.dkk-card {
    padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.dkk-card:last-child { border-bottom: none; }
.dkk-card-kritik { border-left: 3px solid #f87171; }
.dkk-card-orta   { border-left: 3px solid #fb923c; }
.dkk-card-dusuk  { border-left: 3px solid #facc15; }
.dkk-card-head   { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.dkk-card-count  { font-size: .82rem; font-weight: 700; color: var(--danger); }
.dkk-card-label  { font-weight: 600; font-size: .88rem; margin-bottom: 3px; }
.dkk-card-detail { font-size: .8rem; color: var(--muted); margin-bottom: 8px; }
.dkk-card-link   { margin-top: 2px; }

/* ── Detaylı Veri Kalite Raporu ─────────────────────────── */
.dkk-detail-wrap  { margin-bottom: 14px; }
.dkk-detail-bar   { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.dkk-toggle-btn   { background: #f3f4f6; border: 1px solid var(--border); color: #374151; font-weight: 600; }
.dkk-toggle-btn:hover { background: #e5e7eb; }

.dkk-detail-section { display: flex; flex-direction: column; gap: 12px; }

.dkk-detail-group {
    border: 1px solid var(--border); border-radius: var(--radius);
    background: #fff; overflow: hidden;
}
.dkk-detail-group-kritik { border-left: 3px solid #f87171; }
.dkk-detail-group-orta   { border-left: 3px solid #fb923c; }
.dkk-detail-group-dusuk  { border-left: 3px solid #facc15; }

.dkk-detail-group-head {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    padding: 9px 14px; background: #f9fafb;
    border-bottom: 1px solid var(--border);
}
.dkk-detail-group-title { font-weight: 600; font-size: .88rem; flex: 1; min-width: 160px; }
.dkk-detail-group-total { font-size: .82rem; color: var(--muted); }
.dkk-ilk20 { font-style: italic; }

.dkk-detail-table td, .dkk-detail-table th { padding: 7px 10px; }
.dkk-id { font-weight: 700; color: var(--muted); font-size: .82rem; }

/* ── Çıkış Nedeni Badge ──────────────────────────────────── */
.cikis-nedeni-badge {
    display: inline-block;
    padding: 2px 9px; border-radius: 999px;
    font-size: .78rem; font-weight: 700; white-space: nowrap;
    background: #ffedd5; color: #9a3412;
    border: 1px solid #fed7aa;
}

/* ── Zorunlu alan yıldızı ────────────────────────────────── */
.req { color: #ef4444; font-weight: 700; margin-left: 2px; }

/* ── Hızlı Düzelt satır içi formu ───────────────────────── */
.hd-fix-cell { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.hd-form { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.hd-select, .hd-input {
    font-size: .78rem; padding: 4px 6px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: #fff; color: var(--text);
    max-width: 130px; height: 30px; box-sizing: border-box;
}
.hd-input { width: 120px; }
.hd-save-btn { padding: 4px 9px !important; height: 30px; min-width: 0; }

/* ── Malzeme Stok ────────────────────────────────────────── */
.badge-duzeltme { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }

.ms-form-wrap { }
.ms-form-tabs {
    display: flex; gap: 0; margin-bottom: -1px; position: relative; z-index: 1;
}
.ms-tab-btn {
    padding: 9px 20px; font-size: .9rem; font-weight: 600; cursor: pointer;
    border: 1px solid var(--border); border-bottom: none; border-radius: var(--radius) var(--radius) 0 0;
    background: var(--surface-2); color: var(--muted);
    transition: background .15s, color .15s;
}
.ms-tab-btn:hover { background: #f0f4ff; color: var(--primary); }
.ms-tab-btn.ms-tab-active { background: #fff; color: var(--primary); border-color: var(--border); }

.ms-form-card { border-radius: 0 var(--radius) var(--radius) var(--radius); margin-top: 0; }

.ms-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 14px;
}
.ms-form-full { grid-column: 1 / -1; }
@media (max-width: 599px) {
    .ms-form-grid { grid-template-columns: 1fr; }
    .ms-form-full { grid-column: 1; }
}
@media (min-width: 1024px) {
    .ms-form-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Pro-10: Kaydet butonu — form alanlarının hemen altında, masaüstünde
   sağa yaslı (stok/son hareket panelleri kalabalıklaşınca altta kalmasın) ── */
.ms-submit-row { margin-top: 14px; display: flex; justify-content: flex-end; }
@media (max-width: 767px) { .ms-submit-row { justify-content: stretch; } }

/* ── Sprint 33: Giriş/Sevk/Düzeltme açık turuncu panel ── */
.ms-action-card {
    background: #fff7ed;
    border: 1px solid #fed7aa;
}
.ms-form-tabs .ms-tab-btn.ms-tab-active {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #b45309;
}
/* Inputlar beyaz kalsın — okunabilirlik için */
.ms-action-card .form-control { background: #fff; }

/* ── Pro-08: Hızlı tekrar kartı ───────────────────────── */
.ms-quick-card {
    border: 1px solid var(--success, #16a34a);
    background: var(--success-soft, #f0fdf4);
    margin-bottom: 14px;
}
.ms-quick-head { font-weight: 700; font-size: .95rem; margin-bottom: 10px; color: var(--success-dark, #166534); }
.ms-quick-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ── Pro-08: Mobil işlem formu konforu ────────────────── */
@media (max-width: 767px) {
    .ms-form-tabs { flex-wrap: wrap; gap: 4px; }
    .ms-tab-btn { flex: 1 1 auto; padding: 10px 12px; text-align: center; border-radius: var(--radius); }
    .ms-action-card .btn[type="submit"] { width: 100%; min-height: 46px; font-size: 1rem; }
    .ms-quick-btns .btn { flex: 1 1 100%; min-height: 44px; }
}

/* ── Pro-09: Seçili malzeme için güncel stok paneli ───── */
.ms-stok-info {
    margin-top: 12px; padding: 8px 12px; border-radius: var(--radius);
    background: #f0f9ff; border: 1px solid #bae6fd;
}
.ms-stok-satir { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.ms-stok-chip { font-size: .84rem; color: #0369a1; }
.ms-stok-chip b { font-weight: 600; }
.ms-stok-chip.ms-stok-yok { color: var(--muted); font-style: italic; }

/* ── Pro-09: Seçili malzeme için son giriş/sevk hareketleri ── */
.ms-son-hareket {
    margin-top: 10px; padding: 8px 12px; border-radius: var(--radius);
    background: var(--surface-2, #f8fafc); border: 1px solid var(--border);
}
.ms-son-hareket-baslik { font-weight: 600; font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.ms-son-hareket-liste { display: flex; flex-direction: column; gap: 4px; }
.ms-son-hareket-satir {
    display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: .82rem;
    padding: 4px 0; border-bottom: 1px dashed var(--border);
}
.ms-son-hareket-satir:last-child { border-bottom: none; }
.ms-son-hareket-satir span:first-child { color: var(--muted); min-width: 74px; }
.ms-son-hareket-satir span:nth-child(2) { font-weight: 600; }

/* ── Pro-08B: Hızlı tekrar kartı detay satırı ─────────── */
.ms-quick-detail {
    display: flex; gap: 14px; flex-wrap: wrap;
    font-size: .82rem; color: var(--text); margin-bottom: 10px;
}
.ms-quick-detail span { display: inline-flex; gap: 4px; align-items: center; }

/* ── Sprint 33C: Stok kategorisi rozeti ── */
.ms-cat-badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: .7rem; font-weight: 600; white-space: nowrap; }
.ms-cat-kasa  { background: #dbeafe; color: #1e40af; }
.ms-cat-palet { background: #ede9fe; color: #6d28d9; }
.ms-cat-sarf  { background: #dcfce7; color: #166534; }
.ms-cat-diger { background: #f1f5f9; color: #475569; }

/* ── Sprint 33: Hareket düzenle modalı ── */
.ms-edit-btn {
    padding: 2px 7px; font-size: .8rem; line-height: 1.2;
    background: #eff6ff; color: var(--primary); border: 1px solid #bfdbfe;
    border-radius: 4px; cursor: pointer; margin-right: 4px;
}
.ms-edit-btn:hover { background: #dbeafe; }
.ms-edit-overlay {
    position: fixed; inset: 0; background: rgba(15, 23, 42, .55);
    z-index: 1000; display: none; align-items: flex-start; justify-content: center;
    padding: 24px 16px; overflow-y: auto;
}
.ms-edit-overlay.open { display: flex; }
.ms-edit-modal {
    background: #fff; border-radius: var(--radius); width: 100%; max-width: 640px;
    margin: auto; box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
}
.ms-edit-modal-wide { max-width: 780px; }
.ms-edit-head {
    padding: 14px 18px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.ms-edit-head h3 { margin: 0; font-size: 1rem; }
.ms-edit-close {
    background: none; border: none; font-size: 1.6rem; line-height: 1;
    cursor: pointer; color: var(--muted); padding: 0 4px;
}
.ms-edit-close:hover { color: var(--text, #111); }
.ms-edit-body { padding: 16px 18px; }
.ms-edit-foot {
    padding: 12px 18px; border-top: 1px solid var(--border);
    display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap;
}
@media (max-width: 599px) {
    .ms-edit-overlay { padding: 0; }
    .ms-edit-modal { max-width: 100%; min-height: 100%; border-radius: 0; }
    .ms-edit-foot .btn { flex: 1; }
}

/* ── Kantar: Çok-tip Kasa/Palet Satırları ── */
.kp-section { margin-top: 8px; }
.kp-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.kp-section-title { font-size: .85rem; font-weight: 600; color: var(--text-muted, #6b7280); text-transform: uppercase; letter-spacing: .04em; }
.kp-row-list { display: flex; flex-direction: column; gap: 6px; }
.kp-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; background: var(--bg-subtle, #f9fafb); border: 1px solid var(--border, #e5e7eb); border-radius: 6px; padding: 6px 8px; }
.kp-row .kp-cinsi { flex: 1 1 140px; min-width: 120px; font-size: .9rem; }
.kp-row .kp-sayisi { width: 80px; flex-shrink: 0; }
.kp-calc { font-size: .82rem; color: var(--text-muted, #6b7280); white-space: nowrap; }
.kp-toplam-val { color: var(--text, #111); }
.kp-del-btn { background: none; border: 1px solid #d1d5db; border-radius: 4px; color: #9ca3af; cursor: pointer; font-size: .75rem; padding: 2px 6px; flex-shrink: 0; }
.kp-del-btn:hover { border-color: #ef4444; color: #ef4444; }
.kp-total-row { font-size: .82rem; color: var(--text-muted, #6b7280); text-align: right; margin-top: 4px; }
.kp-total-row strong { color: var(--text, #111); }

/* ── Excel Stok Aktarımı ───────────────────────────────── */
.imp-steps-bar {
    display: flex; gap: 0; margin-bottom: 20px;
    border-bottom: 2px solid var(--border);
}
.imp-step-ind {
    padding: 8px 18px; font-size: .85rem; font-weight: 600;
    color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: color .15s, border-color .15s;
}
.imp-step-ind.active { color: var(--primary); border-color: var(--primary); }
.imp-step-ind.done   { color: var(--success); }

.imp-step { animation: fadeIn .15s ease; }

.imp-dropzone {
    border: 2px dashed var(--border-strong); border-radius: var(--radius);
    padding: 40px 24px; text-align: center; cursor: pointer;
    background: var(--bg); transition: border-color .2s, background .2s;
    margin-bottom: 12px;
}
.imp-dropzone.imp-drag-over {
    border-color: var(--primary); background: var(--primary-soft);
}
.imp-dz-icon  { font-size: 2.5rem; margin-bottom: 8px; }
.imp-dz-text  { font-size: 1.05rem; font-weight: 600; margin-bottom: 4px; }
.imp-dz-sub   { color: var(--muted); font-size: .88rem; margin-bottom: 14px; }

.imp-msg {
    padding: 10px 14px; border-radius: var(--radius-sm);
    background: var(--success-soft); color: var(--success);
    font-size: .9rem; margin-top: 8px;
}

.imp-hint { font-size: .85rem; color: var(--muted); margin: 0 0 12px; }

.imp-col-map-tbl td, .imp-col-map-tbl th { vertical-align: middle; }
.imp-sample { color: var(--muted); font-size: .82rem; max-width: 200px; word-break: break-all; }

.imp-urun-tbl td, .imp-urun-tbl th { vertical-align: middle; }

.imp-row-warn { background: var(--warn-soft) !important; }

.imp-warn {
    background: var(--warn-soft); border: 1px solid #fde68a;
    border-radius: var(--radius-sm); padding: 10px 14px;
    font-size: .88rem; color: var(--warn); margin: 12px 0;
}

.imp-nav {
    display: flex; gap: 10px; align-items: center;
    margin-top: 20px; flex-wrap: wrap;
}
.imp-nav .btn-primary { margin-left: auto; }

/* Form bölümü kartı — maliyet_view.php / maliyet_form.php kullanır */
.form-section       { background:var(--card); border:1px solid var(--border); border-radius:10px; padding:18px 20px; margin-bottom:16px; }
.form-section-title { font-size:.95rem; font-weight:700; margin-bottom:14px; color:var(--text); border-bottom:1px solid var(--border); padding-bottom:8px; }

/* =========================================================
   Sprint 17 — Yükleme Kayıtları İyileştirme
   ========================================================= */

/* Sayfalama */
.rec-pagination {
    display:flex; align-items:center; gap:10px;
    margin-top:16px; flex-wrap:wrap;
}
.rec-pagination-info { color:var(--muted); font-size:.85rem; flex:1; }
.rec-pagination-btns { display:flex; gap:6px; flex-wrap:wrap; }
.rec-pg-ellipsis { color:var(--muted); padding:0 4px; align-self:center; }

/* Mobil kart — dara/net satırı */
.record-card-dara-net {
    display:flex; gap:8px; padding:4px 8px;
    background:var(--primary-soft);
    border-radius:var(--radius-sm);
    margin-bottom:6px;
}
.rcdn-item {
    display:flex; flex-direction:column;
    align-items:center; flex:1; font-size:.82rem;
}
.rcdn-item span { color:var(--muted); font-size:.72rem; }
.rcdn-item strong { font-size:.9rem; }
.rcdn-net strong { font-size:1.05rem; font-weight:700; color:var(--primary); }

.record-card.durum-islendi .record-card-dara-net  { background:rgba(245,158,11,.12); }
.record-card.durum-islendi  .rcdn-net strong      { color:#92400e; }
.record-card.durum-yuklendi .record-card-dara-net { background:rgba(16,185,129,.12); }
.record-card.durum-yuklendi .rcdn-net strong      { color:#065f46; }

/* Filtre satırı ayraç */
.pill-sep { width:1px; background:var(--border-strong); margin:0 2px; align-self:stretch; }

/* =========================================================
   Sprint 18B — Ürün Stok Kullanılabilirlik
   ========================================================= */

/* Hareket tipi filtresi satırı */
.stok-mv-filter-row {
    display:flex; flex-wrap:wrap; gap:6px;
    margin:8px 0 14px;
}

/* Sayfalama */
.stok-pg {
    display:flex; align-items:center; flex-wrap:wrap;
    gap:10px; padding:12px 16px; border-top:1px solid var(--border);
}
.stok-pg-info { color:var(--muted); font-size:.84rem; flex:1; min-width:120px; }
.stok-pg-btns { display:flex; gap:6px; flex-wrap:wrap; }
.stok-pg-ellipsis { color:var(--muted); padding:0 4px; align-self:center; }

/* Teorik Kalan kart durumları */
.stok-kart-kalan-negatif { border-top-color:var(--danger) !important; background:rgba(239,68,68,.07); }
.stok-kart-kalan-sifir   { border-top-color:#f59e0b !important; background:rgba(245,158,11,.07); }

.stok-kalan-negatif { color:var(--danger)  !important; }
.stok-kalan-sifir   { color:#b45309 !important; }
.stok-kalan-pozitif { color:#7c3aed; }

/* Depo boş kantar uyarısı */
.stok-uyari-depo {
    background:rgba(239,68,68,.08);
    border:1px solid rgba(239,68,68,.3);
    border-radius:var(--radius);
    padding:10px 14px;
    font-size:.88rem;
    color:#7f1d1d;
}
.stok-uyari-depo a { color:#b91c1c; font-weight:600; }

@media (max-width:599px) {
    .stok-pg { flex-direction:column; align-items:flex-start; }
    .stok-pg-info { font-size:.78rem; }
}

/* ── Sprint 19: Malzeme Stok negatif uyarı + ozet vurgusu ── */
.ms-neg-uyari {
    background:rgba(239,68,68,.07);
    border:1px solid rgba(239,68,68,.25);
    border-radius:var(--radius);
    padding:12px 16px;
    margin-bottom:14px;
}
.ms-neg-uyari-head { font-weight:600; color:#7f1d1d; font-size:.9rem; margin-bottom:8px; }
.ms-row-negatif { background:rgba(239,68,68,.05); }
.ms-row-negatif td { border-bottom-color:rgba(239,68,68,.15); }

/* =========================================================
   SPRINT 31 — MASAÜSTÜ / TABLET KURUMSAL GÖRÜNÜM KATMANI
   ---------------------------------------------------------
   Bu blok YALNIZCA ≥900px ekranları etkiler. Mobil (≤767px)
   kurallar burada OVERRIDE EDİLMEZ; mevcut mobil görünüm
   olduğu gibi korunur. Tüm sayfaların paylaştığı yapı taşları
   (container, page-head, card, data-table, home-card, topbar,
   filter pills, özet grid) üzerinden ortak bir "dashboard"
   kalitesi sağlanır.
   ========================================================= */

/* ---- Tablet ve üzeri (≥900px) ---- */
@media (min-width: 900px) {

    /* — Sayfa iskeleti: daha ferah yatay nefes — */
    .container { padding-left: 28px; padding-right: 28px; }

    /* — Sayfa başlığı: kurumsal başlık bandı — */
    .page-head {
        margin-bottom: 20px;
        padding-bottom: 16px;
        border-bottom: 1px solid var(--border);
        align-items: center;
    }
    .page-head h1 { font-size: 1.7rem; letter-spacing: -.01em; }

    /* — Kartlar biraz daha ferah — */
    .card { padding: 20px 22px; }
    .card-head { margin-bottom: 16px; }

    /* — Tablo: beyaz panel + dashboard hissi — */
    .table-wrap { box-shadow: var(--shadow); }
    .data-table { font-size: .9rem; }
    .data-table th {
        padding: 13px 14px;
        background: #f4f7fb;
        color: #4a5365;
        border-bottom: 2px solid var(--border-strong);
    }
    .data-table td { padding: 12px 14px; }
    .data-table tbody tr { transition: background .12s ease; }
    .data-table tbody tr:hover td { background: var(--primary-soft); }

    /* — Filtre pill'leri: biraz daha dokunulabilir/okunur — */
    .filter-pills { gap: 8px; margin-bottom: 18px; }
    .pill { padding: 7px 14px; font-size: .88rem; }

    /* — Buton grupları desktopta daha derli toplu — */
    .page-head-actions { gap: 10px; }

    /* — Ana ekran: kurumsal tile ızgarası — */
    .home-grid { gap: 16px; }
    .home-card {
        min-height: 132px;
        padding: 22px 18px 18px;
        border-color: var(--border);
    }
    .home-card-icon {
        width: 68px; height: 68px;
        font-size: 2.2rem;
        box-shadow: inset 0 0 0 1px rgba(20,30,60,.04);
    }
    /* Masaüstünde biraz daha belirgin kalkış — kapsam yukarıdaki
       Dashboard-3D bloğuyla AYNI (.pdks-dashboard-grid hariç). */
    .home-grid:not(.pdks-dashboard-grid) .home-card:hover {
        box-shadow: var(--tile-shadow-hover);
        transform: translateY(-5px) scale(1.015);
        border-color: var(--border-strong);
    }
    /* Sayaç rozeti köşeye sabitlensin — düzenli dursun */
    .home-card-badge {
        position: absolute;
        top: 12px; right: 12px;
        margin: 0;
    }
    /* Bölüm başlığı: daha belirgin ayrım */
    .home-section-title {
        font-size: .74rem;
        padding-top: 14px;
        margin-top: 6px;
    }

    /* — Topbar: linkler arasında daha net ayrım — */
    .topnav a { padding: 8px 16px; }

    /* — Özet/istatistik kartları aynı yükseklikte hizalansın — */
    .stok-ozet-grid > *, .stok-ozet-grid-6 > * { height: 100%; }
}

/* ---- Geniş masaüstü (≥1280px) ---- */
@media (min-width: 1280px) {
    /* Topbar sidebar arkasında kalır (≥900px gizli), max-width sidebar ile çakışmaması için kaldırıldı */
    .topbar-inner { max-width: none; }

    .container { padding-left: 36px; padding-right: 36px; }

    /* Ana ekran kartlarına biraz daha hava */
    .home-card { min-height: 140px; }
}

/* =========================================================
   SPRINT 31B — BUGFIX TAMAMLAMA + TABLET/DESKTOP EK POLİSH
   ========================================================= */

/* ── 1. Tablet (768–1023px): kayıt kartları 2 kolon grid ── */
@media (min-width: 768px) and (max-width: 1023px) {
    .card-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    /* Tablet'te mobil kart başlıkları arasını düzelt */
    .record-card { margin: 0; }
}

/* ── 2. Desktop (≥900px): filtre formu yatay düzen ───────── */
@media (min-width: 900px) {
    /* Tablo durum satırları: hover'da daha belirgin ışıma */
    .data-table tr.tr-islendi:hover > td { background: rgba(245,158,11,.14); }
    .data-table tr.tr-yuklendi:hover > td { background: rgba(16,185,129,.13); }

    /* Ana ekran bölüm başlığı: daha belirgin */
    .home-section-title {
        font-size: .8rem;
        color: #6b7385;
        letter-spacing: .06em;
    }

    /* Topbar: kullanıcı adı biraz daha okunaklı */
    .topnav-user-name { font-size: .87rem; max-width: 160px; }
    .topnav-user-role { font-size: .76rem; max-width: 160px; }
    .topbar-inner { padding: 11px 22px; }
}

/* =========================================================
   SPRINT 32 — MASAÜSTÜ SABİT SOL SIDEBAR NAVİGASYON
   ---------------------------------------------------------
   < 900px  : sidebar GİZLİ, mevcut topbar + bottomnav korunur.
   ≥ 900px  : sidebar görünür, topbar gizlenir, içerik sağa kayar.
   print    : sidebar gizli, içerik tam genişlik.
   ========================================================= */
.desktop-sidebar { display: none; }

@media (min-width: 900px) {
    /* Üst yatay menü sidebar ile değiştirilir */
    .topbar { display: none !important; }
    .bottomnav { display: none !important; }

    .desktop-sidebar {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0; top: 0; bottom: 0;
        width: var(--sb-w, 180px);
        overflow: hidden;   /* v548: kaydırma yalnız .sidebar-nav'da; marka + kullanıcı alanı sabit */
        background: var(--text);
        color: #fff;
        z-index: 100;
        box-shadow: 2px 0 8px rgba(0,0,0,.08);
        border-left: 4px solid var(--depot-accent, transparent);
        transition: border-left-color .2s ease;
    }

    /* Marka */
    .sidebar-brand {
        display: flex; align-items: center; gap: 10px;
        padding: 16px 16px 14px;
        color: #fff; text-decoration: none;
        border-bottom: 2px solid var(--depot-accent, rgba(255,255,255,.08));
        transition: border-bottom-color .2s ease;
    }
    .sidebar-brand:hover { text-decoration: none; }
    .sidebar-tema { position: absolute; top: 17px; right: 14px; width: 32px; height: 32px; z-index: 2; }
    .sidebar-brand-logo { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
    .sidebar-brand-txt { display: flex; flex-direction: column; line-height: 1.2; }
    .sidebar-brand-name { font-weight: 700; font-size: 1rem; }
    .sidebar-brand-sub { font-size: .7rem; color: rgba(255,255,255,.5); }

    /* Menü */
    .sidebar-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 8px 10px; }
    .sidebar-brand, .sidebar-depo, .sidebar-user { flex-shrink: 0; }
    .sidebar-section {
        font-size: .66rem; font-weight: 700; text-transform: uppercase;
        letter-spacing: .08em; color: rgba(255,255,255,.4);
        padding: 12px 8px 5px;
    }
    .sidebar-section:first-child { padding-top: 6px; }

    .sidebar-link {
        display: flex; align-items: center; gap: 9px;
        padding: 8px 10px; margin-bottom: 1px;
        border-radius: var(--radius-sm);
        color: rgba(255,255,255,.82);
        font-size: .88rem; font-weight: 500;
        text-decoration: none;
        border-left: 3px solid transparent;
        transition: background .12s, color .12s;
    }
    .sidebar-link:hover {
        background: rgba(255,255,255,.08);
        color: #fff; text-decoration: none;
    }
    .sidebar-link-icon { font-size: 1rem; width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; text-align: center; flex-shrink: 0; }
    .sidebar-link-icon img { width: 20px; height: 20px; object-fit: contain; display: block; }
    .sidebar-link-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

    /* "Personel Takibi" sidebar ikonu — index.php'nin dashboard kartındaki
       yeşil giriş / kırmızı çıkış 3D ikonunun (.home-card-icon-personel,
       72px) sidebar boyutuna (18px) ölçeklenmiş hâli. Yalnız bu link'i
       etkiler, emoji yerine geçer. */
    .sbi-personel {
        position: relative;
        display: inline-block;
        width: 18px; height: 18px;
        border-radius: 5px;
        overflow: hidden;
        vertical-align: middle;
        background: linear-gradient(145deg, #12633f 0%, #073d2c 58%, #052c22 100%);
    }
    .sbi-personel::after {
        content: "";
        position: absolute; inset: 0; border-radius: inherit;
        box-shadow: inset 0 1px 1px rgba(255,255,255,.22), inset 0 -1px 2px rgba(0,0,0,.3);
        pointer-events: none;
    }
    .sbi-personel-arrow {
        position: absolute;
        left: 20%; width: 50%; height: 15%;
        border-radius: 999px 1px 1px 999px;
    }
    .sbi-personel-arrow::after {
        content: "";
        position: absolute; top: 50%; width: 0; height: 0;
        transform: translateY(-50%);
        border-top: 2.5px solid transparent;
        border-bottom: 2.5px solid transparent;
    }
    .sbi-personel-arrow-in {
        top: 25%;
        background: linear-gradient(#39ef50, #08c92d);
    }
    .sbi-personel-arrow-in::after { right: -4px; border-left: 5px solid #0bd333; }
    .sbi-personel-arrow-out {
        bottom: 25%; left: 28%;
        background: linear-gradient(#ff5458, #f02028);
    }
    .sbi-personel-arrow-out::after { left: -4px; border-right: 5px solid #f4262d; }

    .sidebar-link.active {
        background: rgba(31,157,91,.18);
        color: #fff;
        border-left-color: var(--success);
    }

    /* Kullanıcı alanı (sidebar alt) */
    .sidebar-user {
        display: flex; align-items: center; gap: 8px;
        padding: 10px 14px;
        border-top: 1px solid rgba(255,255,255,.08);
        background: rgba(0,0,0,.15);
    }
    .sidebar-user-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
    .sidebar-user-name {
        font-size: .82rem; font-weight: 600; color: rgba(255,255,255,.92);
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .sidebar-user-role {
        font-size: .7rem; color: rgba(255,255,255,.5);
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .sidebar-user-logout {
        display: flex; align-items: center; justify-content: center;
        width: 32px; height: 32px; flex-shrink: 0;
        color: rgba(255,255,255,.65);
        border: 1px solid rgba(255,255,255,.18);
        border-radius: var(--radius-sm);
        transition: background .12s, color .12s;
    }
    .sidebar-user-logout:hover { background: rgba(255,255,255,.12); color: #fff; text-decoration: none; }
    /* v548: sürüm damgası çıkış düğmesinin yanında (kullanıcı alanı içinde) */
    .sidebar-user .sidebar-surum { margin: 0; flex-shrink: 0; font-size: .66rem; }

    /* İçerik alanını sidebar genişliği kadar kaydır */
    .container {
        margin-left: 220px !important;
        margin-right: 0 !important;
        max-width: none !important;
        padding-bottom: 48px;
    }
}

@media (min-width: 1280px) {
    /* Geniş ekranda sidebar genişliği tek --sb-w token'ı ile yönetilir (B-42) */
    :root { --sb-w: 210px; }
    .container {
        margin-left: var(--sb-w, 210px) !important;
        max-width: none !important;
    }
    /* 1280px'de sidebar daha geniş olduğu için 4 kolon yeterlice alan bulur */
    .home-grid { grid-template-columns: repeat(4, 1fr); }
}

@media print {
    .desktop-sidebar { display: none !important; }
    .topbar { display: none !important; }
    .container { margin-left: 0 !important; max-width: none !important; padding-bottom: 0 !important; }
}

/* Kantar Raporlandı Badge */
.kantar-badge {
    display: inline-flex; align-items: center; gap: 3px;
    padding: 2px 8px; border-radius: 20px;
    font-size: .75rem; font-weight: 600; white-space: nowrap;
}
.kantar-badge-yes { background: #dcfce7; color: #166534; }
.kantar-badge-no  { background: #fef3c7; color: #92400e; }
body.print-mode .container { margin-left: 0 !important; max-width: none !important; }

/* ── Çıkma Net KG vurgusu ─────────────────────────────── */
.cikma-net-kg { font-weight: 800; color: #0f172a; }

/* ── Çıkma Yazdır Şablonu ─────────────────────────────── */
.cikma-sheet {
    font-family: 'Segoe UI', Arial, sans-serif;
    max-width: 100%;
    padding: 8px;
}
.cikma-print-header {
    text-align: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 3px solid #7f1d1d;
}
.cikma-print-title {
    font-size: 26px;
    font-weight: 800;
    color: #7f1d1d;
    letter-spacing: 3px;
    text-transform: uppercase;
}
.cikma-print-subtitle {
    font-size: 11px;
    color: #991b1b;
    font-weight: 600;
    letter-spacing: 1px;
    margin-top: 2px;
}
.cikma-info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
    font-size: 12px;
}
.cikma-info-table th {
    background: #f5f5f5;
    padding: 5px 8px;
    text-align: left;
    font-size: 10px;
    color: #555;
    border: 1px solid #ddd;
    font-weight: 600;
    white-space: nowrap;
}
.cikma-info-table td {
    padding: 5px 10px;
    border: 1px solid #ddd;
    font-weight: 600;
}
.cikma-pallets-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11.5px;
    margin-bottom: 14px;
}
.cikma-pallets-table th {
    background: #7f1d1d;
    color: #fff;
    padding: 5px 6px;
    text-align: left;
    font-size: 10.5px;
    white-space: nowrap;
}
.cikma-pallets-table th.num,
.cikma-pallets-table td.num { text-align: right; }
.cikma-pallets-table td {
    padding: 4px 6px;
    border-bottom: 1px solid #eee;
}
.cikma-pallets-table tbody tr:nth-child(even) td { background: #fafafa; }
.cikma-pallets-table tfoot td {
    background: #fff1f2 !important;
    border-top: 2px solid #9f1239;
    font-weight: 700;
}
.cikma-summary-table {
    border-collapse: collapse;
    min-width: 300px;
    font-size: 12px;
}
.cikma-summary-table thead th {
    background: #7f1d1d;
    color: #fff;
    padding: 5px 12px;
    text-align: left;
}
.cikma-summary-table tbody th {
    background: #f9f9f9;
    padding: 4px 10px;
    text-align: left;
    border: 1px solid #ddd;
    width: 160px;
    font-weight: 600;
    white-space: nowrap;
}
.cikma-summary-table tbody td {
    padding: 4px 10px;
    border: 1px solid #ddd;
}
.cikma-summary-table tbody td div { line-height: 1.5; }
.cikma-summary-net td,
.cikma-summary-net th {
    background: #fff1f2 !important;
    font-weight: 700;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

@media print {
    .cikma-sheet { padding: 0; }
    .cikma-print-title { font-size: 22pt; }
    .cikma-print-subtitle { font-size: 9pt; }
    .cikma-info-table { font-size: 9pt; margin-bottom: 6px; }
    .cikma-pallets-table { font-size: 8.5pt; margin-bottom: 8px; }
    .cikma-pallets-table th { font-size: 8pt; }
    .cikma-summary-table { font-size: 9pt; }
    .cikma-pallets-table tfoot td {
        background: #fff1f2 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .cikma-pallets-table th {
        background: #7f1d1d !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .cikma-summary-table thead th {
        background: #7f1d1d !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    .cikma-summary-table tbody th {
        background: #f9f9f9 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ── Beyan Modülü — Durum Badge'leri (Sprint Beyan-01) ── */
.beyan-badge {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    vertical-align: middle;
}
.beyan-badge-taslak          { background: #f3f4f6; color: #374151; }
.beyan-badge-beyan_acildi    { background: #dbeafe; color: #1d4ed8; }
.beyan-badge-numune_bekliyor { background: #fef3c7; color: #92400e; }
.beyan-badge-analiz_bekliyor { background: #ffedd5; color: #9a3412; }
.beyan-badge-temiz           { background: #d1fae5; color: #065f46; }
.beyan-badge-red             { background: #fee2e2; color: #991b1b; }
.beyan-badge-iptal           { background: #e5e7eb; color: #4b5563; }
.beyan-badge-yukleme_olustu  { background: #ede9fe; color: #5b21b6; }
.beyan-badge-yuklendi        { background: #d1fae5; color: #065f46; font-weight: 700; }
/* Liste: HKS bildirim rozeti — GÖNDERİLDİ turuncu (her iki temada okunur). */
.beyan-hks-gonderildi        { background: #f97316; color: #fff; }

/* Tıklanabilir tablo satırı (tr.row-link[data-href] — app.js yönlendirir). */
tr.row-link { cursor: pointer; }
tr.row-link:hover > td { background: rgba(37, 99, 235, .06); }
.row-link-a { color: inherit; text-decoration: none; }
.row-link-a:hover { text-decoration: underline; }

/* Beyan filtre formu
   Detay paneli HER genişlikte katlanır. Eskiden toggle yalnız <768px'de
   görünürdü; masaüstünde panel kalıcı açık kalıyor ve on durum pili üç
   satıra sarıp beş girdiyle birlikte liste üstünde ~200px yer kaplıyordu. */
.beyan-filter-form { margin-bottom: 12px; }
.beyan-filter-form .bff-main { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.beyan-filter-form .bff-main input[type="search"] { flex: 1; min-width: 180px; }

.beyan-filter-toggle {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .85rem; padding: 8px 12px; line-height: 1.2;
    background: var(--card); border: 1px solid var(--border-strong);
    border-radius: var(--radius); cursor: pointer; color: var(--text);
    white-space: nowrap;
}
.beyan-filter-toggle .bft-ok { transition: transform .15s ease; display: inline-block; }
.beyan-filter-toggle[aria-expanded="true"] .bft-ok { transform: rotate(180deg); }
.beyan-filter-toggle .bft-rozet {
    background: var(--primary); color: #fff; border-radius: 999px;
    padding: 1px 8px; font-size: .74rem; font-weight: 600;
    max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.beyan-filter-form .bff-filters {
    display: none; gap: 8px 10px; flex-wrap: wrap; align-items: flex-end;
    margin-top: 8px; padding: 10px 12px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
}
.beyan-filter-form .bff-filters.bff-open { display: flex; }
.beyan-filter-form .bff-filters > div {
    display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 120px;
}
.beyan-filter-form .bff-filters label {
    font-size: .75rem; color: var(--text-muted); font-weight: 500; white-space: nowrap;
}
.beyan-filter-form .bff-filters input { width: 100%; }
.beyan-filter-form .bff-filters > .bff-uygula { flex: 0 0 auto; min-width: auto; align-self: flex-end; }

/* Durum pilleri tek satır — sarmaz, taşarsa yatay kayar. */
.beyan-filter-form .bff-filters > .bff-durum {
    flex: 1 0 100%; min-width: 0;
    display: flex; flex-direction: row; align-items: center; gap: 6px;
    flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px;
    -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
.beyan-filter-form .bff-durum > .bff-durum-lbl {
    font-size: .75rem; color: var(--text-muted); font-weight: 500;
    white-space: nowrap; flex: 0 0 auto; padding-right: 2px;
}
.beyan-filter-form .bff-durum > .pill {
    flex: 0 0 auto; padding: 4px 11px; font-size: .78rem; white-space: nowrap;
}

/* Beyan kart listesi */
.beyan-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    display: block;
}
.beyan-card:hover { border-color: var(--primary); text-decoration: none; }
.beyan-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
}
.beyan-card-parti { font-weight: 700; font-size: 1rem; }
.beyan-card-urun  { font-size: .95rem; color: var(--text); margin-bottom: 4px; }
.beyan-card-meta  {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 12px;
    font-size: .82rem;
    color: var(--muted);
    margin: 4px 0;
}
.beyan-card-alici { font-size: .88rem; margin-top: 4px; }
.beyan-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    flex-wrap: wrap;
}

/* Beyan form bölümleri */
.beyan-section {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-bottom: 12px;
}
.beyan-section-title {
    font-weight: 600;
    font-size: .88rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.beyan-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
@media (max-width: 480px) {
    .beyan-form-grid { grid-template-columns: 1fr; }
}

/* Beyan detay görünümü */
.beyan-view-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px 16px;
    font-size: .9rem;
}
@media (min-width: 768px) {
    .beyan-view-grid { grid-template-columns: repeat(3, 1fr); }
}
.beyan-view-row .lbl { color: var(--muted); font-size: .78rem; display: block; }
.beyan-view-row .val { font-weight: 500; }

/* Collapsible ham metin */
.beyan-collapsible-toggle {
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    color: var(--primary);
    font-size: .88rem;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}
.beyan-collapsible-body {
    margin-top: 8px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px;
    font-size: .82rem;
    font-family: monospace;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 300px;
    overflow-y: auto;
}

/* Durum geçiş butonları */
.beyan-next-status-wrap {
    display: flex;
    gap: 8px;              /* seçili pilin dış halkası komşuya değmesin */
    flex-wrap: wrap;
    margin-top: 6px;
}

/* ── Durum şeridi (beyan_view.php) ────────────────────────────────────────
   TÜM durumlar tıklanabilir duruyor ve seçili olan ÇERÇEVE ile işaretli:
   sonuca varmak için ara durumlara tek tek tıklamak gerekmiyor. Pil ve buton
   AYNI kutu ölçüsünü paylaşır (1px şeffaf kenar ↔ 2px halka farkı kutuyu
   kaydırmasın), yoksa seçili durum değişince şerit yerinden oynuyordu. */
.beyan-durum-btn,
.beyan-durum-secili {
    font: inherit;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    padding: 5px 12px;
    min-height: 30px;                /* dokunma hedefi — 9 pil yan yana */
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 999px;
}
.beyan-durum-btn {
    border: 2px solid transparent;
    cursor: pointer;
    opacity: .9;
}
.beyan-durum-btn:hover,
.beyan-durum-btn:focus-visible {
    opacity: 1;
    border-color: currentColor;
}
/* Önerilen sonraki durum(lar) — kesik çerçeve. Kapı değil, yalnız ipucu:
   diğer butonların hepsi aynı şekilde tıklanabilir. */
.beyan-durum-onerilen { border-style: dashed; border-color: currentColor; opacity: 1; }
.beyan-durum-onerilen:hover { border-style: solid; }
/* Seçili (şu anki) durum: dolu çerçeve + halka. ✓ işareti de taşır —
   TEMİZ ile YÜKLENDİ aynı yeşil, renge tek başına güvenilmez. */
.beyan-durum-secili {
    border: 2px solid currentColor;
    /* Çift halka pilin KENDİ renginde (currentColor): iç boşluk zeminden,
       dış halka renkten. Her durum rengiyle tutarlı çalışır ve koyu temada
       `--card` kendiliğinden değişir — ayrı bir tema kuralı gerekmez. */
    box-shadow: 0 0 0 2px var(--card, #fff), 0 0 0 4px currentColor;
    cursor: default;
}

/* Detay başlığındaki kopyalama: parti numarasının hemen altında. */
.beyan-page-heading .btn-whatsapp {
    margin-top: 8px;
    background: #25d366;
    border-color: #159947;
    color: #063c22;
    font-weight: 700;
}
.beyan-page-heading .btn-whatsapp:hover { background: #20bd5a; border-color: #117c39; color: #063c22; }
.beyan-page-heading .btn-whatsapp:focus-visible { outline: 3px solid #075e54; outline-offset: 3px; }

/* JS yoksa ve mobilde bütün durumlar mevcut şeritte erişilebilir kalır. */
.beyan-durum-toggle { display: none; }
@media (min-width: 1024px) {
    .beyan-durum-picker.is-enhanced { position: relative; display: flex; align-items: center; width: 100%; min-height: 64px; padding: 4px; }
    .beyan-durum-picker.is-enhanced .beyan-durum-toggle {
        display: inline-flex;
        min-height: 40px;
        cursor: pointer;
        gap: 10px;
        flex-shrink: 0;
        position: relative;
        z-index: 2;
    }
    .beyan-durum-toggle:focus-visible { outline: 3px solid var(--primary); outline-offset: 6px; }
    .beyan-durum-chevron { font-size: 20px; line-height: 1; transition: transform .3s; }
    .beyan-durum-picker.is-open .beyan-durum-chevron { transform: rotate(180deg); }
    .bv .beyan-durum-picker.is-enhanced .beyan-next-status-wrap {
        display: flex;
        position: absolute;
        left: 100%;
        top: 0;
        z-index: 1;
        min-width: 0;
        width: 0;
        max-width: 100%;
        height: 64px;
        box-sizing: border-box;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        padding: 10px 8px;
        margin: 0;
        gap: 8px;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        visibility: hidden;
        pointer-events: none;
        clip-path: inset(0 100% 0 0);
        transition: clip-path .48s ease, visibility 0s .65s;
    }
    .bv .beyan-durum-picker.is-enhanced.is-open .beyan-next-status-wrap {
        visibility: visible;
        pointer-events: auto;
        clip-path: inset(0 0 0 0);
        transition: clip-path .55s ease, visibility 0s;
    }
    .beyan-durum-picker.is-enhanced .beyan-next-status-wrap > .beyan-durum-secili { display: none; }
    .beyan-durum-picker.is-enhanced .beyan-durum-btn {
        min-height: 40px;
        justify-content: center;
        flex-shrink: 0;
        white-space: nowrap;
        transform-origin: left center;
        transform: translateX(calc(var(--card-order, 0) * -45px - 24px)) rotate(-9deg) scale(.9);
        opacity: 0;
        transition: transform .42s cubic-bezier(.22,.8,.25,1), opacity .3s;
        transition-delay: calc((7 - var(--card-order, 0)) * 18ms);
    }
    .beyan-durum-picker.is-enhanced.is-open .beyan-durum-btn {
        transform: translateX(0) rotate(0deg) scale(1);
        opacity: 1;
        transition-delay: calc(var(--card-order, 0) * 35ms);
    }
}
@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
    .bv .beyan-durum-picker.is-enhanced .beyan-next-status-wrap,
    .beyan-durum-picker.is-enhanced .beyan-durum-btn,
    .beyan-durum-picker.is-enhanced .beyan-durum-chevron { transition-duration: 0s; transition-delay: 0s; }
}

/* ── Liste: durum rozeti → aşağı açılan seçenekler (v344) ── */
.bl-durum { display: inline-block; margin: 0; }
.bl-durum-tetik { cursor: pointer; font: inherit; font-size: inherit; display: inline-flex; align-items: center; gap: 4px; border: 1px solid transparent; }
.bl-durum-ok { font-size: .8em; transition: transform .3s; }
.bl-durum.is-open .bl-durum-ok { transform: rotate(180deg); }
.bl-durum-tetik:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.bl-durum-menu { display: none; }
@media (min-width: 1024px) {
    .bl-durum-menu {
        display: flex; flex-direction: column; gap: 6px; align-items: stretch;
        position: fixed; z-index: 400; min-width: 150px; overflow-y: auto;
        padding: 8px; border: 1px solid var(--border); border-radius: 14px;
        background: var(--card, #fff); box-shadow: 0 12px 32px rgba(15,23,42,.22);
        visibility: hidden; pointer-events: none;
        clip-path: inset(0 0 100% 0 round 14px);
        transition: clip-path .4s ease, visibility 0s .5s;
    }
    .bl-durum.is-open .bl-durum-menu { visibility: visible; pointer-events: auto; clip-path: inset(0 0 0 0 round 14px); transition: clip-path .45s ease, visibility 0s; }
    .bl-durum-sec {
        cursor: pointer; justify-content: center; text-align: center; border: 1px solid transparent;
        transform: translateY(-14px) scale(.92); opacity: 0;
        transition: transform .36s cubic-bezier(.22,.8,.25,1), opacity .25s; transition-delay: calc((8 - var(--sira, 0)) * 12ms);
    }
    .bl-durum.is-open .bl-durum-sec { transform: none; opacity: 1; transition-delay: calc(var(--sira, 0) * 30ms); }
    .bl-durum-sec:hover, .bl-durum-sec:focus-visible { box-shadow: 0 0 0 2px rgba(37,99,235,.45); outline: none; }
}
@media (prefers-reduced-motion: reduce) { .bl-durum-menu, .bl-durum-sec, .bl-durum-ok { transition-duration: 0s !important; transition-delay: 0s !important; } }
@media print { .bl-durum-menu { display: none !important; } }

@media print {
    .beyan-card-actions, .beyan-next-status-wrap, .beyan-durum-picker, .btn-whatsapp { display: none !important; }
}

/* ── Beyan parse alert (Sprint Beyan-02) ── */
.beyan-parse-alert {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    margin: 10px 0 4px;
    line-height: 1.4;
}
.beyan-parse-alert-ok    { background: #d1fae5; color: #065f46; }
.beyan-parse-alert-warn  { background: #fef3c7; color: #92400e; }
.beyan-parse-alert-error { background: #fee2e2; color: #991b1b; }

/* ── Toplu beyan önizleme ── */
#beyanBulkPreview {
    margin: 12px 0 4px;
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
    background: #f8fafc;
    overflow: hidden;
}
.beyan-bulk-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 10px 14px;
    background: #eef2ff;
    border-bottom: 1px solid var(--border, #e2e8f0);
    flex-wrap: wrap;
}
.beyan-bulk-head strong { font-size: 1rem; }
.beyan-bulk-list {
    max-height: 360px; overflow-y: auto;
    padding: 8px 10px; display: flex; flex-direction: column; gap: 8px;
}
.beyan-bulk-item {
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    padding: 8px 10px;
}
.beyan-bulk-item-head {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    margin-bottom: 3px;
}
.beyan-bulk-no    { font-weight: 700; color: var(--primary); font-size: .82rem; }
.beyan-bulk-parti { font-weight: 700; font-size: .95rem; }
.beyan-bulk-count {
    margin-left: auto; font-size: .72rem; color: var(--muted);
    background: #f1f5f9; border-radius: 999px; padding: 2px 8px;
}
.beyan-bulk-item-body { font-size: .85rem; color: var(--text); line-height: 1.35; }
.beyan-bulk-actions {
    padding: 10px 14px; border-top: 1px solid var(--border, #e2e8f0);
    display: flex; justify-content: flex-end;
}
.beyan-bulk-status { padding: 0 14px 12px; font-size: .85rem; }
.beyan-bulk-status.ok  { color: #065f46; }
.beyan-bulk-status.err { color: #991b1b; }

/* ── Yükleme Planı Eşleştirme Modalı (Sprint Beyan-Yukleme-Eslesme-01) ── */
.beyan-match-overlay[hidden] { display: none !important; }
.beyan-match-overlay {
    position: fixed; inset: 0; z-index: 700;
    background: rgba(15, 23, 42, .55);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 24px 12px; overflow-y: auto;
}
.beyan-match-dialog {
    background: #fff; border-radius: var(--radius, 12px);
    width: 100%; max-width: 1000px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
    display: flex; flex-direction: column;
    max-height: calc(100vh - 48px);
}
.beyan-match-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid var(--border, #e2e8f0);
}
.beyan-match-head h2 { margin: 0; font-size: 1.1rem; }
.beyan-match-close {
    background: none; border: none; font-size: 1.3rem; cursor: pointer;
    color: var(--muted, #64748b); line-height: 1; padding: 4px 8px;
}
.beyan-match-body { padding: 16px 18px; overflow-y: auto; }
.beyan-match-desc { font-size: .88rem; color: var(--muted, #64748b); margin: 0 0 12px; }
.beyan-match-search { margin-bottom: 12px; }
.beyan-match-table-wrap { overflow-x: auto; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; }
.beyan-match-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.beyan-match-table th, .beyan-match-table td {
    padding: 7px 10px; text-align: left; border-bottom: 1px solid var(--border, #eef2f7);
    white-space: nowrap;
}
.beyan-match-table thead th { background: #f8fafc; font-weight: 700; font-size: .78rem; }
.beyan-match-row { cursor: pointer; }
.beyan-match-row:hover { background: #f0f9ff; }
.beyan-match-radio { width: 18px; height: 18px; cursor: pointer; }
.beyan-match-durum {
    display: inline-block; padding: 2px 8px; border-radius: 999px;
    background: #fef3c7; color: #92400e; font-size: .72rem; font-weight: 700;
}
.beyan-match-footer {
    display: flex; gap: 10px; justify-content: flex-end;
    margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border, #e2e8f0);
}
.beyan-match-preview th { width: 22%; }
.beyan-match-preview td { white-space: normal; }
.beyan-match-changed td, .beyan-match-changed th { background: #ecfdf5; }
.beyan-match-note { font-size: .72rem; color: var(--muted, #64748b); font-weight: 400; margin-top: 3px; }
.beyan-match-warn {
    font-size: .85rem; background: #fffbeb; border: 1px solid #fde68a;
    color: #92400e; padding: 10px 12px; border-radius: 8px; margin: 12px 0 0;
}
@media (max-width: 767px) {
    .beyan-match-overlay { padding: 0; }
    .beyan-match-dialog { max-width: 100%; min-height: 100vh; max-height: 100vh; border-radius: 0; }
}
@media print { .beyan-match-overlay { display: none !important; } }

/* =========================================================
   HAL KAYIT BİLDİRİM MODALİ (Sprint Beyan-Bildirim-01)
   beyan_view.php — "🏛 Bildirim Yap" penceresi.
   z-index 700: .beyan-match-overlay ile aynı katman (CLAUDE.md ≥600 kuralı).
   ========================================================= */
.beyan-hks-overlay[hidden] { display: none !important; }
.beyan-hks-overlay {
    position: fixed; inset: 0; z-index: 700;
    background: rgba(15, 23, 42, .55);
    display: flex; align-items: flex-start; justify-content: center;
    padding: 24px 12px; overflow-y: auto;
}
.beyan-hks-dialog {
    background: #fff; border-radius: var(--radius, 12px);
    width: 100%; max-width: 620px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
    display: flex; flex-direction: column;
    max-height: calc(100vh - 48px);
}
.beyan-hks-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 18px; border-bottom: 1px solid var(--border, #e2e8f0);
}
.beyan-hks-x {
    background: none; border: none; font-size: 1.3rem; cursor: pointer;
    color: var(--muted, #64748b); line-height: 1; padding: 4px 8px;
}
.beyan-hks-body { padding: 16px 18px; overflow-y: auto; }
.beyan-hks-sub {
    font-size: .78rem; font-weight: 700; letter-spacing: .03em;
    color: var(--muted, #64748b); margin: 14px 0 8px;
}
.beyan-hks-sub:first-child { margin-top: 0; }

/* Beyandan gelen salt-okunur bilgiler */
.beyan-hks-list {
    margin: 0; display: grid; grid-template-columns: auto 1fr;
    gap: 6px 14px; font-size: .88rem;
}
.beyan-hks-list dt { color: var(--muted, #64748b); }
.beyan-hks-list dd { margin: 0; font-weight: 600; }

/* Doldurulacak alanlar */
.beyan-hks-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.beyan-hks-fields label {
    display: flex; flex-direction: column; gap: 4px;
    font-size: .82rem; color: var(--muted, #64748b);
}
.beyan-hks-rozet { font-size: .72rem; font-weight: 600; }
.beyan-hks-rozet-ok { color: #16a34a; }
.beyan-hks-rozet-uyari { color: #b45309; }
/* Yazarak aranabilir select (data-aramali) — Hal Kayıt panelindeki
   "İhracat Yapılan Ülke" kutusuyla aynı davranış. Asıl <select> DOM'da kalır
   ve değeri taşır; yalnız gizlenir. */
.ara-sec-gizli { display: none !important; }
.ara-sec-bos {
    border-color: var(--danger, #dc2626) !important;
    background: #fff6f6;
}
html[data-theme="dark"] body:not(.print-mode) .ara-sec-bos { background: #2a1616; }

/* ─────────────────────────────────────────────────────────────────────────
   BİLDİRİM KARTI (beyan_view.php üst özeti)
   Ülke · Ürün · Net KG · Plaka — HKS bildiriminin dört zorunlu bilgisi.
   Mobilde 2 sütun, ≥600px'te 4 sütun. Eksik alan soluk "—" değil, işaretli.
   ───────────────────────────────────────────────────────────────────────── */
.bk-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--border, #e2e8f0); }
.bk-hucre { background: var(--card, #fff); padding: 10px 12px; min-width: 0; }
.bk-etiket {
    font-size: .68rem; letter-spacing: .06em; text-transform: uppercase;
    color: var(--muted, #64748b); margin-bottom: 3px;
}
.bk-deger {
    font-size: 1.05rem; font-weight: 700; line-height: 1.25;
    overflow-wrap: anywhere;
}
.bk-not { font-size: .7rem; color: #b45309; margin-top: 2px; }
.bk-eksik .bk-deger { color: #b45309; font-weight: 600; font-style: italic; }
.bk-kart .bk-grid { border-radius: 8px; overflow: hidden; }
@media (min-width: 600px) { .bk-grid { grid-template-columns: repeat(4, 1fr); } }

/* Kartın eylem satırı — buton etkilediği verinin YANINDA durur. Buton pasifse
   sebebi hemen yanında yazar; `title` ipucu mobilde hiç görünmüyordu. */
.bk-alt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.bk-engel { font-size: .82rem; color: #b45309; flex: 1 1 220px; line-height: 1.4; }

/* ── Beyan listesi bölümleri (beyanlar.php) ───────────────────────────────
   Sayfa iki bloğa ayrılır: ÜSTTE işlem bekleyen (yüklenmeyen) beyanlar,
   ALTTA yüklenen/kapanan arşiv + filtre şeridi. Üst blok sol şeridi ve
   dolgun sayacıyla bilerek daha belirgin — gün içinde bakılacak yer o. */
.beyan-blok {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 16px;
}
.beyan-blok-acik     { border-left: 4px solid var(--warn); }
.beyan-blok-kapanmis { border-left: 4px solid var(--success); }
.beyan-blok-head {
    display: flex; align-items: baseline; gap: 4px 12px;
    flex-wrap: wrap; margin-bottom: 10px;
    padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.beyan-blok-baslik {
    margin: 0; font-size: 1.02rem; font-weight: 700;
    display: flex; align-items: center; gap: 8px;
}
.beyan-blok-sayi {
    display: inline-block; min-width: 24px; text-align: center;
    padding: 1px 8px; border-radius: 999px;
    font-size: .8rem; font-weight: 700; line-height: 1.5;
    background: var(--surface-2); color: var(--muted);
}
.beyan-blok-acik .beyan-blok-sayi     { background: var(--warn);    color: #1c1917; }
.beyan-blok-kapanmis .beyan-blok-sayi { background: var(--success); color: #fff; }
.beyan-blok-not { font-size: .78rem; }
.beyan-blok-bos {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 14px 4px; font-size: .88rem; color: var(--muted);
}
/* Filtre şeridi bloğun içinde — bloğun kendi dolgusu zaten boşluk veriyor. */
.beyan-blok .beyan-filter-form { margin-bottom: 10px; }
/* Tablo bloğun dolgusunu yemez: 13 kolonlu liste zaten dar, bloğun içinde
   28px daha kaybedince işlem butonları sıkışıyordu. .table-wrap kendi
   overflow-x'ini koruduğu için taşma yatay kaymaya döner, sayfayı bozmaz. */
.beyan-blok > .table-wrap { margin-left: -14px; margin-right: -14px; }
@media (max-width: 767px) {
    .beyan-blok { padding: 10px 12px; border-radius: 8px; }
    .beyan-blok-baslik { font-size: .95rem; }
    .beyan-blok > .table-wrap { margin-left: -12px; margin-right: -12px; }
}
/* Yazdırmada blok çerçevesi gereksiz — başlık kalsın, kutu gitsin. */
@media print {
    .beyan-blok { border: 0; padding: 0; margin-bottom: 10px; background: none; }
    .beyan-blok-not { display: none; }
}

/* Toplu bildirim: seçim sütunu + alt şerit (beyanlar.php) */
.bb-sec-col { width: 34px; text-align: center; }
.bb-bar[hidden] { display: none !important; }
.bb-bar {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 550;                     /* bottomnav (500) üstünde, modal (700) altında */
    display: flex; align-items: center; gap: 10px;
    padding: 8px 14px; border-radius: 999px;
    background: var(--card, #fff); border: 1px solid var(--border, #e2e8f0);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
    font-size: .85rem; max-width: calc(100vw - 24px);
}
.bb-engel td { background: #fffbeb; }
@media (max-width: 899px) {
    /* Bottomnav ile çakışmasın — onun üstüne otur (B-35: <900px) */
    .bb-bar { bottom: calc(var(--bn-h) + 8px + env(safe-area-inset-bottom, 0px)); }
    .bb-bar .btn { white-space: nowrap; }
}
@media print { .bb-bar { display: none !important; } }

/* Birim fiyat önerileri — tıklanabilir şeritler (otomatik doldurmaz) */
.beyan-hks-oneri { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.beyan-hks-oneri:empty { display: none; }
.beyan-hks-oneri-baslik { font-size: .74rem; color: var(--muted, #64748b); }
.beyan-hks-oneri-btn {
    font: inherit; font-size: .76rem; cursor: pointer;
    padding: 3px 9px; border-radius: 999px;
    border: 1px solid var(--border, #cbd5e1);
    background: var(--bg, #f8fafc); color: inherit;
}
.beyan-hks-oneri-btn:hover { border-color: #7c3aed; color: #7c3aed; }

.beyan-hks-warn {
    margin: 14px 0 0; padding: 10px 12px; border-radius: 8px;
    background: #fef3c7; color: #92400e; font-size: .82rem; line-height: 1.5;
}
.beyan-hks-foot {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 12px 18px; border-top: 1px solid var(--border, #e2e8f0);
}

/* Mobil: tam ekran + iOS zoom önleme (16px kuralı) */
@media (max-width: 767px) {
    .beyan-hks-overlay { padding: 0; }
    .beyan-hks-dialog { max-width: 100%; min-height: 100vh; max-height: 100vh; border-radius: 0; }
    .beyan-hks-fields { grid-template-columns: 1fr; }
    .beyan-hks-fields select, .beyan-hks-fields input { font-size: 16px; }
}
@media print { .beyan-hks-overlay { display: none !important; } }

/* =========================================================
   TASARIM REVİZYONU — Global kabuk cilası + yerleşim kayması fix
   ---------------------------------------------------------
   Bu blok YALNIZCA ekleme yapar; < 768px mobil kuralları korunur.
   Amaç: sayfa geçişlerinde yatay "kayma" sorununu bitirmek,
   tablet üst barını düzeltmek, sidebar/topbar'a kurumsal cila.
   ========================================================= */

/* — 1. Sayfa geçişlerinde yatay "kayma" fix (ASIL SORUN) —
   Dikey scrollbar her zaman yer ayırsın. Önceden sayfa A'da scrollbar yok,
   B'de var iken içerik ~15px yatay zıplıyordu → "üst bar kayıyor" hissi.
   Klasik scrollbar'lı masaüstünde (Chrome/Edge/Firefox) etkilidir;
   iOS/overlay scrollbar'da zaten kayma olmadığından mobili etkilemez. */
html { scrollbar-gutter: stable; }

/* — 2. Tutarlı, keskin odak halkası (erişilebilirlik + cila) — */
a:focus-visible, button:focus-visible, .btn:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible,
.pill:focus-visible, .sidebar-link:focus-visible, .topnav a:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* — 3. Topbar cilası (mobil/tablet'te görünür) — */
.topbar {
    background: linear-gradient(180deg, #232c3e 0%, #1a2130 100%);
    box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 4px 16px rgba(15,22,40,.16);
}
.topnav a { transition: background .14s ease; }

/* — 4. Tablet (768–899px) üst bar: linkler taşmasın, tek satırda yatay kayar — */
@media (min-width: 768px) and (max-width: 899px) {
    .topbar-inner { flex-wrap: nowrap; gap: 10px; }
    .brand-text { white-space: nowrap; }
    .topnav {
        flex-wrap: nowrap;
        overflow-x: auto;
        min-width: 0;
        gap: 2px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        -webkit-overflow-scrolling: touch;
    }
    .topnav::-webkit-scrollbar { display: none; }
    .topnav a { padding: 7px 11px; font-size: .9rem; white-space: nowrap; }
    /* Dar alanda kullanıcı adı/rol gizlenir, çıkış butonu kalır */
    .topnav-user-info { display: none; }
}

/* — 5. Masaüstü sidebar cilası (≥900px) — kurumsal, marka rengiyle uyumlu — */
@media (min-width: 900px) {
    .desktop-sidebar {
        background: linear-gradient(180deg, #1f2738 0%, #161c29 100%);
        border-right: 1px solid rgba(255,255,255,.06);
        box-shadow: 1px 0 0 rgba(0,0,0,.18), 4px 0 24px rgba(15,22,40,.06);
    }
    .sidebar-section { letter-spacing: .1em; }
    .sidebar-link { padding: 9px 11px; transition: background .14s ease, color .14s ease; }
    .sidebar-link:hover { background: rgba(255,255,255,.06); }
    /* Aktif sekme: yeşil yerine marka mavisi — tema ile bütünleşik */
    .sidebar-link.active {
        background: linear-gradient(90deg, rgba(29,108,240,.22), rgba(29,108,240,.04));
        border-left-color: var(--primary);
        color: #fff;
        font-weight: 600;
    }
}

/* =========================================================
   TASARIM SİSTEMİ v2 — token / tipografi / form / tablo / buton
   ---------------------------------------------------------
   Tüm sisteme tutarlı kurumsal kimlik. Additive + token override;
   durum satırı renkleri (islendi/yuklendi) ve mobil kuralları korunur.
   ========================================================= */

/* — 1. Rafine token'lar (mevcut değişkenler güncellenir → her yere yayılır) — */
:root {
    /* Daha keskin, modern iki-katmanlı gölge skalası */
    --shadow:    0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.09);
    --shadow-sm: 0 1px 2px rgba(16,24,40,.06);
    --shadow-md: 0 4px 10px rgba(16,24,40,.07), 0 2px 4px rgba(16,24,40,.05);
    --shadow-lg: 0 10px 28px rgba(16,24,40,.12), 0 4px 10px rgba(16,24,40,.06);
    --radius-lg: 14px;
    /* Odak halkası (form kontrolleri için yumuşak parıltı) */
    --ring: 0 0 0 3px rgba(29,108,240,.18);

    /* — Ana sayfa karoları: kabartma/derinlik token'ları (Sprint Dashboard-3D-01) —
       inset üst parıltı + inset alt gölge (yüzeyin kendi kabartması) + iki katman
       dış gölge (yakın temas + uzak yükselme). .home-card / .home-card-icon burada
       tüketilir; reports.php, personel_takip.php aynı sınıfları
       paylaştığı için otomatik faydalanır. */
    --tile-shadow:
        inset 0 1px 0 rgba(255,255,255,.75),
        inset 0 -10px 16px -13px rgba(16,24,40,.22),
        0 1px 2px rgba(16,24,40,.05),
        0 10px 22px -10px rgba(16,24,40,.22),
        0 3px 8px -2px rgba(16,24,40,.10);
    --tile-shadow-hover:
        inset 0 1px 0 rgba(255,255,255,.9),
        inset 0 -10px 16px -13px rgba(16,24,40,.18),
        0 2px 4px rgba(16,24,40,.06),
        0 20px 38px -14px rgba(16,24,40,.28),
        0 8px 18px -6px rgba(16,24,40,.16);
    --icon-tile-shadow:
        inset 0 1px 1px rgba(255,255,255,.85),
        inset 0 -3px 6px rgba(16,24,40,.10),
        0 3px 7px -1px rgba(16,24,40,.18),
        0 1px 2px rgba(16,24,40,.10);
    --icon-tile-shadow-hover:
        inset 0 1px 1px rgba(255,255,255,.9),
        inset 0 -3px 6px rgba(16,24,40,.08),
        0 5px 11px -2px rgba(16,24,40,.22),
        0 2px 3px rgba(16,24,40,.12);
    --icon-sheen: linear-gradient(150deg, rgba(255,255,255,.62) 0%, rgba(255,255,255,.16) 40%, rgba(255,255,255,0) 62%);
}

/* — 2. Tipografi: net render + modern başlık ritmi — */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}
h1, h2, h3 { letter-spacing: -.011em; }

/* — 3. Form kontrolleri: modern odak halkası + yumuşak etkileşim — */
input[type="text"], input[type="search"], input[type="tel"],
input[type="date"], input[type="number"], input[type="email"],
input[type="password"], select, textarea {
    transition: border-color .14s ease, box-shadow .14s ease, background-color .14s ease;
}
input[type="text"]:hover, input[type="search"]:hover, input[type="tel"]:hover,
input[type="date"]:hover, input[type="number"]:hover, input[type="email"]:hover,
input[type="password"]:hover, select:hover, textarea:hover {
    border-color: var(--border-strong);
}
/* Odak: sert outline yerine yumuşak halka + marka kenarlığı (mouse).
   Klavye için :focus-visible outline ilk blokta zaten korunur. */
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--ring);
}
::placeholder { color: #9aa3b2; opacity: 1; }
.form-label, .grid label { letter-spacing: .005em; }

/* — 4. Kart & tablo yüzeyleri: rafine derinlik — */
.card { box-shadow: var(--shadow); }
.table-wrap { box-shadow: var(--shadow); }
/* Yuvarlatılmış kabuk içinde temiz alt kenar */
.data-table tbody tr:last-child td { border-bottom: none; }
/* Kenar nefesi — ilk/son hücre */
.data-table th:first-child, .data-table td:first-child { padding-left: 16px; }
.data-table th:last-child,  .data-table td:last-child  { padding-right: 16px; }
/* Başlık biraz daha okunur kontrast */
.data-table th { color: #586074; }

/* — 5. Butonlar: hafif derinlik + dokunsal basış — */
.btn { box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: linear-gradient(180deg, #2a78f5, var(--primary));
    box-shadow: 0 1px 2px rgba(16,24,40,.12), inset 0 1px 0 rgba(255,255,255,.12);
}
.btn-primary:hover { background: linear-gradient(180deg, var(--primary), var(--primary-dark)); }

/* — 6. Pill filtreleri: yumuşak etkileşim — */
.pill { transition: background .14s ease, border-color .14s ease, color .14s ease; }
.pill:not(.active):hover { border-color: var(--border-strong); background: #f7f9fc; }

/* ---------- Aktif Depo Rozeti (Sprint Depo-01/02) ---------- */
/* Renk: --depot-accent* değişkenleri render_header()'da <body>'ye enjekte
   edilir (depot_color() — admin definitions.php'den seçebilir, yoksa
   isimden türetilen sabit palet rengi). Depo değişince otomatik güncellenir. */
/* Sidebar (≥900px): marka altında aktif depo kartı — depo rengiyle vurgulu */
.sidebar-depo {
    display: flex; align-items: center; gap: 10px;
    margin: 10px 12px 4px; padding: 9px 12px;
    border-radius: 10px;
    background: rgba(var(--depot-accent-rgb, 29,108,240), 0.16);
    border: 1px solid rgba(var(--depot-accent-rgb, 29,108,240), 0.4);
    transition: background .2s, border-color .2s;
}
.sidebar-depo:hover { background: rgba(var(--depot-accent-rgb, 29,108,240), 0.26); text-decoration: none; }
.sidebar-depo-icon { font-size: 1.1rem; flex-shrink: 0; }
.sidebar-depo-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.sidebar-depo-label {
    font-size: .62rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; color: #64748b;
}
.sidebar-depo-name {
    font-size: .86rem; font-weight: 800; color: var(--depot-accent, #1d6cf0);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-depo-caret { font-size: .65rem; color: #94a3b8; flex-shrink: 0; }

/* ── Tedarikçi öneri kutusu (malzeme_stok_islem) ── */
.ms-sug-wrap { position: relative; }
.ms-sug-list {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 700;
    margin-top: 3px; max-height: 260px; overflow-y: auto;
    background: #fff; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}
.ms-sug-row {
    padding: 9px 12px; font-size: .9rem; font-weight: 600;
    color: var(--text); cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
}
.ms-sug-row:last-child { border-bottom: none; }
.ms-sug-row:has(> .ms-sug-del) { position: relative; padding-right: 40px; }
.ms-sug-del { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 26px; height: 26px; padding: 0;
    border: 1px solid transparent; border-radius: 50%; background: transparent; color: #b91c1c; cursor: pointer;
    opacity: 0; transition: opacity .12s, background .12s; line-height: 1; }
.ms-sug-del::before { content: "\2715"; font-size: .8rem; font-weight: 700; }
.ms-sug-row:hover > .ms-sug-del, .ms-sug-row.active > .ms-sug-del, .ms-sug-del:focus-visible { opacity: 1; }
.ms-sug-del:hover { background: #fee2e2; border-color: #fca5a5; }
@media (hover: none) { .ms-sug-del { opacity: .75; } }
html[data-theme="dark"] .ms-sug-del { color: #fca5a5; }
html[data-theme="dark"] .ms-sug-del:hover { background: rgba(248,113,113,.18); border-color: rgba(248,113,113,.5); }
.ms-sug-row:hover, .ms-sug-row.active { background: #eff6ff; }
.ms-sug-add {
    color: #15803d; background: #f0fdf4;
    border-top: 1.5px dashed #16a34a;
}
.ms-sug-add:hover, .ms-sug-add.active { background: #dcfce7; }
.ms-sug-add.busy { opacity: .7; cursor: wait; }

/* Öneri kutusu "+ ekle" satırı — koyu tema (açık yeşil zemin + açık yazı okunmuyordu) */
html[data-theme="dark"] .ms-sug-add { color: #86efac; background: rgba(22,163,74,.14); border-top-color: rgba(74,222,128,.5); }
html[data-theme="dark"] .ms-sug-add:hover,
html[data-theme="dark"] .ms-sug-add.active { background: rgba(22,163,74,.26); color: #bbf7d0; }

/* ---------- Depo Tema Tonu (Sprint Depo-02b) ---------- */
/* İçerik arka planına aktif depo renginin ÇOK hafif tonu (%4.5) verilir.
   Kartlar beyaz kalır — kontrast ve okunabilirlik bozulmaz, göz yormaz.
   Depo seçili değilken fallback triplet --bg ile aynı → ton görünmez. */
:root { --depot-accent-rgb: 244,246,250; }
body:not(.print-mode) {
    min-height: 100vh;
    background: linear-gradient(
        rgba(var(--depot-accent-rgb), 0.045),
        rgba(var(--depot-accent-rgb), 0.045)
    ), var(--bg);
}
@media print {
    body { background: #fff !important; }
}

/* =========================================================
   TEMA SİSTEMİ — Açık / Koyu / Sistem (asya_tema)
   ---------------------------------------------------------
   html[data-theme] helpers.php head script'i ile CSS'ten önce
   set edilir (FOUC yok). Koyu tema = token override + hardcoded
   yüzeylerin hedefli düzeltmesi. Additive katman: açık tema ve
   print çıktısı birebir korunur.
   ========================================================= */

/* — Koyu tema token'ları — */
html[data-theme="dark"] {
    --bg: #0f141b;
    --card: #161d27;
    --border: #273140;
    --border-strong: #3a4658;
    --text: #e7ecf4;
    --muted: #93a0b4;
    --primary: #4d8dff;
    --primary-dark: #2f6fe0;
    --primary-soft: #1a2740;
    --danger: #f06b64;
    --danger-soft: #34201f;
    --success: #2ecc8f;
    --success-soft: #14302a;
    --warn: #e6a93c;
    --warn-soft: #332916;
    --shadow:    0 1px 2px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.4);
    --shadow-sm: 0 1px 2px rgba(0,0,0,.35);
    --shadow-md: 0 4px 10px rgba(0,0,0,.42), 0 2px 4px rgba(0,0,0,.3);
    --shadow-lg: 0 10px 28px rgba(0,0,0,.55), 0 4px 10px rgba(0,0,0,.35);
    --ring: 0 0 0 3px rgba(77,141,255,.28);
    /* .data-table th ile aynı "gömülü yüzey" tonu — tutarlılık için */
    --surface-2: #1a2331;
    color-scheme: dark;

    /* — Ana sayfa karoları: koyu temada aynı kabartma, ışık yerine derinlik
       vurgulu (üst parıltı çok belirgin olursa koyu yüzeyde "leke" gibi
       durur — opaklığı düşük tutulur, dış gölgeler siyaha çekilir) — */
    --tile-shadow:
        inset 0 1px 0 rgba(255,255,255,.05),
        inset 0 -10px 16px -13px rgba(0,0,0,.55),
        0 1px 2px rgba(0,0,0,.4),
        0 12px 26px -10px rgba(0,0,0,.6),
        0 4px 10px -2px rgba(0,0,0,.4);
    --tile-shadow-hover:
        inset 0 1px 0 rgba(255,255,255,.08),
        inset 0 -10px 16px -13px rgba(0,0,0,.5),
        0 2px 4px rgba(0,0,0,.45),
        0 22px 44px -14px rgba(0,0,0,.65),
        0 10px 20px -6px rgba(0,0,0,.45);
    --icon-tile-shadow:
        inset 0 1px 1px rgba(255,255,255,.14),
        inset 0 -3px 6px rgba(0,0,0,.4),
        0 3px 8px -1px rgba(0,0,0,.5),
        0 1px 2px rgba(0,0,0,.4);
    --icon-tile-shadow-hover:
        inset 0 1px 1px rgba(255,255,255,.18),
        inset 0 -3px 6px rgba(0,0,0,.35),
        0 5px 12px -2px rgba(0,0,0,.55),
        0 2px 3px rgba(0,0,0,.45);
    --icon-sheen: linear-gradient(150deg, rgba(255,255,255,.22) 0%, rgba(255,255,255,.06) 40%, rgba(255,255,255,0) 62%);
}

/* v580: ana sayfa 3B ikonları şeffaf arka planlıdır — koyu temada ::after karartma katmanı yok. */
html[data-theme="dark"] .home-grid:not(.pdks-dashboard-grid) .home-card-icon::before,
html[data-theme="dark"] .home-grid:not(.pdks-dashboard-grid) .home-card-icon::after {
    content: none;
    display: none;
}

/* — Chrome yüzeyleri: topbar/sidebar açıkta lacivert (var(--text))
     kullanır; koyu temada --text açık renge döndüğü için sabitlenir — */
html[data-theme="dark"] .topbar { background: #121924; }
/* Alt çubuk: dok yüzeyi + pasif ikonlar koyu temada sönükleşir (parlamasın) */
html[data-theme="dark"] .bottomnav {
    --bn-dock: #19212d;
    --bn-dock-border: #2c3747;
    --bn-label: #93a0b4;
    --bn-label-on: #e7ecf4;
    --ni-idle: saturate(.55) brightness(.86);
}
@media (min-width: 900px) {
    html[data-theme="dark"] .desktop-sidebar { background: #121924; box-shadow: 2px 0 10px rgba(0,0,0,.45); }
}

/* — Form kontrolleri (açıkta hardcoded #fff) — */
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="date"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="password"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background: #101722; color: var(--text); border-color: var(--border-strong);
}
html[data-theme="dark"] ::placeholder { color: #64718a; }

/* — Tablolar — */
html[data-theme="dark"] .data-table th { background: #1a2331; color: var(--muted); }
html[data-theme="dark"] .data-table td { border-color: var(--border); }

/* — Sık kullanılan hardcoded-açık yüzeyler — */
html[data-theme="dark"] .empty,
html[data-theme="dark"] .record-card,
html[data-theme="dark"] .lock-banner { background: var(--card); }
html[data-theme="dark"] .pill:not(.active):hover { background: #1b2432; }
html[data-theme="dark"] .ms-sug-list { background: var(--card); border-color: var(--border); }
html[data-theme="dark"] .ms-sug-row { color: var(--text); border-bottom-color: #202a38; }
html[data-theme="dark"] .ms-sug-row:hover,
html[data-theme="dark"] .ms-sug-row.active { background: #1a2740; }

/* — Modal / overlay kutuları — */
html[data-theme="dark"] .ym-box,
html[data-theme="dark"] .pm-dialog,
html[data-theme="dark"] .ms-edit-modal { background: var(--card); color: var(--text); }

/* — Durum satırları (islendi/yuklendi): açık pastel yerine koyu ton — */
html[data-theme="dark"] .record-card.durum-islendi { background: #2b2410; }
html[data-theme="dark"] .record-card.durum-yuklendi { background: #122b20; }
html[data-theme="dark"] .data-table tr.tr-islendi > td { background: #2b2410; }
html[data-theme="dark"] .data-table tr.tr-taslak > td { background: #1f1a33; }
html[data-theme="dark"] .record-card.durum-taslak { background: #1f1a33; border-color: #7c3aed; }
html[data-theme="dark"] .badge-taslak { background: #2e2250; color: #c4b5fd; }
html[data-theme="dark"] .data-table tr.tr-yuklendi > td { background: #122b20; }

/* — Print sayfaları HER temada açık kalır (kağıt çıktısı bozulmaz) — */
html[data-theme="dark"] body.print-mode {
    --bg: #f4f6fa; --card: #ffffff; --border: #e3e7ee; --border-strong: #c7cdd9;
    --text: #1c2230; --muted: #6b7385;
    background: #fff; color-scheme: light;
}

/* =========================================================
   TEMA DÖNGÜ BUTONU — mobil/tablet topbar (sidebar'da artık yok,
   onun yerine sürüm damgası gösteriliyor — bkz. .sidebar-surum)
   ========================================================= */
.tema-dongu {
    flex-shrink: 0;
    width: 34px; height: 34px; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,.3); border-radius: 50%;
    background: rgba(255,255,255,.1); color: #fff;
    font-size: .95rem; cursor: pointer;
    transition: background .15s ease;
}
.tema-dongu:hover { background: rgba(255,255,255,.2); }
@media print { .tema-dongu, .sidebar-surum { display: none !important; } }

/* Sidebar sürüm damgası — sunucudaki dosyanın güncel olup olmadığını
   gözle doğrulamak için (Hal Bildirimi panelSurum ile aynı amaç). */
.sidebar-surum {
    margin: 10px 12px 4px;
    text-align: center;
    font-size: .68rem;
    color: rgba(255,255,255,.4);
    letter-spacing: .02em;
}

/* =========================================================
   KOYU TEMA v2 — okunabilirlik düzeltmeleri (kullanıcı geri bildirimi)
   Hardcoded açık arka planlı bileşenler: tablolar, düz butonlar,
   filtre hapları, kayıt görüntüleme kağıdı, rapor rozetleri.
   ========================================================= */

/* — Tablolar: beyaz gövde → kart yüzeyi — */
html[data-theme="dark"] .table-wrap { background: var(--card); }
html[data-theme="dark"] .data-table tr:hover td { background: #1b2430; }
html[data-theme="dark"] .data-table tbody th { background: #1a2331; color: var(--muted); }
html[data-theme="dark"] .th-sort-active { background: #1a2740 !important; }
html[data-theme="dark"] .rpt-table .totals-row td,
html[data-theme="dark"] .rpt-table tfoot td { background: #1a2331; }

/* — Düz (beyaz) butonlar — renkli varyantlar hariç — */
html[data-theme="dark"] .btn:not(.btn-primary):not(.btn-danger):not(.btn-secondary):not(.btn-success):not(.btn-geri):not(.btn-durum-islendi):not(.btn-durum-yuklendi) {
    background: #1d2635; color: var(--text); border-color: var(--border-strong);
}
html[data-theme="dark"] .btn:not(.btn-primary):not(.btn-danger):not(.btn-secondary):not(.btn-success):not(.btn-geri):not(.btn-durum-islendi):not(.btn-durum-yuklendi):hover {
    background: #243044;
}

/* v297-C: geri düğmesi koyu temada — beyaz yazı AA için koyu mavi zemin */
html[data-theme="dark"] .btn-geri {
    background: linear-gradient(180deg, #2f6fe0, #2459b8); color: #fff; border-color: #6ea1ff;
    box-shadow: 0 2px 8px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.18);
}
html[data-theme="dark"] .btn-geri:hover { background: linear-gradient(180deg, #3a7bef, #2a63c9); }

/* v301: "← Personel Takibi" geri düğmesi TÜM sayfalarda TURUNCU (sahip kararı). Diğer geri
   düğmeleri mavi kalır; yalnız personel_takip.php'ye giden bağlantıya `btn-geri-ptak` verilir.
   Beyaz yazı AA için koyu turuncu (#c2410c ≈ 5:1). */
.btn-geri.btn-geri-ptak {
    background: linear-gradient(180deg, #e8650f, #c2410c);
    border-color: #9a3412;
    box-shadow: 0 2px 6px rgba(194,65,12,.34), inset 0 1px 0 rgba(255,255,255,.22);
}
.btn-geri.btn-geri-ptak:hover { background: linear-gradient(180deg, #c2410c, #9a3412); color: #fff; border-color: #7c2d12; }
html[data-theme="dark"] .btn-geri.btn-geri-ptak {
    background: linear-gradient(180deg, #d9631a, #a8420f); color: #fff; border-color: #ffb27a;
    box-shadow: 0 2px 8px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.18);
}
html[data-theme="dark"] .btn-geri.btn-geri-ptak:hover { background: linear-gradient(180deg, #e8721f, #b84a12); }

/* — Filtre hapları (Bugün / Bu hafta / İşlendi ...) — */
html[data-theme="dark"] .pill { background: #1d2635; }
html[data-theme="dark"] .durum-opt-active.durum-opt-beklemede { background: #1d2635; }

/* — Kayıt görüntüleme "kağıdı" ve yan panelleri (ekranda koyu kart;
     @media print kuralları yazdırmada zaten beyaza zorlar) — */
html[data-theme="dark"] .print-sheet { background: var(--card); }
html[data-theme="dark"] .rv-materials-col { background: var(--card); }
html[data-theme="dark"] .mat-pick-table tr.mat-pick-row.is-selected { background-color: rgba(59, 130, 246, 0.16); }
html[data-theme="dark"] .mat-chip {
    background: rgba(77, 141, 255, .16);
    color: #93c5fd;
    border-color: rgba(77, 141, 255, .32);
}
html[data-theme="dark"] .pallet-card.pc-clickable:hover {
    box-shadow: 0 2px 10px rgba(77, 141, 255, .18);
}
html[data-theme="dark"] .pc-mat-tag {
    background: var(--surface-2, #1a2331);
    color: var(--text, #e7ecf4);
    border-color: var(--border, #273140);
}

/* — Rapor rozetleri: pastel → koyu ton — */
html[data-theme="dark"] .rpt-badge.badge-islendi  { background: #3a2c0a; color: #fbbf24; }
html[data-theme="dark"] .rpt-badge.badge-yuklendi { background: #0d3327; color: #34d399; }
html[data-theme="dark"] .dr-type-x { background: #17263d; color: #7db2ff; }
html[data-theme="dark"] .dr-type-z { background: #12301e; color: #4ade80; }

/* — Stok kritik satırı + toplu beyan kutusu — */
html[data-theme="dark"] .dkk-row-kritik { background: #2e1a1a; }
html[data-theme="dark"] #beyanBulkPreview { background: var(--card); }
html[data-theme="dark"] .beyan-bulk-head { background: #1a2740; }

/* — Malzeme Stok: kategori/durum rozetleri + uyarı-bilgi kutuları —
   Bunlar hiç dark override taşımıyordu; pastel açık renkler koyu arka
   plana karşı beyaza yakın kutular gibi parlıyordu (rapor_malzeme.php'deki
   "Parti No" bugu ile aynı aile — orada !important'la ezilmişti, burada
   hiç yazılmamıştı). Diğer rozetlerle (.rpt-badge) aynı desen: pastel → koyu
   doygun ton + aynı tondan açık yazı rengi. */
html[data-theme="dark"] .ms-cat-kasa  { background: #1f2a44; color: #93c5fd; }
html[data-theme="dark"] .ms-cat-palet { background: #2c2150; color: #c4b5fd; }
html[data-theme="dark"] .ms-cat-sarf  { background: #0d3327; color: #34d399; }
html[data-theme="dark"] .ms-cat-diger { background: #232d3c; color: var(--muted); }
html[data-theme="dark"] .badge-gelen    { background: #0d3327; color: #34d399; }
html[data-theme="dark"] .badge-cikan    { background: #3a1616; color: #f87171; }
html[data-theme="dark"] .badge-fire     { background: #3d2410; color: #fb923c; }
html[data-theme="dark"] .badge-duzeltme { background: #332a0a; color: #fbbf24; border-color: #5c4a12; }
html[data-theme="dark"] .stok-uyari-box { background: #332a0a; border-color: #5c4a12; }
html[data-theme="dark"] .stok-info-box  { background: #1a2740; border-color: #31456b; color: #93c5fd; }
html[data-theme="dark"] .ms-edit-btn         { background: #1a2740; border-color: #31456b; }
html[data-theme="dark"] .ms-edit-btn:hover   { background: #22345a; }

/* =========================================================
   KOYU TEMA v3 — sistematik tarama: token-metinli açık yüzeyler
   (arka plan hardcoded açık + metin var(--text)/var(--muted) olan
   tüm bileşenler). print-mode sayfaları bilinçli KAPSAM DIŞI.
   ========================================================= */

/* — Form vurgulu girişler (kayıt formu) — */
html[data-theme="dark"] body:not(.print-mode) input.kasa-adeti { background: #182740; }
html[data-theme="dark"] body:not(.print-mode) input.brut-kg   { background: #2b2410; }

/* — Görüntüleme kartları / malzeme blokları — */
html[data-theme="dark"] body:not(.print-mode) .view-card { background: var(--card); }
html[data-theme="dark"] body:not(.print-mode) .vc-materials,
html[data-theme="dark"] body:not(.print-mode) .materials-block { background: #1a2331; }
html[data-theme="dark"] body:not(.print-mode) .ym-hint { background: #1a2331; }

/* — Kantar (grup hesap / tartım) — */
html[data-theme="dark"] body:not(.print-mode) .grup-row-inputs,
html[data-theme="dark"] body:not(.print-mode) .grup-sapma-row,
html[data-theme="dark"] body:not(.print-mode) .kantar-tartim-row { background: var(--card); }
html[data-theme="dark"] body:not(.print-mode) .grup-calc-bar,
html[data-theme="dark"] body:not(.print-mode) .kv-grup-table tfoot td { background: #1a2331; }
html[data-theme="dark"] body:not(.print-mode) .grup-sum-row,
html[data-theme="dark"] body:not(.print-mode) .grup-ozel-inputs { background: #1a2740; }

/* — Tanımlar (def3) — */
html[data-theme="dark"] body:not(.print-mode) .def3-field select:disabled { background: #1b2430; }
html[data-theme="dark"] body:not(.print-mode) .def3-color-row input[type="color"] { background: var(--card); }
html[data-theme="dark"] body:not(.print-mode) .def3-panel-meta { background: #1a2331; }
html[data-theme="dark"] body:not(.print-mode) .def3-tab { background: #1d2635; }
html[data-theme="dark"] body:not(.print-mode) .def3-tab:hover,
html[data-theme="dark"] body:not(.print-mode) .def3-tgroup-add:hover { background: #1a2740; }
html[data-theme="dark"] body:not(.print-mode) .def3-row { background: var(--card); }
html[data-theme="dark"] body:not(.print-mode) .def3-row:hover { background: #1b2430; }
html[data-theme="dark"] body:not(.print-mode) .def3-row.sel { background: #1a2740; }
html[data-theme="dark"] body:not(.print-mode) .def3-chip { background: #232d3c; }

/* — Hesap / Stok / Malzeme Stok — */
html[data-theme="dark"] body:not(.print-mode) .dkk-detail-group { background: var(--card); }
html[data-theme="dark"] body:not(.print-mode) .dkk-detail-group-head { background: #1a2331; }
html[data-theme="dark"] body:not(.print-mode) .hd-select,
html[data-theme="dark"] body:not(.print-mode) .hd-input { background: #101722; color: var(--text); }
html[data-theme="dark"] body:not(.print-mode) .ms-tab-btn:hover { background: #1a2740; }
html[data-theme="dark"] body:not(.print-mode) .ms-tab-btn.ms-tab-active,
html[data-theme="dark"] body:not(.print-mode) .ms-form-tabs .ms-tab-btn.ms-tab-active { background: var(--card); color: var(--text); }
html[data-theme="dark"] body:not(.print-mode) .ms-action-card .form-control { background: #101722; color: var(--text); }
html[data-theme="dark"] body:not(.print-mode) .ms-stok-info { background: #14293a; border-color: #1e3a52; }
html[data-theme="dark"] body:not(.print-mode) .ms-stok-chip { color: #7dd3fc; }
html[data-theme="dark"] body:not(.print-mode) .ms-son-hareket { background: #1a2331; }

/* — Beyanlar — */
html[data-theme="dark"] body:not(.print-mode) .beyan-card,
html[data-theme="dark"] body:not(.print-mode) .beyan-section,
html[data-theme="dark"] body:not(.print-mode) .beyan-match-dialog { background: var(--card); }
html[data-theme="dark"] body:not(.print-mode) .beyan-collapsible-body,
html[data-theme="dark"] body:not(.print-mode) .beyan-bulk-item { background: #1a2331; }
html[data-theme="dark"] body:not(.print-mode) .beyan-match-table thead th { background: #1a2331; color: var(--muted); }
html[data-theme="dark"] body:not(.print-mode) .beyan-match-row:hover { background: #1b2430; }
html[data-theme="dark"] body:not(.print-mode) .beyan-match-changed td,
html[data-theme="dark"] body:not(.print-mode) .beyan-match-changed th { background: #2b2410; }
html[data-theme="dark"] body:not(.print-mode) .beyan-hks-dialog { background: var(--card); }
html[data-theme="dark"] body:not(.print-mode) .beyan-hks-warn { background: #2b2410; color: #fcd34d; }
html[data-theme="dark"] body:not(.print-mode) .beyan-hks-rozet-uyari { color: #fbbf24; }
html[data-theme="dark"] body:not(.print-mode) .beyan-hks-oneri-btn { background: #1a2331; border-color: #2b3648; }
html[data-theme="dark"] body:not(.print-mode) .beyan-hks-oneri-btn:hover { border-color: #a78bfa; color: #a78bfa; }
html[data-theme="dark"] body:not(.print-mode) .beyan-blok { background: var(--card); }
html[data-theme="dark"] body:not(.print-mode) .beyan-blok-sayi { background: #1a2331; }
html[data-theme="dark"] body:not(.print-mode) .beyan-blok-acik .beyan-blok-sayi { background: var(--warn); color: #1c2230; }
html[data-theme="dark"] body:not(.print-mode) .beyan-blok-kapanmis .beyan-blok-sayi { background: var(--success); color: #052e16; }
html[data-theme="dark"] body:not(.print-mode) .bb-bar { background: var(--card); }
html[data-theme="dark"] body:not(.print-mode) .bb-engel td { background: #2b2410; }
html[data-theme="dark"] body:not(.print-mode) .bk-hucre { background: var(--card); }
html[data-theme="dark"] body:not(.print-mode) .bk-grid { background: #2b3648; }
html[data-theme="dark"] body:not(.print-mode) .bk-not,
html[data-theme="dark"] body:not(.print-mode) .bk-engel,
html[data-theme="dark"] body:not(.print-mode) .bk-eksik .bk-deger { color: #fbbf24; }
html[data-theme="dark"] body:not(.print-mode) .btn:disabled:hover,
html[data-theme="dark"] body:not(.print-mode) .btn[disabled]:hover { background: var(--card); }

/* =========================================================
   KOYU TEMA v4 — inline <style> taşıyan sayfalar (records genişleyen satır,
   record_view plan tablosu, rapor_malzeme, kantar_raporu, kantar_view,
   audit, malzeme_stok(+rapor), yedekler, depo_sec, login).
   html[data-theme] özgüllüğü inline sayfa stillerini ezer.
   Yalnız EKRAN (@media screen) — yazdırma hiç etkilenmez.
   ========================================================= */
@media screen {

/* — Global güvence: sayfa gövdesi inline #fff dese bile koyu kalır (depo tonu korunur) — */
html[data-theme="dark"] body:not(.print-mode) {
    background: linear-gradient(
        rgba(var(--depot-accent-rgb), 0.045),
        rgba(var(--depot-accent-rgb), 0.045)
    ), var(--bg);
}

/* — Yüklemeler: genişleyen satır detayı — */
html[data-theme="dark"] .rec-main-row:hover { background: #1b2430; }
html[data-theme="dark"] .rec-row-expanded { background: #1a2740; }
html[data-theme="dark"] .rec-detail-row > td { background: #1a2331; }
html[data-theme="dark"] .rds-em-item { background: var(--card); border-color: var(--border); }

/* — Kayıt görüntüleme: plan tablosu (ekran) — */
html[data-theme="dark"] body:not(.print-mode) .print-table th { background: #1a2331; color: var(--muted); }
html[data-theme="dark"] body:not(.print-mode) .print-table .totals-row td { background: #2b2410; }
html[data-theme="dark"] body:not(.print-mode) .data-table .totals-row td { background: #2b2410; }

/* — Kantar Raporu — */
html[data-theme="dark"] .kr-stat-item { background: var(--card); }
html[data-theme="dark"] .kr-row-tek { background: #16233a; }
html[data-theme="dark"] .kr-row-grup-head { background: #2b2410; }
html[data-theme="dark"] .kr-row-grup-item { background: #221d10; }
html[data-theme="dark"] .kr-row-grup-item:hover { background: #2b2410; }
html[data-theme="dark"] .kr-total-row { background: #1a2331; }
html[data-theme="dark"] .kr-fo-card { background: var(--card); }
html[data-theme="dark"] .kr-fo-total { background: #1a2331; }
html[data-theme="dark"] .kr-depo-chip { background: #1f2a44; color: #a5b4fc; }
html[data-theme="dark"] .kr-kp-chip { background: #232d3c; color: var(--text); }
html[data-theme="dark"] .kr-tag-oto { background: #232d3c; color: var(--muted); }
html[data-theme="dark"] .kr-sapma-uyari { background: #34201f; color: #f0938d; }

/* — Kantar fiş görüntüleme (ekran) — */
html[data-theme="dark"] body:not(.print-mode) .kv-photo-wrap { background: var(--card); }
html[data-theme="dark"] body:not(.print-mode) .kv-grup-table th { background: #1a2331; color: var(--muted); }
html[data-theme="dark"] body:not(.print-mode) .kv-sapma-uyari { background: #34201f; color: #f0938d; }

/* — İşlem Geçmişi (audit) — */
html[data-theme="dark"] .au-risk { background: #2b2410; }
html[data-theme="dark"] .au-fix { background: #16233a; }
html[data-theme="dark"] .al-filters,
html[data-theme="dark"] .al-detail { background: #1a2331; }
html[data-theme="dark"] tr[data-status=approved] { background: #122b20; }
html[data-theme="dark"] tr[data-status=excluded] { background: #1a2331; }
html[data-theme="dark"] .al-row-toggle:hover td { background: #1b2430; }

/* — Malzeme Stok + Raporu — */
html[data-theme="dark"] .stok-table thead tr,
html[data-theme="dark"] .stok-table thead th { background: #1a2331; color: var(--muted); }
html[data-theme="dark"] .rapor-btn { background: #1d2635; color: var(--text); }
html[data-theme="dark"] .rapor-btn:hover { background: #243044; }
html[data-theme="dark"] .rapor-btn-active { background: #1a2740; color: #a5b4fc; }
html[data-theme="dark"] .rapor-filter-card { background: #1a2331; }
html[data-theme="dark"] .rapor-fg select,
html[data-theme="dark"] .rapor-fg input[type=text] { background: #101722; color: var(--text); }
html[data-theme="dark"] body:not(.print-mode) table.print-table td.kalan-col { background: #16233a; }
html[data-theme="dark"] body:not(.print-mode) table.print-table td.kalan-col.kalan-neg { background: #34201f; }
html[data-theme="dark"] body:not(.print-mode) table.print-table td.kalan-col.kalan-sifir { background: #1a2331; color: var(--muted); }
html[data-theme="dark"] body:not(.print-mode) tr.row-neg td { background: #2e1a1a; }

/* — Rapor rozet tabanı + Veritabanı Yedekleri — */
html[data-theme="dark"] .rpt-badge { background: #232d3c; }
html[data-theme="dark"] .gl-mv-badge { background: #232d3c; }
html[data-theme="dark"] .bkp-stat { background: #1a2331; }
html[data-theme="dark"] table.bkp-table th { background: #1a2331; }

/* — Depo Seçimi + Giriş (render_header'sız sayfalar; head'lerine tema
     script'i eklendi; kart stilleri burada koyulaştırılır) — */
html[data-theme="dark"] .dsc, html[data-theme="dark"] .lc { background: var(--card); }
html[data-theme="dark"] .dsc-depo { background: #1a2331; color: var(--text); }
html[data-theme="dark"] .dsc-depo:hover { background: #243044; }
html[data-theme="dark"] .dsc-depo.aktif { background: #1a2740; }
html[data-theme="dark"] .dsc-depo-rozet { background: #1f2a44; color: #7db2ff; }
html[data-theme="dark"] .dsc-bos { background: #1a2331; }
html[data-theme="dark"] .dsc-yeni-satir input { background: #101722; color: var(--text); }
html[data-theme="dark"] .dsc-yeni-satir input:focus { background: #101722; }
html[data-theme="dark"] .dsc-error, html[data-theme="dark"] .lc-error { background: #34201f; color: #f0938d; }
html[data-theme="dark"] .dsc-yeni-baslik { color: var(--muted); }
html[data-theme="dark"] .dsc-subtitle { color: var(--muted); }

} /* @media screen */

/* =========================================================
   KOYU TEMA v5 — palet toplu giriş panelleri
   (Toplu Düzenle · Excel Yükle · Yapıştır)
   Yalnız EKRAN; yazdırma çıktısı etkilenmez.
   ========================================================= */
@media screen {

html[data-theme="dark"] body:not(.print-mode) .toplu-panel { background: #1a2331; }
html[data-theme="dark"] body:not(.print-mode) .toplu-tablo th { background: #232d3c; color: var(--muted); }
html[data-theme="dark"] body:not(.print-mode) .toplu-tablo td { border-bottom-color: #232d3c; }
html[data-theme="dark"] body:not(.print-mode) .tp-cell:focus { background: #101722; color: var(--text); }
html[data-theme="dark"] body:not(.print-mode) .excel-bulk-section { background: #16233a; border-color: #2b3d5e; }
html[data-theme="dark"] body:not(.print-mode) .excel-drop-zone:hover,
html[data-theme="dark"] body:not(.print-mode) .excel-drop-zone.drag-over { background: #16233a; }

/* Yapıştır paneli */
html[data-theme="dark"] body:not(.print-mode) .yp-ta { background: #101722; color: var(--text); }
html[data-theme="dark"] body:not(.print-mode) .yp-uyari { background: #332916; border-color: #6b5320; color: #e6bf6b; }
html[data-theme="dark"] body:not(.print-mode) .yp-ozet { background: #16233a; border-color: #2b3d5e; }
html[data-theme="dark"] body:not(.print-mode) .yp-satir-hata td { background: #34201f; }
html[data-theme="dark"] body:not(.print-mode) .yp-satir-atlandi td { background: #1d2635; }
html[data-theme="dark"] body:not(.print-mode) .yp-ops { background: rgba(255,255,255,.08); }

} /* @media screen */

/* Şoför seçilince otomatik dolan telefon kutusu — kısa vurgu */
.oto-dolan {
    animation: oto-dolan-flash 1.2s ease-out;
}
@keyframes oto-dolan-flash {
    0%   { background: #dcfce7; border-color: #16a34a; }
    100% { background: inherit; border-color: inherit; }
}

/* =========================================================
   YENİ BEYAN FORMU — görsel katman (Sprint Beyan-Form-Tasarim-01)
   ---------------------------------------------------------
   Kapsam YALNIZ `form.bf` (beyan_create.php). Düzenle formu ve diğer
   .beyan-section kullanan ekranlar (beyan_view, tanı) etkilenmez.
   İşaretleme kancaları: bölümde data-bf="<ad>" (renk), başlıkta ve her
   .form-group'ta data-ic="<simge>" (maske). Simgeler mask-image olduğu için
   rengi temadan gelir; açık/koyu aynı işaretlemeyle çalışır.
   Özgüllük: `body:not(.print-mode) form.bf .beyan-section[data-bf]` —
   koyu tema katmanındaki `.beyan-section { background: var(--card) }` ve
   `html[data-theme="dark"] input[...]` kurallarını bilerek ezer.
   ========================================================= */
form.bf {
    --bf-kart: rgba(255,255,255,.9);
    --bf-kart-kenar: rgba(99,88,190,.13);
    --bf-golge: 0 1px 2px rgba(30,27,75,.04), 0 12px 32px -16px rgba(76,64,160,.22);
    --bf-baslik: #1e1b4b;
    --bf-etiket: #3b3a55;
    --bf-girdi: rgba(255,255,255,.96);
    --bf-girdi-kenar: #d9dbec;
    --bf-kutu-parlak: rgba(255,255,255,.7);
}
html[data-theme="dark"] form.bf {
    --bf-kart: rgba(22,29,41,.92);
    --bf-kart-kenar: rgba(255,255,255,.07);
    --bf-golge: 0 1px 2px rgba(0,0,0,.4), 0 14px 34px -16px rgba(0,0,0,.75);
    --bf-baslik: #e6e8ff;
    --bf-etiket: #b4bdcf;
    --bf-girdi: #0f1520;
    --bf-girdi-kenar: #2b3547;
    --bf-kutu-parlak: rgba(255,255,255,.04);
}
/* Bölüm renkleri: --bf-acc (açık uç) → --bf-acc2 (koyu uç) */
form.bf [data-bf] { --bf-acc: #a5b4fc; --bf-acc2: #4f46e5; --bf-acc-rgb: 79,70,229; --bf-glif: var(--bf-acc2); }
form.bf [data-bf="wa"]       { --bf-acc: #4ade80; --bf-acc2: #059669; --bf-acc-rgb: 16,185,129; }
form.bf [data-bf="hks"]      { --bf-acc: #fdba74; --bf-acc2: #ea580c; --bf-acc-rgb: 234,88,12; }
form.bf [data-bf="temel"]    { --bf-acc: #c4b5fd; --bf-acc2: #7c3aed; --bf-acc-rgb: 124,58,237; }
form.bf [data-bf="urun"]     { --bf-acc: #f9a8d4; --bf-acc2: #db2777; --bf-acc-rgb: 219,39,119; }
form.bf [data-bf="lojistik"] { --bf-acc: #93c5fd; --bf-acc2: #2563eb; --bf-acc-rgb: 37,99,235; }
form.bf [data-bf="durum"]    { --bf-acc: #7dd3fc; --bf-acc2: #4f46e5; --bf-acc-rgb: 79,70,229; }
html[data-theme="dark"] form.bf [data-bf] { --bf-glif: var(--bf-acc); }
/* Hal Bildirim kartı — diğer bölümlerden bilerek AYRI zeminde durur (HKS
   bildirimi için zorunlu alanlar burada; kart rengi bunu tek bakışta ayırır).
   Proje genelindeki --success-soft/--success token'ları kullanılır (Sprint
   Beyan-Form-Tasarim-02) — ayrı ton icat etmek yerine mevcut "olumlu/tamam"
   rengiyle tutarlı kalır; açık/koyu temada otomatik doğru değere döner. */
form.bf [data-bf="hks"] { --bf-kart: var(--success-soft); --bf-kart-kenar: rgba(31,157,91,.28); }
html[data-theme="dark"] form.bf [data-bf="hks"] { --bf-kart-kenar: rgba(46,204,143,.32); }

/* Sayfa zemini — yumuşak mor/mavi ışık (yalnız bu formun sayfasında) */
@media screen {
    body:not(.print-mode):has(form.bf) {
        background:
            radial-gradient(900px 520px at 88% -8%, rgba(139,92,246,.11), transparent 62%),
            radial-gradient(760px 520px at -8% 38%, rgba(59,130,246,.07), transparent 62%),
            var(--bg);
    }
    html[data-theme="dark"] body:not(.print-mode):has(form.bf) {
        background:
            radial-gradient(900px 520px at 88% -8%, rgba(139,92,246,.13), transparent 62%),
            radial-gradient(760px 520px at -8% 38%, rgba(59,130,246,.08), transparent 62%),
            var(--bg);
    }
}

/* — Bölüm kartı — */
body:not(.print-mode) form.bf .beyan-section[data-bf] {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 22px 22px;
    margin-bottom: 16px;
    border: 1px solid var(--bf-kart-kenar);
    border-radius: 18px;
    background:
        radial-gradient(420px 190px at 100% 0%, rgba(var(--bf-acc-rgb),.09), transparent 70%),
        var(--bf-kart);
    box-shadow: var(--bf-golge);
}

/* — Bölüm başlığı: renkli kabartma karo + başlık + (varsa) açıklama — */
body:not(.print-mode) form.bf .beyan-section[data-bf] > .beyan-section-title {
    display: grid;
    grid-template-columns: 48px minmax(0,1fr);
    column-gap: 14px;
    align-items: center;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: .92rem;
    font-weight: 800;
    letter-spacing: .05em;
    color: var(--bf-baslik);
}
form.bf .beyan-section-title::before,
form.bf .beyan-section-title::after {
    content: "";
    grid-column: 1;
    grid-row: 1;
    width: 48px;
    height: 48px;
    border-radius: 14px;
}
/* Açıklama satırı varsa karo iki satırı kaplar (yoksa başlık karoya ortalanır) */
form.bf .beyan-section-title:has(.bf-alt)::before,
form.bf .beyan-section-title:has(.bf-alt)::after { grid-row: 1 / span 2; }
form.bf .beyan-section-title::before {
    background: var(--icon-sheen), linear-gradient(145deg, var(--bf-acc), var(--bf-acc2));
    box-shadow: var(--icon-tile-shadow), 0 8px 18px -8px rgba(var(--bf-acc-rgb),.75);
}
form.bf .beyan-section-title::after {
    background: #fff;
    -webkit-mask: var(--ic) center / 24px 24px no-repeat;
            mask: var(--ic) center / 24px 24px no-repeat;
}
form.bf .bf-emoji { display: none; }
form.bf .bf-alt {
    grid-column: 2;
    display: block;
    margin-top: 3px;
    font-size: .8rem;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted);
}
/* HKS bölümünün açıklama paragrafı (ortak helpers.php parçası) başlığın altına */
body:not(.print-mode) form.bf .beyan-section[data-bf] > .beyan-section-title + p.muted {
    margin: -10px 0 0 62px !important;
    font-size: .8rem !important;
    line-height: 1.45;
}

/* `hidden` alan — CLAUDE.md maliyet.css emsaliyle aynı tuzak: aşağıdaki
   `.form-group[data-ic] { display:grid }` kuralı `[hidden]`in UA display:none
   kuralını özgüllükle ezer. `!important` ile geri kazanılır. */
form.bf .form-group[hidden] { display: none !important; }

/* — Alan: solda simge karosu, sağda etiket + girdi — */
body:not(.print-mode) form.bf .beyan-section[data-bf] .form-group[data-ic] {
    display: grid;
    grid-template-columns: 40px minmax(0,1fr);
    column-gap: 10px;
    row-gap: 6px;
    margin: 0;
    min-width: 0;
}
form.bf .form-group[data-ic] > * { grid-column: 2; min-width: 0; }
form.bf .form-group[data-ic]::before,
form.bf .form-group[data-ic]::after {
    content: "";
    grid-column: 1;
    grid-row: 2;
    align-self: start;
    width: 40px;
    height: 40px;
    margin-top: 2px;
    border-radius: 11px;
    box-sizing: border-box;
}
form.bf .form-group[data-ic]::before {
    background: rgba(var(--bf-acc-rgb),.09);
    border: 1px solid rgba(var(--bf-acc-rgb),.18);
    box-shadow: inset 0 1px 0 var(--bf-kutu-parlak);
}
form.bf .form-group[data-ic]::after {
    background: var(--bf-glif);
    -webkit-mask: var(--ic) center / 19px 19px no-repeat;
            mask: var(--ic) center / 19px 19px no-repeat;
}
body:not(.print-mode) form.bf .beyan-section[data-bf] .form-label {
    margin: 0;
    font-size: .8rem;
    font-weight: 600;
    color: var(--bf-etiket);
}
body:not(.print-mode) form.bf .beyan-section[data-bf] .beyan-form-grid { gap: 16px 22px; }

/* — Girdiler — */
body:not(.print-mode) form.bf .beyan-section[data-bf] :is(input[type="text"], input[type="datetime-local"], select, textarea) {
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid var(--bf-girdi-kenar);
    border-radius: 11px;
    background-color: var(--bf-girdi);
    color: var(--text);
    font-family: inherit;
    box-shadow: inset 0 1px 2px rgba(16,24,40,.04);
    transition: border-color .15s ease, box-shadow .15s ease;
}
/* Ok simgesi açıkça yazılır: koyu temadaki `select { background: … }` kısaltması
   genel oku (background-image) siliyordu. */
body:not(.print-mode) form.bf .beyan-section[data-bf] select {
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235b5d7a' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
}
html[data-theme="dark"] body:not(.print-mode) form.bf .beyan-section[data-bf] select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2393a0b4' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
body:not(.print-mode) form.bf .beyan-section[data-bf] textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
body:not(.print-mode) form.bf .beyan-section[data-bf] textarea.bf-ham { height: 124px; }
body:not(.print-mode) form.bf .beyan-section[data-bf] :is(input, select, textarea):focus {
    outline: none;
    border-color: rgba(var(--bf-acc-rgb),.7);
    box-shadow: 0 0 0 3px rgba(var(--bf-acc-rgb),.16);
}
body:not(.print-mode) form.bf .beyan-section[data-bf] .ara-sec-bos { background-color: #fff6f6; }
html[data-theme="dark"] body:not(.print-mode) form.bf .beyan-section[data-bf] .ara-sec-bos { background-color: #2a1616; }
@media (min-width: 768px) {
    body:not(.print-mode) form.bf .beyan-section[data-bf] :is(input[type="text"], input[type="datetime-local"], select, textarea) { font-size: .95rem; }
}
@media (max-width: 767px) {
    /* iOS zoom önleme — datetime-local genel kuralda yok, burada da 16px */
    body:not(.print-mode) form.bf .beyan-section[data-bf] :is(input[type="text"], input[type="datetime-local"], select, textarea) { font-size: 16px; }
}

/* v356: Şoför Telefonu type="tel" — metin kutularıyla aynı görünüm (yalnız EKLEME; yukarıdaki kurallar değişmedi). */
body:not(.print-mode) form.bf .beyan-section[data-bf] input[type="tel"] {
    width: 100%;
    min-height: 44px;
    padding: 10px 13px;
    border: 1px solid var(--bf-girdi-kenar);
    border-radius: 11px;
    background-color: var(--bf-girdi);
    color: var(--text);
    font-family: inherit;
    box-shadow: inset 0 1px 2px rgba(16,24,40,.04);
    transition: border-color .15s ease, box-shadow .15s ease;
}
@media (min-width: 768px) {
    body:not(.print-mode) form.bf .beyan-section[data-bf] input[type="tel"] { font-size: .95rem; }
}
@media (max-width: 767px) {
    body:not(.print-mode) form.bf .beyan-section[data-bf] input[type="tel"] { font-size: 16px; }
}

/* — WhatsApp satırı: metin kutusu + Metni Ayrıştır yan yana — */
form.bf .bf-wa-satir {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 16px;
    align-items: center;
}

/* — Butonlar (simge: data-ic maskesi, rengi currentColor) — */
form.bf .btn[data-ic] { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
form.bf .btn[data-ic]::before {
    content: "";
    flex: none;
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: var(--ic) center / contain no-repeat;
            mask: var(--ic) center / contain no-repeat;
}
body:not(.print-mode) form.bf :is(.bf-ayristir, .bf-kaydet) {
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, #4f7cff 0%, #7c4dff 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 10px 22px -10px rgba(99,82,255,.75), inset 0 1px 0 rgba(255,255,255,.25);
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
body:not(.print-mode) form.bf :is(.bf-ayristir, .bf-kaydet):hover:not(:disabled) {
    color: #fff;
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: 0 14px 26px -10px rgba(99,82,255,.85), inset 0 1px 0 rgba(255,255,255,.3);
}
body:not(.print-mode) form.bf :is(.bf-ayristir, .bf-kaydet):disabled { opacity: .6; cursor: progress; transform: none; }
body:not(.print-mode) form.bf .bf-iptal {
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid var(--bf-girdi-kenar);
    border-radius: 13px;
    background: var(--bf-girdi);
    color: var(--text);
    font-weight: 600;
}
body:not(.print-mode) form.bf .bf-iptal:hover { border-color: var(--border-strong); color: var(--text); }
form.bf .bf-eylem {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 4px 0 24px;
}
@media (prefers-reduced-motion: reduce) {
    body:not(.print-mode) form.bf :is(.bf-ayristir, .bf-kaydet) { transition: none; }
    body:not(.print-mode) form.bf :is(.bf-ayristir, .bf-kaydet):hover:not(:disabled) { transform: none; }
}

/* — Dar ekran — */
@media (max-width: 767px) {
    body:not(.print-mode) form.bf .beyan-section[data-bf] { padding: 16px 14px 18px; border-radius: 16px; gap: 14px; }
    body:not(.print-mode) form.bf .beyan-section[data-bf] > .beyan-section-title { grid-template-columns: 42px minmax(0,1fr); column-gap: 12px; font-size: .86rem; }
    form.bf .beyan-section-title::before,
    form.bf .beyan-section-title::after { width: 42px; height: 42px; border-radius: 12px; }
    body:not(.print-mode) form.bf .beyan-section[data-bf] > .beyan-section-title + p.muted { margin: -8px 0 0 !important; }
    body:not(.print-mode) form.bf .beyan-section[data-bf] .form-group[data-ic] { grid-template-columns: 38px minmax(0,1fr); }
    form.bf .form-group[data-ic]::before,
    form.bf .form-group[data-ic]::after { width: 38px; height: 38px; margin-top: 3px; }
    form.bf .bf-wa-satir { grid-template-columns: 1fr; gap: 12px; }
    form.bf .bf-wa-btn { padding-left: 48px; }
    form.bf .bf-wa-btn .btn { width: 100%; }
    form.bf .bf-eylem .bf-kaydet { flex: 1; }
}

/* — Simge maskeleri (Lucide çizimleri, ISC lisansı) — */
:is(form.bf, .bv) [data-ic="mesaj"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7.9 20A9 9 0 1 0 4 16.1L2 22Z'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="hal"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 22h18'/%3E%3Cpath d='M6 18v-7'/%3E%3Cpath d='M10 18v-7'/%3E%3Cpath d='M14 18v-7'/%3E%3Cpath d='M18 18v-7'/%3E%3Cpath d='M12 2 20 7H4z'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="pano"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='8' height='4' x='8' y='2' rx='1'/%3E%3Cpath d='M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2'/%3E%3Cpath d='M12 11h4'/%3E%3Cpath d='M12 16h4'/%3E%3Cpath d='M8 11h.01'/%3E%3Cpath d='M8 16h.01'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="paket"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7.5 4.27 9 5.15'/%3E%3Cpath d='M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z'/%3E%3Cpath d='m3.3 7 8.7 5 8.7-5'/%3E%3Cpath d='M12 22V12'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="tir"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2'/%3E%3Cpath d='M15 18H9'/%3E%3Cpath d='M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.62l-3.48-4.35A1 1 0 0 0 17.52 8H14'/%3E%3Ccircle cx='17' cy='18' r='2'/%3E%3Ccircle cx='7' cy='18' r='2'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="grafik"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='M18 17V9'/%3E%3Cpath d='M13 17V5'/%3E%3Cpath d='M8 17v-3'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="metin"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z'/%3E%3Cpath d='M13 8H7'/%3E%3Cpath d='M17 12H7'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="uyari"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4'/%3E%3Cpath d='M12 17h.01'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="bina"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 22V4a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v18Z'/%3E%3Cpath d='M6 12H4a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h2'/%3E%3Cpath d='M18 9h2a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2h-2'/%3E%3Cpath d='M10 6h4'/%3E%3Cpath d='M10 10h4'/%3E%3Cpath d='M10 14h4'/%3E%3Cpath d='M10 18h4'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="kure"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20'/%3E%3Cpath d='M2 12h20'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="arac"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 17h2c.6 0 1-.4 1-1v-3c0-.9-.7-1.7-1.5-1.9C18.7 10.6 16 10 16 10s-1.3-1.4-2.2-2.3c-.5-.4-1.1-.7-1.8-.7H5c-.6 0-1.1.4-1.4.9l-1.4 2.9A3.7 3.7 0 0 0 2 12v4c0 .6.4 1 1 1h2'/%3E%3Ccircle cx='7' cy='17' r='2'/%3E%3Cpath d='M9 17h6'/%3E%3Ccircle cx='17' cy='17' r='2'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="belge"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3Cpath d='M10 9H8'/%3E%3Cpath d='M16 13H8'/%3E%3Cpath d='M16 17H8'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="diyez"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9h16'/%3E%3Cpath d='M4 15h16'/%3E%3Cpath d='M10 3 8 21'/%3E%3Cpath d='M16 3l-2 18'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="rota"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='6' cy='19' r='3'/%3E%3Cpath d='M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15'/%3E%3Ccircle cx='18' cy='5' r='3'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="konum"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="elma"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20.94c1.5 0 2.75 1.06 4 1.06 3 0 6-8 6-12.22A4.91 4.91 0 0 0 17 5c-2.22 0-4 1.44-5 2-1-.56-2.78-2-5-2a4.9 4.9 0 0 0-5 4.78C2 14 5 22 8 22c1.25 0 2.5-1.06 4-1.06Z'/%3E%3Cpath d='M10 2c1 .5 2 2 2 5'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="etiket"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.59 2.59A2 2 0 0 0 11.17 2H4a2 2 0 0 0-2 2v7.17a2 2 0 0 0 .59 1.42l8.7 8.7a2.43 2.43 0 0 0 3.42 0l6.58-6.58a2.43 2.43 0 0 0 0-3.42z'/%3E%3Ccircle cx='7.5' cy='7.5' r='1'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="katman"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83Z'/%3E%3Cpath d='m22 17.65-9.17 4.16a2 2 0 0 1-1.66 0L2 17.65'/%3E%3Cpath d='m22 12.65-9.17 4.16a2 2 0 0 1-1.66 0L2 12.65'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="agirlik"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='5' r='3'/%3E%3Cpath d='M6.5 8a2 2 0 0 0-1.9 1.46L2.1 18.5A2 2 0 0 0 4 21h16a2 2 0 0 0 1.93-2.54L19.4 9.5A2 2 0 0 0 17.48 8Z'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="terazi"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m16 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z'/%3E%3Cpath d='m2 16 3-8 3 8c-.87.65-1.92 1-3 1s-2.13-.35-3-1Z'/%3E%3Cpath d='M7 21h10'/%3E%3Cpath d='M12 3v18'/%3E%3Cpath d='M3 7h2c2 0 5-1 7-2 2 1 5 2 7 2h2'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="kutu"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z'/%3E%3Cpath d='m3.3 7 8.7 5 8.7-5'/%3E%3Cpath d='M12 22V12'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="kasa"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='5' x='2' y='3' rx='1'/%3E%3Cpath d='M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8'/%3E%3Cpath d='M10 12h4'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="depo"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 8.35V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V8.35A2 2 0 0 1 3.26 6.5l8-3.2a2 2 0 0 1 1.48 0l8 3.2A2 2 0 0 1 22 8.35Z'/%3E%3Cpath d='M6 18h12'/%3E%3Cpath d='M6 14h12'/%3E%3Crect width='12' height='12' x='6' y='10'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="kisi"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="rehber"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 2v2'/%3E%3Cpath d='M7 22v-2a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v2'/%3E%3Cpath d='M8 2v2'/%3E%3Ccircle cx='12' cy='11' r='3'/%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="telefon"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="rozet"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15.48 12.89 1.51 8.53a.5.5 0 0 1-.81.47l-3.58-2.69a1 1 0 0 0-1.2 0l-3.59 2.69a.5.5 0 0 1-.81-.47l1.51-8.53'/%3E%3Ccircle cx='12' cy='8' r='6'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="liste"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h.01'/%3E%3Cpath d='M3 18h.01'/%3E%3Cpath d='M3 6h.01'/%3E%3Cpath d='M8 12h13'/%3E%3Cpath d='M8 18h13'/%3E%3Cpath d='M8 6h13'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="tup"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 2v7.53a2 2 0 0 1-.21.9L4.72 20.55a1 1 0 0 0 .9 1.45h12.76a1 1 0 0 0 .9-1.45l-5.07-10.13A2 2 0 0 1 14 9.53V2'/%3E%3Cpath d='M8.5 2h7'/%3E%3Cpath d='M7 16h10'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="takvim"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='18' x='3' y='4' rx='2'/%3E%3Cpath d='M16 2v4'/%3E%3Cpath d='M8 2v4'/%3E%3Cpath d='M3 10h18'/%3E%3Cpath d='m9 16 2 2 4-4'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="kalem"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.38 3.62a1 1 0 0 1 3 3L7.37 18.64a2 2 0 0 1-.86.5l-2.87.84a.5.5 0 0 1-.62-.62l.84-2.87a2 2 0 0 1 .5-.85z'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="sihir"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.64 3.64-1.28-1.28a1.21 1.21 0 0 0-1.72 0L2.36 18.64a1.21 1.21 0 0 0 0 1.72l1.28 1.28a1.2 1.2 0 0 0 1.72 0L21.64 5.36a1.2 1.2 0 0 0 0-1.72'/%3E%3Cpath d='m14 7 3 3'/%3E%3Cpath d='M5 6v4'/%3E%3Cpath d='M19 14v4'/%3E%3Cpath d='M10 2v2'/%3E%3Cpath d='M7 8H3'/%3E%3Cpath d='M21 16h-4'/%3E%3Cpath d='M11 3H9'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="kaydet"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z'/%3E%3Cpath d='M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7'/%3E%3Cpath d='M7 3v4a1 1 0 0 0 1 1h7'/%3E%3C/svg%3E"); }
:is(form.bf, .bv) [data-ic="carpi"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18'/%3E%3Cpath d='m6 6 12 12'/%3E%3C/svg%3E"); }

:is(form.bf, .bv) [data-ic="baglanti"] { --ic: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71'/%3E%3Cpath d='M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71'/%3E%3C/svg%3E"); }

/* =========================================================
   BEYAN ÖNİZLEME (beyan_view.php) — görsel katman (Sprint Beyan-Onizleme-01)
   ---------------------------------------------------------
   Kapsam YALNIZ `.bv` (beyan_view.php sarmalayıcısı). Yeni Beyan / Düzenle
   formunun (form.bf) dili: renkli kabartma karo başlık, alan başına simge
   karosu, bölüm rengi (data-bf). Simge maskeleri yukarıdaki ortak
   `:is(form.bf, .bv) [data-ic]` listesindedir — yeni simge orada tanımlanır.
   `.bv` sınıfını ve `.beyan-view-row[data-ic]` işaretlemesini SİLME.
   ========================================================= */
.bv {
    --bf-kart: rgba(255,255,255,.9);
    --bf-kart-kenar: rgba(99,88,190,.13);
    --bf-golge: 0 1px 2px rgba(30,27,75,.04), 0 12px 32px -16px rgba(76,64,160,.22);
    --bf-baslik: #1e1b4b;
    --bf-kutu-parlak: rgba(255,255,255,.7);
    --bf-zemin: rgba(99,88,190,.05);
}
html[data-theme="dark"] .bv {
    --bf-kart: rgba(22,29,41,.92);
    --bf-kart-kenar: rgba(255,255,255,.07);
    --bf-golge: 0 1px 2px rgba(0,0,0,.4), 0 14px 34px -16px rgba(0,0,0,.75);
    --bf-baslik: #e6e8ff;
    --bf-kutu-parlak: rgba(255,255,255,.04);
    --bf-zemin: rgba(255,255,255,.04);
}
.bv [data-bf] { --bf-acc: #a5b4fc; --bf-acc2: #4f46e5; --bf-acc-rgb: 79,70,229; --bf-glif: var(--bf-acc2); }
.bv [data-bf="wa"]       { --bf-acc: #4ade80; --bf-acc2: #059669; --bf-acc-rgb: 16,185,129; }
.bv [data-bf="hks"]      { --bf-acc: #fdba74; --bf-acc2: #ea580c; --bf-acc-rgb: 234,88,12; }
.bv [data-bf="temel"]    { --bf-acc: #c4b5fd; --bf-acc2: #7c3aed; --bf-acc-rgb: 124,58,237; }
.bv [data-bf="urun"]     { --bf-acc: #f9a8d4; --bf-acc2: #db2777; --bf-acc-rgb: 219,39,119; }
.bv [data-bf="lojistik"] { --bf-acc: #93c5fd; --bf-acc2: #2563eb; --bf-acc-rgb: 37,99,235; }
.bv [data-bf="durum"]    { --bf-acc: #7dd3fc; --bf-acc2: #4f46e5; --bf-acc-rgb: 79,70,229; }
.bv [data-bf="baglanti"] { --bf-acc: #5eead4; --bf-acc2: #0d9488; --bf-acc-rgb: 13,148,136; }
.bv [data-bf="uyari"]    { --bf-acc: #fcd34d; --bf-acc2: #d97706; --bf-acc-rgb: 217,119,6; }
html[data-theme="dark"] .bv [data-bf] { --bf-glif: var(--bf-acc); }
.bv .bf-emoji { display: none; }

/* — Bölüm kartı — */
body:not(.print-mode) .bv .beyan-section[data-bf] {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 18px 20px 20px;
    margin-bottom: 14px;
    border: 1px solid var(--bf-kart-kenar);
    border-radius: 18px;
    background:
        radial-gradient(420px 190px at 100% 0%, rgba(var(--bf-acc-rgb),.09), transparent 70%),
        var(--bf-kart);
    box-shadow: var(--bf-golge);
}
body:not(.print-mode) .bv .beyan-section[data-bf="hks"] {
    background:
        radial-gradient(420px 190px at 100% 0%, rgba(var(--bf-acc-rgb),.12), transparent 70%),
        var(--bf-kart);
    border-color: rgba(var(--bf-acc-rgb),.28);
}

/* — Bölüm başlığı: renkli kabartma karo + başlık — */
body:not(.print-mode) .bv .beyan-section[data-bf] > .beyan-section-title {
    display: grid;
    grid-template-columns: 44px minmax(0,1fr);
    column-gap: 14px;
    align-items: center;
    margin: 0;
    padding: 0;
    border: 0;
    font-size: .9rem;
    font-weight: 800;
    letter-spacing: .05em;
    color: var(--bf-baslik);
}
.bv .beyan-section-title::before,
.bv .beyan-section-title::after,
.bv .beyan-collapsible-toggle[data-ic]::before,
.bv .beyan-collapsible-toggle[data-ic]::after {
    content: "";
    grid-column: 1;
    grid-row: 1;
    width: 44px;
    height: 44px;
    border-radius: 13px;
}
.bv .beyan-section-title::before,
.bv .beyan-collapsible-toggle[data-ic]::before {
    background: var(--icon-sheen), linear-gradient(145deg, var(--bf-acc), var(--bf-acc2));
    box-shadow: var(--icon-tile-shadow), 0 8px 18px -8px rgba(var(--bf-acc-rgb),.75);
}
.bv .beyan-section-title::after,
.bv .beyan-collapsible-toggle[data-ic]::after {
    background: #fff;
    -webkit-mask: var(--ic) center / 22px 22px no-repeat;
            mask: var(--ic) center / 22px 22px no-repeat;
}

/* — Bildirim kartı hücreleri: simge karosu + etiket/değer — */
.bv .bk-grid,
html[data-theme="dark"] body:not(.print-mode) .bv .bk-grid { gap: 10px; background: none; border-radius: 0; overflow: visible; }
html[data-theme="dark"] body:not(.print-mode) .bv .bk-hucre { background: var(--bf-zemin); }
html[data-theme="dark"] body:not(.print-mode) .bv .bk-hucre.bk-eksik { background: rgba(217,119,6,.12); }
.bv .bk-kart .bk-grid { border-radius: 0; overflow: visible; }
.bv .bk-hucre {
    display: grid;
    grid-template-columns: 38px minmax(0,1fr);
    column-gap: 10px;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid rgba(var(--bf-acc-rgb),.16);
    border-radius: 14px;
    background: var(--bf-zemin);
}
.bv .bk-hucre[data-ic]::before,
.bv .bk-hucre[data-ic]::after {
    content: "";
    grid-column: 1;
    grid-row: 1 / span 3;
    width: 38px;
    height: 38px;
    border-radius: 11px;
}
.bv .bk-hucre[data-ic]::before {
    background: rgba(var(--bf-acc-rgb),.10);
    border: 1px solid rgba(var(--bf-acc-rgb),.2);
    box-shadow: inset 0 1px 0 var(--bf-kutu-parlak);
}
.bv .bk-hucre[data-ic]::after {
    background: var(--bf-glif);
    -webkit-mask: var(--ic) center / 19px 19px no-repeat;
            mask: var(--ic) center / 19px 19px no-repeat;
}
.bv .bk-hucre > * { grid-column: 2; min-width: 0; }
.bv .bk-hucre.bk-eksik { background: rgba(217,119,6,.09); border-color: rgba(217,119,6,.3); }
.bv .bk-hucre.bk-eksik[data-ic]::before { background: rgba(217,119,6,.14); border-color: rgba(217,119,6,.3); }
.bv .bk-hucre.bk-eksik[data-ic]::after { background: #d97706; }
.bv button.bk-tikla { font: inherit; text-align: left; color: inherit; width: 100%; cursor: pointer; transition: box-shadow .15s, transform .1s; }
.bv button.bk-tikla:hover { box-shadow: 0 0 0 2px rgba(217,119,6,.35); }
.bv button.bk-tikla:active { transform: scale(.99); }
.bv button.bk-tikla:focus-visible { outline: 2px solid #d97706; outline-offset: 2px; }
.plaka-hizli { border: 1px solid var(--border); border-radius: 16px; padding: 18px; width: min(360px, calc(100vw - 32px)); background: var(--card, #fff); color: var(--text, inherit); box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.plaka-hizli::backdrop { background: rgba(15,23,42,.5); }
.plaka-hizli h3 { margin: 0 0 12px; font-size: 1.05rem; }
.plaka-hizli input { width: 100%; font-size: 1.1rem; letter-spacing: .06em; font-weight: 600; }
.plaka-hizli-hata { margin-top: 8px; color: var(--danger, #b91c1c); font-size: .88rem; }
.plaka-hizli-btn { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.bv .bk-alt {
    margin-top: 0;
    padding-top: 14px;
    border-top: 1px dashed rgba(var(--bf-acc-rgb),.3);
}

/* — Alan satırı: solda simge karosu, sağda etiket + değer — */
.bv .beyan-view-grid { gap: 16px 22px; }
@media (min-width: 640px) { .bv .beyan-view-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 1024px) { .bv .beyan-view-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.bv .beyan-view-row { min-width: 0; align-self: start; }
.bv .beyan-view-row[data-ic] {
    display: grid;
    grid-template-columns: 40px minmax(0,1fr);
    column-gap: 12px;
    align-items: center;
}
.bv .beyan-view-row[data-ic]::before,
.bv .beyan-view-row[data-ic]::after {
    content: "";
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    box-sizing: border-box;
}
.bv .beyan-view-row[data-ic]::before {
    background: rgba(var(--bf-acc-rgb),.09);
    border: 1px solid rgba(var(--bf-acc-rgb),.18);
    box-shadow: inset 0 1px 0 var(--bf-kutu-parlak);
}
.bv .beyan-view-row[data-ic]::after {
    background: var(--bf-glif);
    -webkit-mask: var(--ic) center / 19px 19px no-repeat;
            mask: var(--ic) center / 19px 19px no-repeat;
}
.bv .beyan-view-row[data-ic] > * { grid-column: 2; min-width: 0; }
.bv .beyan-view-row .lbl { font-size: .74rem; font-weight: 600; letter-spacing: .02em; }
.bv .beyan-view-row .val { font-size: .95rem; font-weight: 600; overflow-wrap: anywhere; }
.bv .beyan-view-row .val.strong { font-weight: 800; }

/* — Analiz notu + durum şeridi — */
.bv .bv-not {
    padding: 12px 14px;
    border: 1px solid rgba(var(--bf-acc-rgb),.2);
    border-radius: 12px;
    background: var(--bf-zemin);
}
.bv .bv-yanyana { display: block; }
.bv .bv-yanyana > .beyan-section { min-width: 0; }
@media (min-width: 900px) {
    .bv .bv-yanyana-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: 16px; align-items: start; }
    .bv .bv-yanyana-2 > .beyan-section { margin-top: 0; }
}
.bv .bv-not-baslik { font-size: .74rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.bv .bv-durum { padding-top: 14px; border-top: 1px dashed rgba(var(--bf-acc-rgb),.3); }
.bv .bv-durum-ipucu { font-size: .82rem; margin-bottom: 8px; }
.bv .beyan-next-status-wrap { margin-top: 0; }
/* Dar ekranda durum pilleri tek satırda kayar (dokuz pil sarıp ekranı doldurmasın) */
@media (max-width: 767px) {
    .bv .beyan-next-status-wrap { flex-wrap: nowrap; overflow-x: auto; padding: 4px 4px 8px; margin: 0 -4px; -webkit-overflow-scrolling: touch; }
    .bv .beyan-next-status-wrap > * { flex: none; }
}

/* — Katlanır bölümler (WhatsApp / eşleşmeyen satırlar) — */
body:not(.print-mode) .bv .beyan-section.bv-katla[data-bf] { padding: 12px 14px; gap: 0; }
.bv .beyan-collapsible-toggle[data-ic] {
    display: grid;
    grid-template-columns: 44px minmax(0,1fr) auto;
    column-gap: 14px;
    align-items: center;
    width: 100%;
    min-height: 44px;
    text-align: left;
    font-weight: 800;
    font-size: .9rem;
    letter-spacing: .02em;
    color: var(--bf-baslik);
}
.bv .beyan-collapsible-toggle[data-ic] > span { grid-column: 3; }
.bv .bv-katla .beyan-collapsible-body { margin-top: 12px; overflow-wrap: anywhere; }

/* — Yükleme planı bağlantısı: butonlar tek satırda, dar ekranda tam genişlik — */
.bv .beyan-section[data-bf="baglanti"] > p { margin: 0; }
.bv .beyan-section[data-bf="baglanti"] > .btn { align-self: flex-start; }

/* — Düğmeye simge (HKS Taslağı Oluştur) — */
.bv .btn[data-ic] { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.bv .btn[data-ic]::before {
    content: "";
    flex: none;
    width: 18px;
    height: 18px;
    background: currentColor;
    -webkit-mask: var(--ic) center / contain no-repeat;
            mask: var(--ic) center / contain no-repeat;
}

/* — Masaüstü (≥900px): kart içindeki alanlar TEK satırda, kompakt (v329).
   Sığmazsa kendiliğinden bir alt satıra sarar; tam genişlik satırlar
   (Gümrük Adı / Adresi) ayrı satırda kalır. Mobil/tablet düzeni değişmez. */
@media (min-width: 900px) {
    .bv .beyan-view-grid { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: flex-start; }
    .bv .beyan-view-grid > .beyan-view-row { flex: 1 1 108px; min-width: 0; }
    .bv .beyan-view-grid > .beyan-view-row[style*="grid-column"] { flex: 1 1 100%; }
    .bv .beyan-view-row[data-ic] { grid-template-columns: 32px minmax(0,1fr); column-gap: 10px; }
    .bv .beyan-view-row[data-ic]::before, .bv .beyan-view-row[data-ic]::after { width: 32px; height: 32px; border-radius: 9px; }
    .bv .beyan-view-row[data-ic]::after { -webkit-mask-size: 16px 16px; mask-size: 16px 16px; }
    .bv .beyan-view-row .lbl { font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .bv .beyan-view-row .val { font-size: .9rem; }
    body:not(.print-mode) .bv .beyan-section[data-bf] { padding: 14px 18px 16px; gap: 12px; margin-bottom: 12px; }
    body:not(.print-mode) .bv .beyan-section[data-bf] > .beyan-section-title { grid-template-columns: 36px minmax(0,1fr); column-gap: 12px; font-size: .84rem; }
    .bv .beyan-section-title::before, .bv .beyan-section-title::after { width: 36px; height: 36px; border-radius: 11px; }
    .bv .beyan-section-title::after { -webkit-mask-size: 18px 18px; mask-size: 18px 18px; }
    .bv .bk-grid { grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
    .bv .bk-hucre { padding: 9px 11px; grid-template-columns: 32px minmax(0,1fr); }
    .bv .bk-hucre[data-ic]::before, .bv .bk-hucre[data-ic]::after { width: 32px; height: 32px; }
    .bv .bk-deger { font-size: 1rem; }
    .bv .bk-alt { padding-top: 10px; }
    .bv .bv-durum { padding-top: 10px; }
}

/* — Dar ekran — */
@media (max-width: 767px) {
    body:not(.print-mode) .bv .beyan-section[data-bf] { padding: 14px 14px 16px; border-radius: 16px; gap: 14px; }
    body:not(.print-mode) .bv .beyan-section[data-bf] > .beyan-section-title { grid-template-columns: 38px minmax(0,1fr); column-gap: 12px; font-size: .84rem; }
    .bv .beyan-section-title::before, .bv .beyan-section-title::after,
    .bv .beyan-collapsible-toggle[data-ic]::before, .bv .beyan-collapsible-toggle[data-ic]::after { width: 38px; height: 38px; border-radius: 11px; }
    .bv .beyan-collapsible-toggle[data-ic] { grid-template-columns: 38px minmax(0,1fr) auto; column-gap: 12px; font-size: .84rem; }
    .bv .bk-alt { flex-direction: column; align-items: stretch; }
    .bv .bk-alt .btn { width: 100%; min-height: 46px; }
    .bv .bk-alt .bk-engel { flex: 0 0 auto; }
    .bv .beyan-section[data-bf="baglanti"] > .btn,
    .bv .beyan-section[data-bf="baglanti"] > p .btn { width: 100%; align-self: stretch; }
}
@media (max-width: 380px) {
    .bv .bk-hucre { grid-template-columns: 32px minmax(0,1fr); column-gap: 8px; padding: 9px 9px; }
    .bv .bk-hucre[data-ic]::before, .bv .bk-hucre[data-ic]::after { width: 32px; height: 32px; }
    .bv .bk-deger { font-size: .95rem; }
}
@media print {
    .bv .beyan-section[data-bf] { box-shadow: none !important; background: none !important; }
}

/* =========================================================
   BEYAN ÖNİZLEME + LİSTE — v330
   - Önizleme: bölüm başlık bandı bir ton koyu (kartlar birbirine karışmasın),
     bildirim kartı 5 hücre (HKS Firma · Ülke · Ürün · Net KG · Plaka).
   - Liste (beyanlar.php): blok başlığı simge karosu, 3B parti no rozeti,
     plaka/HKS firma/ülke sütunları, kopyala düğmesi.
   `.bl-*` / `.bn-parti` yalnız beyan listesinde kullanılır.
   ========================================================= */
.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; }

/* — Önizleme: koyu başlık bandı — */
body:not(.print-mode) .bv .beyan-section[data-bf]:not(.bv-katla) > .beyan-section-title {
    margin: -14px -18px 2px;
    padding: 11px 18px;
    border-radius: 17px 17px 0 0;
    background: linear-gradient(180deg, rgba(var(--bf-acc-rgb), .17), rgba(var(--bf-acc-rgb), .11));
    border-bottom: 1px solid rgba(var(--bf-acc-rgb), .22);
}
html[data-theme="dark"] body:not(.print-mode) .bv .beyan-section[data-bf]:not(.bv-katla) > .beyan-section-title {
    background: linear-gradient(180deg, rgba(var(--bf-acc-rgb), .26), rgba(var(--bf-acc-rgb), .16));
    border-bottom-color: rgba(var(--bf-acc-rgb), .3);
}
@media (max-width: 767px) {
    body:not(.print-mode) .bv .beyan-section[data-bf]:not(.bv-katla) > .beyan-section-title {
        margin: -14px -14px 2px; padding: 10px 14px; border-radius: 15px 15px 0 0;
    }
    .bv .bk-grid > .bk-hucre:nth-child(5):nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 600px) and (max-width: 899px) {
    .bv .bk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* — Liste: blok kartı + başlık — */
.beyan-blok { border-radius: 18px; box-shadow: 0 1px 2px rgba(30,27,75,.04), 0 12px 30px -18px rgba(76,64,160,.25); }
.beyan-blok-head {
    display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center;
    gap: 4px 14px; border-bottom: 0; padding-bottom: 4px;
}
.bl-baslik-kap { min-width: 0; }
.bl-baslik-kap .beyan-blok-baslik { font-size: 1.05rem; }
.bl-baslik-kap .beyan-blok-not { display: block; margin-top: 2px; }
.bl-ikon {
    width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center;
    font-size: 1.35rem; line-height: 1;
    background: var(--icon-sheen), linear-gradient(145deg, var(--bl-a), var(--bl-b));
    box-shadow: var(--icon-tile-shadow), 0 8px 18px -8px var(--bl-b);
}
.bl-ikon-acik   { --bl-a: #fdba74; --bl-b: #ea580c; }
.bl-ikon-kapali { --bl-a: #6ee7b7; --bl-b: #059669; }
.bl-bilgi {
    font-size: .76rem; padding: 6px 12px; border-radius: 999px; max-width: 360px; line-height: 1.35;
    border: 1px solid transparent;
}
.bl-bilgi-acik   { background: rgba(234,88,12,.09);  color: #c2410c; border-color: rgba(234,88,12,.2); }
.bl-bilgi-kapali { background: rgba(5,150,105,.09);  color: #047857; border-color: rgba(5,150,105,.2); }
html[data-theme="dark"] .bl-bilgi-acik   { color: #fdba74; background: rgba(234,88,12,.16); }
html[data-theme="dark"] .bl-bilgi-kapali { color: #6ee7b7; background: rgba(5,150,105,.16); }
@media (max-width: 767px) {
    .beyan-blok-head { grid-template-columns: auto minmax(0,1fr); }
    .bl-ikon { width: 38px; height: 38px; border-radius: 11px; font-size: 1.15rem; }
    .bl-bilgi { grid-column: 1 / -1; max-width: none; border-radius: 12px; }
}

/* — Liste: arama kutusu (büyüteç simgeli) — */
.beyan-blok .bl-arama input[type="search"],
.beyan-blok .beyan-filter-form .bff-main input[type="search"] {
    padding-left: 38px; min-height: 42px; border-radius: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: 12px center;
}
.beyan-blok .bl-arama .btn, .beyan-blok .beyan-filter-form .bff-main > .btn:not(.btn-ghost) { min-height: 42px; border-radius: 12px; }

/* — Liste: tablo başlığı + satır — */
.beyan-blok .data-table thead th {
    font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
    background: rgba(99,88,190,.06); white-space: nowrap;
}
html[data-theme="dark"] .beyan-blok .data-table thead th { background: rgba(255,255,255,.05); }
.beyan-blok .data-table td { vertical-align: middle; }
/* Sütun sayısı arttı: yatay boşluk daraltılır, tarih/parti/plaka sarmaz */
.beyan-blok .data-table th, .beyan-blok .data-table td { padding-left: 8px; padding-right: 8px; }
.beyan-blok .data-table th { white-space: nowrap; }
.beyan-blok .data-table td:nth-child(2), .beyan-blok .data-table td:nth-child(3) { white-space: nowrap; }
.bn-parti { white-space: nowrap; }

/* — 3B parti no rozeti — */
.bn-parti {
    display: inline-block; min-width: 62px; text-align: center; padding: 5px 13px; border-radius: 11px;
    font-weight: 800; font-size: .86rem; letter-spacing: .02em; color: #1d4ed8; text-decoration: none;
    background: linear-gradient(180deg, #ffffff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 2px 0 #93c5fd, 0 6px 12px -4px rgba(37,99,235,.38);
    transition: transform .12s ease, box-shadow .12s ease;
}
a.bn-parti:hover, tr.row-link:hover .bn-parti { text-decoration: none; transform: translateY(-1px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 3px 0 #93c5fd, 0 9px 14px -4px rgba(37,99,235,.45); }
a.bn-parti:active { transform: translateY(1px); box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 0 0 #93c5fd, 0 2px 6px -2px rgba(37,99,235,.4); }
html[data-theme="dark"] .bn-parti {
    color: #bfdbfe; background: linear-gradient(180deg, #2b3b63 0%, #1e2a4a 100%); border-color: #3b4f87;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 2px 0 #121b33, 0 6px 12px -4px rgba(0,0,0,.6);
}
.beyan-card-parti .bn-parti { font-size: .95rem; }
@media (prefers-reduced-motion: reduce) { .bn-parti { transition: none; } a.bn-parti:hover, tr.row-link:hover .bn-parti { transform: none; } }

/* — Plaka / HKS sütunları — */
.bl-plaka {
    display: inline-block; padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: .8rem; letter-spacing: .04em;
    background: #f1f5f9; border: 1px solid #cbd5e1; color: #0f172a; white-space: nowrap;
}
html[data-theme="dark"] .bl-plaka { background: #1e293b; border-color: #334155; color: #e2e8f0; }
.bl-eksik { color: #b45309; font-style: italic; font-size: .82rem; }
html[data-theme="dark"] .bl-eksik { color: #fbbf24; }
.bl-hks-satir { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: .82rem; }
.bl-hks-oge b { color: var(--muted); font-weight: 600; font-size: .72rem; margin-right: 4px; text-transform: uppercase; letter-spacing: .04em; }

/* — Kopyala düğmesi (satır sonu) — */
.bl-kop-col { width: 44px; text-align: center; }
.bl-kop-form { margin: 0; }
.bl-kop-btn {
    width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 1rem; line-height: 1;
    border: 1px solid var(--border); background: var(--card); color: var(--muted);
}
.bl-kop-btn:hover, .bl-kop-btn:focus-visible { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
@media print { .bl-kop-col, .bl-bilgi { display: none !important; } }

/* Beyan çalışma alanı — mevcut bf renkleri, maskeleri ve düğmeleri korunur. */
.beyan-workspace { min-width: 0; }
.beyan-workspace [hidden] { display: none !important; }
.beyan-workspace-head {
    position: sticky;
    top: 0;
    z-index: 90;
    padding: 12px 0;
    margin-bottom: 12px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    gap: 12px;
}
.beyan-workspace-heading { min-width: 0; }
.beyan-workspace-heading h1 { font-size: 1.35rem; }
.beyan-workspace-heading p { margin: 3px 0 0; }
.beyan-workspace-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.beyan-dirty { font-size: .8rem; }
.beyan-workspace-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
.beyan-workspace-main, .beyan-workspace-hks { min-width: 0; }
.beyan-workspace-hks { max-width: 640px; }
.beyan-workspace-tabs {
    display: flex;
    gap: 6px;
    padding: 6px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
}
.beyan-workspace-tabs .btn { flex: 1; min-width: 0; min-height: 44px; padding: 8px 10px; }
.beyan-workspace-tabs [aria-selected="true"] { background: var(--primary-soft); color: var(--primary); box-shadow: inset 0 -2px var(--primary); }
.beyan-workspace :is([role="tab"], summary):focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
body:not(.print-mode) form.beyan-workspace-form .beyan-section[data-bf] { padding: 16px; gap: 14px; margin-bottom: 12px; }
body:not(.print-mode) form.beyan-workspace-form .beyan-section[data-bf] > .beyan-section-title { grid-template-columns: 36px minmax(0, 1fr); column-gap: 10px; letter-spacing: 0; }
form.beyan-workspace-form .beyan-section-title::before,
form.beyan-workspace-form .beyan-section-title::after { width: 36px; height: 36px; border-radius: 11px; }
form.beyan-workspace-form .beyan-section-title::after { -webkit-mask-size: 21px 21px; mask-size: 21px 21px; }
body:not(.print-mode) form.beyan-workspace-form .beyan-section[data-bf] .form-group[data-ic] { grid-template-columns: 28px minmax(0, 1fr); column-gap: 7px; row-gap: 5px; }
form.beyan-workspace-form .form-group[data-ic]::before,
form.beyan-workspace-form .form-group[data-ic]::after { width: 28px; height: 32px; border-radius: 8px; margin-top: 6px; }
form.beyan-workspace-form .form-group[data-ic]::after { -webkit-mask-size: 17px 17px; mask-size: 17px 17px; }
body:not(.print-mode) form.beyan-workspace-form .beyan-section[data-bf] .beyan-form-grid { gap: 12px; }
body:not(.print-mode) form.beyan-workspace-form .beyan-section[data-bf] .beyan-workspace-fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); }
body:not(.print-mode) form.beyan-workspace-form .beyan-section[data-bf] .beyan-workspace-quantities { grid-template-columns: repeat(auto-fit, minmax(min(100%, 132px), 1fr)); }
body:not(.print-mode) form.beyan-workspace-form .beyan-workspace-hks .beyan-form-grid { grid-template-columns: minmax(0, 1fr); }
body:not(.print-mode) form.beyan-workspace-form .beyan-section[data-bf] > .beyan-section-title + p.muted { margin: 0 !important; }
body:not(.print-mode) form.beyan-workspace-form details.beyan-section { display: block; }
.beyan-workspace summary, .beyan-workspace-bag > summary { cursor: pointer; min-height: 44px; padding: 10px 0; font-weight: 600; overflow-wrap: anywhere; }
.beyan-workspace summary .muted { font-weight: 400; }
.beyan-workspace-details[open] > :not(summary), .beyan-unmatched[open] > :not(summary) { margin-top: 12px; }
body:not(.print-mode) form.beyan-workspace-form .beyan-section[data-bf] .beyan-source-text { min-height: 180px; }
.beyan-workspace-delete, .beyan-workspace-bag { margin: 10px 0 16px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.beyan-workspace-delete .btn { margin-bottom: 14px; color: var(--danger); }
.beyan-workspace-bag > .beyan-section { margin-top: 8px; }
.beyan-bulk-edit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 12px; }
.beyan-parse-comparison { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.beyan-parse-compare-row { padding: 10px 0; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.beyan-parse-compare-row:last-child { border-bottom: 0; }
.beyan-workspace :is([data-beyan-panel], input, select, textarea) { scroll-margin-top: 145px; }
@media (max-width: 899px) {
    .beyan-workspace-head { top: 60px; }
}
@media (max-width: 767px) {
    .beyan-workspace-head { align-items: stretch; flex-direction: column; padding: 8px 0; gap: 6px; }
    .beyan-workspace-heading p { display: none; }
    .beyan-workspace-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; }
    .beyan-workspace-actions .beyan-dirty { overflow-wrap: anywhere; }
    body:not(.print-mode) form.beyan-workspace-form :is(.bf-kaydet, .bf-iptal) { min-height: 44px; padding: 0 12px; }
    .beyan-workspace-tabs { gap: 3px; padding: 4px; }
    .beyan-workspace-tabs .btn { font-size: .9rem; padding: 8px 4px; }
    body:not(.print-mode) form.beyan-workspace-form .beyan-section[data-bf] { padding: 12px; }
    body:not(.print-mode) form.beyan-workspace-form .beyan-section[data-bf] .beyan-workspace-fields { grid-template-columns: minmax(0, 1fr); }
    body:not(.print-mode) form.beyan-workspace-form .beyan-section[data-bf] .beyan-workspace-quantities { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body:not(.print-mode) form.beyan-workspace-form .beyan-workspace-quantities .form-group[data-ic] { grid-template-columns: 22px minmax(0, 1fr); column-gap: 5px; }
    form.beyan-workspace-form .beyan-workspace-quantities .form-group[data-ic]::before,
    form.beyan-workspace-form .beyan-workspace-quantities .form-group[data-ic]::after { width: 22px; }
    body:not(.print-mode) form.beyan-workspace-form .beyan-workspace-quantities input { padding: 10px 7px; }
}
@media print {
    .beyan-workspace-tabs, .beyan-workspace-head, .beyan-workspace-delete { display: none !important; }
    .beyan-workspace-grid { display: block; }
}

/* Beyan section permissions: hidden HKS yields its width to the form. */
.beyan-permission-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.beyan-section { min-width: 0; margin-inline: 0; }
.beyan-workspace-grid:not(:has(.beyan-workspace-hks)) { grid-template-columns: minmax(0, 1fr); }
.beyan-workspace fieldset[disabled] .beyan-section-title::after { opacity: .65; }
.beyan-workspace :disabled { opacity: .8; cursor: default; }
.beyan-permission-note { font-size: .8rem; color: var(--muted); margin: 0 0 8px; }
/* Role editor: page access, operations and field permissions. */
.rol-dialog { width: min(1120px, 96vw); max-width: 1120px; }
.rol-editor-tools { display:flex; align-items:end; gap:16px; flex-wrap:wrap; margin-bottom:12px; }
.rol-editor-tools > label:first-child { flex:1 1 260px; font-weight:600; font-size:.85rem; }
.rol-selected-filter { display:flex; align-items:center; gap:8px; font-size:.85rem; padding:10px 0; }
.rol-total { color:var(--primary); padding:10px 0; font-size:.85rem; }
.rol-editor .rol-perm-group { padding:16px; }
.rol-editor .rol-perm-group-head { flex-wrap:wrap; }
.rol-editor .rol-perm-group-title { font-size:1rem; }
.rol-group-count { font-weight:400; color:var(--muted); margin-left:8px; white-space:nowrap; }
.rol-editor .rol-perm-group-actions { flex-wrap:wrap; gap:8px; }
.rol-editor .rol-perm-toggle { min-height:36px; padding:5px 9px; border:1px solid var(--border); border-radius:6px; text-decoration:none; }
.rol-editor .rol-perm-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.rol-perm-kind { grid-column:1/-1; font-size:.75rem; font-weight:700; color:var(--muted); margin:8px 0 2px; }
.rol-editor .rol-permission { display:flex; align-items:flex-start; gap:10px; border:1px solid var(--border); border-radius:8px; padding:12px; min-width:0; cursor:pointer; }
.rol-permission input { flex:0 0 auto; width:18px; height:18px; margin:2px 0; accent-color:var(--primary); }
.rol-permission span { overflow-wrap:anywhere; }
.rol-permission small { display:block; font-size:.7rem; color:var(--muted); margin-top:4px; }
.rol-permission:has(input:checked) { background:var(--primary-soft); border-color:var(--primary); }
.rol-editor [hidden] { display:none !important; }
.usr-permission-preview { font-size:.82rem; padding:12px; margin-top:10px; border:1px solid var(--border); border-radius:8px; line-height:1.6; }
.usr-permission-preview ul { max-height:180px; overflow:auto; padding-left:20px; }
@media(max-width:767px) {
 .rol-dialog { width:100%; max-width:100%; }
 .rol-editor .rol-perm-grid { grid-template-columns:minmax(0,1fr); }
 .rol-editor .rol-perm-group { padding:10px; }
 .rol-editor .rol-perm-toggle { min-height:44px; }
 .rol-editor-tools { gap:4px 12px; }
}
.rol-help { margin:4px 0 12px; font-size:.8rem; color:var(--muted); }
.rol-help summary { cursor:pointer; padding:4px 0; }
.rol-help p { margin:6px 0; line-height:1.5; }
@media(max-width:767px) {
 .rol-dialog .pm-body { padding:12px; }
 .rol-dialog .rol-form-label-row { margin-bottom:8px; }
 .rol-editor-tools { margin-bottom:4px; }
 .rol-selected-filter, .rol-total { padding:4px 0; }
 .rol-editor .rol-perm-group-head { gap:4px; margin-bottom:2px; }
}

/* v346 — Önizleme: göz yormasın. Hal Kayıt Bildirimi (hks) ve uyarı kartları dışındaki
   bölümlerin zemini/başlık bandı tek nötr renk (Yeni Beyan formu gibi); simge karoları
   ve alan simgeleri bölüm renginde KALIR (--bf-acc değişkenleri dokunulmadı). */
body:not(.print-mode) .bv .beyan-section[data-bf]:not([data-bf="hks"]):not([data-bf="uyari"]) {
    background: var(--bf-kart);
}
body:not(.print-mode) .bv .beyan-section[data-bf]:not([data-bf="hks"]):not([data-bf="uyari"]):not(.bv-katla) > .beyan-section-title {
    background: none;
    border-bottom: 1px solid var(--bf-kart-kenar);
}
html[data-theme="dark"] body:not(.print-mode) .bv .beyan-section[data-bf]:not([data-bf="hks"]):not([data-bf="uyari"]):not(.bv-katla) > .beyan-section-title {
    background: none;
    border-bottom-color: var(--bf-kart-kenar);
}

/* v347 — Önizleme: Gümrük Adı ve Gümrük Adresi aynı satırda; ad sığmazsa kendi sütununda alt satıra kayar. */
.bv .beyan-view-grid > .bv-satir-kir { display: none; }
.bv .beyan-view-grid > .bv-gumruk-ad,
.bv .beyan-view-grid > .bv-gumruk-adres { min-width: 0; overflow-wrap: anywhere; }
@media (min-width: 900px) {
    .bv .beyan-view-grid > .bv-satir-kir { display: block; flex: 0 0 100%; height: 0; margin: -12px 0 0; }
    .bv .beyan-view-grid > .bv-gumruk-ad { flex: 1 1 28%; }
    .bv .beyan-view-grid > .bv-gumruk-adres { flex: 2 1 55%; }
}
@media (min-width: 1024px) {
    .bv .beyan-view-grid > .bv-gumruk-adres { grid-column: auto; }
}
@media (min-width: 640px) and (max-width: 899px) {
    .bv .beyan-view-grid > .bv-gumruk-ad,
    .bv .beyan-view-grid > .bv-gumruk-adres { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
    .bv .beyan-view-grid > .bv-gumruk-ad,
    .bv .beyan-view-grid > .bv-gumruk-adres { flex: 1 1 100%; }
}
/* HKS Ürün Adı alanı: ürün adı bir HKS ürünüyle eşleşince kilitli görünür */
.ara-sec:disabled, select[data-hks-kilit="1"] { background-color: var(--surface-2, #f1f5f9); color: var(--muted, #64748b); cursor: not-allowed; }
body:not(.print-mode) form.bf select[data-hks-kilit="1"] { background-color: rgba(100,116,139,.12); color: var(--muted, #64748b); cursor: not-allowed; opacity: 1; }
html[data-theme="dark"] body:not(.print-mode) form.bf select[data-hks-kilit="1"] { background-color: rgba(148,163,184,.14); }
/* v348 — HKS Ürün Adı: ürün adı eşleşmediğinde alan açılır ve belirgin (turuncu) çerçeve alır */
body:not(.print-mode) form.bf .beyan-section[data-bf] select[data-hks-serbest="1"],
body:not(.print-mode) form.bf .beyan-section[data-bf] input.ara-sec.hks-serbest { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.20); background-color: #fffbeb; }
html[data-theme="dark"] body:not(.print-mode) form.bf .beyan-section[data-bf] select[data-hks-serbest="1"],
html[data-theme="dark"] body:not(.print-mode) form.bf .beyan-section[data-bf] input.ara-sec.hks-serbest { background-color: rgba(245,158,11,.10); border-color: #f59e0b; }
body:not(.print-mode) form.bf .beyan-section[data-bf] select[data-hks-kilit="1"],
body:not(.print-mode) form.bf .beyan-section[data-bf] input.ara-sec:disabled { background-color: rgba(100,116,139,.12); color: var(--muted, #64748b); cursor: not-allowed; opacity: 1; }

/* v353 — Önizleme: Düzenle düğmesi turuncu (açık + koyu tema) */
.btn.btn-duzenle { background: linear-gradient(180deg, #f97316, #ea580c); border-color: #c2410c; color: #fff; }
.btn.btn-duzenle:hover, .btn.btn-duzenle:focus-visible { background: linear-gradient(180deg, #fb923c, #c2410c); border-color: #9a3412; color: #fff; }
html[data-theme="dark"] .btn.btn-duzenle { background: linear-gradient(180deg, #ea580c, #c2410c); border-color: #f97316; color: #fff; }

/* ── v357: "İşlem Bekleyen Beyanlar" kartı — Yazdır / PDF Gönder (assets/beyan_yazdir.js) ── */
.beyan-blok-acik .beyan-blok-head { grid-template-columns: auto minmax(0,1fr) auto auto; }
.bl-aksiyon { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.bl-aksiyon .btn { white-space: nowrap; font-weight: 700; }
.bl-pdf-btn { background: #25D366; border-color: #1da851; color: #fff; }
.bl-pdf-btn:hover:not(:disabled) { background: #1fbd5a; color: #fff; }
.bl-pdf-btn:disabled { cursor: wait; }
@media (max-width: 767px) {
    .beyan-blok-acik .beyan-blok-head { grid-template-columns: auto minmax(0,1fr); }
    .bl-aksiyon { grid-column: 1 / -1; justify-content: stretch; }
    .bl-aksiyon .btn { flex: 1 1 0; min-height: 40px; }
}
@media print { .bl-aksiyon { display: none !important; } }

/* v360: bölüm başlıklarındaki açıklama pili (.bl-bilgi) kaldırıldı — bekleyen kartta boş 4. sütun kalmasın. */
@media (min-width: 768px) {
    .beyan-blok-acik .beyan-blok-head { grid-template-columns: auto minmax(0,1fr) auto; }
}

/* v365: aynı dorse plakalı bekleyen beyanların Parti No rozeti aynı renkte (yazdırma paletiyle aynı sıra) */
.bn-parti.bn-g0 { --g-bg:#fde68a; --g-tx:#92400e; --g-ac:#f59e0b; }
.bn-parti.bn-g1 { --g-bg:#bfdbfe; --g-tx:#1e3a8a; --g-ac:#3b82f6; }
.bn-parti.bn-g2 { --g-bg:#bbf7d0; --g-tx:#14532d; --g-ac:#22c55e; }
.bn-parti.bn-g3 { --g-bg:#fbcfe8; --g-tx:#831843; --g-ac:#ec4899; }
.bn-parti.bn-g4 { --g-bg:#ddd6fe; --g-tx:#4c1d95; --g-ac:#8b5cf6; }
.bn-parti.bn-g5 { --g-bg:#fed7aa; --g-tx:#7c2d12; --g-ac:#f97316; }
.bn-parti.bn-g6 { --g-bg:#a5f3fc; --g-tx:#134e4a; --g-ac:#06b6d4; }
.bn-parti.bn-g7 { --g-bg:#fecaca; --g-tx:#7f1d1d; --g-ac:#ef4444; }
.bn-parti.bn-g8 { --g-bg:#d9f99d; --g-tx:#365314; --g-ac:#84cc16; }
.bn-parti.bn-g9 { --g-bg:#e9d5ff; --g-tx:#581c87; --g-ac:#a855f7; }
.bn-parti.bn-g { color: var(--g-tx); background: linear-gradient(180deg, #ffffff 0%, var(--g-bg) 100%); border-color: var(--g-ac);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 2px 0 var(--g-ac), 0 6px 12px -4px rgba(0,0,0,.25); }
html[data-theme="dark"] .bn-parti.bn-g { color: var(--g-bg); background: linear-gradient(180deg, color-mix(in srgb, var(--g-ac) 38%, #1e2a4a) 0%, color-mix(in srgb, var(--g-ac) 22%, #141b30) 100%);
    border-color: var(--g-ac); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 2px 0 #121b33, 0 6px 12px -4px rgba(0,0,0,.6); }

/* v370: Mail Merkezi okunmamış rozeti (kenar çubuğu · üst menü · alt çubuk · "Diğer" sayfası).
   İşaretleme PHP'de (nav_rozet_html); beyaz #dc2626 üstünde 4.8:1 — açık ve koyu temada aynı. Animasyon yok. */
.nav-rozet {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 18px; height: 18px; padding: 0 5px; box-sizing: border-box;
    border-radius: 999px; background: #dc2626; color: #fff;
    font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: 0;
    font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0;
}
.nav-rozet[hidden] { display: none; }
.sidebar-link .nav-rozet { margin-left: auto; }
.topnav a .nav-rozet { margin-left: 6px; vertical-align: 1px; }
.bn-item .ni-wrap .nav-rozet {
    position: absolute; top: -4px; right: -9px; z-index: 2;
    box-shadow: 0 0 0 2px var(--bn-dock); pointer-events: none;
}
.bn-tile .nav-rozet-tile { position: absolute; top: 2px; right: calc(50% + 14px); box-shadow: 0 0 0 2px var(--card); pointer-events: none; }
html[data-theme="dark"] .nav-rozet { background: #ef4444; color: #1a0606; }

/* Sidebar açılır/kapanır grup başlıkları (v433) */
.sidebar-grup > summary.sidebar-section {
    display: flex; align-items: center; gap: 9px; cursor: pointer; list-style: none;
    font-size: .82rem; font-weight: 800; letter-spacing: .09em;
    color: rgba(255,255,255,.88); padding: 10px 10px; margin: 8px 0 4px;
    border-radius: 9px; background: rgba(255,255,255,.05);
    border-left: 3px solid var(--depot-accent, #3b82f6);
    user-select: none; -webkit-user-select: none;
}
.sidebar-grup > summary.sidebar-section::-webkit-details-marker { display: none; }
.sidebar-grup > summary.sidebar-section:hover { background: rgba(255,255,255,.09); color: #fff; }
.sidebar-grup > summary.sidebar-section:focus-visible { outline: 2px solid #93c5fd; outline-offset: 1px; }
.sidebar-section-ikon { display: inline-flex; color: var(--depot-accent, #60a5fa); flex-shrink: 0; }
.sidebar-section-ad { flex: 1; text-transform: uppercase; }
.sidebar-section-ok {
    width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    transform: rotate(45deg); margin-top: -3px; transition: transform .18s ease; opacity: .8;
}
.sidebar-grup:not([open]) > summary .sidebar-section-ok { transform: rotate(-45deg); margin-top: 0; }

/* =========================================================
   EKRAN KİLİDİ (v454) — yalnız masaüstü (≥900px + fare). Mobilde kilit yok.
   <dialog id="ekranKilit"> app.js ile showModal() edilir (üst katman: açık diğer
   pencerelerin ÜSTÜNDE, arka plan etkileşimsiz). Sunucu kilitliyse body.ekran-kilitli
   içeriği ilk çizimde gizler. Tokenlar temayla değişir (koyu için ayrı kural gerekmez).
   ========================================================= */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
    body.ekran-kilitli > *:not(#ekranKilit) { visibility: hidden !important; }
}
dialog.ekran-kilit {
    border: 0; padding: 0; background: transparent; color: var(--text);
    max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh;
}
dialog.ekran-kilit::backdrop { background: var(--bg); }
dialog.ekran-kilit[open] { display: flex; align-items: center; justify-content: center; }
.ekran-kilit-kart {
    width: 100%; max-width: 380px; box-sizing: border-box; margin: 16px;
    background: var(--card); border: 1px solid var(--border); border-radius: 16px;
    box-shadow: var(--shadow); padding: 28px 24px; text-align: center;
    display: flex; flex-direction: column; gap: 12px;
}
.ekran-kilit-ikon { font-size: 36px; line-height: 1; }
.ekran-kilit-kart h2 { margin: 0; font-size: 20px; }
.ekran-kilit-not { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.ekran-kilit-girdi {
    width: 100%; box-sizing: border-box; padding: 11px 14px; font-size: 16px;
    border: 1px solid var(--border-strong); border-radius: 10px;
    background: var(--card); color: var(--text); text-align: center;
}
.ekran-kilit-girdi:focus { outline: 2px solid var(--primary); outline-offset: 1px; }
.ekran-kilit-hata { color: var(--danger); background: var(--danger-soft); border-radius: 8px; padding: 8px 10px; font-size: 13px; }
.ekran-kilit-hata[hidden] { display: none; }
.ekran-kilit-btn { width: 100%; justify-content: center; }
.ekran-kilit-cikis { color: var(--muted); font-size: 13px; text-decoration: underline; }

/* --- Ekran kilidi: PIN modeli (v455) --- */
.ekran-pin-girdi {
    -webkit-text-security: disc; text-security: disc;
    letter-spacing: .35em; font-variant-numeric: tabular-nums;
}
.ekran-pin-girdi::placeholder { letter-spacing: normal; }
.ekran-kilit-kart label { display: flex; flex-direction: column; gap: 4px; text-align: left; font-size: 13px; color: var(--muted); }
.ekran-kilit-kart label[hidden], .ekran-kilit-kart [hidden] { display: none; }
.ekran-pin-satir { display: flex; gap: 8px; }
.ekran-pin-satir > * { flex: 1; justify-content: center; }
.ekran-pin-bilgi { color: var(--success, #166534); font-size: 13px; }
button.ekran-pin-link {
    background: none; border: 0; padding: 0; color: var(--primary); font-size: 13px;
    text-decoration: underline; cursor: pointer; align-self: flex-start;
}
/* PIN değiştir: tam ekran değil, ortada kart; arka plan yarı saydam */
dialog#ekranPinDegistir.ekran-kilit { width: 100vw; height: 100vh; }
dialog#ekranPinDegistir.ekran-kilit::backdrop { background: rgba(0,0,0,.45); }
dialog#ekranPinDegistir.ekran-kilit { background: transparent; }
dialog.ekran-kilit:not([open]) { display: none; }
body.ekran-kilitli > dialog.ekran-kilit { visibility: visible; }
.ekran-kilit-hata, .ekran-pin-bilgi { overflow-wrap: anywhere; }

/* Sidebar PIN değiştir düğmesi — yalnız masaüstü */
.sidebar-user-pin { display: none; }
@media (min-width: 900px) and (hover: hover) and (pointer: fine) {
    .sidebar-user-pin {
        display: flex; align-items: center; justify-content: center;
        width: 32px; height: 32px; flex-shrink: 0; padding: 0; cursor: pointer;
        background: transparent; color: rgba(255,255,255,.65);
        border: 1px solid rgba(255,255,255,.18);
        border-radius: var(--radius-sm);
        transition: background .12s, color .12s;
    }
    .sidebar-user-pin:hover { background: rgba(255,255,255,.12); color: #fff; }
    .sidebar-user-pin:focus-visible { outline: 2px solid #93c5fd; outline-offset: 1px; }
}
.ekran-pin-toast {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 3000;
    background: var(--card); color: var(--text); border: 1px solid var(--border-strong);
    border-radius: 10px; box-shadow: var(--shadow); padding: 10px 16px; font-size: 14px;
}

/* Role matrix: sidebar pages and four stable action columns. */
.rol-editor { --rol-green:#119757; --rol-off:#cbd3dc; }
.rol-editor-tools { display:flex; align-items:flex-end; gap:10px; padding:14px; border:1px solid var(--border); border-radius:12px; background:var(--surface-2,var(--card)); }
.rol-editor-tools > label { display:grid; gap:5px; flex:0 1 170px; min-width:0; font-size:.78rem; font-weight:600; color:var(--muted); }
.rol-editor-tools > label:first-child { flex:1 1 230px; font-size:.78rem; }
.rol-editor-tools .form-control { min-height:40px; font-size:.85rem; }
.rol-editor .rol-total { font-size:.8rem; margin-left:auto; padding:8px 0; white-space:nowrap; }
.rol-matrix-intro { font-size:.82rem; color:var(--muted); margin:12px 0; line-height:1.5; }
.rol-editor .rol-perm-group { padding:0; overflow:hidden; margin-bottom:18px; border:1px solid var(--border); border-radius:12px; background:var(--card); }
.rol-editor .rol-perm-group-head { padding:12px 16px; margin:0; background:var(--surface-2,var(--surface)); border-bottom:1px solid var(--border); }
.rol-editor .rol-perm-group-title { margin:0; font-size:.92rem; }
.rol-editor .rol-group-count { font-size:.75rem; font-weight:400; }
.rol-editor .rol-expand-group { font-size:.75rem; min-height:32px; }
.rol-matrix-table { width:100%; table-layout:fixed; border-collapse:collapse; margin:0; }
.rol-matrix-table th:first-child { width:52%; text-align:left; }
.rol-matrix-table th:not(:first-child) { width:12%; text-align:center; }
.rol-matrix-table thead th { padding:12px 8px; font-weight:600; font-size:.78rem; color:var(--muted); background:var(--card); border-bottom:1px solid var(--border); }
.rol-matrix-table tbody th, .rol-matrix-table tbody td { padding:15px 8px; vertical-align:middle; border-bottom:1px solid var(--border); background:transparent; white-space:normal; }
.rol-matrix-table tbody th { font-weight:500; }
.rol-matrix-table tbody td { text-align:center; }
.rol-matrix-table tbody tr:last-child > * { border-bottom:0; }
.rol-matrix-table tbody tr:hover > * { background:var(--surface-2,var(--surface)); }
.rol-row-heading { display:flex; align-items:center; gap:6px; padding-left:calc(var(--rol-depth,0) * 18px); min-width:0; }
.rol-row-heading > div { min-width:0; }
.rol-row-title { font-size:.94rem; font-weight:650; overflow-wrap:anywhere; }
.rol-row-subtitle, .rol-row-note, .rol-admin-note { display:block; color:var(--muted); font-size:.72rem; font-weight:400; line-height:1.45; margin-top:3px; overflow-wrap:anywhere; }
.rol-admin-note { color:var(--muted); }
.rol-row-expand { display:grid; place-items:center; width:30px; height:34px; flex:0 0 30px; border:0; background:transparent; border-radius:6px; color:var(--muted); cursor:pointer; font-size:1.4rem; }
.rol-row-expand > span { display:block; transition:transform .15s; }
.rol-row-expand[aria-expanded="true"] > span { transform:rotate(90deg); }
.rol-row-expand:hover { background:var(--primary-soft); color:var(--primary); }
.rol-row-spacer { width:30px; flex:0 0 30px; }
.rol-switch { position:relative; display:inline-flex; width:44px; height:26px; align-items:center; cursor:pointer; vertical-align:middle; margin:0; }
.rol-switch input { position:absolute; inset:0; width:44px; height:26px; margin:0; opacity:0; cursor:pointer; z-index:1; }
.rol-switch-track { position:absolute; inset:0; border-radius:20px; background:var(--rol-off); transition:background .15s; box-shadow:inset 0 0 0 1px rgba(0,0,0,.04); }
.rol-switch-track::after { content:""; position:absolute; width:20px; height:20px; left:3px; top:3px; border-radius:50%; background:#fff; box-shadow:0 1px 3px rgba(0,0,0,.2); transition:transform .15s; }
.rol-switch input:checked + .rol-switch-track { background:var(--rol-green); }
.rol-switch input:checked + .rol-switch-track::after { transform:translateX(18px); }
.rol-switch input:focus-visible + .rol-switch-track { outline:3px solid var(--primary); outline-offset:3px; }
.rol-switch input:disabled + .rol-switch-track { opacity:.5; }
.rol-switch-label, .rol-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; }
.rol-unavailable { color:var(--muted); opacity:.65; font-size:1rem; }
.rol-matrix-extra > td { padding:0 16px 14px !important; text-align:left !important; }
.rol-extra-permissions { padding:12px 14px; background:var(--surface-2,var(--surface)); border-radius:8px; border-left:3px solid var(--border); }
.rol-extra-permissions > strong { display:block; color:var(--muted); font-size:.72rem; margin-bottom:6px; font-weight:600; }
.rol-extra-item { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:8px 0; font-size:.8rem; }
.rol-extra-item .rol-switch { flex:0 0 44px; }
.rol-data-scope { border:1px solid var(--border); border-radius:10px; padding:12px 14px; margin:12px 0 18px; font-size:.82rem; }
.rol-data-scope summary { font-weight:650; cursor:pointer; }
.rol-scope-summary { float:right; font-size:.75rem; color:var(--muted); font-weight:400; }
.rol-data-scope p { color:var(--muted); line-height:1.5; }
.rol-data-scope > label { display:grid; gap:5px; max-width:350px; }
.rol-scope-depots { display:flex; flex-wrap:wrap; gap:10px 18px; margin:12px 0 0; padding:10px 0 0; border:0; }
.rol-scope-depots legend { font-size:.76rem; color:var(--muted); }
.rol-scope-depots label { display:flex; align-items:center; gap:6px; min-height:30px; }
.rol-scope-empty { width:100%; font-size:.75rem; margin:0; }
.rol-empty { text-align:center; padding:28px 12px; color:var(--muted); }
@media(max-width:767px) {
 .rol-editor-tools { gap:10px; padding:10px; }
 .rol-editor-tools > label:first-child { flex-basis:100%; }
 .rol-editor-tools > label { flex:1 1 125px; }
 .rol-editor-tools .rol-total { margin-left:0; }
 .rol-editor .rol-perm-group-head { padding:10px 12px; gap:4px; }
 .rol-editor .rol-perm-group-title { font-size:.86rem; }
 .rol-editor .rol-group-count { margin-left:4px; }
 .rol-matrix-table, .rol-matrix-table tbody { display:block; width:100%; }
 .rol-matrix-table thead { display:none; }
 .rol-matrix-table tr.rol-matrix-row { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); padding:8px 10px 12px; border-bottom:1px solid var(--border); }
 .rol-matrix-table tr.rol-matrix-row > th { width:auto; grid-column:1/-1; padding:6px 0 10px; border:0; }
 .rol-matrix-table tr.rol-matrix-row > td { padding:2px 4px; border:0; display:flex; flex-direction:column; align-items:center; gap:9px; }
 .rol-matrix-table tr.rol-matrix-row > td::before { content:attr(data-column); color:var(--muted); font-size:.72rem; font-weight:500; }
 .rol-matrix-table tr.rol-matrix-extra { display:block; }
 .rol-matrix-table tr.rol-matrix-extra > td { display:block; }
 .rol-row-heading { padding-left:calc(var(--rol-depth,0) * 10px); }
 .rol-row-title { font-size:.89rem; }
 .rol-row-expand { min-height:40px; }
 .rol-switch { width:46px; height:28px; }
 .rol-switch input { width:46px; height:28px; }
 .rol-switch-track::after { width:22px; height:22px; }
 .rol-extra-item .rol-switch { flex-basis:46px; }
}
@media(prefers-reduced-motion:reduce) {
 .rol-switch-track, .rol-switch-track::after, .rol-row-expand > span { transition:none; }
}

/* ── v498 Yükleme Bildir (beyansız yükleme) + Beyanlar sekmeleri ── */
.bsz-sekmeler { display:flex; gap:6px; flex-wrap:wrap; margin:0 0 14px; border-bottom:2px solid var(--border, #e2e8f0); }
.bsz-sekme { display:inline-flex; align-items:center; gap:6px; padding:9px 14px; min-height:44px; border-radius:8px 8px 0 0;
    font-weight:600; color:var(--muted, #64748b); text-decoration:none; border:1px solid transparent; border-bottom:0; margin-bottom:-2px; }
.bsz-sekme:hover { color:var(--text, #0f172a); background:var(--primary-soft, rgba(37,99,235,.08)); }
.bsz-sekme-aktif { color:var(--primary, #2563eb); background:var(--card, #fff); border-color:var(--border, #e2e8f0); border-bottom:2px solid var(--card, #fff); }
.bsz-sekme-say { display:inline-block; min-width:20px; padding:0 6px; border-radius:10px; background:var(--primary, #2563eb); color:#fff; font-size:.75rem; line-height:20px; text-align:center; }
.bsz-ac-btn { background:#0f766e; border-color:#0f766e; color:#fff; }
.bsz-ac-btn:hover { background:#115e59; }
.bsz-form { align-items:end; }
.bsz-yon { border:1px solid var(--border, #e2e8f0); border-radius:8px; padding:8px 12px; margin:0; display:flex; gap:16px; flex-wrap:wrap; }
.bsz-yon legend { font-size:.8rem; font-weight:600; padding:0 6px; color:var(--muted, #64748b); }
.bsz-radyo { display:inline-flex !important; flex-direction:row !important; align-items:center; gap:6px; font-weight:500; }
.bsz-plaka-band { display:flex; gap:10px; align-items:center; flex-wrap:wrap; padding:10px 12px; margin:10px 0; border-radius:8px;
    background:#fff7ed; color:#9a3412; border:1px solid #fdba74; }
.bsz-rozet { display:inline-block; padding:2px 9px; border-radius:999px; font-size:.78rem; font-weight:600; white-space:nowrap; }
.bsz-r-bekliyor { background:#fef3c7; color:#92400e; }
.bsz-r-tamamla { background:#ede9fe; color:#5b21b6; }
.bsz-r-gonderildi { background:#dcfce7; color:#166534; }
.bsz-r-silindi { background:#f1f5f9; color:#475569; }
.bsz-r-belirsiz { background:#fee2e2; color:#991b1b; }
.bsz-not { display:block; margin-top:4px; font-size:.75rem; color:var(--muted, #64748b); }
.bsz-yon-etiket, td .bsz-yon { font-size:.75rem; font-weight:600; color:#0f766e; }
.bsz-kart + .bsz-kart { margin-top:10px; }
.bsz-kart { background:var(--card, #fff); border:1px solid var(--border, #e2e8f0); border-radius:10px; padding:12px; display:grid; gap:4px; }
.bsz-kart-ust { display:flex; justify-content:space-between; gap:8px; align-items:center; }
.bsz-kart-tarih { font-size:.78rem; }
.bsz-kart-durum { margin-top:4px; }
html[data-theme="dark"] .bsz-plaka-band { background:#431407; color:#fdba74; border-color:#9a3412; }
html[data-theme="dark"] .bsz-r-bekliyor { background:#451a03; color:#fcd34d; }
html[data-theme="dark"] .bsz-r-tamamla { background:#2e1065; color:#c4b5fd; }
html[data-theme="dark"] .bsz-r-gonderildi { background:#052e16; color:#86efac; }
html[data-theme="dark"] .bsz-r-silindi { background:#1e293b; color:#cbd5e1; }
html[data-theme="dark"] .bsz-r-belirsiz { background:#450a0a; color:#fca5a5; }
html[data-theme="dark"] .bsz-sekme-aktif { background:var(--card, #1e293b); }
@media (max-width:767px) { .bsz-sekme { flex:1 1 auto; justify-content:center; } }

/* — Yükleme Bildir penceresi (v499): Yeni Beyan formunun ikonlu alan düzeni (form.bf) — */
.bsz-bf { margin: 0; }
body:not(.print-mode) form.bsz-bf .beyan-section[data-bf] { padding: 14px 14px 16px; margin-bottom: 8px; border-radius: 14px; box-shadow: none; }
form.bsz-bf .bsz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
form.bsz-bf .bsz-tam { grid-column: 1 / -1; }
form.bsz-bf .bsz-zor { color: var(--danger, #dc2626); }
form.bsz-bf .bsz-yon { grid-column: 1 / -1; }
form.bsz-bf .form-group[data-ic] > .ara-sec-sarmal, form.bsz-bf .form-group[data-ic] > input, form.bsz-bf .form-group[data-ic] > select { width: 100%; }
.bsz-plaka-band[hidden], .bsz-overlay [hidden] { display: none !important; }
@media (max-width: 560px) { form.bsz-bf .bsz-grid { grid-template-columns: 1fr; } }
/* v500: Yükleme Bildir — Araç Plakası ve Net KG kutuları Hal Kayıt bildirim ekranındaki
   turuncu (dikkat çekici) giriş kutularıyla aynı görünür. */
form.bf.bsz-bf .form-group.bsz-vurgu[data-ic] > input.form-control { background: rgba(245,166,35,.12); border: 2px solid #f5a623; color: #7a4a00; font-weight: 700; }
form.bf.bsz-bf .form-group.bsz-vurgu[data-ic] > input.form-control::placeholder { color: #c98a3a; font-weight: 600; }
form.bf.bsz-bf .form-group.bsz-vurgu[data-ic] > input.form-control:focus { background: var(--card, #fff); border-color: #ea580c; box-shadow: 0 0 0 3px rgba(234,88,12,.18); outline: 0; }
html[data-theme="dark"] form.bf.bsz-bf .form-group.bsz-vurgu[data-ic] > input.form-control { background: rgba(245,166,35,.10); border-color: #8a6210; color: #f2c27d; }
html[data-theme="dark"] form.bf.bsz-bf .form-group.bsz-vurgu[data-ic] > input.form-control::placeholder { color: #b58a3e; }
.bsz-yeni-bag { display: inline-block; margin-top: 6px; padding: 4px 0; background: none; border: 0; color: var(--primary, #2563eb); font-size: .85rem; font-weight: 600; cursor: pointer; text-align: left; }
.bsz-yeni-bag:hover { text-decoration: underline; }
/* v501: beyansız yükleme Sil düğmesi */
.bsz-sil { color: #b91c1c; border-color: #fca5a5; }
.bsz-sil:hover { background: #fee2e2; }
html[data-theme="dark"] .bsz-sil { color: #fca5a5; border-color: #7f1d1d; }
html[data-theme="dark"] .bsz-sil:hover { background: #450a0a; }
.bsz-kart-sil { margin-top: 8px; }

/* v506 — Roller matrisi: her sayfa kendi renginde, alt başlıkları (kartlar) sayfayla AYNI renk. Yarı saydam ton: açık + koyu temada çalışır. */
.rol-matrix-table tbody tr.rol-tone-0 { --rol-tone:37,99,235; }
.rol-matrix-table tbody tr.rol-tone-1 { --rol-tone:22,163,74; }
.rol-matrix-table tbody tr.rol-tone-2 { --rol-tone:217,119,6; }
.rol-matrix-table tbody tr.rol-tone-3 { --rol-tone:147,51,234; }
.rol-matrix-table tbody tr.rol-tone-4 { --rol-tone:219,39,119; }
.rol-matrix-table tbody tr.rol-tone-5 { --rol-tone:8,145,178; }
.rol-matrix-table tbody tr[class*="rol-tone-"] > th,
.rol-matrix-table tbody tr[class*="rol-tone-"] > td { background:rgba(var(--rol-tone),.09); }
.rol-matrix-table tbody tr[class*="rol-tone-"] > th:first-child { box-shadow:inset 4px 0 0 rgb(var(--rol-tone)); }
.rol-matrix-table tbody tr[class*="rol-tone-"]:hover > th,
.rol-matrix-table tbody tr[class*="rol-tone-"]:hover > td { background:rgba(var(--rol-tone),.16); }
.rol-matrix-table tbody tr.rol-matrix-extra[class*="rol-tone-"] > td { background:rgba(var(--rol-tone),.09); box-shadow:inset 4px 0 0 rgb(var(--rol-tone)); }
@media (max-width: 767px) {
  .rol-matrix-table tbody tr.rol-matrix-row[class*="rol-tone-"] { background:rgba(var(--rol-tone),.09); box-shadow:inset 4px 0 0 rgb(var(--rol-tone)); }
  .rol-matrix-table tbody tr.rol-matrix-row[class*="rol-tone-"] > th,
  .rol-matrix-table tbody tr.rol-matrix-row[class*="rol-tone-"] > td { background:transparent; box-shadow:none; }
}

/* ═══ v507 — ROL DÜZENLEYİCİ (iki panel): solda sayfalar + durum, sağda seçili sayfanın izinleri ═══
   Yalnız EKLEME: eski .rol-matrix-* kuralları dokunulmadan kalır (artık kullanılmıyor). */
.rol-badge-slug { display:inline-block; font-family:monospace; font-size:.72rem; color:var(--muted); background:var(--surface-2,var(--bg)); border-radius:6px; padding:1px 6px; }
.rol-badge-system { display:inline-block; padding:1px 8px; border-radius:20px; font-size:.7rem; font-weight:700; background:rgba(79,70,229,.12); color:#4338ca; border:1px solid rgba(79,70,229,.3); white-space:nowrap; margin-left:4px; }
html[data-theme="dark"] .rol-badge-system { color:#a5b4fc; }
.rol-card { background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:14px 16px; }
.rol-card-name { font-weight:700; font-size:1rem; }
.rolx-flash { border-radius:var(--radius-sm); padding:10px 14px; margin-bottom:12px; font-weight:500; border:1px solid transparent; }
.rolx-flash-ok { background:rgba(16,185,129,.14); color:#047857; border-color:rgba(16,185,129,.4); }
.rolx-flash-hata { background:rgba(239,68,68,.12); color:#b91c1c; border-color:rgba(239,68,68,.4); }
html[data-theme="dark"] .rolx-flash-ok { color:#6ee7b7; }
html[data-theme="dark"] .rolx-flash-hata { color:#fca5a5; }
.rolx-lejant { font-size:.78rem; color:var(--muted); margin:0 0 12px; display:flex; flex-wrap:wrap; align-items:center; gap:4px 6px; }
.rolx-cipler { display:flex; flex-wrap:wrap; gap:4px; }
.rolx-cip { display:inline-block; padding:2px 9px; border-radius:20px; font-size:.72rem; font-weight:600; white-space:nowrap; line-height:1.5; }
.rolx-cip-tam, .rolx-d-tam { background:rgba(22,163,74,.15); color:#15803d; }
.rolx-cip-kismi, .rolx-d-kismi { background:rgba(217,119,6,.16); color:#b45309; }
.rolx-cip-salt, .rolx-d-salt { background:rgba(37,99,235,.13); color:#1d4ed8; }
.rolx-cip-kapali, .rolx-cip-fazla, .rolx-d-kapali { background:rgba(100,116,139,.14); color:var(--muted); }
html[data-theme="dark"] .rolx-cip-tam, html[data-theme="dark"] .rolx-d-tam { color:#4ade80; }
html[data-theme="dark"] .rolx-cip-kismi, html[data-theme="dark"] .rolx-d-kismi { color:#fbbf24; }
html[data-theme="dark"] .rolx-cip-salt, html[data-theme="dark"] .rolx-d-salt { color:#93c5fd; }
.rolx-kisiler { font-size:.82rem; }
.rolx-eylemler { display:flex; gap:4px; flex-wrap:wrap; align-items:center; }
.rolx-kartlar { display:none; }
@media (max-width:767px) {
    .rolx-tablo-liste { display:none; }
    .rolx-kartlar { display:flex; flex-direction:column; gap:10px; }
}

.rolx-dialog { width:min(1240px,96vw); max-width:1240px; }
.pm-body.rolx-body { padding:0; display:flex; flex-direction:column; }
.rolx-kimlik { padding:14px 20px 12px; border-bottom:1px solid var(--border); flex-shrink:0; }
.rolx-kimlik .form-control { max-width:460px; }
.rolx-slug-not { font-size:.78rem; color:var(--muted); margin:4px 0 0; }
.rolx { --rol-green:#119757; --rol-off:#cbd3dc; }
.rolx-nav { padding:12px; }
.rolx-ara { display:block; margin-bottom:10px; }
.rolx-nav-liste { display:none; }
.rolx-nav-sec-kap { display:block; }
.rolx-nav-bas { font-size:.68rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); padding:12px 10px 4px; }
.rolx-nav-oge { display:flex; align-items:center; justify-content:space-between; gap:8px; width:100%; padding:8px 10px; border:0; border-left:3px solid transparent; border-radius:8px; background:transparent; color:var(--text); font:inherit; font-size:.86rem; text-align:left; cursor:pointer; }
.rolx-nav-oge:hover { background:var(--card); }
.rolx-nav-oge:focus-visible { outline:2px solid var(--primary); outline-offset:1px; }
.rolx-nav-oge.rolx-aktif { background:var(--card); border-left-color:var(--primary); font-weight:650; box-shadow:0 1px 3px rgba(0,0,0,.08); }
.rolx-nav-ad { min-width:0; overflow-wrap:anywhere; }
.rolx-nav-durum { flex:0 0 auto; font-size:.66rem; font-weight:600; padding:2px 7px; border-radius:20px; white-space:nowrap; color:var(--muted); }
.rolx-nav-bos { font-size:.8rem; color:var(--muted); padding:10px; }
.rolx-govde { padding:0 16px 20px; min-width:0; }
.rolx-ust { position:sticky; top:0; z-index:2; display:flex; align-items:center; flex-wrap:wrap; gap:8px 14px; padding:10px 0; background:var(--card); border-bottom:1px solid var(--border); }
.rolx-ust .rol-total { padding:0; font-size:.82rem; }
.rolx-degisti { font-size:.74rem; font-weight:600; padding:2px 9px; border-radius:20px; background:rgba(217,119,6,.16); color:#b45309; }
html[data-theme="dark"] .rolx-degisti { color:#fbbf24; }
.rolx-kopya { margin-left:auto; display:flex; align-items:center; gap:8px; font-size:.78rem; color:var(--muted); }
.rolx-kopya .form-control { min-height:36px; width:auto; max-width:220px; font-size:.82rem; }
.rolx-panel-bas { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; padding:16px 0 6px; }
.rolx-panel-bas h3 { margin:0; font-size:1.12rem; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.rolx-panel-bas p { margin:4px 0 0; font-size:.8rem; color:var(--muted); line-height:1.5; max-width:70ch; }
.rolx-durum { font-size:.7rem; font-weight:600; padding:2px 9px; border-radius:20px; }
.rolx-hazir { display:flex; gap:6px; flex-wrap:wrap; }
.rolx-kapali-not, .rolx-bilgi { font-size:.8rem; line-height:1.5; padding:9px 12px; border-radius:8px; margin:8px 0 0; background:rgba(217,119,6,.12); color:var(--text); border:1px solid rgba(217,119,6,.35); }
.rolx-bilgi { background:var(--surface-2,var(--bg)); border-color:var(--border); color:var(--muted); }
.rolx-alt-bas { margin:18px 0 8px; font-size:.74rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); }
.rolx-tablo-kap { border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.rolx-tablo { width:100%; table-layout:fixed; border-collapse:collapse; margin:0; }
.rolx-tablo thead th { padding:9px 8px; font-size:.74rem; font-weight:600; color:var(--muted); background:var(--surface-2,var(--bg)); border-bottom:1px solid var(--border); text-align:center; }
.rolx-tablo thead th:first-child { width:48%; text-align:left; padding-left:14px; }
.rolx-tablo tbody th, .rolx-tablo tbody td { padding:11px 8px; border-bottom:1px solid var(--border); vertical-align:middle; background:transparent; white-space:normal; }
.rolx-tablo tbody tr:last-child > * { border-bottom:0; }
.rolx-tablo tbody td { text-align:center; }
.rolx-tablo tbody th { text-align:left; font-weight:500; padding-left:14px; }
.rolx-satir-sayfa > * { background:var(--primary-soft) !important; }
.rolx-satir-ad { padding-left:calc(var(--rolx-d,0) * 16px); min-width:0; }
.rolx-satir-baslik { font-size:.9rem; font-weight:650; overflow-wrap:anywhere; }
.rolx-satir-ad small, .rolx-oge-metin small { display:block; margin-top:2px; font-size:.72rem; font-weight:400; color:var(--muted); line-height:1.45; overflow-wrap:anywhere; }
.rolx-hucre-not { display:block; margin-top:3px; font-size:.66rem; color:var(--muted); line-height:1.3; }
.rolx-liste { border:1px solid var(--border); border-radius:10px; overflow:hidden; }
.rolx-oge { display:flex; align-items:center; gap:12px; padding:10px 14px; border-bottom:1px solid var(--border); }
.rolx-oge:last-child { border-bottom:0; }
.rolx-oge-metin { flex:1 1 auto; min-width:0; }
.rolx-oge-metin strong { font-size:.87rem; font-weight:600; overflow-wrap:anywhere; }
.rolx-oge .rol-switch { flex:0 0 44px; }
.rolx-tur { flex:0 0 auto; font-size:.64rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; padding:2px 7px; border-radius:6px; border:1px solid var(--border); color:var(--muted); }
.rolx-tur-kart { border-color:rgba(37,99,235,.35); color:#1d4ed8; }
html[data-theme="dark"] .rolx-tur-kart { color:#93c5fd; }
.rolx-gerek-yok .rolx-oge-metin strong, .rolx-gerek-yok .rolx-tur { opacity:.5; }
.rolx-gerek-not { color:#b45309 !important; }
html[data-theme="dark"] .rolx-gerek-not { color:#fbbf24 !important; }
.rolx-bulundu { background:rgba(250,204,21,.18); }
.rolx-kapsam-sec { display:grid; gap:5px; max-width:350px; margin-top:14px; font-size:.82rem; }
.rolx-yonetici-liste { font-size:.82rem; color:var(--muted); line-height:1.7; margin:0; }
.rolx [hidden] { display:none !important; }
@media (min-width:768px) {
    .rolx-dialog { height:92vh; max-height:92vh; }
    .pm-body.rolx-body { overflow:hidden; }
    .rolx { flex:1 1 auto; min-height:0; display:grid; grid-template-columns:280px minmax(0,1fr); }
    .rolx-nav { overflow-y:auto; border-right:1px solid var(--border); background:var(--surface-2,var(--bg)); }
    .rolx-nav-liste { display:block; }
    .rolx-nav-sec-kap { display:none; }
    .rolx-govde { overflow-y:auto; padding:0 22px 24px; }
}
@media (max-width:767px) {
    .rolx-dialog { width:100%; max-width:100%; }
    .rolx-kimlik { padding:12px; }
    .rolx-nav { padding:10px 12px 0; }
    .rolx-govde { padding:0 12px 16px; }
    .rolx-ust { position:static; }
    .rolx-kopya { margin-left:0; width:100%; }
    .rolx-kopya .form-control { flex:1; max-width:none; }
    .rolx-ara-kutu, .rolx-nav-sec, .rolx-kopya .form-control { font-size:16px; }
    .rolx-tablo, .rolx-tablo tbody { display:block; width:100%; }
    .rolx-tablo thead { display:none; }
    .rolx-tablo tr.rolx-satir { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); padding:8px 10px 10px; border-bottom:1px solid var(--border); }
    .rolx-tablo tr.rolx-satir:last-child { border-bottom:0; }
    .rolx-tablo tr.rolx-satir > th { grid-column:1/-1; padding:4px 0 8px; border:0; }
    .rolx-tablo tr.rolx-satir > td { padding:2px 4px; border:0; display:flex; flex-direction:column; align-items:center; gap:6px; }
    .rolx-tablo tr.rolx-satir > td::before { content:attr(data-column); color:var(--muted); font-size:.7rem; font-weight:500; }
    .rolx-satir-sayfa { background:var(--primary-soft); }
    .rolx-satir-sayfa > * { background:transparent !important; }
    .rolx-oge { padding:10px 12px; gap:8px; }
}
.rolx-ust .rol-total { margin-left:0; }
.rolx-kimlik { display:flex; align-items:center; flex-wrap:wrap; gap:6px 12px; }
.rolx-kimlik .form-label { margin:0; white-space:nowrap; }
.rolx-kimlik .form-control { flex:1 1 260px; }
.rolx-kimlik .rolx-slug-not { margin:0; }

/* v507 — Kullanıcılar: sayfa sayfa yetki özeti (yetki yalnız rolden gelir) */
.usr-ozet-dialog { width:min(720px,96vw); max-width:720px; }
.usr-permission-preview { max-height:none; }
.usr-ozet-bas { font-size:.9rem; margin-bottom:4px; }
.usr-ozet-roller { font-size:.8rem; color:var(--muted); margin:0 0 8px; }
.usr-ozet-roller a { font-weight:600; }
.usr-ozet-not, .usr-ozet-kapali { font-size:.78rem; color:var(--muted); line-height:1.5; margin:8px 0 0; }
.usr-ozet-admin { color:var(--text); font-weight:600; }
.usr-ozet-liste { border:1px solid var(--border); border-radius:10px; overflow:hidden; max-height:320px; overflow-y:auto; }
.usr-ozet-dialog .usr-ozet-liste { max-height:none; }
.usr-ozet-satir { display:flex; align-items:center; gap:10px; padding:8px 12px; border-bottom:1px solid var(--border); }
.usr-ozet-satir:last-child { border-bottom:0; }
.usr-ozet-ad { flex:1 1 auto; min-width:0; font-size:.86rem; font-weight:600; overflow-wrap:anywhere; }
.usr-ozet-eylem { display:flex; gap:4px; flex:0 0 auto; }
.usr-ozet-e { font-size:.66rem; padding:1px 6px; border-radius:6px; border:1px solid var(--border); color:var(--muted); opacity:.45; text-decoration:line-through; }
.usr-ozet-e-var { opacity:1; text-decoration:none; border-color:rgba(22,163,74,.45); background:rgba(22,163,74,.12); color:#15803d; font-weight:600; }
html[data-theme="dark"] .usr-ozet-e-var { color:#4ade80; }
@media (max-width:767px) {
    .usr-ozet-satir { flex-wrap:wrap; gap:6px 8px; }
    .usr-ozet-ad { flex-basis:100%; }
}

/* ═══ Mal Kabul Fişi formu (_kantar_form.php, v544) ═══ */
.mk-form { --mk-accent: #12824a; --mk-soft: #e6f4ec; --mk-warn: #b45309; --mk-warn-soft: #fff1e0; }
html[data-theme="dark"] .mk-form { --mk-accent: #5fd39a; --mk-soft: #17332a; --mk-warn: #f5b062; --mk-warn-soft: #3a2a17; }
.mk-head-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mk-head-ico { flex: 0 0 auto; width: 44px; height: 44px; }
.mk-head h1 { margin: 0; line-height: 1.2; }
.mk-sub { margin: 2px 0 0; font-size: .85rem; color: var(--muted); }
.mk-card { margin-bottom: 14px; }
.mk-sec-title {
    display: flex; align-items: center; gap: 8px; margin: 0 0 12px;
    padding: 8px 12px; border-radius: var(--radius-sm);
    background: var(--mk-soft); color: var(--mk-accent);
    font-size: .95rem; font-weight: 700;
}
.mk-sec-title--tartim { background: var(--mk-warn-soft); color: var(--mk-warn); }
.mk-g { display: grid; grid-template-columns: 1fr; gap: 12px; }
.mk-lbl { display: block; font-size: .85rem; color: var(--muted); font-weight: 500; }
.mk-lbl > input, .mk-lbl > select, .mk-lbl > small, .mk-lbl > .mk-cb { display: block; margin-top: 4px; }
.mk-lbl > small.mk-inline { display: inline; margin: 0; }
.mk-row2 { display: grid; grid-template-columns: 1fr; gap: 0; }
.mk-row2 > .mk-card { margin-bottom: 14px; }
.mk-ambalaj { display: grid; grid-template-columns: 1fr; gap: 16px; }
.mk-form .kp-section { margin-top: 0; }
.mk-form .kp-section-title { text-transform: none; letter-spacing: 0; font-size: .9rem; color: var(--text); }
.mk-form .kp-row { background: none; border: 0; padding: 0; }
.kp-dara-lbl { display: inline-flex; align-items: center; gap: 4px; font-size: .82rem; color: var(--muted); white-space: nowrap; }
.kp-row .kp-dara { width: 70px; min-height: 38px; padding: 6px 8px; font-size: .95rem; }
/* Mal kabul formu: cins seçimi kendi satırında, adet · dara · toplam altında */
.mk-form .kp-row { gap: 8px; }
.mk-form .kp-row .kp-cinsi { flex: 1 1 100%; min-width: 0; }
.mk-form .kp-row .kp-sayisi { width: 84px; }
.mk-form .kp-row .kp-calc { margin-left: auto; }
.mk-btn-add { color: var(--mk-accent); border-color: var(--mk-accent); background: transparent; font-weight: 600; }
.mk-form .kantar-tartim-wrap { margin-top: 0; }
.mk-ico { font-size: 1.1rem; line-height: 1; }
.mk-aciklama { min-height: 84px; resize: vertical; }
.mk-card-gorsel { display: flex; flex-direction: column; }
.mk-card-gorsel .kantar-img-area { flex: 1 1 auto; margin-bottom: 8px; }
.mk-card-gorsel > .btn { align-self: flex-start; }
.mk-form .kantar-img-area { margin-bottom: 8px; min-height: 120px; }
.mk-form .kantar-img-area.is-drag { border-color: var(--mk-accent); background: var(--mk-soft); }
.kantar-img-ph small { display: block; margin-top: 4px; font-size: .75rem; opacity: .8; }
.kantar-img-ph-ico { display: block; font-size: 1.4rem; margin-bottom: 4px; }
.mk-foot { flex-direction: row; justify-content: space-between; align-items: center; }
.mk-foot-left, .mk-foot-right { display: flex; gap: 8px; flex-wrap: wrap; }
.mk-foot-right { justify-content: flex-end; }
@media (min-width: 720px) {
    .mk-g3 { grid-template-columns: 1fr 1fr; }
    .mk-g4 { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
    .mk-g4 { grid-template-columns: repeat(4, 1fr); }
    .mk-g3 { grid-template-columns: repeat(3, 1fr); }
    .mk-row2 { grid-template-columns: 1fr 1fr; gap: 14px; }
    .mk-ambalaj { grid-template-columns: 1fr 1fr; gap: 28px; }
    .mk-ambalaj > .kp-section + .kp-section { border-left: 1px solid var(--border); padding-left: 28px; }
}
@media (max-width: 767px) {
    .mk-foot-left, .mk-foot-right { width: 100%; }
    .mk-foot-left .btn { flex: 1 1 0; }
    .mk-foot-right .btn { flex: 1 1 auto; }
    .mk-head .page-head-actions { width: 100%; }
}

/* Yazarak bulunan alan (assets/kantar-combo.js) */
.mk-cb { position: relative; display: block; }
.mk-cb-list {
    position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 30; margin: 0; padding: 4px; list-style: none;
    max-height: 260px; overflow-y: auto; background: var(--card, #fff); color: var(--text);
    border: 1px solid var(--primary); border-radius: var(--radius-sm); box-shadow: 0 10px 28px rgba(11, 36, 64, .25);
}
.mk-cb-list[hidden] { display: none; }
.mk-cb-list li { padding: 10px 12px; border-radius: 6px; font-weight: 600; font-size: .95rem; cursor: pointer; }
.mk-cb-list li:hover, .mk-cb-list li.mk-cb-aktif { background: var(--primary-soft); color: var(--primary); }
.mk-cb-list li.mk-cb-ekle { color: var(--mk-accent, #12824a); font-weight: 800; border-top: 1px dashed var(--border); }
.mk-form .kp-row > .mk-cb { flex: 1 1 100%; min-width: 0; }
html[data-theme="dark"] .mk-cb-list li:hover, html[data-theme="dark"] .mk-cb-list li.mk-cb-aktif { background: #1c2a40; color: #8ab8ff; }

/* ═══ Mal Kabul Fişleri listesi (kantar.php, assets/kantar-liste.js; görünüm palet-fisleri.css ile ortak) ═══ */
.kf-table tbody tr { cursor: pointer; }
.kf-table tbody tr:focus { outline: 2px solid #0877d1; outline-offset: -2px; }
.kf-table thead tr#kfHead th { cursor: pointer; user-select: none; }
.kf-table th.kf-sirali-art::after { content: " ▲"; font-size: .7em; }
.kf-table th.kf-sirali-azal::after { content: " ▼"; font-size: .7em; }
.kf-table thead tr.kf-filtre-satir th {
    top: 0; z-index: 2; padding: 3px 4px; cursor: default; font-weight: 400;
    background: var(--pf-bg); border-bottom: 2px solid var(--pf-head);
}
.kf-filtre-satir input[type="search"] {
    width: 100%; min-height: 0; padding: 4px 6px; border: 1px solid var(--pf-border); border-radius: 4px;
    background: var(--pf-surface); color: var(--pf-text); box-sizing: border-box;
}
@media (min-width: 768px) { .kf-filtre-satir input[type="search"] { font-size: .8rem; } }
a.pf-tb { text-decoration: none; display: inline-flex; align-items: center; }
.pf-tb[hidden] { display: none; }
html[data-theme="dark"] #kfPage .pf-tb:not(.pf-tb-ekle) { background: #1d2735; color: #e7ecf4; border-color: #34445a; }

/* Mal Kabul formu: ek alanlar (şoför / malın sahibi / müstahsil / bahçe) */
.mk-kal-uyari { margin: 0 0 10px; font-size: .85rem; }
.mk-form input:disabled { opacity: .55; cursor: not-allowed; }
@media (min-width: 720px) { .mk-g5 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .mk-g5 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1180px) { .mk-g5 { grid-template-columns: repeat(5, 1fr); } }

/* =========================================================
   Sidebar hover mikro-animasyonu (v551) — yalnız fare olan masaüstü.
   Yaygın, ölçülü kalıp: hafif zemin dolgusu + 3px sağa kayma + ikon büyümesi + sol vurgu çizgisi.
   Yalnız transform/opacity/background geçişi (düzen hesabı yok); 160ms ease-out; azaltılmış harekette KAPALI.
   ========================================================= */
@media (min-width: 900px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    .sidebar-nav { overflow-x: hidden; }
    .sidebar-link {
        transition: background .16s ease-out, color .16s ease-out, transform .16s ease-out, border-left-color .16s ease-out;
    }
    .sidebar-link:hover { transform: translateX(3px); border-left-color: rgba(255,255,255,.32); }
    .sidebar-link.active:hover { border-left-color: var(--primary); }
    .sidebar-link-icon { transition: transform .16s ease-out; }
    .sidebar-link:hover .sidebar-link-icon { transform: scale(1.14); }
    .sidebar-section { transition: background .16s ease-out, color .16s ease-out; border-radius: var(--radius-sm); }
    .sidebar-section:hover { color: rgba(255,255,255,.8); }
    .sidebar-section-ok { transition: transform .18s ease-out; }
}

/* =========================================================
   MASAÜSTÜ %80 ÖLÇEK & 7-SÜTUN ANA SAYFA MİMARİSİ (v580)
   ---------------------------------------------------------
   Mobil (<768px), tablet (768–899px) ve @media print (1:1)
   ETKİLENMEZ. CSS `zoom` yerine kök rem (12px = 15px × 0.8) +
   masaüstü kutu yoğunluğu kullanılır → 100vh/dvh, position:fixed,
   getBoundingClientRect(), drag-drop ve native <dialog> 1:1 kalır.
   ========================================================= */

/* Tablet (768–899px): ana sayfa 4 sütun (PDKS panosu hariç) */
@media screen and (min-width: 768px) and (max-width: 899px) {
    .home-grid:not(.pdks-dashboard-grid) {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Masaüstü (≥900px, yalnız ekran — print ve print-mode hariç) */
@media screen and (min-width: 900px) {
    /* 1) Kök %80 tipografi ölçeği (15px → 12px; tüm rem kurallarını otomatik ölçekler) */
    html:not(:has(body.print-mode)) { font-size: 12px; }
    body:not(.print-mode) { font-size: 1rem; }

    /* 2) Sidebar (tek --sb-w kaynağı) & içerik alanı (B-42) */
    :root { --sb-w: 180px; }
    .desktop-sidebar { width: var(--sb-w); }
    body:not(.print-mode) .container {
        margin-left: var(--sb-w) !important;
        margin-right: 0 !important;
        max-width: none !important;
        padding: 18px 20px 36px;
    }
    /* B-42: 12px kök ölçeklemede 11px altına düşen küçük etiket/ipucu yazıları için okunabilirlik tabanı */
    .muted, .hint, .field-hint, .sidebar-section, .home-section-title, small {
        font-size: max(11px, .82rem);
    }

    .sidebar-brand { gap: 8px; padding: 12px 12px 10px; }
    .sidebar-brand-logo { width: 28px; height: 28px; }
    .sidebar-tema { top: 12px; right: 10px; width: 26px; height: 26px; }
    .sidebar-depo { gap: 8px; margin: 8px 10px 4px; padding: 7px 10px; border-radius: 8px; }
    .sidebar-nav { padding: 6px 8px; }
    .sidebar-section { padding: 9px 7px 4px; }
    .sidebar-link { gap: 8px; padding: 6px 9px; }
    /* NOT: .sidebar-link img 20×20 korunur (dashboard_navigation_smoke.js:48) */
    .sidebar-link img { width: 20px; height: 20px; }
    .sidebar-user { gap: 6px; padding: 8px 10px; }
    .sidebar-user-logout,
    .sidebar-user-pin { width: 28px; height: 28px; }

    /* 3) Ortak yüzeyler, başlıklar, kartlar, tablolar */
    .page-head { gap: 10px; margin-bottom: 14px; padding-bottom: 11px; }
    .page-head h1 { font-size: 1.55rem; }
    .page-head-actions { gap: 7px; }

    .card { padding: 14px 16px; margin-bottom: 12px; border-radius: 8px; }
    .card-head { gap: 8px; margin-bottom: 10px; }
    .grid { gap: 10px; }
    .search-row { gap: 6px; margin-bottom: 12px; }
    .form-foot { gap: 6px; margin-top: 12px; }
    .flash { padding: 9px 12px; margin-bottom: 11px; }

    /* 4) Butonlar, form kontrolleri, filtre pill'leri */
    .btn { gap: 5px; padding: 7px 12px; min-height: 34px; }
    .btn-sm { padding: 4px 8px; min-height: 28px; }
    .btn-lg { padding: 9px 18px; min-height: 38px; }
    .btn-icon { width: 32px; min-height: 32px; }

    input[type="text"], input[type="search"], input[type="tel"],
    input[type="date"], input[type="number"], input[type="email"],
    input[type="password"], select, textarea {
        padding: 7px 10px;
        min-height: 34px;
    }
    select { padding-right: 28px; background-position: right 9px center; }

    .filter-pills { gap: 6px; margin-bottom: 12px; }
    .pill { padding: 5px 11px; }

    .data-table th { padding: 9px 11px; }
    .data-table td { padding: 8px 11px; }
    .data-table th:first-child, .data-table td:first-child { padding-left: 12px; }
    .data-table th:last-child,  .data-table td:last-child  { padding-right: 12px; }

    /* 5) Modallar (.pm-dialog > form flex zinciri ve dialog:not([open]) korunur) */
    .pm-header { padding: 12px 16px; }
    .pm-body { padding: 12px 16px; }
    .pm-footer { padding: 10px 16px; gap: 8px; }
    .pm-calc { gap: 18px; padding: 8px 12px; margin-bottom: 10px; }

    /* 6) Ekran Kilidi (sabit px tipografisini %80'e indir) */
    .ekran-kilit-kart { max-width: 320px; padding: 22px 20px; gap: 10px; border-radius: 13px; }
    .ekran-kilit-ikon { font-size: 29px; }
    .ekran-kilit-kart h2 { font-size: 16px; }
    .ekran-kilit-not { font-size: 12px; }
    .ekran-kilit-girdi { padding: 8px 11px; font-size: 13px; }
    .ekran-kilit-hata, .ekran-pin-bilgi, .ekran-kilit-cikis,
    button.ekran-pin-link, .ekran-kilit-kart label { font-size: 11px; }
    .ekran-pin-toast { padding: 8px 13px; font-size: 12px; }

    /* 7) Ana sayfa karoları (yalnız .home-grid:not(.pdks-dashboard-grid)) */
    .home-grid:not(.pdks-dashboard-grid) {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
    }
    .home-grid:not(.pdks-dashboard-grid) .home-card {
        min-width: 0;
        min-height: 108px;
        padding: 12px 8px 10px;
        gap: 7px;
        border-radius: 14px;
    }
    .home-grid:not(.pdks-dashboard-grid) .home-card:hover {
        transform: translateY(-3px) scale(1.015);
        text-decoration: none;
    }
    .home-grid:not(.pdks-dashboard-grid) .home-card-icon {
        width: 56px;
        height: 56px;
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        border-radius: 0;
        overflow: visible;
        font-size: 1.75rem;
    }
    .home-grid:not(.pdks-dashboard-grid) .home-card-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
    }
    .home-grid:not(.pdks-dashboard-grid) .home-card-title {
        font-size: .95rem;
        line-height: 1.25;
        max-width: 100%;
        overflow-wrap: break-word;
    }
    .home-grid:not(.pdks-dashboard-grid) .home-section-title {
        color: var(--muted);
        margin-top: 10px;
        padding-top: 10px;
        font-size: .8rem;
    }
    .home-grid:not(.pdks-dashboard-grid) .home-section-title:first-child {
        margin-top: 0;
        padding-top: 0;
    }
}

/* Orta masaüstü (1100–1279px): 5 sütun ana sayfa */
@media screen and (min-width: 1100px) and (max-width: 1279px) {
    .home-grid:not(.pdks-dashboard-grid) {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 11px;
    }
}

/* Geniş masaüstü (≥1280px): 210px sidebar + 7 sütun ana sayfa + 64px 3B ikon */
@media screen and (min-width: 1280px) {
    :root { --sb-w: 210px; }
    .desktop-sidebar { width: var(--sb-w); }
    body:not(.print-mode) .container {
        margin-left: var(--sb-w) !important;
        max-width: none !important;
        padding: 20px 24px 40px;
    }
    .home-grid:not(.pdks-dashboard-grid) {
        grid-template-columns: repeat(7, minmax(0, 1fr));
        gap: 12px;
    }
    .home-grid:not(.pdks-dashboard-grid) .home-card {
        min-height: 116px;
        padding: 14px 10px 12px;
        gap: 8px;
    }
    .home-grid:not(.pdks-dashboard-grid) .home-card-icon {
        width: 64px;
        height: 64px;
    }
}

/* Çok geniş masaüstü (≥1500px): kartlar arası 14px boşluk */
@media screen and (min-width: 1500px) {
    .home-grid:not(.pdks-dashboard-grid) {
        gap: 14px;
    }
}

