/* ==========================================================================
   TZ Yeni Tasarım — app.css'e EK katman
   Kullanım: zimmet/static/zimmet/css/ altına kopyalayın ve base.html'de
   app.css'ten SONRA yükleyin:
     <link href="{% static 'zimmet/css/tz-yeni-tasarim.css' %}" rel="stylesheet">
   Tüm renkler app.css :root değişkenlerinden gelir; yeni renk üretilmedi.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Sol menü — arama, katlanan gruplar, bekleyen iş rozeti
   -------------------------------------------------------------------------- */
.app-menu-search {
    display: flex;
    align-items: center;
    gap: .5rem;
    width: 100%;
    min-height: 34px;
    padding: 0 .625rem;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: .5rem;
    background: rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .62);
    font-family: inherit;
    font-size: .8125rem;
    text-align: left;
    cursor: pointer;
}

.app-menu-search:hover {
    background: rgba(255, 255, 255, .16);
    border-color: rgba(255, 255, 255, .3);
}

.app-menu-search svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    fill: rgba(255, 255, 255, .7);
}

.app-menu-search span {
    flex: 1 1 auto;
    min-width: 0;
}

.app-menu-search kbd {
    margin-left: auto;
    padding: 0;
    background: none;
    color: rgba(255, 255, 255, .45);
    font-family: inherit;
    font-size: .6875rem;
    font-weight: 700;
}

.app-menu-favorites {
    display: grid;
    gap: .125rem;
}

.app-menu-group {
    margin: 0;
}

.app-menu-group > summary {
    list-style: none;
    cursor: pointer;
}

.app-menu-group > summary::-webkit-details-marker,
.app-menu-group > summary::marker {
    display: none;
    content: "";
}

.app-menu-group .chevron {
    width: 13px;
    height: 13px;
    flex: 0 0 auto;
    fill: currentColor;
    transition: transform .15s ease;
}

.app-menu-group[open] > summary .chevron {
    transform: rotate(90deg);
}

.app-menu-sub {
    display: grid;
    padding: .125rem 0 .375rem;
}

.app-menu-sub a {
    padding: .375rem .625rem .375rem 2.125rem;
    color: rgba(255, 255, 255, .78);
    font-size: .8125rem;
    text-decoration: none;
}

.app-menu-sub a:hover {
    color: #fff;
}

.app-menu-sub a.active {
    color: #fff;
    font-weight: 700;
}

.app-menu-count {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 20px;
    padding: 0 .375rem;
    border-radius: 999px;
    background: #f59e0b;
    color: var(--app-text);
    font-size: .6875rem;
    font-weight: 800;
}

.app-menu-count.is-soft {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

/* --------------------------------------------------------------------------
   2. Üst bar — ikon düğmeleri, kullanıcı bloğu
   -------------------------------------------------------------------------- */
.topbar-icon-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--app-border);
    border-radius: .5rem;
    background: var(--app-surface);
    color: var(--app-muted);
    font-family: inherit;
    font-size: .875rem;
    font-weight: 800;
    cursor: pointer;
}

.topbar-icon-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.topbar-icon-btn:hover {
    border-color: #9bb2cc;
    background: #eef4fb;
    color: var(--app-navy);
}

.topbar-icon-btn.is-danger:hover {
    border-color: #f0b4ad;
    background: #fff1f2;
    color: var(--app-danger);
}

.topbar-user-chip {
    display: inline-flex;
    align-items: center;
    gap: .5625rem;
    height: 36px;
    padding: 0 .75rem 0 .25rem;
    border: 1px solid var(--app-border);
    border-radius: .5rem;
    background: var(--app-surface);
}

.topbar-user-chip .avatar {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .3125rem;
    background: #e8eef7;
    color: var(--app-navy);
    font-size: .75rem;
    font-weight: 800;
}

.topbar-user-chip small {
    display: block;
    color: var(--app-muted);
    font-size: .6875rem;
    line-height: 1.15;
}

/* --------------------------------------------------------------------------
   3. Sayfa iskeleti — üst bloklar akışta, tablo kaydırılır
   -------------------------------------------------------------------------- */
.page-flow {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.page-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    padding: 1.375rem 1.5rem 2rem;
}

.section-head {
    display: flex;
    align-items: baseline;
    gap: .625rem;
    flex-wrap: wrap;
    margin-bottom: .625rem;
}

.section-head h2 {
    margin: 0;
    color: var(--app-navy);
    font-size: .9375rem;
    font-weight: 800;
}

.section-head .meta {
    color: var(--app-muted);
    font-size: .78125rem;
}

/* --------------------------------------------------------------------------
   4. Ana panel — bekleyen iş kartları, envanter şeridi
   -------------------------------------------------------------------------- */
.task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: .75rem;
}

.task-card {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: .25rem;
    padding: .875rem 1rem;
    border: 1px solid var(--app-border);
    border-left-width: 4px;
    border-radius: .5rem;
    background: var(--app-surface);
}

.task-card.is-warning { border-left-color: var(--app-warning); }
.task-card.is-danger { border-left-color: var(--app-danger); }
.task-card.is-neutral { border-left-color: #94a3b8; }

.task-card .label {
    color: #526174;
    font-size: .8125rem;
    font-weight: 700;
}

.task-card .value {
    color: var(--app-navy);
    font-size: 2.125rem;
    font-weight: 700;
    line-height: 1;
}

.task-card.is-danger .value { color: var(--app-danger); }

.task-card .note {
    color: var(--app-muted);
    font-size: .78125rem;
}

.task-card .btn {
    justify-self: start;
    margin-top: .5rem;
}

.stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    border: 1px solid var(--app-border);
    border-radius: .5rem;
    background: var(--app-surface);
    overflow: hidden;
}

.stat-strip > a,
.stat-strip > div {
    padding: .875rem 1rem;
    border-right: 1px solid #edf2f7;
    color: inherit;
    text-decoration: none;
}

.stat-strip > a:hover { background: #f8fbff; }

.stat-strip .label {
    color: #526174;
    font-size: .78125rem;
    font-weight: 700;
}

.stat-strip .value {
    display: block;
    margin-top: .25rem;
    color: var(--app-navy);
    font-size: 1.625rem;
    font-weight: 700;
    line-height: 1.1;
}

.stat-strip .is-success .value { color: var(--app-success); }
.stat-strip .is-warning { background: #fffbeb; }
.stat-strip .is-warning .value { color: #a85500; }
.stat-strip .is-danger { background: #fff7f7; }
.stat-strip .is-danger .value { color: var(--app-danger); }

/* --------------------------------------------------------------------------
   5. Liste araç çubuğu
   -------------------------------------------------------------------------- */
.list-toolbar {
    flex: 0 0 auto;
    padding: 1rem 1.5rem;
    background: var(--app-surface);
    border-bottom: 1px solid var(--app-border);
}

.list-toolbar-row {
    display: flex;
    align-items: center;
    gap: .625rem;
    flex-wrap: wrap;
}

.list-toolbar-row + .list-toolbar-row {
    margin-top: .75rem;
}

.list-search {
    display: flex;
    align-items: center;
    gap: .5625rem;
    flex: 1 1 260px;
    min-width: 0;
    height: 38px;
    padding: 0 .75rem;
    border: 1px solid #cbd5e1;
    border-radius: .5rem;
}

.list-search svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    fill: #94a3b8;
}

.list-search input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font: inherit;
    color: var(--app-text);
}

.search-result-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.25rem;
  padding: .75rem 1rem;
  border: 1px solid #cbd9e8;
  border-radius: .625rem;
  background: #f6faff;
  color: var(--app-muted);
  font-size: .8125rem;
  line-height: 1.45;
}

.search-result-summary > div {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  color: var(--app-text);
}

.search-result-summary strong {
  font-size: .9375rem;
  color: var(--app-navy);
}

.search-result-label {
  color: var(--app-muted);
  font-size: .6875rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.assignment-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: .25rem .5rem;
  border: 1px solid #c8d8e9;
  border-radius: 999px;
  background: #f1f7fd;
  color: #163f68;
  font-size: .75rem;
  font-weight: 700;
  line-height: 1.2;
}

.assignment-chip.is-empty {
  border-color: #d9dee6;
  background: #f7f8fa;
  color: var(--app-muted);
  font-weight: 600;
}

@media (max-width: 575.98px) {
  .search-result-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: .375rem;
  }

  .data-scroll.is-tanim-arama .data-head,
  .data-scroll.is-tanim-arama .data-row {
    grid-template-columns: 72px minmax(0, .85fr) minmax(0, 1.2fr) !important;
    gap: .5rem;
    min-width: 0 !important;
    padding-inline: .75rem;
  }

  .data-scroll.is-tanim-arama [data-col="sec"],
  .data-scroll.is-tanim-arama [data-col="marka"],
  .data-scroll.is-tanim-arama [data-col="durum"],
  .data-scroll.is-tanim-arama [data-col="deger"],
  .data-scroll.is-tanim-arama [data-col="islem"] {
    display: none !important;
  }

  .data-scroll.is-tanim-arama [data-col="ad"],
  .data-scroll.is-tanim-arama [data-col="zimmet"] {
    min-width: 0;
  }

  .data-scroll.is-tanim-arama .assignment-chip {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: .4375rem;
    flex: 0 0 auto;
    height: 38px;
    padding: 0 .75rem;
    border: 1px solid var(--app-border);
    border-radius: .5rem;
    background: var(--app-surface);
    color: #334155;
    font-family: inherit;
    font-size: .8125rem;
    font-weight: 700;
    cursor: pointer;
}

.toolbar-btn svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.toolbar-btn:hover { border-color: #9bb2cc; }

.toolbar-btn.is-active {
    border-color: var(--app-navy);
    background: #eef4fb;
    color: var(--app-navy);
}

.toolbar-btn .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    border-radius: 999px;
    background: var(--app-navy);
    color: #fff;
    font-size: .6875rem;
}

.view-seg {
    display: inline-flex;
    border: 1px solid var(--app-border);
    border-radius: .5rem;
    overflow: hidden;
}

.view-seg > * {
    padding: .4375rem .8125rem;
    border-right: 1px solid var(--app-border);
    color: #526174;
    font-size: .78125rem;
    font-weight: 700;
    text-decoration: none;
    background: var(--app-surface);
    cursor: pointer;
}

.view-seg > *:last-child { border-right: 0; }

.view-seg > .active {
    background: var(--app-navy);
    color: #fff;
}

.filtre-cip.is-view {
    background: var(--app-surface);
    border-color: #9bb2cc;
    color: var(--app-navy);
}

.filtre-cip.is-view svg {
    width: 12px;
    height: 12px;
    fill: var(--app-muted);
}

.page-count {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .625rem;
    color: #526174;
    font-size: .78125rem;
    font-variant-numeric: tabular-nums;
}

/* --------------------------------------------------------------------------
   6. Veri ızgarası — kolon tabanları + kaydırma
   Ara kutulara overflow:hidden VERMEYİN; taşıma .data-scroll'a ulaşmalı.
   -------------------------------------------------------------------------- */
.data-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    background: var(--app-surface);
}

.data-head,
.data-row {
    display: grid;
    gap: .875rem;
    align-items: center;
    padding: .6875rem 1.25rem;
    grid-template-columns: var(--data-cols, 40px 152px minmax(170px, 1.25fr) minmax(150px, 1fr) 130px minmax(160px, 1.15fr) 108px 44px);
    min-width: var(--data-min, 1100px);
}

.data-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    border-bottom: 1px solid #e7edf5;
    color: #526174;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.data-row {
    border-bottom: 1px solid #edf2f7;
    color: #34404d;
    font-size: .84375rem;
}

.data-row:hover { background: #f8fbff; }
.data-row.is-selected { background: #f2f7ff; }
.data-row.is-warning { background: #fffbeb; }

.data-row .primary {
    color: var(--app-text);
    font-weight: 600;
}

.data-num {
    font-variant-numeric: tabular-nums;
}

.data-right {
    text-align: right;
}

.state-text {
    font-size: .78125rem;
    font-weight: 700;
}

.state-text.is-muted { color: #526174; }
.state-text.is-success { color: var(--app-success); }
.state-text.is-warning { color: #a85500; }
.state-text.is-danger { color: var(--app-danger); }

.row-check {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    margin: 0;
    border: 1.5px solid #94a3b8;
    border-radius: .1875rem;
    accent-color: var(--app-navy);
    cursor: pointer;
}

.row-eye {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid #e2e8f0;
    border-radius: .5rem;
    background: var(--app-surface);
    color: var(--app-muted);
    cursor: pointer;
}

.row-eye svg { width: 15px; height: 15px; fill: currentColor; }
.row-eye:hover { border-color: #9bb2cc; background: #eef4fb; }

.data-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    padding: 3.5rem 1.5rem;
    text-align: center;
}

.data-empty svg { width: 28px; height: 28px; fill: #cbd5e1; }
.data-empty strong { color: var(--app-text); font-size: .9375rem; }
.data-empty span { max-width: 42ch; color: var(--app-muted); font-size: .8125rem; }

/* --------------------------------------------------------------------------
   7. Seçim çubuğu — akışta, absolute DEĞİL
   -------------------------------------------------------------------------- */
.selection-bar {
    flex: 0 0 auto;
    margin: .75rem 1.5rem 1.25rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .875rem;
    padding: .75rem 1rem;
    border-radius: .5rem;
    background: var(--app-navy);
    color: #fff;
    box-shadow: 0 14px 30px rgba(15, 47, 87, .28);
}

.selection-bar[hidden] { display: none; }

.selection-bar strong { font-size: .875rem; }

.selection-bar .clear {
    color: rgba(255, 255, 255, .75);
    font-size: .78125rem;
}

.selection-bar .clear:hover { color: #fff; }

.selection-bar .actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
}

.selection-bar .btn {
    min-height: 34px;
    padding: 0 .875rem;
    font-size: .8125rem;
}

.selection-bar .btn-on-navy {
    background: #fff;
    color: var(--app-navy);
    border: 0;
}

.selection-bar .btn-on-navy:hover { background: #eef4fb; }

.selection-bar .btn-ghost-navy {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, .4);
    color: #fff;
}

.selection-bar .btn-ghost-navy:hover { background: rgba(255, 255, 255, .12); }

/* --------------------------------------------------------------------------
   8. Yan panel (filtre / kolon / hızlı önizleme)
   -------------------------------------------------------------------------- */
.side-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1055;
    display: flex;
    justify-content: flex-end;
    background: rgba(15, 23, 42, .36);
}

.side-drawer-backdrop[hidden] { display: none; }

.side-drawer {
    width: min(400px, 100%);
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--app-surface);
    box-shadow: -18px 0 44px rgba(15, 47, 87, .22);
}

.side-drawer-head,
.side-drawer-foot {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: 1rem 1.125rem;
}

.side-drawer-head { border-bottom: 1px solid var(--app-border); }
.side-drawer-foot { border-top: 1px solid var(--app-border); }

.side-drawer-head strong { color: var(--app-navy); font-size: .9375rem; }

.side-drawer-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: .25rem 1.125rem 1.125rem;
}

.drawer-group-title {
    margin: 1rem 0 .5rem;
    color: var(--app-muted);
    font-size: .6875rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.drawer-option {
    display: flex;
    align-items: center;
    gap: .625rem;
    min-height: 40px;
    margin-bottom: .375rem;
    padding: 0 .75rem;
    border: 1px solid #e7edf5;
    border-radius: .5rem;
    background: var(--app-surface);
    font-size: .84375rem;
    color: var(--app-text);
    cursor: pointer;
}

.drawer-option:hover { border-color: #9bb2cc; }

.drawer-option:has(input:checked) {
    border-color: #9bb2cc;
    background: #f2f7ff;
}

.drawer-option .name { flex: 1 1 auto; min-width: 0; }

.drawer-option .count {
    flex: 0 0 auto;
    color: var(--app-muted);
    font-size: .78125rem;
    font-variant-numeric: tabular-nums;
}

.peek-field {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: .75rem;
    padding-bottom: .5625rem;
    margin-bottom: .625rem;
    border-bottom: 1px solid #edf2f7;
    font-size: .84375rem;
}

.peek-field dt { color: var(--app-muted); font-weight: 400; }
.peek-field dd { margin: 0; color: var(--app-text); font-weight: 600; }

/* --------------------------------------------------------------------------
   9. Komut paleti
   -------------------------------------------------------------------------- */
.cmd-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: flex;
    justify-content: center;
    padding: 12vh 1rem 1rem;
    background: rgba(15, 23, 42, .44);
}

.cmd-backdrop[hidden] { display: none; }

.cmd-palette {
    width: min(640px, 100%);
    max-height: 68vh;
    display: flex;
    flex-direction: column;
    border-radius: .625rem;
    background: var(--app-surface);
    box-shadow: 0 24px 60px rgba(15, 47, 87, .32);
    overflow: hidden;
}

.cmd-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .875rem 1rem;
    border-bottom: 1px solid #edf2f7;
}

.cmd-head svg { width: 17px; height: 17px; flex: 0 0 auto; fill: #94a3b8; }

.cmd-head input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: .9375rem;
    color: var(--app-text);
}

.cmd-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: .5rem 0;
}

.cmd-group-title {
    padding: .5rem 1rem .25rem;
    color: #94a3b8;
    font-size: .6875rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.cmd-row {
    display: flex;
    align-items: center;
    gap: .6875rem;
    padding: .5625rem 1rem;
    color: var(--app-text);
    text-decoration: none;
}

.cmd-row:hover,
.cmd-row.is-active { background: #eef4fb; }

.cmd-row .icon {
    width: 26px;
    height: 26px;
    flex: 0 0 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    background: #eef4fb;
    color: var(--app-navy);
}

.cmd-row .icon svg { width: 14px; height: 14px; fill: currentColor; }
.cmd-row .title { display: block; font-size: .84375rem; font-weight: 700; }
.cmd-row .sub { display: block; color: var(--app-muted); font-size: .75rem; }
.cmd-row .hint { margin-left: auto; flex: 0 0 auto; color: #94a3b8; font-size: .75rem; }

.cmd-foot {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .625rem 1rem;
    border-top: 1px solid #edf2f7;
    background: #f8fafc;
    color: var(--app-muted);
    font-size: .75rem;
}

.kbd-key {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 .5625rem;
    border: 1px solid var(--app-border);
    border-radius: .25rem;
    background: #f8fafc;
    color: #334155;
    font-family: inherit;
    font-size: .75rem;
    font-weight: 700;
}

.shortcut-row {
    display: flex;
    align-items: center;
    gap: .875rem;
    padding: .5625rem 0;
    border-bottom: 1px solid #edf2f7;
    font-size: .84375rem;
}

.shortcut-row span:first-child { flex: 1 1 auto; min-width: 0; }

/* --------------------------------------------------------------------------
   10. Bildirim (toast)
   -------------------------------------------------------------------------- */
.app-toast {
    position: fixed;
    left: 50%;
    bottom: 1.625rem;
    transform: translateX(-50%);
    z-index: 1070;
    display: flex;
    align-items: center;
    gap: .875rem;
    max-width: min(640px, calc(100vw - 2rem));
    padding: .75rem .875rem .75rem 1rem;
    border-radius: .5rem;
    background: var(--app-text);
    color: #fff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, .34);
}

.app-toast[hidden] { display: none; }

.app-toast .tick {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--app-success);
}

.app-toast .tick svg { width: 13px; height: 13px; fill: #fff; }
.app-toast .msg { min-width: 0; font-size: .84375rem; }

.app-toast button {
    flex: 0 0 auto;
    border: 1px solid rgba(255, 255, 255, .32);
    border-radius: .5rem;
    background: transparent;
    color: #fff;
    font-family: inherit;
    font-size: .78125rem;
    font-weight: 700;
    height: 30px;
    padding: 0 .75rem;
    cursor: pointer;
}

.app-toast button:hover { background: rgba(255, 255, 255, .14); }

.app-toast .close {
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    color: rgba(255, 255, 255, .66);
}

/* --------------------------------------------------------------------------
   11. Şeritler — dört varyant tek sistemden
   -------------------------------------------------------------------------- */
.app-strip {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    padding: .625rem .75rem;
    border-radius: .5rem;
    font-size: .8125rem;
    line-height: 1.5;
}

.app-strip.is-info    { border: 1px solid #bfdbfe; border-left: 3px solid var(--app-blue);    background: #eff6ff; color: #1e3a8a; }
.app-strip.is-warning { border: 1px solid #f3c675; border-left: 3px solid var(--app-warning); background: #fffbeb; color: #7c4a03; }
.app-strip.is-danger  { border: 1px solid #f0b4ad; border-left: 3px solid var(--app-danger);  background: #fff1f2; color: #7f1d1d; }
.app-strip.is-success { border: 1px solid #dcfce7; border-left: 3px solid var(--app-success); background: #dcfce7; color: #14532d; }

.app-strip .actions { margin-left: auto; display: flex; gap: .5rem; }

/* --------------------------------------------------------------------------
   12. Adım göstergesi + hedef kartı (zimmet / iade)
   -------------------------------------------------------------------------- */
.step-row {
    display: flex;
    align-items: center;
    gap: .875rem;
    flex-wrap: wrap;
}

.step {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--app-navy);
    font-size: .8125rem;
    font-weight: 700;
}

.step .num {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--app-navy);
    color: #fff;
    font-size: .75rem;
}

.step.is-done .num { background: var(--app-success); }
.step.is-todo { color: #94a3b8; }
.step.is-todo .num { background: #e2e8f0; color: var(--app-muted); }
.step-sep { width: 28px; height: 1px; background: var(--app-border); }

.target-card {
    display: flex;
    align-items: center;
    gap: .625rem;
    flex-wrap: wrap;
    padding: .625rem .75rem;
    border: 1px solid var(--app-border);
    border-radius: .5rem;
    background: #f8fbff;
}

.target-card .avatar {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    background: var(--app-navy);
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
}

.target-card small { display: block; color: var(--app-muted); font-size: .75rem; }
.target-card .btn { margin-left: auto; }

/* --------------------------------------------------------------------------
   13. Sepet paneli (zimmet)
   -------------------------------------------------------------------------- */
.cart-pane {
    display: flex;
    flex-direction: column;
    min-height: 0;
    border-left: 1px solid var(--app-border);
    background: var(--app-surface);
}

.cart-head,
.cart-foot { flex: 0 0 auto; padding: .875rem 1.125rem; }
.cart-head { display: flex; align-items: center; gap: .625rem; border-bottom: 1px solid #edf2f7; }
.cart-foot { display: grid; gap: .625rem; border-top: 1px solid #edf2f7; }
.cart-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }

.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 .4375rem;
    border-radius: 999px;
    background: var(--app-navy);
    color: #fff;
    font-size: .75rem;
    font-weight: 800;
}

.cart-item {
    display: flex;
    align-items: flex-start;
    gap: .625rem;
    padding: .6875rem 1.125rem;
    border-bottom: 1px solid #edf2f7;
}

.cart-item .info { flex: 1 1 auto; min-width: 0; }
.cart-item .sicil { display: block; font-size: .8125rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-item .name { display: block; color: #526174; font-size: .78125rem; }
.cart-item .meta { display: block; color: #94a3b8; font-size: .75rem; }

.cart-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    color: #526174;
    font-size: .78125rem;
}

.cart-total strong { color: var(--app-text); font-size: .875rem; font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------------------
   14. Form ekranı — bölümler + sabit alt eylem çubuğu
   -------------------------------------------------------------------------- */
.form-card {
    border: 1px solid var(--app-border);
    border-radius: .5rem;
    background: var(--app-surface);
    margin-bottom: 1rem;
}

.form-card-head {
    display: flex;
    align-items: baseline;
    gap: .625rem;
    flex-wrap: wrap;
    padding: .75rem 1.125rem;
    border-bottom: 1px solid #edf2f7;
}

.form-card-head strong { color: var(--app-navy); font-size: .875rem; }
.form-card-head span { color: var(--app-muted); font-size: .78125rem; }

.form-card-body {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .875rem;
    padding: 1rem 1.125rem;
}

.form-card-body .span-2 { grid-column: span 2; }
.form-card-body .span-all { grid-column: 1 / -1; }

.form-actions {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    padding: .875rem 1.5rem;
    background: var(--app-surface);
    border-top: 1px solid var(--app-border);
}

.form-actions .spacer { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }

.upload-drop {
    display: flex;
    align-items: center;
    gap: .875rem;
    flex-wrap: wrap;
    padding: 1.125rem;
    border: 1.5px dashed #cbd5e1;
    border-radius: .5rem;
    background: #f8fbff;
    cursor: pointer;
}

.upload-drop:hover { border-color: #9bb2cc; }
.upload-drop svg { width: 22px; height: 22px; flex: 0 0 auto; fill: #94a3b8; }
.upload-drop strong { display: block; font-size: .84375rem; }
.upload-drop span { display: block; color: var(--app-muted); font-size: .78125rem; }

/* --------------------------------------------------------------------------
   15. Sekmeler (hurda / devir)
   -------------------------------------------------------------------------- */
.tab-row { display: flex; gap: .125rem; }

.tab-row a {
    padding: .625rem 1rem;
    border-bottom: 3px solid transparent;
    color: var(--app-muted);
    font-size: .84375rem;
    font-weight: 700;
    text-decoration: none;
}

.tab-row a.active {
    border-bottom-color: var(--app-navy);
    color: var(--app-navy);
}

.tab-row .count { margin-left: .4375rem; color: #94a3b8; font-size: .75rem; }

/* --------------------------------------------------------------------------
   16. Tüketim stok seviyesi
   -------------------------------------------------------------------------- */
.stock-level { display: flex; align-items: baseline; gap: .375rem; }
.stock-level strong { font-size: .9375rem; font-variant-numeric: tabular-nums; color: var(--app-success); }
.stock-level .limit { color: #94a3b8; font-size: .75rem; }
.stock-level.is-critical strong { color: #a85500; }

.stock-bar {
    display: block;
    margin-top: .3125rem;
    height: 5px;
    border-radius: 999px;
    background: #e7edf5;
    overflow: hidden;
}

.stock-bar > span { display: block; height: 5px; background: var(--app-success); }
.stock-bar.is-critical > span { background: #a85500; }

/* --------------------------------------------------------------------------
   17. Giriş ekranı — iki panel
   -------------------------------------------------------------------------- */
.login-split {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(400px, 480px);
}

.login-brand {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: 2.75rem 3rem;
    background: linear-gradient(145deg, var(--app-navy), var(--app-navy-2));
    color: #fff;
}

.login-brand h1 { font-size: 1.875rem; line-height: 1.2; font-weight: 700; }
.login-brand p { color: rgba(255, 255, 255, .82); font-size: .90625rem; line-height: 1.6; }
.login-brand li { list-style: none; display: flex; gap: .625rem; color: rgba(255, 255, 255, .86); font-size: .84375rem; }
.login-brand li svg { width: 16px; height: 16px; flex: 0 0 auto; margin-top: .125rem; fill: #93c5fd; }
.login-brand ul { padding: 0; margin: 1.5rem 0 0; display: grid; gap: .625rem; }
.login-brand .foot { color: rgba(255, 255, 255, .6); font-size: .78125rem; }

.login-form-pane {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 2rem;
    background: var(--app-surface);
    border-left: 1px solid var(--app-border);
}

.login-form-pane .inner { width: 100%; max-width: 360px; }

@media (max-width: 991.98px) {
    .login-split { grid-template-columns: 1fr; }
    .login-brand { display: none; }
}

/* --------------------------------------------------------------------------
   18. Odak halkası — her yerde görünür
   -------------------------------------------------------------------------- */
.app-menu-search:focus-visible,
.toolbar-btn:focus-visible,
.topbar-icon-btn:focus-visible,
.row-eye:focus-visible,
.cmd-row:focus-visible,
.drawer-option:focus-within,
.selection-bar .btn:focus-visible,
.tab-row a:focus-visible {
    outline: 3px solid var(--app-blue);
    outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   19. Dar ekran
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .list-toolbar,
    .page-scroll { padding-left: .75rem; padding-right: .75rem; }

    .selection-bar { margin-left: .75rem; margin-right: .75rem; }
    .selection-bar .actions { width: 100%; }
    .selection-bar .actions .btn { flex: 1 1 auto; }

    .form-card-body { grid-template-columns: 1fr; }
    .form-card-body .span-2 { grid-column: span 1; }

    .cart-pane { border-left: 0; border-top: 1px solid var(--app-border); }
}


/* ==========================================================================
   19. Form ızgarası (demirbas_form.html)
   ========================================================================== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: .875rem;
    padding: 1rem 1.125rem;
}

.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-all { grid-column: 1 / -1; }

.form-field { display: grid; gap: .375rem; align-content: start; }
.form-field .form-label { margin: 0; color: #334155; font-size: .78125rem; font-weight: 700; }
.form-field .req { color: var(--app-danger); font-weight: 800; }
.form-field .form-text { margin: 0; color: var(--app-muted); font-size: .75rem; }
.form-field .field-error { color: var(--app-danger); font-size: .75rem; font-weight: 600; }
.field-error { color: var(--app-danger); font-size: .75rem; font-weight: 600; }

.form-card-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    padding: .875rem 1.125rem;
    border-top: 1px solid #edf2f7;
    background: #f8fafc;
}

.form-actions .note { color: var(--app-muted); font-size: .78125rem; }
.form-actions .btns { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }

@media (max-width: 575.98px) {
    .form-actions { flex-direction: column; align-items: stretch; }
    .form-actions .btns { margin-left: 0; }
    .form-actions .btns .btn { flex: 1 1 auto; }
}

/* ==========================================================================
   20. Fotoğraf ızgarası
   ========================================================================== */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: .75rem;
}

.photo-cell {
    margin: 0;
    padding: .5rem;
    border: 1px solid var(--app-border);
    border-radius: .5rem;
    background: #f8fafc;
}

.photo-cell img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: .25rem;
    object-fit: cover;
}

.photo-cell .photo-locked {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 4 / 3;
    border-radius: .25rem;
    background: #eef2f7;
    color: var(--app-muted);
    font-size: .75rem;
    text-align: center;
    padding: .5rem;
}

.photo-cell figcaption { margin-top: .5rem; color: var(--app-muted); font-size: .75rem; }

/* ==========================================================================
   21. Detay ekranı (demirbas_detay)
   ========================================================================== */
.detail-hero {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1.25rem 1.5rem .875rem;
}

.detail-hero-main { min-width: 0; }
.detail-title { margin: .125rem 0 .5rem; color: var(--app-navy); font-size: 1.375rem; font-weight: 700; }
.detail-badges { display: flex; gap: .5rem; flex-wrap: wrap; }
.detail-hero-actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }

.detail-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    padding: 1rem 1.5rem 1.5rem;
}

@media (max-width: 1199.98px) {
    .detail-cols { grid-template-columns: minmax(0, 1fr); }
}

.info-group { padding: .875rem 1.125rem; border-bottom: 1px solid #edf2f7; }
.info-group:last-child { border-bottom: 0; }

.info-group-title {
    margin-bottom: .5rem;
    color: var(--app-muted);
    font-size: .6875rem;
    font-weight: 800;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.info-list {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: .625rem .875rem;
}

.info-list > div { min-width: 0; }
.info-list > .span-all { grid-column: 1 / -1; }
.info-list dt { color: var(--app-muted); font-size: .75rem; font-weight: 600; }
.info-list dd { margin: .0625rem 0 0; color: var(--app-text); font-size: .875rem; word-break: break-word; }

/* segmentli hedef seçimi — radio'lar erişilebilir kalır */
.target-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--app-border); border-radius: .5rem; overflow: hidden; }
.target-seg label { margin: 0; cursor: pointer; }
.target-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.target-seg label > span {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 .875rem;
    border-right: 1px solid var(--app-border);
    color: #526174;
    font-size: .8125rem;
    font-weight: 700;
}

.target-seg label:last-child > span { border-right: 0; }
.target-seg input:checked + span { background: var(--app-navy); color: #fff; }
.target-seg input:focus-visible + span { outline: 2px solid var(--app-blue); outline-offset: -2px; }

.target-card .target-copy { min-width: 0; line-height: 1.25; }
.target-card .target-copy strong { display: block; color: var(--app-text); font-size: .875rem; }
.target-card .target-copy > span { display: block; color: var(--app-muted); font-size: .75rem; }

/* ==========================================================================
   22. Zimmet ekranı düzeni + sayfalama
   ========================================================================== */
.zimmet-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1rem;
    align-items: start;
    padding: 1rem 1.5rem 0;
}

@media (max-width: 1199.98px) {
    .zimmet-layout { grid-template-columns: minmax(0, 1fr); }
}

.zimmet-main { min-width: 0; }

.cart-head {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .875rem 1rem;
    border-bottom: 1px solid var(--app-border);
}

.cart-head strong { color: var(--app-navy); font-size: .875rem; }
.cart-head .btn { margin-left: auto; }
.cart-body { padding: .875rem 1rem; }
.cart-foot { padding: .875rem 1rem; border-top: 1px solid var(--app-border); background: #f8fafc; }

.cart-empty {
    padding: .875rem;
    border: 1px dashed var(--app-border);
    border-radius: .5rem;
    background: #f8fafc;
    color: var(--app-muted);
    font-size: .8125rem;
    text-align: center;
}

.pager {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.pager-info { color: #526174; font-size: .78125rem; font-variant-numeric: tabular-nums; }
.pager-info strong { color: var(--app-text); }

.pager-nav {
    margin-left: auto;
    display: inline-flex;
    border: 1px solid var(--app-border);
    border-radius: .5rem;
    overflow: hidden;
}

.pager-nav > * {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 30px;
    border-right: 1px solid var(--app-border);
    color: #334155;
}

.pager-nav > *:last-child { border-right: 0; }
.pager-nav > *:hover { background: #eef4fb; }
.pager-nav svg { width: 13px; height: 13px; fill: currentColor; }
.pager-nav .is-disabled { color: #cbd5e1; pointer-events: none; }
.pager-nav .is-disabled:hover { background: transparent; }


/* ==========================================================================
   23. Denetim sonrası tamamlananlar
   ========================================================================== */
.upload-copy { min-width: 0; display: grid; gap: .125rem; }
.upload-copy strong { color: var(--app-text); font-size: .84375rem; }
.upload-copy > span { color: var(--app-muted); font-size: .78125rem; }

/* filtre çipindeki kaldır düğmesi */
.cip-kaldir {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin-left: .125rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #7a8694;
    font-size: .875rem;
    line-height: 1;
    cursor: pointer;
}

.cip-kaldir:hover { background: #dbe6f4; color: var(--app-navy); }

/* adım göstergesi — tamamlanmış adım */
.step.done .dot { background: var(--app-success); border-color: var(--app-success); color: #fff; }
.step.done { color: var(--app-text); }


/* ==========================================================================
   24. Canlı test düzeltmeleri
   ========================================================================== */

/* İç içe page-flow: form da kalan yüksekliği almalı, yoksa tablo çöker.
   (zimmet_iade / hurda_onay / kisi_zimmet: <div class="page-flow"><form class="page-flow">) */
.page-flow > .page-flow,
.page-flow > form.page-flow {
    flex: 1 1 auto;
    min-height: 0;
}

/* Sabit üst bloklar çoksa tablo tamamen çökmesin — her zaman birkaç satır görünür */
.data-scroll { min-height: 180px; }

/* Kısa etiketler satır kırmasın */
.target-seg label > span,
.pager-info,
.filtre-cip,
.tab-row a,
.step,
.kbd-key,
.toolbar-btn,
.view-seg > * { white-space: nowrap; }

.filtre-cip { display: inline-flex; align-items: center; gap: .25rem; }

/* Uzun mekân/personel adları çipte taşmasın */
.filtre-cip.is-long { white-space: normal; }


/* ==========================================================================
   25. Hizalama düzeltmeleri
   ========================================================================== */
.target-card { align-items: center; flex-wrap: wrap; }
.target-card .btn { align-self: center; flex: 0 0 auto; }
.target-card .target-copy { flex: 1 1 200px; }

.form-actions .note { flex: 1 1 auto; min-width: 0; }
.form-actions .btns { flex: 0 0 auto; }

.selection-bar .clear { white-space: nowrap; }
.selection-bar strong { white-space: nowrap; }

/* ==========================================================================
   26. Prototip ölçü hizalaması
   Kaynak: uygulama/prototip/Yeni Tasarim.dc.html + "Teslim Notlari.md"
   (sol menü 252px, üst bar 60px, gövde 14px). app.css bu ölçüleri eski
   değerleriyle (292px / 76px / .95rem) taşıdığı için burada hizalanır;
   app.css'e dokunulmaz. Yeni renk üretilmedi.
   ========================================================================== */
:root {
    --app-sidebar-width: 252px;
}

body.app-body {
    font-size: .875rem;
}

.app-topbar {
    min-height: 60px;
    padding: .625rem 1.5rem;
    background: var(--app-surface);
    backdrop-filter: none;
}

/* Üst bar — prototipteki sıra: üst başlık + sayfa adı · kurum · ? · çıkış · kullanıcı */
.app-topbar .topbar-title {
    flex: 1 1 auto;
}

.app-topbar .topbar-title .eyebrow {
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--app-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-topbar .topbar-title :is(strong, h1) {
    font-size: 1.0625rem;
    color: var(--app-navy);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-kurum {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    height: 36px;
    padding: 0 .75rem;
    border: 1px solid var(--app-border);
    border-radius: .5rem;
    background: var(--app-surface);
    color: var(--app-navy);
    font-size: .8125rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.topbar-kurum:hover { border-color: #9bb2cc; color: var(--app-navy); }
.topbar-kurum svg { width: 12px; height: 12px; fill: var(--app-muted); }

.topbar-cikis { flex: 0 0 auto; margin: 0; display: inline-flex; }

.topbar-user-chip { cursor: pointer; }
.topbar-user-chip:hover { border-color: #9bb2cc; }

/* Kabul kriteri (Uygulama Kilavuzu §5): tıklanabilir alanlar en az 32px.
   .row-eye 28px tanımlıydı; dokunma hedefi 32px'e çıkarıldı. */
.row-eye {
    width: 32px;
    height: 32px;
}

/* ==========================================================================
   27. Ortak operasyon konsolu bileşenleri
   ========================================================================== */
.page-context {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-context > :first-child {
    min-width: 0;
}

.action-bar {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.content-card {
    border: 1px solid var(--app-border);
    border-radius: .5rem;
    background: var(--app-surface);
}

.content-card > .page-context,
.content-card > .action-bar {
    padding: .875rem 1rem;
}

.list-toolbar.content-card > .action-bar {
    padding: 0;
}

.content-card > .page-context + .action-bar {
    border-top: 1px solid #edf2f7;
}

.empty-state {
    display: grid;
    place-items: center;
    gap: .5rem;
    min-height: 160px;
    padding: 2rem 1rem;
    color: var(--app-muted);
    text-align: center;
}

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid var(--app-blue);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

@media (max-width: 575.98px) {
    .page-context {
        flex-direction: column;
        align-items: stretch;
    }

    .action-bar {
        width: 100%;
        align-items: stretch;
    }

    .action-bar .btn,
    .action-bar .toolbar-btn {
        flex: 1 1 100%;
        justify-content: center;
    }
}
