/*
 * NOVERA ERP - Ortak arayüz stilleri
 * Derleme adımı gerektirmez; tüm kaynaklar yereldir (CDN yok).
 */

/* ---------- Fontlar (yerel, SIL OFL 1.1 - bkz. fonts/inter/OFL.txt) ---------- */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('../fonts/inter/inter-latin-ext-wght-normal.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('../fonts/inter/inter-latin-wght-normal.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/* ---------- Tasarım değişkenleri ---------- */
/* Marka renkleri NOVERA logosundan: lacivert #0B1F3A, turkuaz #12A396 */
:root, [data-theme-preview] {
    /* K96: tüm temalarda Segoe UI (Dynamics 365 ile aynı); Inter yalnız yedek */
    --font-sans: 'Segoe UI', 'Segoe UI Variable Text', 'Segoe UI Web', system-ui, -apple-system, 'Inter', Arial, sans-serif;
    --font-mono: 'Cascadia Mono', Consolas, ui-monospace, monospace;

    /* Novera360 logosu: lacivert #132a4a, mavi #0c6cd3 (değişken adı geriye uyum için brand-teal) */
    --brand-navy: #132a4a;
    --brand-teal: #0c6cd3;

    --bg: #f3f5f8;
    --surface: #ffffff;
    --surface-muted: #f7f9fb;
    --border: #dde3ea;
    --border-strong: #c7d0db;

    --text: #0b1f3a;
    --text-muted: #44546a;
    --text-faint: #66768a;

    /* Düğme: logo laciverti; vurgu ve bağlantı: logo mavisi (beyaz zeminde yeterli kontrast için bağlantı bir ton koyu) */
    --primary: #132a4a;
    --primary-hover: #1d3a63;
    --primary-soft: #e8f1fc;
    --link: #0b5cb3;
    --link-hover: #094a91;
    --accent: #0c6cd3;

    --shell-bg: #132a4a;
    --shell-text: #d7e0ea;
    --shell-text-muted: #8fa1b7;
    --shell-hover: #1d3a63;
    --shell-active: #24477a;
    --shell-strong: #ffffff;
    --shell-line: rgb(255 255 255 / 0.18);
    --shell-field: rgb(255 255 255 / 0.08);
    --on-primary: #ffffff;
    --search-bg: #ffffff;
    --search-text: #0b1f3a;
    --search-icon: #66768a;
    --search-border: transparent;
    --app-bg: var(--bg);

    --ok: #15803d;
    --ok-soft: #e8f6ee;
    --warning: #b45309;
    --warning-soft: #fdf3e2;
    --error: #b91c1c;
    --error-soft: #fdecec;
    --neutral-soft: #eef2f6;

    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 10px;
    --radius-xs: 4px;
    --shadow: none;
    --shadow-pop: 0 12px 32px rgb(11 31 58 / 0.18), 0 2px 6px rgb(11 31 58 / 0.08);

    --menubar-h: 40px;
    --subbar-h: 34px;
}

/* ---------- Temel ---------- */
*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--app-bg);
    -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { margin: 0; line-height: 1.25; font-weight: 600; }

code, .mono { font-family: var(--font-mono); font-size: 0.92em; }

.icon {
    width: 18px;
    height: 18px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--brand-teal); outline-offset: 2px; }

/* ---------- Ana yerleşim ---------- */
/* İnce uygulama çubuğu (üst) + daraltılabilir modül menüsü (sol) + içerik. Zemin açık gri, içerik beyaz. */
.app { min-height: 100vh; display: flex; flex-direction: column; --sidebar-w: var(--sidebar-open-w, 260px); }
.app.is-collapsed { --sidebar-w: 52px; }
.app__body { flex: 1; display: flex; min-height: 0; }
.app__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.content {
    flex: 1;
    width: 100%;
    max-width: 1680px;
    padding: 16px 20px 32px;
}
.content:focus { outline: none; }

.skip-link { position: absolute; left: 8px; top: -40px; z-index: 100; padding: 6px 10px; background: var(--surface); border: 2px solid var(--brand-teal); border-radius: var(--radius-sm); }
.skip-link:focus { top: 6px; }

/* ---------- Uygulama çubuğu ---------- */
.appbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 12px;
    height: var(--menubar-h);
    padding: 0 8px 0 10px;
    background: var(--shell-bg);
    color: var(--shell-text);
}

.appbar__toggle {
    display: inline-grid; place-items: center; width: 32px; height: 32px;
    border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--shell-strong); cursor: pointer;
}
.appbar__toggle:hover { background: var(--shell-hover); }

.appbar__brand { display: flex; align-items: center; gap: 8px; color: var(--shell-strong); flex: none; }
.appbar__brand:hover { color: var(--shell-strong); }
.appbar__brand .brand-mark { width: 20px; height: 21px; color: var(--shell-strong); }
.brand-word { font-weight: 800; letter-spacing: 0.08em; font-size: 13px; }
.brand-word small { font-weight: 600; letter-spacing: 0.18em; font-size: 10px; color: var(--brand-teal); margin-left: 4px; }

.appbar__context { display: flex; align-items: center; gap: 10px; padding-left: 12px; border-left: 1px solid var(--shell-line); min-width: 0; font-size: 12px; }
.appbar__company { color: var(--shell-strong); white-space: nowrap; font-size: 13px; }
.appbar__plant { color: var(--shell-text-muted); white-space: nowrap; }
.appbar__context select {
    height: 26px; width: auto; max-width: 240px; padding: 0 6px;
    border: 1px solid var(--shell-line); border-radius: var(--radius-sm);
    background: transparent; color: var(--shell-strong); font-size: 12px; cursor: pointer;
}
.appbar__context option { color: var(--text); background: var(--surface); }

.appbar__search { position: relative; flex: 1; max-width: 440px; margin: 0 auto; }
.appbar__search .icon { position: absolute; left: 10px; top: 50%; width: 14px; height: 14px; transform: translateY(-50%); color: var(--search-icon); z-index: 1; pointer-events: none; }
.appbar__search input[type="search"] {
    width: 100%; height: 28px; padding: 0 10px 0 30px;
    border: 1px solid var(--search-border); border-radius: 14px;
    background: var(--search-bg); color: var(--search-text); font: inherit; font-size: 12.5px;
}
.appbar__search input[type="search"]::placeholder { color: var(--search-icon); }
.appbar__search input[type="search"]:focus { outline: none; border-color: var(--brand-teal); background: var(--search-bg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-teal) 35%, transparent); }

.appbar__tools { display: flex; align-items: stretch; height: 100%; gap: 2px; flex: none; }
.appbar__help { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid currentColor; border-radius: 50%; font-size: 11px; font-weight: 700; line-height: 1; }
.notify-count {
    position: absolute; top: 5px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 8px; background: var(--brand-teal); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}
.notify-panel { min-width: 320px; }
.notify-empty { margin: 4px 10px 8px; }
.count-pill { min-width: 24px; padding: 0 6px; border-radius: 10px; background: var(--neutral-soft); color: var(--text); font-size: 12px; font-weight: 600; text-align: center; }

/* ---------- Açılır menüler (uygulama çubuğu ve işlem çubukları) ---------- */
.menu { position: relative; display: flex; }

.menu__trigger {
    position: relative;
    display: flex; align-items: center; gap: 4px; height: 100%; padding: 0 10px;
    border: 0; background: transparent; color: var(--text); font: inherit;
    font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer;
}
.menu__trigger .icon { width: 13px; height: 13px; color: var(--text-faint); transition: transform .15s ease; }
.menu.is-open > .menu__trigger .icon { transform: rotate(180deg); }

.menu--tool > .menu__trigger { padding: 0 9px; color: var(--shell-text); }
.menu--tool > .menu__trigger .icon { width: 17px; height: 17px; color: var(--shell-text); transform: none; }
.menu--tool > .menu__trigger:hover, .menu--tool.is-open > .menu__trigger { background: var(--shell-hover); color: var(--shell-strong); }
.menu--tool.is-open > .menu__trigger .icon { transform: none; }

.menu__panel {
    position: absolute; top: 100%; left: 0; z-index: 60; display: none; min-width: 240px; padding: 8px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-pop);
}
.menu.is-open > .menu__panel { display: block; }
.menu__panel--right { left: auto; right: 0; }
.menu__group h4 { margin: 2px 8px 6px; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }

.menu__item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 6px 8px; border-radius: var(--radius-sm); color: var(--text); font-size: 13px;
}
.menu__item:hover, .menu__item:focus-visible { background: var(--primary-soft); color: var(--text); outline: none; }
.menu__item[aria-disabled="true"], .menu__item:disabled { color: var(--text-faint); cursor: not-allowed; background: transparent; }
.menu__item .soon { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); }
.menu__sep { height: 1px; margin: 6px 4px; background: var(--border); }

.avatar {
    display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
    background: var(--brand-teal); color: #fff; font-size: 11px; font-weight: 700;
}
.user-card { padding: 6px 8px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.user-card strong { display: block; }
.user-card span { font-size: 12px; color: var(--text-muted); }
.menu__item--button { width: 100%; border: 0; background: transparent; font: inherit; cursor: pointer; text-align: left; }

/* ---------- Sol modül menüsü ---------- */
.sidebar {
    position: sticky;
    top: var(--menubar-h);
    z-index: 30;
    display: flex;
    flex-direction: column;
    flex: none;
    width: var(--sidebar-w);
    height: calc(100vh - var(--menubar-h));
    background: var(--surface);
    border-right: 1px solid var(--border);
    transition: width .15s ease;
}

.sidebar__list { flex: 1; margin: 0; padding: 8px 6px; list-style: none; overflow-y: auto; overflow-x: hidden; }
.sidebar__list > li + li { margin-top: 1px; }

.sidebar__link {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 34px; padding: 0 8px;
    border: 0; border-radius: var(--radius-sm); background: transparent;
    color: var(--text); font: inherit; font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; white-space: nowrap;
}
.sidebar__link > .icon { width: 18px; height: 18px; color: var(--text-muted); }
.sidebar__link:hover { background: var(--surface-muted); color: var(--text); }
.sidebar__link.is-current, .sidebar__module.is-current > .sidebar__link { color: var(--primary); font-weight: 600; }
.sidebar__link.is-current { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--brand-teal); }
.sidebar__module.is-current > .sidebar__link > .icon, .sidebar__link.is-current > .icon { color: var(--link); }
.sidebar__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sidebar__chevron { width: 14px !important; height: 14px !important; transition: transform .15s ease; }
.sidebar__module.is-open > .sidebar__toggle .sidebar__chevron { transform: rotate(180deg); }

.sidebar__pages { display: none; margin: 2px 0 6px; padding: 0 0 0 28px; list-style: none; }
.sidebar__module.is-open > .sidebar__pages { display: block; }
.sidebar__group { margin: 8px 8px 2px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); }
.sidebar__page {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 5px 8px; border-radius: var(--radius-sm); color: var(--text); font-size: 13px;
}
.sidebar__page:hover { background: var(--surface-muted); color: var(--link); }
.sidebar__page.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand-teal); }
.sidebar__page.is-planned { color: var(--text-muted); }
.sidebar__soon { font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-faint); white-space: nowrap; }

.sidebar__collapse {
    display: flex; align-items: center; gap: 10px; margin: 6px; padding: 7px 8px;
    border: 0; border-top: 1px solid var(--border); background: transparent; color: var(--text-muted);
    font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap;
}
.sidebar__collapse:hover { color: var(--text); }
.sidebar__collapse .when-collapsed { display: none; }

/* Daraltılmış: yalnız simgeler; modül alt menüsü açılmaz (tıklayınca menü genişler). */
.app.is-collapsed .sidebar__label,
.app.is-collapsed .sidebar__soon,
.app.is-collapsed .sidebar__chevron,
.app.is-collapsed .sidebar__pages { display: none !important; }
.app.is-collapsed .sidebar__link { justify-content: center; padding: 0; }
.app.is-collapsed .sidebar__collapse { justify-content: center; }
.app.is-collapsed .sidebar__collapse .when-open { display: none; }
.app.is-collapsed .sidebar__collapse .when-collapsed { display: inline; }

.sidebar-backdrop { position: fixed; inset: var(--menubar-h) 0 0 0; z-index: 25; background: rgb(11 31 58 / 0.35); }

/* İkinci ince satır: konum ve ortam */
.subbar {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--subbar-h);
    padding: 0 20px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
}

.subbar__right { margin-left: auto; display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.subbar__right .icon { width: 14px; height: 14px; }
.subbar__item { display: inline-flex; align-items: center; gap: 5px; }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
}

.breadcrumb li { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.breadcrumb li:last-child { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.breadcrumb .icon { width: 12px; height: 12px; color: var(--text-faint); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--link); }

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
}

.icon-button:hover { background: var(--neutral-soft); color: var(--text); }

/* ---------- Sayfa başlığı ---------- */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.page-header h1 { font-size: 22px; }
.page-header p { margin: 4px 0 0; color: var(--text-muted); }

.page-header__title { display: flex; align-items: center; gap: 12px; }

.page-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-lg);
    background: var(--primary-soft);
    color: var(--primary);
    flex: none;
}

.page-icon .icon { width: 22px; height: 22px; }

/* ---------- Kartlar ve ızgaralar ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
}

.card__header h2 { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.card__header h2 .icon { color: var(--text-muted); }
.card__body { padding: 16px 18px; }

.grid { display: grid; gap: 16px; }
.grid--stats { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin-bottom: 20px; }
.grid--modules { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid--two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); align-items: start; }

.section-title { margin: 28px 0 12px; font-size: 15px; font-weight: 600; }

.stat { padding: 16px 18px; }
.stat__label { font-size: 12px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stat__value { margin-top: 6px; font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat__hint { margin-top: 2px; font-size: 12px; color: var(--text-muted); }

.module-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px;
    color: var(--text);
    transition: border-color .15s ease, box-shadow .15s ease;
}

.module-card:hover { color: var(--text); border-color: var(--border-strong); box-shadow: 0 4px 12px rgb(15 23 42 / 0.07); }
.module-card__head { display: flex; align-items: center; gap: 10px; }
.module-card__head h3 { font-size: 15px; flex: 1; }
.module-card p { margin: 0; color: var(--text-muted); font-size: 13px; }
.module-card__meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--text-muted); }

.module-card .page-icon { width: 34px; height: 34px; border-radius: 8px; }
.module-card .page-icon .icon { width: 18px; height: 18px; }

/* ---------- Rozetler ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    background: var(--neutral-soft);
    color: var(--text-muted);
}

.badge .icon { width: 13px; height: 13px; }
.badge--ok { background: var(--ok-soft); color: var(--ok); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--error { background: var(--error-soft); color: var(--error); }
.badge--info { background: var(--primary-soft); color: var(--primary); }

/* ---------- Listeler ve tablolar ---------- */
.kv { margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }

.table-wrap { overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { padding: 10px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.table th { font-size: 12px; font-weight: 600; color: var(--text-muted); background: var(--surface-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.table tr:last-child td { border-bottom: 0; }
.table td.status { width: 1%; white-space: nowrap; }

.page-list { list-style: none; margin: 0; padding: 0; }
.page-list li + li { border-top: 1px solid var(--border); }

.page-list a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: var(--text);
}

.page-list a:hover { background: var(--surface-muted); }
.page-list .page-list__text { flex: 1; min-width: 0; }
.page-list strong { display: block; font-weight: 600; }
.page-list span.desc { display: block; color: var(--text-muted); font-size: 13px; }
.page-list .arrow { color: var(--text-faint); }

/* ---------- Uyarı kutuları ---------- */
.alert {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1px solid;
    margin-bottom: 20px;
}

.alert .icon { margin-top: 1px; }
.alert p { margin: 2px 0 0; }
.alert--warning { background: var(--warning-soft); border-color: #f5d9a8; color: #7a3e06; }
.alert--error { background: var(--error-soft); border-color: #f5c2c2; color: #7f1d1d; }
.alert--ok { background: var(--ok-soft); border-color: #bfe5cd; color: #14532d; }

/* ---------- Boş durum ---------- */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 56px 24px;
}

.empty-state .page-icon { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 16px; }
.empty-state .page-icon .icon { width: 28px; height: 28px; }
.empty-state h2 { font-size: 18px; }
.empty-state p { max-width: 520px; margin: 8px 0 20px; color: var(--text-muted); }

.button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-weight: 500;
    cursor: pointer;
}

.button:hover { background: var(--surface-muted); color: var(--text); }
.button .icon { width: 16px; height: 16px; }

/* ---------- Düğmeler ---------- */
.button--primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.button--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
.button--danger { color: var(--error); border-color: #f0b4b4; }
.button--danger:hover { background: var(--error-soft); color: var(--error); }
.button--small { height: 30px; padding: 0 10px; font-size: 13px; }
.button--ghost { border-color: transparent; background: transparent; }

.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.actions form { margin: 0; }

/* ---------- Araç çubuğu (arama/filtre) ---------- */
.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border);
}

.toolbar input, .toolbar select { height: 34px; }
.toolbar .grow { flex: 1; min-width: 200px; }

/* ---------- Formlar ---------- */
.form-card + .form-card { margin-top: 16px; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px 18px;
}

.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-all { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: 13px; font-weight: 500; color: var(--text); }
.field .required::after { content: ' *'; color: var(--error); }
.field .help { font-size: 12px; color: var(--text-muted); }
.field .field-error, .cell-error { font-size: 12px; color: var(--error); }

input[type="text"], input[type="number"], input[type="date"], input[type="email"], input[type="search"], input[type="password"], select, textarea {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font: inherit;
}

textarea { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgb(29 78 216 / 0.12); }
input[readonly] { background: var(--surface-muted); color: var(--text-muted); }
.is-invalid { border-color: var(--error) !important; }

.checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.checkbox input { width: 16px; height: 16px; accent-color: var(--primary); }

.form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* ---------- Satır (kalem) tabloları ---------- */
.lines-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lines-table th { padding: 8px 6px; font-size: 12px; font-weight: 600; text-align: left; color: var(--text-muted); background: var(--surface-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.lines-table td { padding: 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.lines-table input, .lines-table select { height: 32px; font-size: 13px; padding: 0 8px; }
.lines-table .col-num { width: 110px; }
.lines-table .col-small { width: 80px; }
.lines-table .col-unit { width: 100px; }
.lines-table .col-date { width: 140px; }
/* Bütçe matrisi: hesap × boyut × 12 ay; tablo yatay kayar */
.budget-matrix .budget-matrix__account { min-width: 240px; }
.budget-matrix td select { min-width: 92px; }
.budget-matrix input.num { width: 96px; text-align: right; font-variant-numeric: tabular-nums; }
.budget-matrix tfoot th { padding: 8px 6px; font-size: 12px; background: var(--surface-muted); border-top: 1px solid var(--border); white-space: nowrap; }
.budget-matrix tfoot th.num, .budget-matrix td.num { text-align: right; white-space: nowrap; }
.table .table__group th { padding: 10px 12px 6px; font-size: 12px; font-weight: 600; text-transform: none; color: var(--text-muted); background: var(--surface-muted); text-align: left; }
.lines-table .col-action { width: 40px; text-align: center; }
.lines-footer { padding: 10px 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Tablo yardımcıları ---------- */
.num { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--text-muted); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.table a.row-link { font-weight: 600; }
.table tfoot td { font-weight: 600; background: var(--surface-muted); }
.table-empty { padding: 32px 18px; text-align: center; color: var(--text-muted); }

.badge--neutral { background: var(--neutral-soft); color: var(--text-muted); }
.alert--info { background: var(--primary-soft); border-color: #c7d7fe; color: #1e3a8a; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }

.tag-theoretical {
    display: inline-block;
    margin-left: 4px;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    background: var(--warning-soft);
    color: var(--warning);
    vertical-align: middle;
}

/* ---------- Sayfalama ---------- */
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.pagination .pages { display: flex; gap: 4px; }
.pagination a, .pagination span.current, .pagination span.disabled {
    display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px;
    border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text);
}
.pagination span.current { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pagination span.disabled { color: var(--text-faint); }

/* ---------- Kılavuz ---------- */
.guide-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.guide-nav { position: sticky; top: calc(var(--menubar-h) + 16px); padding: 12px; }
.guide-nav h3 { margin: 10px 8px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.guide-nav a { display: block; padding: 6px 8px; border-radius: var(--radius-sm); color: var(--text); font-size: 13px; }
.guide-nav a:hover { background: var(--surface-muted); }
.guide-nav a.is-active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

.prose { padding: 8px 28px 28px; line-height: 1.65; }
.prose h2 { display: flex; align-items: center; gap: 10px; margin: 28px 0 10px; font-size: 17px; }
.prose h2 .step { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-size: 13px; }
.prose h3 { margin: 18px 0 6px; font-size: 15px; }
.prose p, .prose ul, .prose ol { margin: 8px 0; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 4px; }
.prose table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
.prose th, .prose td { padding: 8px 10px; border: 1px solid var(--border); text-align: left; vertical-align: top; }
.prose th { background: var(--surface-muted); font-weight: 600; }
.prose .note { padding: 10px 14px; border-left: 3px solid var(--primary); background: var(--primary-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.prose .warning { padding: 10px 14px; border-left: 3px solid var(--warning); background: var(--warning-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

/* ---------- Akış şeması ---------- */
.flow { display: flex; flex-direction: column; align-items: center; gap: 0; margin: 12px 0; }
.flow-step { width: min(360px, 100%); padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); text-align: center; font-weight: 500; }
.flow-step small { display: block; font-weight: 400; }
.flow-step.is-ready { border-color: #9fd7b4; background: var(--ok-soft); }
.flow-step.is-decision { border-style: dashed; }
.flow-arrow { width: 1px; height: 18px; background: var(--border-strong); }

@media (max-width: 640px) {
    .form-grid .span-2 { grid-column: auto; }
}

@media (max-width: 900px) {
    .guide-layout { grid-template-columns: minmax(0, 1fr); }
    .guide-nav { position: static; }
    .prose { padding: 4px 16px 20px; }
}

/* ---------- Dar ekran ---------- */
@media (max-width: 1100px) {
    .appbar__plant { display: none; }
}

@media (max-width: 900px) {
    .appbar { gap: 8px; }
    .appbar__context, .appbar__search { display: none; }
    .appbar__tools { margin-left: auto; }
    .app.is-searching .appbar__search { display: block; position: absolute; top: var(--menubar-h); left: 0; right: 0; max-width: none; padding: 8px 12px; background: var(--shell-bg); }

    /* Menü çekmece olur; daraltma tercihi dar ekranda uygulanmaz. */
    .app, .app.is-collapsed { --sidebar-w: 264px; }
    .sidebar { position: fixed; left: 0; top: var(--menubar-h); transform: translateX(-100%); transition: transform .18s ease; box-shadow: var(--shadow-pop); }
    .app.is-menu-open .sidebar { transform: none; }
    .app.is-collapsed .sidebar__label, .app.is-collapsed .sidebar__soon, .app.is-collapsed .sidebar__chevron { display: initial !important; }
    .app.is-collapsed .sidebar__link { justify-content: flex-start; padding: 0 8px; }
    .app.is-collapsed .sidebar__module.is-open > .sidebar__pages { display: block !important; }
    .sidebar__collapse { display: none; }

    .content { padding: 12px 12px 28px; }
    .subbar { padding: 0 12px; }
    .subbar__right .hide-mobile { display: none; }
}

@media (min-width: 901px) {
    .appbar__toggle { display: none; }
}

@media (max-width: 640px) {
    .grid--two { grid-template-columns: minmax(0, 1fr); }
    .form-grid .span-2 { grid-column: auto; }
}

@media print {
    .appbar, .sidebar, .subbar { display: none !important; }
    body { background: #fff; }
}

/* ---------- Giriş ekranı ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, #0b1f3a 0%, #0b1f3a 45%, #f3f5f8 45%); }
.auth-card { width: min(400px, 100%); padding: 28px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-pop); }
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; color: var(--brand-navy); }
.auth-logo .brand-mark { width: 44px; height: 46px; }
.auth-logo .brand-word { font-size: 24px; color: var(--brand-navy); }
.auth-logo .brand-word small { display: block; margin: 2px 0 0; font-size: 11px; color: var(--brand-navy); letter-spacing: 0.4em; }
.auth-card h1 { font-size: 17px; margin-bottom: 4px; }
.auth-card p.lead { margin: 0 0 18px; color: var(--text-muted); font-size: 13px; }
.auth-card .field + .field { margin-top: 14px; }
.auth-card .button { width: 100%; justify-content: center; margin-top: 18px; height: 40px; }
.auth-footer { margin-top: 16px; text-align: center; font-size: 12px; color: var(--text-muted); }

.card__footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-top: 1px solid var(--border); background: var(--surface-muted); border-radius: 0 0 var(--radius) var(--radius); }

/* Gönderilen formda düğme kilitlenir (çift tıklama koruması) */
button[disabled].is-submitting { opacity: .6; cursor: progress; }

/* ---------- Seçenek kartları (şirket kurulumu, politika) ---------- */
.fieldset-plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.choice-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.choice:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 3px rgb(29 78 216 / 0.10); }
.choice input { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--primary); flex: none; }
.choice strong { display: block; font-size: 14px; font-weight: 600; }
.choice span { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 16px; }
.section-number { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-size: 12px; font-weight: 600; margin-right: 8px; }

/* =====================================================================
   Liste, kart ve çalışma alanı (Business Central esinli; 0.4.0)
   Yoğunluk: tablo ve form alanları ön planda; büyük kart ve gölge yok.
   ===================================================================== */
.page-header--compact { margin-bottom: 10px; align-items: center; }
.page-header--compact h1 { font-size: 19px; }
.page-header--compact p { font-size: 12px; margin-top: 2px; }

.card { box-shadow: none; }
.card__note { margin: 0; padding: 8px 14px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-muted); }
.section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: 18px 0 8px; }

.button--small { height: 30px; padding: 0 10px; font-size: 13px; }
.button.is-submitting { opacity: 0.6; cursor: progress; }
.button.is-submitting::after { content: ' …'; }
a.button[aria-disabled="true"] { pointer-events: none; opacity: 0.45; }
.icon.flip { transform: scaleX(-1); }

/* İşlem çubuğu */
.actionbar {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    padding: 6px 8px; margin-bottom: 10px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.actionbar__status { margin-left: auto; }
.actionbar__spacer { flex: 1; }
.menu--bar > .menu__trigger.button { height: 30px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.menu--bar > .menu__trigger.button:hover, .menu--bar.is-open > .menu__trigger.button { background: var(--surface-muted); }
.menu--bar > .menu__panel { top: calc(100% + 4px); min-width: 230px; }
.button:disabled, .menu__item--button:disabled { opacity: 0.45; cursor: not-allowed; }

/* Filtre şeridi */
.filterbar { display: flex; align-items: flex-end; gap: 10px; padding: 10px 12px; margin-bottom: 8px; flex-wrap: wrap; }
.filterbar__fields { display: flex; flex-wrap: wrap; gap: 8px 10px; flex: 1; }
.filterbar .field { gap: 3px; min-width: 130px; }
.filterbar .field > label, .filterbar .field-label { font-size: 12px; color: var(--text-muted); }
.filterbar input, .filterbar select { height: 30px; font-size: 13px; }
.field--grow { flex: 1 1 220px; }
.field--check { justify-content: flex-end; }
.field--check .checkbox { height: 30px; font-size: 13px; }
.field-pair { display: flex; gap: 4px; }
.field-pair input { width: 140px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.chip {
    display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px 0 10px;
    border: 1px solid var(--border-strong); border-radius: 13px; background: var(--surface); color: var(--text); font-size: 12px;
}
.chip .icon { width: 13px; height: 13px; color: var(--text-muted); }
.chip:hover { border-color: var(--link); color: var(--text); }
.chip--clear { border-style: dashed; color: var(--link); }

/* Sıkı ve sabit başlıklı tablo */
.table--dense th, .table--dense td { padding: 6px 10px; font-size: 13px; }
.table--dense th { font-size: 11px; }
.table-scroll { max-height: calc(100vh - 290px); min-height: 200px; overflow: auto; }
.table--sticky thead th { position: sticky; top: 0; z-index: 2; box-shadow: inset 0 -1px 0 var(--border); }
.table th a.sort { color: inherit; display: inline-flex; align-items: center; gap: 4px; }
.table th a.sort:hover { color: var(--link); }
.table th[aria-sort="ascending"] a.sort::after { content: '▲'; font-size: 9px; }
.table th[aria-sort="descending"] a.sort::after { content: '▼'; font-size: 9px; }
.table tbody tr[data-select-row], .table tbody tr[data-line-row] { cursor: pointer; }
.table tbody tr[data-select-row]:hover td, .table tbody tr[data-line-row]:hover td { background-image: linear-gradient(var(--row-hover), var(--row-hover)); }
.table tbody tr.is-selected td { background: var(--primary-soft) !important; }
.table tbody tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--brand-teal); }
.table tbody tr:focus-visible { outline: 2px solid var(--brand-teal); outline-offset: -2px; }
.list-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 8px 12px; border-top: 1px solid var(--border); }
.list-footer .pagination { margin: 0; }

/* Göstergeler (Business Central "cue") */
.cues { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin-bottom: 14px; }
.cue {
    display: flex; flex-direction: column; gap: 2px; padding: 10px 12px;
    background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--brand-teal); border-radius: var(--radius-sm); color: var(--text);
}
a.cue:hover { border-color: var(--link); color: var(--text); background: var(--surface-muted); }
.cue__count { font-size: 24px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.cue__title { font-size: 13px; font-weight: 600; }
.cue__hint { font-size: 11px; color: var(--text-muted); }
.cue--warn { border-left-color: var(--warning); }
.cue--warn .cue__count { color: var(--warning); }
.cue--unavailable { border-left-color: var(--border-strong); background: var(--surface-muted); }
.cue--unavailable .cue__count { color: var(--text-faint); }

.workspace-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.workspace-grid .card__header { padding: 8px 12px; }
.workspace-grid .card__header h2 { font-size: 14px; }

/* Belge kartı + sağ bilgi paneli */
.doc-page { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; align-items: start; }
.doc-page:has(.factbox.is-collapsed) { grid-template-columns: minmax(0, 1fr); }
.doc-page__main { min-width: 0; }

.doc-header { margin-bottom: 10px; }
.doc-header__title { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.doc-header__title h1 { font-size: 19px; }
.doc-header__party { font-weight: 500; color: var(--text-muted); }
.doc-header__title p { margin: 2px 0 0; }

.doc-status { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; }
.doc-status > div { display: flex; align-items: center; gap: 6px; }
.doc-status dt { color: var(--text-muted); font-size: 12px; }
.doc-status dd { margin: 0; }

.fasttab { margin-bottom: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.fasttab > summary {
    display: flex; align-items: center; gap: 12px; padding: 9px 12px; cursor: pointer; list-style: none;
    font-size: 14px; font-weight: 600; color: var(--primary);
}
.fasttab > summary::-webkit-details-marker { display: none; }
.fasttab > summary::before { content: '▸'; color: var(--text-faint); transition: transform .12s ease; }
.fasttab[open] > summary::before { transform: rotate(90deg); }
.fasttab > summary:focus-visible { outline: 2px solid var(--brand-teal); outline-offset: -2px; }
.fasttab__summary { margin-left: auto; font-size: 12px; font-weight: 400; color: var(--text-muted); }
.fasttab[open] .fasttab__summary { display: none; }
.fasttab__body { padding: 4px 12px 12px; border-top: 1px solid var(--border); }
.fasttab__body--flush { padding: 0; }
.subhead { font-size: 13px; margin: 14px 0 6px; }

.form-grid--dense { gap: 10px 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); padding-top: 8px; }
.form-grid--dense input, .form-grid--dense select { height: 32px; }
.field-static { display: block; min-height: 32px; padding: 6px 0; font-size: 14px; }

.kv--grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0 20px; padding-top: 4px; }
.kv--grid > div { flex-direction: column; gap: 2px; padding: 7px 0; }
.kv--grid dd { text-align: left; }
.kv--tight > div { padding: 4px 0; font-size: 13px; }
.kv--tight dt { font-size: 12px; }

.lines-view td { vertical-align: middle; }
.line-detail > td { background: var(--surface-muted); padding: 10px 12px !important; }
.line-detail__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px 18px; }
.line-detail__grid h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: 0 0 4px; }
.line-detail__grid p { margin: 0 0 4px; font-size: 13px; }

.form-footer--sticky { position: sticky; bottom: 0; z-index: 5; margin: 0 0 8px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); }

.factbox {
    position: sticky; top: calc(var(--menubar-h) + 12px);
    max-height: calc(100vh - var(--menubar-h) - 24px); overflow-y: auto;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.factbox.is-collapsed { display: none; }
.factbox__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.factbox__head h2 { font-size: 14px; }
.factbox__part { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.factbox__part:last-child { border-bottom: 0; }
.factbox__part h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: 0 0 6px; }
.factbox__part h4 { font-size: 12px; font-weight: 600; margin: 10px 0 2px; }
.factbox__part p { margin: 0 0 4px; }
.factbox__line { font-size: 13px; padding: 4px 8px; background: var(--primary-soft); border-radius: var(--radius-sm); }
.factbox__part--total { background: var(--surface-muted); }

@media (max-width: 1200px) {
    .doc-page { grid-template-columns: minmax(0, 1fr); }
    /* Dar ekranda bilgi paneli sağdan açılan çekmecedir. */
    .factbox, .factbox.is-collapsed {
        display: block; position: fixed; top: var(--menubar-h); right: 0; bottom: 0; z-index: 45;
        width: min(340px, 92vw); max-height: none; border-radius: 0;
        transform: translateX(105%); transition: transform .18s ease; box-shadow: var(--shadow-pop);
    }
    .factbox.is-drawer-open { transform: none; }
    .workspace-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
    .table-scroll { max-height: none; }
    .actionbar__status { width: 100%; margin-left: 0; }
    .filterbar .field { min-width: 0; flex: 1 1 140px; }
}

@media print {
    .actionbar, .filterbar, .chips, .factbox, .fasttab > summary::before { display: none !important; }
    .fasttab:not([open]) > *:not(summary) { display: block; }
}

/* Sol menü: ikinci seviye (grup) */
.sidebar__pages { padding-left: 22px; }
.sidebar__subgroup > ul { display: none; margin: 0 0 4px; padding: 0 0 0 10px; list-style: none; border-left: 1px solid var(--border); }
.sidebar__subgroup.is-open > ul { display: block; }
.sidebar__grouptoggle { display: flex; align-items: center; gap: 6px; width: 100%; padding: 5px 8px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 500; text-align: left; cursor: pointer; }
.sidebar__grouptoggle > span:first-child { flex: 1; min-width: 0; }
.sidebar__grouptoggle:hover { background: var(--surface-muted); }
.sidebar__subgroup.is-open > .sidebar__grouptoggle .sidebar__chevron { transform: rotate(180deg); }
.sidebar__page { font-size: 12.5px; padding: 4px 8px; }
.app.is-collapsed .sidebar__subgroup { display: none; }

/* Düzeltmeler: satır girişinde ürün ve teknik özellik okunur genişlikte; modül adı kesilmesin */
.lines-table select[name$="[product_id]"] { min-width: 260px; }
.lines-table input[name$="[technical_spec]"] { min-width: 170px; }
.lines-table input[type="date"] { min-width: 132px; }
.sidebar__module > .sidebar__toggle.is-planned { color: var(--text-muted); font-weight: 400; }
.sidebar__module > .sidebar__toggle .sidebar__soon { display: none; }
.sidebar__grouptoggle.is-planned { color: var(--text-muted); }
.sidebar__grouptoggle .sidebar__soon { display: none; }
.lines-table { min-width: 1180px; }
.lines-table input[type="number"] { min-width: 74px; }
.lines-table select[name$="[unit_id]"] { min-width: 78px; }
.lines-table input[name$="[quantity]"], .lines-table input[name$="[unit_price]"] { min-width: 100px; }

/* ---------- Ortak bileşenler (x-ui.*) ve Çalışma Alanım ---------- */
.scope-line { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 3px 0 0; font-size: 12px; color: var(--text-muted); }
.scope-line strong { color: var(--text); }

.cues--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cue--critical { border-left-color: var(--error); }
.cue--critical .cue__count { color: var(--error); }

.actionbar--quick { gap: 6px; }
.actionbar__label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-right: 4px; }
.actionbar__form { display: flex; align-items: center; gap: 6px; }
.actionbar__form select { height: 30px; font-size: 13px; width: auto; }

.ui-section { margin-bottom: 12px; }
.ui-section .card__header { padding: 8px 12px; }
.ui-section .card__header h2 { font-size: 14px; }
.ui-section__body--pad { padding: 10px 12px; }

.ui-empty { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); font-size: 13px; }
.ui-empty .icon { width: 16px; height: 16px; margin-top: 2px; color: var(--text-muted); }
.ui-section .ui-empty { margin: 0; border-style: dashed; background: var(--surface-muted); }
.ui-empty--unconfigured { border-style: dashed; background: var(--surface-muted); color: var(--text-muted); }
.ui-empty--error { border-color: #f1b4b4; background: var(--error-soft); color: var(--error); }
.ui-empty--error .icon { color: var(--error); }

.segmented { display: flex; flex-wrap: wrap; gap: 2px; padding: 2px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-muted); }
.segmented__item { padding: 4px 10px; border-radius: var(--radius-xs); font-size: 13px; color: var(--text-muted); }
.segmented__item:hover { color: var(--text); background: var(--surface); }
.segmented__item.is-active { background: var(--surface); color: var(--primary); font-weight: 600; box-shadow: 0 0 0 1px var(--border); }

.menu__item--notify { align-items: flex-start; white-space: normal; }
.notify-kind { display: inline-block; min-width: 44px; margin-right: 4px; padding: 0 5px; border-radius: var(--radius-xs); background: var(--neutral-soft); font-size: 11px; font-weight: 600; text-align: center; }
.notify-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 8px; }

[aria-busy="true"] { opacity: 0.6; pointer-events: none; cursor: progress; }

@media (max-width: 1100px) {
    .cues--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Görevlerim: liste + sağdan detay paneli ---------- */
.segmented--views { display: inline-flex; margin-bottom: 8px; }
.segmented--views .count-pill { margin-left: 4px; font-size: 11px; }
.button.is-disabled { opacity: .5; cursor: not-allowed; pointer-events: auto; }
[data-task-row] { cursor: pointer; }
[data-task-row]:focus-visible td { outline: 2px solid var(--link); outline-offset: -2px; }

.task-panel-backdrop { position: fixed; inset: var(--menubar-h) 0 0 0; z-index: 44; background: rgb(11 31 58 / 0.28); }
.task-panel {
    position: fixed; top: var(--menubar-h); right: 0; bottom: 0; z-index: 45;
    width: min(760px, 100vw); display: flex; flex-direction: column;
    background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-pop);
}
.task-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.task-panel__head h2 { font-size: 17px; margin: 2px 0 4px; }
.task-panel__head h2:focus { outline: none; }
.task-panel__eyebrow { margin: 0; font-size: 12px; color: var(--text-muted); }
.task-panel__badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.task-panel__body { flex: 1; overflow-y: auto; padding: 12px 16px 20px; }
.task-panel__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 12px; }
.task-panel__actions form { margin: 0; }
.task-panel__reason { padding: 10px 12px; margin-bottom: 12px; border: 1px solid #f5d9a8; border-radius: var(--radius-sm); background: var(--warning-soft); }
.task-panel__reason-actions { display: flex; gap: 6px; margin-top: 8px; }
.task-panel__section { padding: 10px 0; border-top: 1px solid var(--border); }
.task-panel__section h3 { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin: 0 0 6px; }
.task-panel__section h4 { font-size: 13px; margin: 10px 0 4px; }
.task-panel__section--rule { background: var(--primary-soft); margin: 0 -16px; padding: 10px 16px; }
.task-panel__text { margin: 0; white-space: pre-line; overflow-wrap: anywhere; font-size: 13px; }
.task-panel__footer { position: sticky; bottom: -20px; display: flex; gap: 8px; padding: 10px 0; margin-top: 12px; background: var(--surface); border-top: 1px solid var(--border); }
.form-grid--panel { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; margin-bottom: 10px; }
.task-comment { padding: 6px 0; border-bottom: 1px dashed var(--border); }
.task-comment__meta { margin: 0 0 2px; font-size: 12px; color: var(--text-muted); }
.task-comment__meta strong { color: var(--text); }
.task-comment-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 8px; }
.task-comment-form textarea { flex: 1; }
.task-history { list-style: none; margin: 0; padding: 0 0 0 10px; border-left: 2px solid var(--border); }
.task-history li { padding: 4px 0 6px 8px; }
.task-history p { margin: 0 0 2px; }

@media (max-width: 700px) {
    .form-grid--panel { grid-template-columns: minmax(0, 1fr); }
    .form-grid--panel .span-2 { grid-column: auto; }
    .task-comment-form { flex-direction: column; align-items: stretch; }
    .segmented--views { display: flex; }
}
@media print {
    .task-panel-backdrop { display: none; }
    .task-panel { position: static; width: auto; box-shadow: none; border: 0; }
}
.task-panel__section--rule .kv > div { justify-content: flex-start; }
.task-panel__section--rule .kv dt { flex: 0 0 120px; }
.task-panel__section--rule .kv dd { text-align: left; font-weight: 400; }

/* =====================================================================
   Ortak tasarım düzeni (0.4.1) — tüm ekranlar aynı bileşenleri kullanır.
   Ölçüler: gövde 14 px, yardımcı metin 12–13 px, sayfa başlığı 22 px; düğme/alan 34–36 px;
   tablo satırı ~40 px; içerik kenarı 24 px; bölüm aralığı 16 px; köşe 6–8 px; gölge yok.
   Kurallar kılavuzda: Temel ilkeler › Ekran ve görsel kurallar.
   ===================================================================== */
:root { --control-h: 36px; --control-h-sm: 34px; --gap: 16px; --border: #dde3ea; }

.content { padding: 20px 24px 32px; }
.card, .cue, .actionbar, .fasttab, .factbox, .doc-status { box-shadow: none; }

/* Sayfa başlığı */
.page-header, .page-header--compact { align-items: center; gap: 12px 16px; margin-bottom: var(--gap); }
.page-header h1, .page-header--compact h1, .doc-header__title h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.page-header p, .page-header--compact p { margin-top: 2px; font-size: 13px; color: var(--text-muted); }
.page-header .page-icon { display: none; } /* dekoratif simge yok */
.page-header .actions { margin-left: auto; }
.scope-line { font-size: 13px; color: var(--text-muted); gap: 2px 12px; }

/* Düğmeler: birincil lacivert, ikincil sade */
.button { height: var(--control-h); padding: 0 14px; font-size: 14px; border-color: var(--border-strong); }
.button--small, .menu--bar > .menu__trigger.button { height: var(--control-h-sm); padding: 0 12px; font-size: 14px; }
.button--ghost { border-color: transparent; background: transparent; }
.button.is-disabled, a.button[aria-disabled="true"] { opacity: .5; }

/* Form alanları */
input[type="text"], input[type="number"], input[type="date"], input[type="email"], input[type="search"], input[type="password"], select { height: var(--control-h); font-size: 14px; }
.filterbar input, .filterbar select, .form-grid--dense input, .form-grid--dense select, .lines-table input, .lines-table select, .actionbar__form select { height: var(--control-h-sm); font-size: 14px; }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-teal) 22%, transparent); border-color: var(--link); }
.field .help, .help { font-size: 12.5px; color: var(--text-muted); }

/* İşlem çubuğu: kutu değil, satır */
.actionbar { gap: 8px; padding: 0; margin-bottom: 12px; background: transparent; border: 0; border-radius: 0; }
.actionbar > .segmented:last-child { margin-left: auto; }

/* Tablo: tek stil */
.table, .table--dense { font-size: 14px; }
.table th, .table--dense th { padding: 9px 12px; font-size: 12px; font-weight: 600; letter-spacing: 0.03em; color: var(--text-muted); background: var(--surface-muted); white-space: nowrap; }
.table td, .table--dense td { padding: 9px 12px; height: 40px; vertical-align: middle; }
.table .small, .table td.small { font-size: 13px; }
.table a.row-link { font-weight: 600; }
.table-scroll { min-height: 0; max-height: calc(100vh - 300px); }
.table-empty { padding: 20px 16px; text-align: left; color: var(--text); }
.table-empty a { margin-left: 4px; }

/* Para: sağa hizalı, para birimi açık */
.num, .money { text-align: right !important; font-variant-numeric: tabular-nums; white-space: nowrap; }
.money__cur { margin-left: 4px; font-size: 12px; font-weight: 600; color: var(--text-muted); }

/* Rozet ve yardımcı metin */
.badge { font-size: 12px; padding: 2px 8px; }
.small { font-size: 12.5px; }
.count-pill { font-size: 12px; }

/* Bölümler ve kartlar */
.ui-section { margin-bottom: var(--gap); }
.ui-section .card__header, .workspace-grid .card__header { padding: 10px 14px; }
.ui-section .card__header h2, .workspace-grid .card__header h2 { font-size: 15px; }
.workspace-grid { gap: var(--gap); margin-bottom: var(--gap); }
.card__note { font-size: 12.5px; padding: 8px 14px; }

/* Göstergeler: eşit genişlik; kesin olmayan gösterge işaretli */
.cues { display: grid; grid-template-columns: repeat(var(--cue-cols, 4), minmax(0, 1fr)); gap: 12px; margin-bottom: var(--gap); }
.cues--4 { --cue-cols: 4; }
.cues--5 { --cue-cols: 5; }
.cue { min-width: 0; padding: 12px 14px; }
.cue__count { font-size: 24px; }
.cue__title { font-size: 14px; }
.cue__hint { font-size: 12.5px; color: var(--text-muted); }
.cue__flag { align-self: flex-start; margin-top: 4px; padding: 0 6px; border-radius: var(--radius-xs); background: var(--warning-soft); color: var(--warning); font-size: 12px; font-weight: 600; }
.cue--partial { border-left-color: var(--warning); }
@media (max-width: 1280px) { .cues--5 { --cue-cols: 3; } }
@media (max-width: 1100px) { .cues, .cues--4 { --cue-cols: 2; } }

/* Hazır görünümler (sekme gibi) */
.views { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 12px; padding: 0; border-bottom: 1px solid var(--border); }
.views a { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; color: var(--text-muted); font-size: 14px; font-weight: 500; }
.views a:hover { color: var(--text); }
.views a.is-active { color: var(--primary); border-bottom-color: var(--brand-teal); font-weight: 600; }
.views .count-pill { min-width: 22px; }

/* Filtreler: arama + 2–3 sık filtre; diğerleri "Filtreler" panelinde */
.filters { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; margin: 0 0 12px; }
.filters .field { gap: 4px; }
.filters .field > label, .filters-more__panel .field > label { font-size: 12.5px; font-weight: 500; color: var(--text-muted); }
.filters__search { width: min(340px, 100%); }
.filters__field { width: 200px; }
.filters .field-pair input { width: 140px; }
.filters input, .filters select { height: var(--control-h-sm); }
.filters-more { position: relative; }
.filters-more > summary { list-style: none; }
.filters-more > summary::-webkit-details-marker { display: none; }
.filters-more__panel {
    position: absolute; z-index: 40; top: calc(100% + 6px); left: 0; width: min(560px, 90vw); padding: 14px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-pop);
}
.filters-more__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.filters-more__actions { display: flex; gap: 8px; justify-content: flex-end; }
.chips { margin: 0 0 12px; }
.chip { height: 28px; font-size: 13px; }

/* Tablo altı: özet, sayfa boyutu, sayfalama */
.list-footer { padding: 8px 12px; gap: 12px; font-size: 13px; }
.list-footer__size { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); }
.list-footer__size select { width: auto; height: 32px; }
.list-footer .pagination { padding: 0; border: 0; }
.list-footer__right { display: flex; align-items: center; gap: 16px; margin-left: auto; }

/* Durumlar: yükleniyor / veri alınamadı / hiç kayıt yok / filtre sonucu boş */
.ui-state { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-bottom: var(--gap); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.ui-state > .icon { margin-top: 2px; }
.ui-state--error { border-color: #f0c2c2; background: var(--error-soft); }
.ui-state--error > .icon { color: var(--error); }
.ui-state__body { flex: 1; min-width: 0; }
.ui-state__title { margin: 0; font-weight: 600; color: #7f1d1d; }
.ui-state__text { margin: 2px 0 8px; color: var(--text); }
.ui-state__actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px; }
.ui-state__details > summary { display: inline-flex; align-items: center; height: var(--control-h-sm); cursor: pointer; color: var(--link); font-weight: 500; }
.ui-state__details[open] { flex-basis: 100%; }
.ui-state__details .table { margin: 6px 0; background: var(--surface); border: 1px solid var(--border); }
.ui-empty { font-size: 14px; color: var(--text); }
.ui-empty--unconfigured { color: var(--text-muted); }
.ui-empty--filtered { border-style: dashed; }
.ui-unavailable { margin: 0; padding: 14px 16px; color: var(--text-muted); }
pre.trace { margin: 6px 0 0; padding: 8px; max-height: 260px; overflow: auto; background: var(--surface-muted); border-radius: var(--radius-sm); font-size: 12px; white-space: pre-wrap; }

/* Sol menü: ~260 px, girintiler az, başlık en çok iki satır */
.sidebar__list { padding: 8px; }
.sidebar__link { font-size: 14px; }
.sidebar__pages { padding: 0 0 0 12px; }
.sidebar__subgroup > ul { padding-left: 4px; margin-left: 6px; }
.sidebar__grouptoggle, .sidebar__page { font-size: 13.5px; line-height: 1.3; padding: 6px 8px; }
.sidebar__grouptoggle > span:first-child, .sidebar__page > span:first-child {
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sidebar__soon { font-size: 11px; }
.sidebar__group { font-size: 12px; }

.task-panel__eyebrow, .task-comment__meta { font-size: 12.5px; }

/* Yükleniyor: liste soluklaşır ve üstünde metin görünür */
[data-list][aria-busy="true"], .table-scroll[aria-busy="true"], .table-wrap[aria-busy="true"] { position: relative; }
[data-list][aria-busy="true"]::after { content: "Yükleniyor…"; position: absolute; top: 48px; left: 50%; transform: translateX(-50%); padding: 6px 12px; border-radius: var(--radius-sm); background: var(--primary); color: #fff; font-size: 13px; opacity: 1; }
.cell-name { min-width: 220px; max-width: 420px; }
.sidebar__pages { padding-left: 20px; }
.table td:first-child { min-width: 120px; }
#siparis-listesi .cell-name { min-width: 240px; }
.ui-section .table td:first-child { min-width: 180px; }
.menu__form { display: grid; gap: 6px; padding: 6px 8px; }
.menu__form input { height: 32px; }

/* ---------- Sol menü genişliği (sürükleyerek) ---------- */
/* Genişlik .app üzerinde --sidebar-open-w ile saklanır; daraltılmış ve dar ekranda tutamaç yoktur. */
.sidebar__resizer {
    position: absolute; top: 0; right: -4px; bottom: 0; z-index: 2; width: 8px;
    cursor: col-resize; touch-action: none;
}
.sidebar__resizer::after {
    content: ""; position: absolute; top: 0; bottom: 0; left: 3px; width: 2px;
    background: transparent; transition: background .12s ease;
}
.sidebar__resizer:hover::after, .sidebar__resizer:focus-visible::after, .app.is-resizing .sidebar__resizer::after { background: var(--brand-teal); }
.sidebar__resizer:focus-visible { outline: none; }
.app.is-resizing, .app.is-resizing * { cursor: col-resize !important; user-select: none; }
.app.is-resizing .sidebar { transition: none; }
.app.is-collapsed .sidebar__resizer { display: none; }
@media (max-width: 900px) { .sidebar__resizer { display: none; } }

/* ---------- Temalar ---------- */
/*
 * Tema <html data-theme="…"> ile seçilir (Sistem Yönetimi › Görünüm › Temalar; tercih tarayıcıda saklanır).
 * Varsayılan değişkenler ":root, [data-theme-preview]" bloğundadır; her tema yalnız değişkenleri değiştirir.
 * Tema sayfasındaki önizlemeler [data-theme-preview="…"] ile aynı değişkenleri kullanır (etkin temadan etkilenmez).
 * Yeni tema: config/erp.php → themes + burada bir değişken bloğu.
 */

/* ===== Açık temalar ===== */

/* Yuvarlak: yumuşak köşeler, hap biçimli düğmeler, hafif gölgeli kartlar */
:root[data-theme="yuvarlak"], [data-theme-preview="yuvarlak"] {
    --radius: 16px; --radius-sm: 10px; --radius-lg: 14px; --radius-xs: 8px;
    --shadow: 0 1px 2px rgb(11 31 58 / 0.05), 0 2px 8px rgb(11 31 58 / 0.05);
}

/* Lacivert menü: sol menü marka lacivertinde, içerik açık */
:root[data-theme="lacivert"] .sidebar,
[data-theme-preview="lacivert"] .theme-mock__side {
    --surface: #0b1f3a; --surface-muted: #16325a; --primary: #ffffff; --primary-soft: #1b3d6b;
    --text: #e3eaf2; --text-muted: #a9b8ca; --text-faint: #8fa1b7; --link: #7db6f4; --border: #1f3a60;
}
:root[data-theme="lacivert"] .sidebar { border-right-color: #0b1f3a; }

/* Yüksek kontrast: koyu metin, belirgin çizgiler, altı çizili bağlantılar */
:root[data-theme="kontrast"], [data-theme-preview="kontrast"] {
    --border: #8996a6; --border-strong: #5b6b7f; --text: #000000; --text-muted: #1f2d3f; --text-faint: #34445a;
    --link: #04524b; --link-hover: #023a35; --shell-bg: #000000; --shell-hover: #1f1f1f;
}
:root[data-theme="kontrast"] .content a:not(.button):not(.menu__item),
[data-theme-preview="kontrast"] .theme-mock__link { text-decoration: underline; text-underline-offset: 2px; }

/* Sade: beyaz üst çubuk, ince çizgiler, mavi vurgu (minimal, düz) */
:root[data-theme="sade"], [data-theme-preview="sade"] {
    --bg: #fafafa; --surface-muted: #f6f7f8; --border: #ececee; --border-strong: #d9dadf;
    --text: #18181b; --text-muted: #52525b; --text-faint: #71717a;
    --primary: #18181b; --primary-hover: #3f3f46; --primary-soft: #f1f5ff; --link: #2563eb; --link-hover: #1d4ed8;
    --brand-teal: #2563eb; --accent: #2563eb;
    --shell-bg: #ffffff; --shell-text: #3f3f46; --shell-text-muted: #71717a; --shell-hover: #f4f4f5; --shell-active: #e4e4e7;
    --shell-strong: #18181b; --shell-line: #e4e4e7; --shell-field: #f4f4f5;
    --radius: 10px; --radius-sm: 8px; --radius-lg: 10px;
}
:root[data-theme="sade"] .appbar { border-bottom: 1px solid #ececee; }

/* Okyanus: canlı mavi, yuvarlak köşeler */
:root[data-theme="okyanus"], [data-theme-preview="okyanus"] {
    --bg: #f0f6fc; --surface-muted: #f5f9fd; --border: #d6e4f2; --border-strong: #b9cfe6;
    --text: #0c2a4a; --text-muted: #3d5a7a; --text-faint: #5f7a96;
    --primary: #0369a1; --primary-hover: #075985; --primary-soft: #e0f0fb; --link: #0369a1; --link-hover: #075985;
    --brand-teal: #0ea5e9; --accent: #0ea5e9;
    --shell-bg: #075985; --shell-hover: #0369a1; --shell-active: #0284c7; --shell-text: #e0f2fe; --shell-text-muted: #9fd0f0;
    --radius: 14px; --radius-sm: 10px; --radius-lg: 12px; --radius-xs: 6px;
}

/* Orman: koyu yeşil kabuk, doğal tonlar */
:root[data-theme="orman"], [data-theme-preview="orman"] {
    --bg: #f3f6f2; --surface-muted: #f6f9f5; --border: #dbe5d8; --border-strong: #c0d0bb;
    --text: #13281b; --text-muted: #3f5a46; --text-faint: #5f7a65;
    --primary: #166534; --primary-hover: #14532d; --primary-soft: #e6f4ea; --link: #15803d; --link-hover: #166534;
    --brand-teal: #22c55e; --accent: #22c55e;
    --shell-bg: #14321f; --shell-hover: #1d4a2e; --shell-active: #25603b; --shell-text: #dcefe2; --shell-text-muted: #94b9a0;
}

/* Gün batımı: sıcak turuncu ve kiremit */
:root[data-theme="gunbatimi"], [data-theme-preview="gunbatimi"] {
    --bg: #fdf7f3; --surface-muted: #fdf9f6; --border: #f0e1d6; --border-strong: #e2c9b8;
    --text: #3b1d10; --text-muted: #6b4433; --text-faint: #8a6352;
    --primary: #c2410c; --primary-hover: #9a3412; --primary-soft: #fdeee4; --link: #c2410c; --link-hover: #9a3412;
    --brand-teal: #f97316; --accent: #f97316;
    --shell-bg: #431407; --shell-hover: #6b230f; --shell-active: #7c2d12; --shell-text: #ffe4d4; --shell-text-muted: #d9a68c;
    --radius: 12px; --radius-sm: 8px;
}

/* Ametist: mor vurgu, yumuşak ve yuvarlak */
:root[data-theme="ametist"], [data-theme-preview="ametist"] {
    --bg: #f7f5fd; --surface-muted: #faf9fe; --border: #e6e1f5; --border-strong: #d0c7ec;
    --text: #23153f; --text-muted: #4f4470; --text-faint: #6f6590;
    --primary: #6d28d9; --primary-hover: #5b21b6; --primary-soft: #f1ebfe; --link: #6d28d9; --link-hover: #5b21b6;
    --brand-teal: #a855f7; --accent: #a855f7;
    --shell-bg: #2e1065; --shell-hover: #4c1d95; --shell-active: #5b21b6; --shell-text: #ede9fe; --shell-text-muted: #b9a8e8;
    --radius: 16px; --radius-sm: 10px; --radius-lg: 14px; --radius-xs: 8px;
    --shadow: 0 1px 2px rgb(46 16 101 / 0.05), 0 4px 12px rgb(46 16 101 / 0.05);
}

/* Bordo: klasik şarap kırmızısı, sade */
:root[data-theme="bordo"], [data-theme-preview="bordo"] {
    --bg: #f8f5f5; --surface-muted: #fbf8f8; --border: #eadfe0; --border-strong: #d8c5c7;
    --text: #2d0f14; --text-muted: #5e3a40; --text-faint: #7e5a60;
    --primary: #881337; --primary-hover: #6f0f2d; --primary-soft: #fbeaef; --link: #9f1239; --link-hover: #881337;
    --brand-teal: #e11d48; --accent: #e11d48;
    --shell-bg: #3b0a17; --shell-hover: #5c1124; --shell-active: #74162e; --shell-text: #fce7ec; --shell-text-muted: #d6a2ae;
}

/* Kum: sıcak kâğıt tonları, düşük göz yorgunluğu */
:root[data-theme="kum"], [data-theme-preview="kum"] {
    --bg: #f4efe6; --surface: #fffcf6; --surface-muted: #f8f3ea; --border: #e6dccb; --border-strong: #d3c4ab;
    --text: #2f2618; --text-muted: #5e5240; --text-faint: #7d705c; --neutral-soft: #efe8db;
    --primary: #5b4a2e; --primary-hover: #463821; --primary-soft: #f1e9d8; --link: #8a5a14; --link-hover: #6d460f;
    --brand-teal: #b7791f; --accent: #b7791f;
    --shell-bg: #3a2f1f; --shell-hover: #4d3f2a; --shell-active: #5e4d33; --shell-text: #f3e9d6; --shell-text-muted: #c4b293;
    --radius: 10px; --radius-sm: 8px;
}

/* Cam: renk geçişli zemin, yarı saydam buzlu kartlar, yuvarlak köşeler */
:root[data-theme="cam"], [data-theme-preview="cam"] {
    --app-bg: linear-gradient(135deg, #dbeafe 0%, #ede9fe 45%, #ccfbf1 100%) fixed;
    --bg: #eef2fb; --surface: rgb(255 255 255 / 0.72); --surface-muted: rgb(255 255 255 / 0.55);
    --border: rgb(15 23 42 / 0.08); --border-strong: rgb(15 23 42 / 0.16);
    --text: #0f172a; --text-muted: #3b4760; --text-faint: #5b6680;
    --primary: #4f46e5; --primary-hover: #4338ca; --primary-soft: rgb(99 102 241 / 0.12); --link: #4338ca; --link-hover: #3730a3;
    --brand-teal: #6366f1; --accent: #6366f1;
    --shell-bg: rgb(15 23 42 / 0.78); --shell-hover: rgb(255 255 255 / 0.10); --shell-active: rgb(255 255 255 / 0.16);
    --radius: 18px; --radius-sm: 12px; --radius-lg: 16px; --radius-xs: 8px;
    --shadow: 0 8px 24px rgb(15 23 42 / 0.08);
}
:root[data-theme="cam"] :is(.appbar, .sidebar, .card, .menu__panel, .fasttab, .theme-card),
[data-theme-preview="cam"] :is(.card, .theme-mock__side) { -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4); }
[data-theme-preview="cam"].theme-mock { background: linear-gradient(135deg, #dbeafe 0%, #ede9fe 45%, #ccfbf1 100%); }

/* ===== Koyu temalar ===== */

/* Gece: lacivert-siyah zemin, turkuaz vurgu */
:root[data-theme="gece"], [data-theme-preview="gece"] {
    color-scheme: dark;
    --bg: #0a1220; --surface: #111c2e; --surface-muted: #16233a; --border: #22314a; --border-strong: #31435f;
    --text: #e6edf6; --text-muted: #a3b2c7; --text-faint: #7f90a8; --neutral-soft: #1c2a42;
    --primary: #4f9cf0; --primary-hover: #7db6f4; --primary-soft: #14294a; --on-primary: #061a33;
    --link: #7db6f4; --link-hover: #a9cff8; --brand-teal: #4f9cf0; --accent: #4f9cf0;
    --ok: #4ade80; --ok-soft: #12321f; --warning: #fbbf24; --warning-soft: #3a2a0a; --error: #f87171; --error-soft: #3b1414;
    --shell-bg: #060c17; --shell-hover: #142035; --shell-active: #1b2a45; --shell-text: #d4deeb; --shell-text-muted: #8293ab;
    --shadow-pop: 0 12px 32px rgb(0 0 0 / 0.5), 0 2px 6px rgb(0 0 0 / 0.3);
}

/* Grafit: nötr koyu gri, mavi vurgu, yuvarlak */
:root[data-theme="grafit"], [data-theme-preview="grafit"] {
    color-scheme: dark;
    --bg: #18181b; --surface: #222226; --surface-muted: #2a2a2f; --border: #34343a; --border-strong: #46464e;
    --text: #f4f4f5; --text-muted: #b4b4bd; --text-faint: #8e8e98; --neutral-soft: #2f2f35;
    --primary: #4f9cf0; --primary-hover: #7db6f4; --primary-soft: #1e2a3d; --on-primary: #061a33;
    --link: #7db6f4; --link-hover: #a9cff8; --brand-teal: #4f9cf0; --accent: #4f9cf0;
    --ok: #4ade80; --ok-soft: #173322; --warning: #fbbf24; --warning-soft: #3a2c0c; --error: #f87171; --error-soft: #3d1717;
    --shell-bg: #0f0f11; --shell-hover: #26262b; --shell-active: #303036; --shell-text: #e4e4e7; --shell-text-muted: #9a9aa3;
    --radius: 12px; --radius-sm: 8px; --radius-lg: 12px;
    --shadow-pop: 0 12px 32px rgb(0 0 0 / 0.55), 0 2px 6px rgb(0 0 0 / 0.3);
}

/* Gece mavisi: derin mor-mavi, neon vurgu */
:root[data-theme="gece-mavisi"], [data-theme-preview="gece-mavisi"] {
    color-scheme: dark;
    --bg: #0f1024; --surface: #171936; --surface-muted: #1e2145; --border: #2a2e5a; --border-strong: #3a3f75;
    --text: #eceefe; --text-muted: #b0b4e0; --text-faint: #868bbd; --neutral-soft: #23264f;
    --primary: #a78bfa; --primary-hover: #c4b5fd; --primary-soft: #2a2459; --on-primary: #1a0f45;
    --link: #c4b5fd; --link-hover: #ddd6fe; --brand-teal: #f472b6; --accent: #f472b6;
    --ok: #4ade80; --ok-soft: #14352a; --warning: #fbbf24; --warning-soft: #3a2c10; --error: #fb7185; --error-soft: #3f1527;
    --shell-bg: #0a0b1a; --shell-hover: #1c1e40; --shell-active: #262a55; --shell-text: #dfe2fb; --shell-text-muted: #8f94c7;
    --radius: 14px; --radius-sm: 10px; --radius-lg: 14px; --radius-xs: 6px;
    --shadow-pop: 0 12px 32px rgb(0 0 0 / 0.55), 0 2px 6px rgb(0 0 0 / 0.3);
}

/* Koyu temalarda sabit yazılmış açık renkleri değişkenlere bağla */
:root:is([data-theme="gece"], [data-theme="grafit"], [data-theme="gece-mavisi"]) .alert--warning { border-color: var(--border); color: var(--warning); }
:root:is([data-theme="gece"], [data-theme="grafit"], [data-theme="gece-mavisi"]) .alert--error { border-color: var(--border); color: var(--error); }
:root:is([data-theme="gece"], [data-theme="grafit"], [data-theme="gece-mavisi"]) .alert--ok { border-color: var(--border); color: var(--ok); }
:root:is([data-theme="gece"], [data-theme="grafit"], [data-theme="gece-mavisi"]) .alert--info { border-color: var(--border); color: var(--text); }
:root:is([data-theme="gece"], [data-theme="grafit"], [data-theme="gece-mavisi"]) .ui-state__title { color: var(--error); }
:root:is([data-theme="gece"], [data-theme="grafit"], [data-theme="gece-mavisi"]) :is(.ui-state--error, .ui-empty--error, .task-panel__reason, .button--danger) { border-color: var(--border-strong); }
:root:is([data-theme="gece"], [data-theme="grafit"], [data-theme="gece-mavisi"]) .module-card:hover { box-shadow: 0 4px 12px rgb(0 0 0 / 0.35); }

/* ===== Biçim: yuvarlak temalarda hap düğmeler ve menü maddeleri ===== */
:root:is([data-theme="yuvarlak"], [data-theme="okyanus"], [data-theme="ametist"], [data-theme="cam"], [data-theme="gece-mavisi"]) :is(.button, .menu--bar > .menu__trigger.button):not([data-theme-preview] *),
:is([data-theme-preview="yuvarlak"], [data-theme-preview="okyanus"], [data-theme-preview="ametist"], [data-theme-preview="cam"], [data-theme-preview="gece-mavisi"]) .button { border-radius: 999px; padding-left: 16px; padding-right: 16px; }
:root:is([data-theme="yuvarlak"], [data-theme="okyanus"], [data-theme="ametist"], [data-theme="cam"], [data-theme="gece-mavisi"]) :is(.sidebar__link, .sidebar__page, .sidebar__grouptoggle) { border-radius: 999px; }
:root:is([data-theme="yuvarlak"], [data-theme="okyanus"], [data-theme="ametist"], [data-theme="cam"], [data-theme="gece-mavisi"]) :is(.sidebar__link.is-current, .sidebar__page.is-active) { box-shadow: none; }
:root:is([data-theme="yuvarlak"], [data-theme="okyanus"], [data-theme="ametist"], [data-theme="cam"], [data-theme="gece-mavisi"]) .card .table-wrap:last-child { overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); } /* hidden yatay kaydırmayı kapatıyordu */
:root:is([data-theme="yuvarlak"], [data-theme="okyanus"], [data-theme="ametist"], [data-theme="cam"], [data-theme="gece-mavisi"]) .sidebar__collapse { border-radius: var(--radius-sm); }
:is([data-theme-preview="yuvarlak"], [data-theme-preview="okyanus"], [data-theme-preview="ametist"], [data-theme-preview="cam"], [data-theme-preview="gece-mavisi"]) .theme-mock__item.is-active { box-shadow: none; }

/* Gölgeli kartlar (değişken --shadow tanımlı temalar) */
:root:is([data-theme="yuvarlak"], [data-theme="ametist"], [data-theme="cam"]) :is(.card, .fasttab):not([data-theme-preview] *),
:is([data-theme-preview="yuvarlak"], [data-theme-preview="ametist"], [data-theme-preview="cam"]) .card { box-shadow: var(--shadow); }

/* Tema sayfası: kartlar ve küçük önizleme */
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.theme-card { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.theme-card:hover { border-color: var(--border-strong); }
.theme-card:has(input:checked) { border-color: var(--brand-teal); box-shadow: 0 0 0 1px var(--brand-teal); }
.theme-card:has(input:focus-visible) { outline: 2px solid var(--brand-teal); outline-offset: 2px; }
.theme-card__head { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.theme-card__head input { margin: 0; accent-color: var(--brand-teal); }
.theme-card__head .badge { margin-left: auto; }
.theme-card p { margin: 0; font-size: 13px; color: var(--text-muted); }

.theme-group { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.theme-grid + .theme-group { margin-top: 20px; }
.theme-mock { display: flex; flex-direction: column; height: 150px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg); pointer-events: none; }
.theme-mock__bar { display: flex; align-items: center; justify-content: center; flex: none; height: 18px; background: var(--shell-bg); }
.theme-mock__search { width: 40%; height: 8px; border-radius: 999px; background: var(--search-bg, #fff); border: 1px solid var(--search-border, transparent); }
.theme-mock__body { flex: 1; display: flex; min-height: 0; }
.theme-mock__side { display: flex; flex-direction: column; gap: 4px; width: 34%; padding: 8px 6px; background: var(--surface); border-right: 1px solid var(--border); }
.theme-mock__item { height: 14px; border-radius: var(--radius-sm); background: var(--surface-muted); }
.theme-mock__item.is-active { background: var(--primary-soft); box-shadow: inset 3px 0 0 var(--brand-teal); }
.theme-mock__main { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 8px; }
.theme-mock .card { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.theme-mock__line { height: 6px; width: 70%; border-radius: var(--radius-xs); background: var(--border); }
.theme-mock__link { font-size: 11px; color: var(--link); }
.theme-mock__row { display: flex; gap: 6px; align-items: center; }
.theme-mock .button { height: 22px; padding: 0 9px; font-size: 11px; }
.theme-mock input { height: 22px; font-size: 11px; padding: 0 6px; }

.width-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.width-row output { font-variant-numeric: tabular-nums; font-weight: 600; min-width: 64px; }

/* ---------- Arama önerileri (üst çubuk) ---------- */
.search-suggest {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 70;
    max-height: min(70vh, 520px); overflow-y: auto; padding: 6px;
    background: var(--surface); color: var(--text);
    border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-pop);
}
.search-suggest[aria-busy="true"] { opacity: .75; }
.search-suggest__group { margin: 6px 8px 2px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); }
.search-suggest__group:first-child { margin-top: 2px; }
.search-suggest__item { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 6px 8px; border-radius: var(--radius-sm); color: var(--text); font-size: 13px; }
.search-suggest__item:hover, .search-suggest__item.is-active { background: var(--primary-soft); color: var(--text); }
.search-suggest__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.search-suggest__sub { flex: none; max-width: 50%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--text-muted); }
.search-suggest__empty { padding: 8px; font-size: 13px; color: var(--text-muted); }
.search-suggest__hint { margin-top: 4px; padding: 6px 8px 2px; border-top: 1px solid var(--border); font-size: 11px; color: var(--text-faint); }

/* Arama kutusu temaya göre: koyu temalarda koyu alan, beyaz çubuklu temada gri alan */
:root:is([data-theme="gece"], [data-theme="grafit"], [data-theme="gece-mavisi"]), :is([data-theme-preview="gece"], [data-theme-preview="grafit"], [data-theme-preview="gece-mavisi"]) {
    --search-bg: var(--surface-muted); --search-text: var(--text); --search-icon: var(--text-faint); --search-border: var(--border-strong);
}
:root[data-theme="sade"], [data-theme-preview="sade"] { --search-bg: #f4f4f5; --search-text: #18181b; --search-icon: #71717a; --search-border: #e4e4e7; }
:root[data-theme="cam"], [data-theme-preview="cam"] { --search-bg: rgb(255 255 255 / 0.9); }
:root[data-theme="kum"], [data-theme-preview="kum"] { --search-bg: #fffcf6; --search-text: #2f2618; }
:root[data-theme="cam"] :is(.search-suggest, .menu__panel) { background: rgb(255 255 255 / 0.96); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }

/* ---------- Sıklık: Sıkı ---------- */
:root[data-density="sik"] { --control-h: 30px; --control-h-sm: 28px; --gap: 10px; --menubar-h: 36px; }
:root[data-density="sik"] .content { padding: 12px 16px 24px; }
:root[data-density="sik"] :is(.table, .table--dense) { font-size: 13px; }
:root[data-density="sik"] :is(.table th, .table--dense th) { padding: 5px 10px; font-size: 11.5px; }
:root[data-density="sik"] :is(.table td, .table--dense td) { padding: 4px 10px; height: 30px; }
:root[data-density="sik"] .card__header { padding: 8px 12px; }
:root[data-density="sik"] .card__header h2 { font-size: 14px; }
:root[data-density="sik"] .card__body, :root[data-density="sik"] .ui-section__body--pad { padding: 10px 12px; }
:root[data-density="sik"] .card__note { padding: 6px 12px; }
:root[data-density="sik"] :is(.button, .button--small) { font-size: 13px; padding: 0 10px; }
:root[data-density="sik"] :is(input[type="text"], input[type="number"], input[type="date"], input[type="email"], input[type="search"], input[type="password"], select) { font-size: 13px; padding: 0 8px; }
:root[data-density="sik"] :is(.page-header h1, .page-header--compact h1, .doc-header__title h1) { font-size: 19px; }
:root[data-density="sik"] .cue { padding: 8px 12px; }
:root[data-density="sik"] .cue__count { font-size: 20px; }
:root[data-density="sik"] .sidebar__link { min-height: 28px; font-size: 13px; }
:root[data-density="sik"] :is(.sidebar__grouptoggle, .sidebar__page) { padding: 3px 8px; font-size: 12.5px; }
:root[data-density="sik"] .form-grid { gap: 10px 12px; }

/* ---------- Görsel düzen: başlık vurgusu, satır vurgusu, sabit tablo başlığı, gösterge çizgisi ---------- */
.page-header h1, .page-header--compact h1 { position: relative; padding-left: 12px; }
.page-header h1::before, .page-header--compact h1::before {
    content: ""; position: absolute; left: 0; top: 0.18em; bottom: 0.18em; width: 4px; border-radius: 4px; background: var(--brand-teal);
}
.table tbody tr:hover > td { background-image: linear-gradient(var(--row-hover), var(--row-hover)); }
.table-scroll .table thead th { position: sticky; top: 0; z-index: 2; box-shadow: inset 0 -1px 0 var(--border); }
.cue { position: relative; overflow: hidden; }
.cue, .cue.cue--warn, .cue.cue--partial, .cue.cue--critical, .cue.cue--unavailable { border-left: 1px solid var(--border); }
.cue::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--brand-teal); }
.cue--warn::before, .cue--partial::before { background: var(--warning); }
.cue--critical::before { background: var(--error); }
.cue--unavailable::before { background: var(--border-strong); }
.card__header h2 { letter-spacing: -0.005em; }

/* ---------- Hareket ---------- */
@keyframes nv-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes nv-fade { from { opacity: 0; } to { opacity: 1; } }
.menu.is-open > .menu__panel, .search-suggest:not([hidden]) { animation: nv-pop .14s ease-out; transform-origin: top; }
.sidebar__module.is-open > .sidebar__pages, .sidebar__subgroup.is-open > ul { animation: nv-fade .16s ease-out; }
.button, .sidebar__link, .sidebar__page, .sidebar__grouptoggle, .menu__item, .table tbody td, a.cue, .theme-card { transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease; }
a.cue:hover, .module-card:hover, .theme-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgb(11 31 58 / 0.08); }
html.is-theme-switching, html.is-theme-switching *, html.is-theme-switching *::before { transition: background-color .3s ease, color .3s ease, border-color .3s ease, box-shadow .3s ease !important; }
:root[data-motion="azalt"] *, :root[data-motion="azalt"] *::before, :root[data-motion="azalt"] *::after { animation: none !important; transition: none !important; }
:root[data-motion="azalt"] :is(a.cue, .module-card, .theme-card):hover { transform: none; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    :is(a.cue, .module-card, .theme-card):hover { transform: none; }
}

/* ---------- Temalar sayfası: tercih bölümleri ---------- */
.pref-status { align-self: center; font-size: 12.5px; color: var(--text-muted); }
.pref-status.is-error { color: var(--error); }
.pref-note { margin: 0 0 12px; font-size: 13px; color: var(--text-muted); }
.link-button { padding: 0; border: 0; background: none; color: var(--link); font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.pref-grid { margin-top: var(--gap); }
.pref-grid > .ui-section { margin-bottom: 0; }
.pref-block { margin-top: var(--gap); }
.choice-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.density-mock { display: flex; flex-direction: column; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-muted); }
.density-mock span { border-bottom: 1px solid var(--border); background: var(--surface); }
.density-mock span:last-child { border-bottom: 0; }
.density-mock--rahat span { height: 16px; }
.density-mock--sik span { height: 10px; }
.theme-mock--split { flex-direction: row; }
.theme-mock__half { flex: 1; display: flex; flex-direction: column; min-width: 0; background: var(--bg); }
.theme-mock__half + .theme-mock__half { border-left: 1px solid var(--border-strong); }
.theme-mock__half .theme-mock__side { width: 30%; }
.form-inline-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; align-items: end; }

/* ---------- Giriş ekranı: marka alanı + kart ---------- */
.auth-page:has(> .auth-hero) { position: relative; grid-template-columns: minmax(0, 1.1fr) minmax(360px, 1fr); place-items: stretch; padding: 0; background: #f3f5f8; }
@media (min-width: 901px) { .auth-page:has(> .auth-hero) .auth-logo { display: none; } }
.auth-hero {
    position: relative; overflow: hidden; display: flex; align-items: center; padding: 48px clamp(32px, 6vw, 96px);
    background: linear-gradient(150deg, #0b1f3a 0%, #132a4a 55%, #0c3f7a 100%); color: #d7e0ea;
}
.auth-hero::before {
    content: ""; position: absolute; inset: 0; opacity: .5;
    background-image: linear-gradient(rgb(255 255 255 / 0.05) 1px, transparent 1px), linear-gradient(90deg, rgb(255 255 255 / 0.05) 1px, transparent 1px);
    background-size: 36px 36px; mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at 30% 40%, #000 0%, transparent 75%);
}
.auth-hero__glow { position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgb(12 108 211 / 0.45), transparent 70%); filter: blur(10px); }
.auth-hero__inner { position: relative; max-width: 460px; }
.auth-hero__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; color: #fff; }
.auth-hero__brand .brand-mark { width: auto; height: 40px; aspect-ratio: 415 / 350; color: #fff; }
.auth-hero__brand .brand-word { font-size: 20px; }
.auth-hero__title { margin: 0 0 24px; font-size: clamp(24px, 2.6vw, 34px); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; color: #fff; }
.auth-hero__list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; font-size: 15px; }
.auth-hero__list li { display: flex; align-items: center; gap: 10px; }
.auth-hero__list li::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #0c6cd3; box-shadow: 0 0 0 4px rgb(12 108 211 / 0.25); }
.auth-page > .auth-card { align-self: center; justify-self: center; width: min(400px, calc(100% - 32px)); margin: 32px 16px; padding: 32px; border: 1px solid var(--border); border-radius: 16px; box-shadow: 0 20px 50px rgb(11 31 58 / 0.12); }
.auth-card .button { border-radius: 10px; }
@media (max-width: 900px) {
    .auth-page:has(> .auth-hero) { grid-template-columns: 1fr; background: linear-gradient(160deg, #0b1f3a 0%, #102b52 40%, #f3f5f8 40%); }
    .auth-hero { display: none; }
}
.lines-table select[name$="[price_method]"], .lines-table select[name$="[method]"] { min-width: 180px; }
.field--action .button { align-self: flex-start; }

/* Yönetici Özeti göstergeleri (x-ui.kpi): eşit genişlik, sayı yalnız kaynak varsa */
.kpis { display: grid; grid-template-columns: repeat(var(--kpi-cols, 6), minmax(0, 1fr)); gap: 12px; margin-bottom: var(--gap); }
.kpis--4 { --kpi-cols: 4; }
.kpi { position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--brand-teal); border-radius: var(--radius-sm); }
.kpi--partial { border-left-color: var(--warning); }
.kpi--off { border-left-color: var(--border-strong); background: var(--surface-muted); }
.kpi__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.kpi__title { font-size: 13px; font-weight: 600; }
.kpi__value { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi__value a { color: var(--text); }
.kpi__value a:hover { color: var(--link); }
.kpi__value--off { color: var(--text-faint); }
.kpi__note { font-size: 12.5px; color: var(--text-muted); }
.kpi__info { position: relative; }
.kpi__info > summary { list-style: none; cursor: pointer; color: var(--text-muted); }
.kpi__info > summary::-webkit-details-marker { display: none; }
.kpi__info .icon { width: 16px; height: 16px; }
.kpi__pop { position: absolute; z-index: 30; right: 0; top: 22px; width: 300px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-pop); font-size: 12.5px; }
.kpi__pop p { margin: 0 0 6px; }
@media (max-width: 1280px) { .kpis { --kpi-cols: 3; } }
@media (max-width: 800px) { .kpis, .kpis--4 { --kpi-cols: 2; } }

/* ---------- Para Birimleri ve Kurlar ---------- */
.cue__count.rate-cue { font-size: 18px; line-height: 1.3; }
.rate-filter { display: flex; align-items: center; gap: 6px; }
.rate-filter select { width: auto; height: var(--control-h-sm); }

.kpis { align-items: start; }

/* Favoriler: yıldız ve pencere, Favorilerim satırları */
.fav-star { position: relative; display: inline-block; }
.fav-star > summary { list-style: none; }
.fav-star > summary::-webkit-details-marker { display: none; }
.fav-star > summary.is-favorite .icon { fill: var(--warning); stroke: var(--warning); }
.fav-star__panel { position: absolute; z-index: 45; right: 0; top: calc(100% + 6px); width: 320px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-pop); text-align: left; }
.fav-star__panel--wide { width: 420px; }
.fav-star__form { display: grid; gap: 10px; }
.fav-star__form .checkbox { display: flex; font-size: 13px; }
.fav-title { display: inline-flex; align-items: center; gap: 8px; }
.fav-title .icon { width: 22px; height: 22px; fill: var(--warning); stroke: var(--warning); }
.fav-table [data-fav-row] { cursor: pointer; }
.fav-table [data-fav-row]:hover td { background-image: linear-gradient(var(--row-hover), var(--row-hover)); }
.fav-actions { width: 48px; text-align: right; }
.fav-list { list-style: none; margin: 0; padding: 0; }
.fav-list li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--border); }
.fav-list li:last-child { border-bottom: 0; }
.fav-empty { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* ---------- Yönetici Özeti (rol merkezi düzeni) ---------- */
.scope-dates { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 0 0 10px; font-size: 13px; }
.scope-dates > div { display: flex; gap: 6px; align-items: baseline; }
.scope-dates dt { color: var(--text-muted); }
.scope-dates dt::after { content: ":"; }
.scope-dates dd { margin: 0; font-weight: 600; }
.scope-dates dd .muted { font-weight: 400; }
.coverage-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-muted); font-size: 13px; color: var(--text-muted); }
.coverage-note .icon { width: 16px; height: 16px; color: var(--link); }
.coverage-note a { font-weight: 600; }

.kpi { border-left: 1px solid var(--border); padding: 14px 16px; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--brand-teal); }
.kpi--attention::before { background: var(--warning); }
.kpi--attention .kpi__value a { color: var(--warning); }
.kpi--off::before { background: var(--border-strong); }
.kpi__value { font-size: 26px; }
.kpi__flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.kpi__more { display: inline-flex; align-items: center; gap: 2px; margin-top: auto; padding-top: 6px; font-size: 12.5px; font-weight: 600; }
.kpi__more .icon { width: 14px; height: 14px; }
.kpi .kpi__pop { left: auto; right: 0; }
.kpi__info[open] { z-index: 40; }
.kpi { overflow: visible; }

.flag { display: inline-flex; align-items: center; padding: 0 7px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface-muted); color: var(--text-muted); font-size: 11.5px; font-weight: 600; line-height: 19px; white-space: nowrap; cursor: help; }
.flag--fx { border-style: dashed; }

.action-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--gap); align-items: start; margin-bottom: var(--gap); }
.action-grid > .ui-section { margin-bottom: 0; }
.action-list { margin: 0; padding: 4px 0; list-style: none; }
.action-list a { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 7px 16px; color: var(--text); font-size: 13.5px; }
.action-list a:hover { background: var(--surface-muted); color: var(--text); }
.action-list li + li a { border-top: 1px solid var(--border); }
.action-list__main { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.action-list__main strong { margin-right: 6px; color: var(--link); }
.action-list__side { flex: none; font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }

.disclosure { margin-bottom: var(--gap); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.disclosure > summary { display: flex; align-items: center; gap: 8px; padding: 12px 16px; cursor: pointer; font-weight: 600; list-style: none; }
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::before { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s ease; color: var(--text-muted); }
.disclosure[open] > summary::before { transform: rotate(45deg); }
.disclosure[open] > summary { border-bottom: 1px solid var(--border); }
.disclosure__body { padding: 4px 16px 12px; font-size: 13.5px; }
.disclosure__body li { margin: 6px 0; }
.disclosure__note { margin: 0; padding: 8px 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-muted); }
@media (max-width: 1100px) { .kpis { --kpi-cols: 2 !important; } }
@media (max-width: 600px) { .kpis { --kpi-cols: 1 !important; } }

/* ---- Müşteri risk ve limit görünümü, ekstre (0.5.1) ---- */
.text-error { color: var(--error); }
.actionbar__sort { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.actionbar__sort select { height: 30px; padding: 0 8px; }
.risk-meter { display: inline-block; width: 56px; height: 6px; margin-right: 6px; vertical-align: middle; border-radius: 3px; background: var(--border); overflow: hidden; }
.risk-meter__bar { display: block; height: 100%; background: var(--brand-teal); }
.risk-meter__bar--near { background: var(--warning, #b45309); }
.risk-meter__bar--over { background: var(--error); }
.filters__field--wide { min-width: 320px; }

/* ---------- Sol menü: Dynamics 365 site haritası düzeni ---------- */
.sitemap { overflow: visible; }
.sitemap__top { flex: none; padding: 6px 6px 6px; border-bottom: 1px solid var(--border); }
.sitemap__areas { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 2px 6px 8px; }
.sitemap__item {
    position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 36px; padding: 0 10px;
    border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--text); font: inherit; font-size: 14px;
    line-height: 1.25; text-align: left; cursor: pointer;
}
.sitemap__item .icon { width: 18px; height: 18px; color: var(--text-muted); }
.sitemap__item:hover { background: var(--surface-muted); color: var(--text); }
.sitemap__item.is-active { background: var(--primary-soft); font-weight: 600; }
.sitemap__item.is-active::before { content: ""; position: absolute; left: 0; top: 7px; bottom: 7px; width: 3px; border-radius: 3px; background: var(--brand-teal); }
.sitemap__item.is-active .icon { color: var(--link); }
.sitemap__item.is-planned { color: var(--text-faint); }
.sitemap__item.is-planned .icon { color: var(--text-faint); opacity: .7; }
.sitemap__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sitemap__soon { flex: none; font-size: 10px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-faint); }
.sitemap__chevron { width: 14px !important; height: 14px !important; transition: transform .15s ease; }
.sitemap__fold.is-open .sitemap__chevron { transform: rotate(180deg); }
.sitemap__foldlist { padding: 2px 0 6px 38px; }
.sitemap__foldlist[aria-busy="true"]::before { content: "Yükleniyor…"; display: block; padding: 4px 8px; font-size: 12.5px; color: var(--text-faint); }
.sitemap__sub { display: block; padding: 4px 8px; border-radius: var(--radius-sm); color: var(--text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sitemap__sub small { display: block; font-size: 11.5px; color: var(--text-faint); }
.sitemap__sub:hover { background: var(--surface-muted); color: var(--text); }
.sitemap__sub--all { color: var(--link); font-size: 12.5px; font-weight: 600; }
.sitemap__group ul { margin: 0; padding: 0; list-style: none; }
.sitemap__heading { margin: 14px 10px 4px; font-size: 13px; font-weight: 700; color: var(--text); letter-spacing: 0; }
.sitemap__group:first-child .sitemap__heading { margin-top: 8px; }

.sitemap__switch { flex: none; position: relative; display: block; padding: 6px; border-top: 1px solid var(--border); }
.sitemap__switch > .sitemap__area-button { display: flex; align-items: center; gap: 10px; width: 100%; height: auto; padding: 6px 8px; border-radius: var(--radius-sm); color: var(--text); text-align: left; }
.sitemap__switch > .sitemap__area-button:hover, .sitemap__switch.is-open > .sitemap__area-button { background: var(--surface-muted); }
.sitemap__area-icon { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--radius-sm); background: var(--primary); color: var(--on-primary); }
.sitemap__area-icon .icon { width: 17px; height: 17px; color: inherit; }
.sitemap__switch .sitemap__label small { display: block; font-size: 11px; color: var(--text-faint); font-weight: 500; }
.sitemap__switch .sitemap__label strong { display: block; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; }
.sitemap__switch .sitemap__chevron { transform: none !important; color: var(--text-muted); }
.sitemap__area-menu { top: auto; bottom: calc(100% + 4px); left: 6px; right: 6px; min-width: 240px; max-height: min(70vh, 560px); overflow-y: auto; }
.sitemap__area-option { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sitemap__area-option .icon { width: 17px; height: 17px; color: var(--text-muted); }
.menu__item.is-selected { background: var(--primary-soft); font-weight: 600; }
.menu__item.is-planned { color: var(--text-muted); }
.sitemap__collapse { width: auto; }

/* Daraltılmış: yalnız simgeler; gruplar ince çizgiyle ayrılır */
.app.is-collapsed .sitemap__label,
.app.is-collapsed .sitemap__soon,
.app.is-collapsed .sitemap__chevron,
.app.is-collapsed .sitemap__heading,
.app.is-collapsed .sitemap__foldlist { display: none !important; }
.app.is-collapsed .sitemap__item { justify-content: center; padding: 0; }
.app.is-collapsed .sitemap__item.is-active::before { top: 9px; bottom: 9px; }
.app.is-collapsed .sitemap__areas, .app.is-collapsed .sitemap__top { padding-left: 4px; padding-right: 4px; }
.app.is-collapsed .sitemap__group + .sitemap__group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--border); }
.app.is-collapsed .sitemap__switch > .sitemap__area-button { justify-content: center; padding: 6px 0; }
.app.is-collapsed .sitemap__area-menu { left: 4px; right: auto; }
@media (max-width: 900px) {
    .sitemap__collapse { display: none; }
    .app.is-collapsed .sitemap__label, .app.is-collapsed .sitemap__heading, .app.is-collapsed .sitemap__soon, .app.is-collapsed .sitemap__chevron { display: initial !important; }
    .app.is-collapsed .sitemap__heading { display: block !important; }
    .app.is-collapsed .sitemap__item { justify-content: flex-start; padding: 0 10px; }
}
:root[data-density="sik"] .sitemap__item { min-height: 30px; font-size: 13px; }
:root[data-density="sik"] .sitemap__heading { margin-top: 10px; }

/* Komut çubuğu (alt çubuk) */
.commandbar { gap: 8px; padding-left: 8px; }
.commandbar__back { flex: none; display: grid; place-items: center; width: 30px; height: 28px; border-radius: var(--radius-sm); color: var(--text); }
.commandbar__back:hover { background: var(--surface-muted); color: var(--text); }
.commandbar__back .icon { width: 18px; height: 18px; }
.commandbar .breadcrumb { padding-left: 8px; border-left: 1px solid var(--border); }

/* Dynamic teması (K96): novera-ds.css §3 — Dynamics 365 Finance görünümü (üst çubuk, menü, sekmeler, düğmeler, tablolar) */
/* Üst çubuk araması: büyüteç simgesine yer — sıklık ayarının alan iç boşluğu bu kutuya uygulanmaz */
:root .appbar__search input[type="search"], :root[data-density] .appbar__search input[type="search"] { padding: 0 30px 0 32px; }
.appbar__search > .icon { left: 11px; }

/* ---------- Pencereler (docs/ekran-tasarim-rehberi.md §3) ---------- */
/* Modal: küçük 440 · orta 640 · geniş 1000 px (en çok %90); en çok ekran − 32 px; yükseklik içerik kadar, en çok %85 */
.modal {
    width: min(var(--modal-w, 640px), calc(100vw - 32px)); max-width: none; max-height: 85vh; padding: 0;
    border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text);
    box-shadow: 0 24px 64px rgb(11 31 58 / 0.28), 0 4px 12px rgb(11 31 58 / 0.12);
    overflow: hidden;
}
.modal[open] { display: flex; flex-direction: column; }
.modal::backdrop { background: rgb(11 31 58 / 0.42); }
.modal--sm { --modal-w: 440px; }
.modal--md { --modal-w: 640px; }
.modal--lg { --modal-w: min(1000px, 90vw); }
.modal__head { flex: none; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal__head h2 { font-size: 17px; }
.modal__head p { margin: 2px 0 0; font-size: 13px; color: var(--text-muted); }
.modal__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 16px 18px; }
.modal__foot { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-muted); }
.modal__foot .modal__foot-note { margin-right: auto; align-self: center; font-size: 12.5px; color: var(--text-muted); }
.modal__guard { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 18px; background: var(--warning-soft); border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text); }
.modal__guard > span { margin-right: auto; font-weight: 600; }
.modal__message { margin: 0; }
.modal__summary { margin-top: 12px; }
.modal--sm .modal__body { padding-bottom: 18px; }
.button--danger-solid { background: var(--error); border-color: var(--error); color: #fff; }
.button--danger-solid:hover { background: #991b1b; border-color: #991b1b; color: #fff; }
@media (max-width: 600px) {
    /* Dar ekranda geniş ve orta pencereler alanı kaplar; küçük onay penceresi kaplamaz */
    .modal--lg, .modal--md { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
}

/* Özet listesi (onay/iptal modallarında) */
.summary-list { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 13.5px; }
.summary-list dt { color: var(--text-muted); }
.summary-list dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.impact-list { margin: 8px 0 0; padding-left: 18px; font-size: 13.5px; }
.impact-list li { margin: 3px 0; }
.impact-list .is-blocking { color: var(--error); font-weight: 600; }

/* Seçim modalı (müşteri/ürün) */
.pick-search { display: flex; gap: 8px; margin-bottom: 10px; }
.pick-search input { flex: 1; }
.pick-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pick-table th, .pick-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.pick-table th { position: sticky; top: -16px; z-index: 1; background: var(--surface-muted); font-size: 12px; font-weight: 600; color: var(--text-muted); }
.pick-table tbody tr { cursor: pointer; }
.pick-table tbody tr.is-active > td { background: var(--primary-soft); }
.pick-table tbody tr:hover > td { background-image: linear-gradient(var(--row-hover), var(--row-hover)); }
.pick-table tbody tr.is-checked > td { background: color-mix(in srgb, var(--primary-soft) 70%, var(--surface)); }
.pick-table .col-check { width: 32px; }
.pick-state { padding: 14px 4px; color: var(--text-muted); font-size: 13.5px; }

/* Yan panel: 480 px (geniş 600 px), sayfayı bloke etmez */
.side-panel {
    position: fixed; top: var(--menubar-h); right: 0; bottom: 0; z-index: 45;
    display: flex; flex-direction: column; width: min(480px, 100vw);
    background: var(--surface); border-left: 1px solid var(--border); box-shadow: -12px 0 32px rgb(11 31 58 / 0.14);
}
.side-panel[hidden] { display: none; }
.side-panel--wide { width: min(600px, 100vw); }
.side-panel__head { flex: none; display: flex; align-items: center; gap: 8px; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--border); }
.side-panel__head h2 { flex: 1; min-width: 0; font-size: 16px; }
.side-panel__head h2:focus { outline: none; }
.side-panel__body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 18px 24px; font-size: 13.5px; }
.side-panel__body[aria-busy="true"]::before { content: "Yükleniyor…"; color: var(--text-faint); }
.side-panel__body section + section { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--border); }
.side-panel__body h3 { margin: 0 0 6px; font-size: 13px; font-weight: 700; color: var(--text); }
.side-panel__body p { margin: 4px 0; }
@media (max-width: 600px) { .side-panel, .side-panel--wide { width: 100vw; } }

/* Bildirim (toast): sağ alt, odak çalmaz */
.toast-region { position: fixed; right: 16px; bottom: 16px; z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast {
    display: flex; align-items: flex-start; gap: 10px; padding: 10px 10px 10px 14px; pointer-events: auto;
    background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--ok);
    border-radius: var(--radius-sm); box-shadow: var(--shadow-pop); font-size: 13.5px; animation: nv-pop .16s ease-out;
}
.toast > .icon { flex: none; margin-top: 1px; color: var(--ok); }
.toast > div { flex: 1; min-width: 0; }
.toast .icon-button { flex: none; width: 24px; height: 24px; }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: opacity .2s ease, transform .2s ease; }

/* Satış siparişi: alan + Ara düğmesi */
.field-with-button { display: flex; gap: 6px; }
.field-with-button > select, .field-with-button > input { flex: 1; min-width: 0; }
.party-link { border: 0; padding: 0; background: none; color: var(--link); font: inherit; cursor: pointer; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }

/* ---- Novera360 marka yazısı (logo: lacivert "Novera" + mavi "360") ---- */
.brand-word { letter-spacing: 0.01em; }
.brand-word__num { color: #0c6cd3; margin-left: 1px; }
[data-theme="gece"] .brand-word__num, [data-theme="grafit"] .brand-word__num, [data-theme="gece-mavisi"] .brand-word__num, .auth-hero__brand .brand-word__num { color: #4f9cf0; }
.appbar__brand .brand-word__num { color: #5aa7f5; }

/* =====================================================================
   Dynamics 365 ekran düzeni (model güdümlü uygulama): kart yüzeyler, komut çubuğu,
   başlık kartı + yan yana sekmeler, sade tablo başlıkları. Tüm temalarda geçerli.
   ===================================================================== */
:root { --elev-1: 0 1.6px 3.6px rgb(0 0 0 / 0.11), 0 0.3px 0.9px rgb(0 0 0 / 0.09); }

/* Komut çubuğu: beyaz kart; ikincil komutlar çerçevesiz (simge + metin), birincil dolu */
.content > .actionbar, .doc-header > .actionbar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 4px 6px; margin-bottom: 12px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--elev-1);
}
.content > .actionbar .button:not(.button--primary):not(.button--danger-solid),
.doc-header > .actionbar .button:not(.button--primary):not(.button--danger-solid),
.content > .actionbar .menu--bar > .menu__trigger.button,
.doc-header > .actionbar .menu--bar > .menu__trigger.button { border-color: transparent; background: transparent; box-shadow: none; }
.content > .actionbar .button:not(.button--primary):hover,
.doc-header > .actionbar .button:not(.button--primary):hover,
.doc-header > .actionbar .menu--bar > .menu__trigger.button:hover { background: var(--surface-muted); }
.content > .actionbar .button .icon, .doc-header > .actionbar .button .icon { color: var(--link); }
.content > .actionbar .button--primary .icon, .doc-header > .actionbar .button--primary .icon { color: inherit; }
.actionbar__status { margin-left: auto; padding-right: 6px; }

/* Kayıt kartı başlığı: komut çubuğu üstte, başlık solda, başlık alanları sağda, sekmeler altta */
.doc-header {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "cmd cmd" "title status" "tabs tabs";
    margin-bottom: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--elev-1);
}
.doc-header > .actionbar { grid-area: cmd; margin: 0; border: 0; border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; box-shadow: none; }
.doc-header__title { grid-area: title; margin: 0; padding: 14px 18px 6px; }
.doc-header__title h1 { font-size: 20px; font-weight: 600; }
.doc-header > .doc-status { grid-area: status; align-self: start; display: flex; flex-wrap: wrap; gap: 0; margin: 0; padding: 12px 14px 6px 0; background: transparent; border: 0; }
.doc-header > .doc-status > div { flex-direction: column-reverse; align-items: flex-start; gap: 2px; padding: 0 14px; border-left: 1px solid var(--border); }
.doc-header > .doc-status > div:first-child { border-left: 0; }
.doc-header > .doc-status dt { font-size: 11.5px; }
.doc-header > .doc-status dd { font-weight: 600; font-size: 13.5px; }

/* Yan yana sekmeler */
.doc-tabs { grid-area: tabs; display: flex; gap: 2px; padding: 0 12px; overflow-x: auto; scrollbar-width: thin; }
.doc-tabs__tab {
    position: relative; flex: none; height: 40px; padding: 0 12px; border: 0; background: transparent; color: var(--text-muted);
    font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
}
.doc-tabs__tab::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: transparent; }
.doc-tabs__tab:hover { color: var(--text); }
.doc-tabs__tab:hover::after { background: var(--border-strong); }
.doc-tabs__tab.is-active { color: var(--text); font-weight: 600; }
.doc-tabs__tab.is-active::after { background: var(--brand-teal); }
.doc-tabs__tab:focus-visible { outline: 2px solid var(--brand-teal); outline-offset: -4px; border-radius: var(--radius-sm); }
.doc-tabs__tab.has-error::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--error); vertical-align: middle; }

/* Sekme paneli: kart, katlama başlığı gizli */
.is-tabbed .fasttab.is-tab-panel { margin-bottom: 12px; border-radius: var(--radius); box-shadow: var(--elev-1); }
.is-tabbed .fasttab.is-tab-panel > summary { display: none; }
.is-tabbed .fasttab.is-tab-panel > .fasttab__body { border-top: 0; padding: 14px 18px 18px; }
.is-tabbed .fasttab.is-tab-panel > .fasttab__body--flush { padding: 0; }
.is-tabbed .fasttab.is-tab-hidden { display: none; }

/* Kartlar ve bilgi paneli: hafif derinlik */
.card, .factbox, .fasttab, .disclosure, .kpi, .cue { box-shadow: var(--elev-1); }
.factbox { border-radius: var(--radius); }

/* Tablo başlıkları: Dynamics gibi sade (büyük harf yok, koyu metin, beyaz zemin) */
.table th, .table--dense th { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 600; color: var(--text); background: var(--surface); border-bottom: 1px solid var(--border-strong); }
.table--sticky thead th { box-shadow: inset 0 -1px 0 var(--border-strong); }
.table tbody tr:hover > td { background-image: linear-gradient(var(--row-hover), var(--row-hover)); }

/* Görünüm sekmeleri (liste): kart içindeki sekmeler gibi */
.views { gap: 2px; border-bottom: 1px solid var(--border); }
.views a { position: relative; border-bottom: 0; }
.views a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0; background: transparent; }
.views a.is-active { color: var(--text); font-weight: 600; }
.views a.is-active::after { background: var(--brand-teal); }

@media (max-width: 900px) {
    .doc-header { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cmd" "title" "status" "tabs"; }
    .doc-header > .doc-status { padding: 0 0 8px 4px; }
}

/* =====================================================================
   Dynamics 365 Unified Interface / Fluent 2 görünümü (6 Ekim 2026, kullanıcı isteği:
   "klasik yapay zekâ HTML görüntüsünü düzeltelim"; başvuru: Dynamics 365 Field Service belgeleri).
   Bu katman tüm ekranlarda geçerlidir ve öncekileri geçersiz kılar:
   - Yazı: Segoe UI (Windows sistem yazı tipi; yerel, indirme yok). Gövde 14 px, sayfa başlığı 20 px yarı kalın.
   - Renk: nötr gri zemin, beyaz yüzey, Fluent mavisi; marka laciverti yalnız üst çubukta.
   - Köşe 4 px; gölge Fluent derinlik 4 (kart) / 16 (açılır panel). Degrade, parıltı, kalkan kart, renkli şerit yok.
   - Komut çubuğu düz (simge + metin); dolu birincil düğme yalnız pencere ve form altlarında.
   - Durum: renkli nokta + metin (hap rozet yok). Bölüm başlıkları cümle düzeninde (büyük harf yok).
   ===================================================================== */

/* Standart tema değişkenleri (diğer temalar kendi değişkenlerini korur) */
:root:not([data-theme]), [data-theme-preview="standart"] {
    --font-sans: 'Segoe UI', 'Segoe UI Variable Text', 'Segoe UI Web', -apple-system, 'Helvetica Neue', 'Inter', sans-serif;
    --bg: #f5f5f5; --app-bg: #f5f5f5; --surface: #ffffff; --surface-muted: #fafafa;
    --border: #e0e0e0; --border-strong: #d1d1d1;
    --text: #242424; --text-muted: #616161; --text-faint: #707070; --neutral-soft: #f0f0f0;
    --primary: #0f6cbd; --primary-hover: #115ea3; --primary-soft: #ebf3fc; --on-primary: #ffffff;
    --link: #0f6cbd; --link-hover: #0f548c; --accent: #0f6cbd; --brand-teal: #0f6cbd;
    --ok: #107c10; --ok-soft: #f1faf1; --warning: #bc4b09; --warning-soft: #fff9f5; --error: #c50f1f; --error-soft: #fdf3f4;
    --shell-bg: #132a4a; --shell-hover: #1d3a63; --shell-active: #24477a;
    --radius: 4px; --radius-sm: 4px; --radius-lg: 4px; --radius-xs: 2px;
    --sitemap-bg: #f0f0f0; --sitemap-active: #ffffff;
}
:root {
    --elev-1: 0 0 2px rgb(0 0 0 / 0.12), 0 1px 2px rgb(0 0 0 / 0.14);
    --shadow-pop: 0 0 2px rgb(0 0 0 / 0.12), 0 8px 16px rgb(0 0 0 / 0.14);
    --control-h: 32px; --control-h-sm: 32px;
    --sitemap-bg: var(--surface); --sitemap-active: var(--primary-soft);
}
:root:not([data-theme]) { --sitemap-bg: #f0f0f0; --sitemap-active: #ffffff; }
body { font-family: var(--font-sans); -webkit-font-smoothing: auto; }
.content { padding: 16px 20px 32px; max-width: none; }

/* --- Süslerin kaldırılması --- */
.page-header h1, .page-header--compact h1 { padding-left: 0; }
.page-header h1::before, .page-header--compact h1::before { content: none; }
.cue::before, .kpi::before { content: none; }
a.cue:hover, .module-card:hover, .theme-card:hover { transform: none; box-shadow: var(--elev-1); }
.menu.is-open > .menu__panel, .search-suggest:not([hidden]) { animation: nv-fade .1s linear; }
.cue, .cue.cue--warn, .cue.cue--partial, .cue.cue--critical, .cue.cue--unavailable, .kpi { border: 0; border-radius: var(--radius); }

/* --- Sayfa başlığı --- */
.page-header, .page-header--compact { margin-bottom: 12px; }
.page-header h1, .page-header--compact h1, .doc-header__title h1 { font-size: 20px; font-weight: 600; letter-spacing: 0; line-height: 28px; }
.page-header p, .page-header--compact p { font-size: 12px; color: var(--text-muted); }

/* --- Düğmeler (Fluent 2) --- */
.button { height: 32px; padding: 0 12px; gap: 6px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); color: var(--text); font-size: 14px; font-weight: 600; }
.button:hover { background: var(--neutral-soft); border-color: var(--border-strong); color: var(--text); }
.button:active { background: var(--border); }
.button .icon { width: 16px; height: 16px; stroke-width: 1.75; }
.button--small, .menu--bar > .menu__trigger.button { height: 32px; padding: 0 10px; font-size: 14px; }
.button--primary { background: var(--primary); border-color: transparent; color: var(--on-primary); }
.button--primary:hover { background: var(--primary-hover); border-color: transparent; color: var(--on-primary); }
.button--ghost { border-color: transparent; background: transparent; }
.button--danger { color: var(--error); border-color: var(--border-strong); }
.icon { stroke-width: 1.75; }

/* --- Komut çubuğu: düz, beyaz, simge + metin; birincil dahil hepsi çerçevesiz --- */
.content > .actionbar, .doc-header > .actionbar, .actionbar {
    gap: 0; padding: 0 4px; min-height: 44px; margin-bottom: 12px;
    background: var(--surface); border: 0; border-radius: var(--radius); box-shadow: var(--elev-1);
}
.actionbar .button, .actionbar .menu--bar > .menu__trigger.button, .actionbar .button--primary, .actionbar .button--danger-solid {
    height: 36px; padding: 0 10px; border-color: transparent; background: transparent; color: var(--text); font-weight: 400; box-shadow: none;
}
.actionbar .button:hover, .actionbar .menu--bar > .menu__trigger.button:hover, .actionbar .menu--bar.is-open > .menu__trigger.button { background: var(--neutral-soft); color: var(--text); }
.actionbar .button .icon, .actionbar .button--primary .icon { color: var(--primary); }
.actionbar .button--danger-solid, .actionbar .button--danger-solid .icon { color: var(--error); }
.actionbar .button[disabled], .actionbar .button.is-disabled, .actionbar a.button[aria-disabled="true"] { color: #bdbdbd; opacity: 1; }
.actionbar .button[disabled] .icon, .actionbar .button.is-disabled .icon { color: #bdbdbd; }
.actionbar > * + .menu, .actionbar > .menu + * { margin-left: 0; }
.actionbar__status { font-size: 12px; color: var(--text-muted); }
.actionbar--quick { box-shadow: none; background: transparent; padding: 0; min-height: 0; }

/* --- Açılır menü / bağlam menüsü --- */
.menu__panel { padding: 4px; border: 0; border-radius: 4px; box-shadow: var(--shadow-pop); }
.menu__item { padding: 0 10px; min-height: 32px; border-radius: 4px; font-size: 14px; }
.menu__item:hover, .menu__item:focus-visible { background: var(--neutral-soft); }
.menu__group h4, .search-suggest__group { text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; color: var(--text-muted); }

/* --- Kartlar ve bölümler --- */
.card, .fasttab, .factbox, .disclosure, .ui-section, .cue, .kpi, .doc-header { border: 0; border-radius: var(--radius); box-shadow: var(--elev-1); background: var(--surface); }
.card__header { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.card__header h2, .ui-section .card__header h2, .workspace-grid .card__header h2 { font-size: 16px; font-weight: 600; letter-spacing: 0; }
.card__footer { background: var(--surface); border-radius: 0 0 var(--radius) var(--radius); }

/* Bölüm başlıkları: cümle düzeni, büyük harf ve harf aralığı yok */
.section-title, .factbox__part h3, .task-panel__section h3, .line-detail__grid h3, .theme-group, .sidebar__group, .guide-nav h3, .stat__label {
    text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 600; color: var(--text);
}
.factbox__part h3 { font-size: 14px; margin-bottom: 8px; }
.factbox__head h2 { font-size: 16px; font-weight: 600; }
.factbox__line { background: var(--neutral-soft); border-radius: 4px; }
.factbox__part--total { background: var(--surface); }

/* --- Göstergeler (gösterge kutuları): düz beyaz kutu, büyük sayı, renk yalnız sayıda --- */
.cue { padding: 12px 16px; gap: 0; }
.cue__count { font-size: 28px; font-weight: 600; line-height: 36px; }
.cue__title { font-size: 14px; font-weight: 400; color: var(--text); }
.cue__hint { font-size: 12px; color: var(--text-muted); }
a.cue:hover { background: var(--surface-muted); }
.cue--unavailable { background: var(--surface); }
.kpi { padding: 12px 16px; }
.kpi__value { font-size: 28px; font-weight: 600; }
.kpi__title { font-size: 14px; font-weight: 400; }

/* --- Durum: nokta + metin (hap rozet yok) --- */
.badge, .badge--neutral, .badge--ok, .badge--warning, .badge--error, .badge--info {
    gap: 6px; padding: 0; border-radius: 0; background: transparent; color: var(--text); font-size: 14px; font-weight: 400;
}
.badge > .icon { display: none; }
.badge::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: #8a8a8a; }
.badge--ok::before { background: var(--ok); }
.badge--warning::before { background: #e3a400; }
.badge--error::before { background: var(--error); }
.badge--info::before { background: var(--primary); }
.badge--neutral::before { background: #c7c7c7; }
.table .badge, .table--dense .badge, .doc-status .badge { font-size: 14px; }
.subbar .badge { font-size: 12px; color: var(--text-muted); }
.flag { border-radius: 2px; }
.count-pill { border-radius: 2px; background: var(--neutral-soft); font-weight: 600; }
.tag-theoretical, .cue__flag, .notify-kind { border-radius: 2px; }
.chip { border-radius: 4px; height: 28px; background: var(--neutral-soft); border-color: transparent; }
.chip:hover { border-color: var(--border-strong); }

/* --- Görünüm sekmeleri (pivot) --- */
.views { margin-bottom: 8px; border-bottom: 0; }
.views a { height: 40px; padding: 0 12px; color: var(--text); font-weight: 400; }
.views a.is-active { font-weight: 600; }
.views a::after, .doc-tabs__tab::after { left: 12px; right: 12px; height: 3px; border-radius: 2px; }
.doc-tabs__tab { font-weight: 400; color: var(--text); }
.doc-tabs__tab.is-active { font-weight: 600; }

/* --- Filtre satırı --- */
.filters { gap: 8px; margin-bottom: 8px; }
.filters .field > label, .filters-more__panel .field > label, .filterbar .field > label { font-size: 12px; font-weight: 400; color: var(--text-muted); }

/* --- Giriş alanları (Fluent 2: ince çerçeve, koyu alt çizgi, odakta mavi alt çizgi) --- */
input[type="text"], input[type="number"], input[type="date"], input[type="email"], input[type="search"], input[type="password"], select, textarea {
    height: 32px; padding: 0 10px; border: 1px solid var(--border-strong); border-bottom-color: var(--text-faint); border-radius: 4px;
    background: var(--surface); font-size: 14px;
}
textarea { height: auto; padding: 6px 10px; }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); border-bottom-color: var(--text-muted); }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: inset 0 -2px 0 var(--primary); border-color: var(--border-strong); border-bottom-color: var(--primary); }
input[readonly] { background: var(--surface-muted); border-color: transparent; border-bottom-color: var(--border-strong); }
.field > label, .field-label { font-size: 14px; font-weight: 400; color: var(--text); }
.field .required::after { color: var(--error); }
.appbar__search input[type="search"] { height: 32px; border: 0; border-radius: 4px; }
.appbar__search input[type="search"]:focus { box-shadow: none; }
.lines-table input, .lines-table select, .filterbar input, .filterbar select, .form-grid--dense input, .form-grid--dense select, .filters input, .filters select { height: 32px; }

/* Kart formu (yoğun ızgara): etiket solda, değer sağda — Dynamics formu */
.form-grid--dense { grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 4px 32px; padding-top: 4px; }
.form-grid--dense > .field { display: grid; grid-template-columns: minmax(120px, 40%) minmax(0, 1fr); align-items: center; gap: 2px 12px; min-height: 40px; }
.form-grid--dense > .field > :is(label, .field-label) { color: var(--text-muted); font-size: 14px; }
.form-grid--dense > .field > :not(label):not(.field-label) { grid-column: 2; }
.form-grid--dense > .field > :is(.help, .field-error) { grid-column: 2; }
.form-grid--dense > .field.span-all, .form-grid--dense > .field.span-2 { grid-template-columns: minmax(120px, calc(20% - 16px)) minmax(0, 1fr); }
.kv--grid { grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 0 32px; }
.kv--grid > div { display: grid; grid-template-columns: minmax(120px, 40%) minmax(0, 1fr); align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 0; }
.kv--grid dt { color: var(--text-muted); }
.kv--grid dd { font-weight: 400; }
.fasttab__body { padding: 8px 16px 16px; }
.fasttab > summary { color: var(--text); font-size: 16px; font-weight: 600; padding: 12px 16px; }
.subhead { font-size: 14px; font-weight: 600; }

/* --- Izgara (liste) --- */
.table, .table--dense { font-size: 14px; }
.table th, .table--dense th {
    height: 42px; padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--text);
    background: var(--surface); border-bottom: 1px solid var(--border); text-transform: none; letter-spacing: 0;
}
.table td, .table--dense td { height: 42px; padding: 0 12px; border-bottom: 1px solid var(--neutral-soft); }
.table tbody tr:hover > td { background-image: linear-gradient(var(--row-hover), var(--row-hover)); }
.table tbody tr.is-selected td { background: var(--primary-soft) !important; }
.table tbody tr.is-selected td:first-child { box-shadow: none; }
.table a.row-link, .table td a { font-weight: 400; }
.table th[aria-sort] a.sort::after { font-size: 10px; color: var(--text-muted); }
.table tfoot td { background: var(--surface-muted); font-weight: 600; }
.money__cur { font-weight: 400; }
.list-footer { font-size: 12px; color: var(--text-muted); border-top: 1px solid var(--border); }
.pagination a, .pagination span.current, .pagination span.disabled { border: 0; border-radius: 4px; min-width: 28px; height: 28px; }
.pagination span.current { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.lines-table th { background: var(--surface); color: var(--text); font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--border); }
.lines-table td { border-bottom-color: var(--neutral-soft); }

/* --- Site haritası (sol menü) --- */
.sidebar, .sitemap { background: var(--sitemap-bg); border-right: 0; }
.sitemap__top, .sitemap__switch { border-color: rgb(0 0 0 / 0.08); }
.sitemap__item, .sidebar__link { min-height: 36px; border-radius: 0; font-size: 14px; font-weight: 400; }
.sitemap__item:hover, .sidebar__link:hover, .sidebar__page:hover, .sidebar__grouptoggle:hover { background: rgb(0 0 0 / 0.05); }
.sitemap__item.is-active, :root[data-theme="dynamics"] .sitemap__item.is-active { background: var(--sitemap-active); font-weight: 600; }
.sitemap__item.is-active::before { top: 0; bottom: 0; width: 3px; border-radius: 0; background: var(--primary); }
.sitemap__item .icon, .sidebar__link > .icon { color: var(--text); }
.sitemap__item.is-active .icon { color: var(--primary); }
.sitemap__heading { margin: 16px 12px 4px; font-size: 14px; font-weight: 600; }
.sitemap__sub, .sidebar__page { border-radius: 0; }
.sitemap__area-icon { border-radius: 4px; }
.sitemap__switch > .sitemap__area-button { border-radius: 0; }
.sidebar__link.is-current, .sidebar__page.is-active { background: var(--sitemap-active); box-shadow: inset 3px 0 0 var(--primary); }

/* --- Konum satırı --- */
.subbar { background: var(--surface); border-bottom: 1px solid var(--border); }
.breadcrumb li:last-child { font-weight: 600; }

/* --- Kayıt formu başlığı (sipariş, fatura, sevkiyat kartları) --- */
.doc-header { grid-template-columns: minmax(280px, 1fr) minmax(0, max-content); }
.doc-header__title { padding: 12px 16px 8px; align-items: center; }
.doc-header__title > div { min-width: 0; }
.doc-header__title h1 { overflow-wrap: anywhere; }
.doc-header__party { font-weight: 400; }
.doc-header > .doc-status { padding: 12px 12px 8px 0; max-width: 62vw; }
.doc-header > .doc-status > div { max-width: 220px; min-width: 96px; padding: 0 16px; border-left: 1px solid var(--border); }
.doc-header > .doc-status dd { font-size: 14px; font-weight: 600; line-height: 20px; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.doc-header > .doc-status dt { font-size: 12px; color: var(--text-muted); }
.doc-header > .doc-status .badge { font-weight: 600; }
.doc-status { border: 0; box-shadow: var(--elev-1); }
.doc-tabs { padding: 0 4px; border-top: 0; }
.is-tabbed .fasttab.is-tab-panel { border-radius: var(--radius); }
@media (max-width: 1300px) {
    .doc-header { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cmd" "title" "status" "tabs"; }
    .doc-header > .doc-status { max-width: none; padding: 0 12px 8px 4px; }
}

/* --- Uyarı, boş durum, açılır pencere, yan panel, bildirim --- */
.alert { border-radius: 4px; border-width: 1px; padding: 10px 12px; }
.alert--info { background: var(--primary-soft); border-color: color-mix(in srgb, var(--primary) 35%, transparent); color: var(--text); }
.alert--warning { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 35%, transparent); color: var(--text); }
.alert--error { background: var(--error-soft); border-color: color-mix(in srgb, var(--error) 35%, transparent); color: var(--text); }
.alert--ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 35%, transparent); color: var(--text); }
.alert--info .icon { color: var(--primary); } .alert--warning .icon { color: var(--warning); } .alert--error .icon { color: var(--error); } .alert--ok .icon { color: var(--ok); }
.ui-empty, .ui-state { border-radius: 4px; }
.modal { border: 0; border-radius: 8px; box-shadow: 0 0 8px rgb(0 0 0 / 0.12), 0 32px 64px rgb(0 0 0 / 0.14); }
.modal::backdrop { background: rgb(0 0 0 / 0.4); }
.modal__head { border-bottom: 0; padding: 20px 24px 8px; }
.modal__head h2 { font-size: 20px; font-weight: 600; }
.modal__body { padding: 8px 24px 16px; }
.modal__foot { padding: 16px 24px 20px; border-top: 0; background: var(--surface); }
.side-panel, .task-panel { border-left: 0; box-shadow: 0 0 8px rgb(0 0 0 / 0.12), 0 32px 64px rgb(0 0 0 / 0.14); }
.toast { border: 0; border-left: 0; border-radius: 4px; box-shadow: var(--shadow-pop); }
.segmented, .segmented__item { border-radius: 4px; }
.choice { border-radius: 4px; }
.choice:has(input:checked) { box-shadow: 0 0 0 1px var(--primary); }
.prose h2 .step, .section-number { border-radius: 4px; }
.prose .note, .prose .warning { border-radius: 0; }

/* --- Uygulama çubuğu --- */
.appbar { height: 48px; }
:root { --menubar-h: 48px; }
:root[data-density="sik"] { --menubar-h: 40px; }
.appbar__company { font-weight: 600; font-size: 14px; }
.notify-count { background: #c50f1f; border-radius: 8px; }

/* --- Giriş ekranı: Microsoft oturum açma düzeni --- */
.auth-page.auth-page--signin { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; min-height: 100vh; padding: 24px 16px; background: #f2f2f2; }
.auth-page--signin > .auth-card { width: min(440px, 100%); margin: 0; padding: 44px; border: 0; border-radius: 0; background: #fff; box-shadow: 0 2px 6px rgb(0 0 0 / 0.2); }
.auth-page--signin .auth-logo { display: flex; margin-bottom: 16px; }
.auth-page--signin .auth-logo .brand-mark { width: auto; height: 24px; }
.auth-page--signin .auth-logo .brand-word { font-size: 20px; font-weight: 600; letter-spacing: 0; color: #132a4a; }
.auth-page--signin .auth-card h1 { margin: 0 0 4px; font-size: 24px; font-weight: 600; line-height: 1.3; }
.auth-page--signin .auth-card p.lead { margin-bottom: 20px; font-size: 14px; color: var(--text); }
.auth-page--signin .field + .field { margin-top: 16px; }
.auth-page--signin input[type="text"], .auth-page--signin input[type="password"] { height: 36px; padding: 0; border: 0; border-bottom: 1px solid #666; border-radius: 0; background: transparent; font-size: 15px; }
.auth-page--signin input:focus { box-shadow: none; border-bottom: 2px solid var(--primary); }
.auth-page--signin .auth-remember { margin-top: 16px; }
.auth-page--signin .auth-actions { display: flex; justify-content: flex-end; margin-top: 24px; }
.auth-page--signin .auth-actions .button { width: auto; min-width: 108px; height: 32px; margin: 0; justify-content: center; border-radius: 0; }
.auth-page--signin .auth-footer { margin-top: 24px; text-align: left; font-size: 13px; color: var(--text-muted); }
.auth-legal { margin: 0; font-size: 12px; color: var(--text-muted); }
@media (max-width: 600px) { .auth-page--signin > .auth-card { padding: 24px; box-shadow: none; } .auth-page.auth-page--signin { background: #fff; justify-content: flex-start; } }

/* --- Sıkı yoğunluk: Dynamics'te ızgara satırı 32 px --- */
:root[data-density="sik"] :is(.table td, .table--dense td) { height: 32px; }
:root[data-density="sik"] :is(.table th, .table--dense th) { height: 34px; font-size: 13px; }
:root[data-density="sik"] .form-grid--dense > .field { min-height: 34px; }

/* Kayıt başlığı: alan, bilgi paneli açıkken de yeterli değilse durum alanları başlığın altına iner (kapsayıcı genişliği) */
.doc-page__main { container-type: inline-size; container-name: docmain; }
@container docmain (max-width: 1100px) {
    .doc-header { grid-template-columns: minmax(0, 1fr); grid-template-areas: "cmd" "title" "status" "tabs"; }
    .doc-header > .doc-status { max-width: none; padding: 0 12px 10px 20px; row-gap: 8px; }
    .doc-header > .doc-status > div:first-child { padding-left: 0; }
}

/* Satış raporları (0.7.0): iki satırlı başlıkta sütun grubu, ikinci düzey görünüm şeridi */
.table th.table__group { text-align: center; border-bottom: 1px solid var(--border); font-weight: 600; }
.views.views--sub { margin-top: -4px; font-size: .92em; }
.views.views--sub a { padding-block: 4px; }

/* =====================================================================
   Dynamics 365 sayfa yapısı (6 Ekim 2026): görünüm kartı, üst komut çubuğu, filtre çubuğu, site haritası.
   Görünüm kartını novera.js oluşturur (.view-card); JS yoksa sayfa önceki düzende kalır.
   ===================================================================== */
/* Komut çubuğu: sayfanın en üstünde, kayarken sabit */
.content.has-view-card > .actionbar { position: sticky; top: calc(var(--menubar-h) + 8px); z-index: 20; margin-bottom: 12px; border-radius: 8px; }

/* Görünüm kartı: başlık + görünümler + filtre + etiket + ızgara + altlık tek kartta */
.view-card { margin-bottom: 16px; background: var(--surface); border-radius: 8px; box-shadow: var(--elev-1); }
.view-card > * { margin-left: 0; margin-right: 0; }
.view-card > .page-header { margin: 0; padding: 14px 20px 6px; align-items: center; }
.view-card > .page-header h1 { display: inline-flex; align-items: center; gap: 6px; font-size: 20px; line-height: 28px; }
.view-card__info { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 4px; color: var(--text-muted); cursor: help; }
.view-card__info:hover, .view-card__info:focus-visible { background: var(--neutral-soft); color: var(--text); outline: none; }
.view-card__info .icon { width: 16px; height: 16px; }
.view-card > .page-header .actions { gap: 4px; }
.view-card > .page-header .actions .button { border-color: transparent; background: transparent; font-weight: 400; }
.view-card > .page-header .actions .button:hover { background: var(--neutral-soft); }
.view-card > .page-header .actions .button .icon { color: var(--primary); }

.view-card > .views { margin: 0; padding: 0 10px; border-bottom: 1px solid var(--border); }
.view-card > .views a { height: 40px; }
.view-card > .cues, .view-card > .kpis { margin: 0; padding: 12px 20px 4px; }
.view-card > .cues .cue, .view-card > .kpis .kpi { box-shadow: none; border: 1px solid var(--border); }
.view-card > .chips { margin: 0; padding: 0 20px 10px; }
.view-card > .ui-empty, .view-card > .ui-state { margin: 12px 20px 20px; box-shadow: none; }
.view-card > .alert { margin: 8px 20px; }
.view-card > .card, .view-card > [data-list] { margin: 0; border: 0; border-radius: 0 0 8px 8px; box-shadow: none; background: transparent; }
.view-card > [data-list] .table-scroll { max-height: calc(100vh - 330px); }
.view-card .table th:first-child, .view-card .table td:first-child { padding-left: 20px; }
.view-card .table th:last-child, .view-card .table td:last-child { padding-right: 20px; }
.view-card .table thead th { border-top: 0; }
.view-card .list-footer, .view-card > .card__note { padding: 10px 20px; }
.view-card > :last-child { border-bottom-left-radius: 8px; border-bottom-right-radius: 8px; }

/* Filtre çubuğu: etiket alanın içinde önek; arama kutusu simgeli; tek satır */
.view-card > .filters { margin: 0; padding: 10px 20px; align-items: center; gap: 8px; }
.view-card > .filters > .field { flex-direction: row; align-items: stretch; gap: 0; height: 32px; width: auto; min-width: 0;
    border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); overflow: hidden; }
.view-card > .filters > .field:focus-within { border-color: var(--primary); box-shadow: inset 0 -2px 0 var(--primary); }
.view-card > .filters > .field > label { display: flex; align-items: center; padding: 0 8px; font-size: 13px; color: var(--text-muted); white-space: nowrap; background: var(--surface-muted); border-right: 1px solid var(--border); }
.view-card > .filters > .field :is(input, select) { height: 30px; border: 0; border-radius: 0; box-shadow: none; background: transparent; min-width: 0; }
.view-card > .filters > .field select { width: auto; max-width: 200px; padding-right: 24px; }
.view-card > .filters > .filters__field { width: auto; }
.view-card > .filters > .field .field-pair { display: flex; gap: 0; }
.view-card > .filters > .field .field-pair input { width: 124px; }
.view-card > .filters > .field .field-pair input + input { border-left: 1px solid var(--border); }
.view-card > .filters > .filters__search { order: 10; margin-left: auto; width: 240px; }
.view-card > .filters > .filters__search > label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.view-card > .filters > .filters__search input { padding-left: 32px; width: 100%;
    background: no-repeat 10px 50% / 14px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23616161' stroke-width='1.6' stroke-linecap='round'%3E%3Ccircle cx='8.5' cy='8.5' r='5.5'/%3E%3Cpath d='M12.5 12.5 17 17'/%3E%3C/svg%3E"); }
.view-card > .filters > .filters-more { order: 8; }
.view-card > .filters > button[type="submit"] { order: 9; }
.view-card > .filters > .filters-more > summary, .view-card > .filters > button[type="submit"] { border-color: transparent; background: transparent; font-weight: 400; }
.view-card > .filters > .filters-more > summary:hover, .view-card > .filters > button[type="submit"]:hover { background: var(--neutral-soft); }
.view-card > .filters > .filters-more > summary .icon, .view-card > .filters > button[type="submit"] .icon { color: var(--primary); }
.view-card > .filters .filters-more__panel { left: auto; right: 0; }
.view-card > .filters .filters-more__panel .field { gap: 4px; }
@media (max-width: 1100px) { .view-card > .filters > .filters__search { order: 0; margin-left: 0; width: 100%; } }

/* Site haritası: henüz yapılmamış ekranlar menüde gösterilmez (modül sayfasında "planlandı" olarak listelenir) */
.sitemap__item.is-planned, .sidebar__page.is-planned { display: none; }
.sitemap__group:not(:has(.sitemap__item:not(.is-planned))) { display: none; }

/* Konum satırı: zemin rengiyle birleşik, sade */
.subbar.commandbar { background: transparent; border-bottom: 0; min-height: 36px; padding-top: 4px; }
.subbar__right .subbar__item { display: none; }

/* ---------- Kayıt formu (Dynamics 365 main form) ---------- */
/* Komut çubuğu formun dışında, en üstte, kayarken sabit */
.doc-page__main > .doc-commandbar { position: sticky; top: calc(var(--menubar-h) + 8px); z-index: 20; margin-bottom: 12px; border-radius: 8px; }
.doc-commandbar__back { width: 36px; justify-content: center; padding: 0 !important; }
.doc-commandbar__back .icon { color: var(--text) !important; }
.doc-commandbar__sep { width: 1px; height: 20px; margin: 0 4px; background: var(--border); }
.doc-commandbar .actionbar__spacer { flex: 1; }

/* Başlık kartı: kayıt simgesi + ad + "- Kaydedildi" + tür; sağda başlık alanları; altında sekmeler ve belge akışı */
.doc-header--record { grid-template-columns: minmax(280px, 1fr) minmax(0, max-content); grid-template-areas: "title status" "tabs tabs" "flow flow"; border-radius: 8px; }
.doc-header--record .doc-header__title { display: flex; align-items: center; gap: 12px; padding: 16px 20px 4px; }
.record-icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--primary); color: var(--on-primary); font-size: 16px; font-weight: 600; letter-spacing: .02em; }
.doc-header--record h1 { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; }
.doc-header__state { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.doc-header__entity { margin: 0; color: var(--text-muted); font-size: 14px; }
.doc-header__entity .party-link { text-decoration: none; }
.doc-header--record > .doc-status { grid-area: status; padding: 18px 20px 0 0; }
.doc-header--record > .doc-status > div { min-width: 110px; }
.doc-header--record > .doc-tabs { grid-area: tabs; padding: 4px 10px 0; }
.doc-header--record > .process-flow { grid-area: flow; }

/* Belge akışı çubuğu */
.process-flow { display: flex; align-items: flex-start; gap: 0; margin: 0; padding: 10px 20px 12px; list-style: none; border-top: 1px solid var(--border); counter-reset: none; }
.process-flow__stage { position: relative; flex: 1 1 0; display: flex; align-items: flex-start; gap: 8px; min-width: 0; padding-right: 12px; color: var(--text-muted); font-size: 13px; line-height: 18px; }
.process-flow__stage:not(:last-child)::after { content: ""; position: absolute; left: 30px; right: 4px; top: 10px; height: 1px; background: var(--border-strong); z-index: 0; }
.process-flow__stage.is-done:not(:last-child)::after { background: var(--primary); }
.process-flow__dot { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); }
.process-flow__dot .icon { width: 12px; height: 12px; stroke-width: 2.5; color: var(--on-primary); }
.process-flow__stage.is-done .process-flow__dot { background: var(--primary); border-color: var(--primary); }
.process-flow__stage.is-active .process-flow__dot, .process-flow__stage.is-partial .process-flow__dot { border: 2px solid var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.process-flow__stage.is-partial .process-flow__dot { background: linear-gradient(90deg, var(--primary) 50%, var(--surface) 50%); }
.process-flow__stage.is-skip { opacity: .55; }
.process-flow__text { position: relative; z-index: 1; display: flex; flex-direction: column; min-width: 0; padding-right: 8px; background: var(--surface); }
.process-flow__title { color: var(--text); }
.process-flow__stage.is-active .process-flow__title, .process-flow__stage.is-partial .process-flow__title { font-weight: 600; }
.process-flow__note { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.process-flow__note { color: var(--link); }

/* Özet sekmesi: bölümler ayrı kartlar */
.is-tabbed .fasttab.is-grouped { margin-bottom: 12px; }
.is-tabbed .fasttab.is-grouped > summary { display: flex !important; cursor: default; pointer-events: none; padding: 14px 20px 4px; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--text); }
.is-tabbed .fasttab.is-grouped > summary::before { content: none; }
.is-tabbed .fasttab.is-grouped .fasttab__summary { display: none; }
.is-tabbed .fasttab.is-tab-panel > .fasttab__body { padding: 8px 20px 18px; }
.is-tabbed .fasttab.is-tab-panel > .fasttab__body--flush { padding: 0 0 8px; }

/* Zaman çizelgesi */
.timeline { margin: 0; padding: 0; list-style: none; }
.timeline__item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--neutral-soft); }
.timeline__item:last-child { border-bottom: 0; }
.timeline__avatar { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #038387; color: #fff; font-size: 11px; font-weight: 600; }
.timeline__body { flex: 1; min-width: 0; }
.timeline__title, .timeline__text { margin: 0; }
.timeline__text { color: var(--text); font-size: 13px; }
.timeline__time { flex: none; font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* Sağ sütun: bilgi paneli bölümleri ayrı kartlar (hızlı görünüm, toplam) */
@media (min-width: 1201px) {
    .doc-page { grid-template-columns: minmax(0, 1fr) 340px; gap: 12px; }
    .doc-page > .factbox { top: calc(var(--menubar-h) + 64px); max-height: calc(100vh - var(--menubar-h) - 76px); background: transparent; box-shadow: none; border: 0; }
    .doc-page > .factbox > .factbox__head { display: none; }
    .doc-page > .factbox > .factbox__part { margin-bottom: 12px; padding: 14px 18px; border: 0; border-radius: 8px; background: var(--surface); box-shadow: var(--elev-1); }
    .doc-page > .factbox > .factbox__part h3 { text-transform: uppercase; letter-spacing: .02em; font-size: 14px; }
    .doc-commandbar [data-factbox-toggle] { display: none; }
}
@container docmain (max-width: 1180px) {
    .doc-header--record { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "status" "tabs" "flow"; }
    .doc-header--record > .doc-status { padding: 8px 20px 4px 80px; }
    .doc-header--record > .doc-status > div:first-child { padding-left: 0; border-left: 0; }
}
/* Belge kartı alanları: Dynamics gibi gri dolgulu, çerçevesiz; üzerine gelince ve odakta alt çizgi */
.doc-page .form-grid--dense :is(input[type="text"], input[type="number"], input[type="date"], input[type="email"], select, textarea),
.doc-page .lines-table :is(input[type="text"], input[type="number"], input[type="date"], select) {
    background: var(--neutral-soft); border-color: transparent; border-bottom-color: transparent;
}
.doc-page .form-grid--dense :is(input, select, textarea):hover, .doc-page .lines-table :is(input, select):hover { border-bottom-color: var(--text-muted); }
.doc-page .form-grid--dense :is(input, select, textarea):focus, .doc-page .lines-table :is(input, select):focus { background: var(--surface); border-color: var(--border-strong); border-bottom-color: var(--primary); }
.doc-page .form-grid--dense .is-invalid { border-color: var(--error) !important; background: var(--error-soft); }

/* =====================================================================
   Tek renk temalar (6 Ekim 2026): Siyah-Beyaz, Gri, Siyah. Renk yalnız durum noktalarında ve uyarılarda.
   ===================================================================== */
:root[data-theme="siyah-beyaz"], [data-theme-preview="siyah-beyaz"] {
    --bg: #f0f0f0; --app-bg: #f0f0f0; --surface: #ffffff; --surface-muted: #f7f7f7; --border: #dadada; --border-strong: #b8b8b8;
    --text: #000000; --text-muted: #3a3a3a; --text-faint: #5a5a5a; --neutral-soft: #ededed;
    --primary: #000000; --primary-hover: #2b2b2b; --primary-soft: #e8e8e8; --on-primary: #ffffff;
    --link: #000000; --link-hover: #000000; --brand-teal: #000000; --accent: #000000;
    --ok: #1b6e1f; --ok-soft: #eef6ee; --warning: #8a4b00; --warning-soft: #faf3e8; --error: #b00020; --error-soft: #fbecee;
    --shell-bg: #000000; --shell-hover: #262626; --shell-active: #333333; --shell-text: #f5f5f5; --shell-text-muted: #a8a8a8;
    --shell-strong: #ffffff; --shell-line: rgb(255 255 255 / 0.22);
    --sitemap-bg: #ffffff; --sitemap-active: #ebebeb;
    --search-bg: #ffffff; --search-text: #000000; --search-icon: #555555;
    --radius: 4px; --radius-sm: 4px; --radius-lg: 4px;
}
:root[data-theme="gri"], [data-theme-preview="gri"] {
    --bg: #e4e4e4; --app-bg: #e4e4e4; --surface: #f8f8f8; --surface-muted: #efefef; --border: #cfcfcf; --border-strong: #b0b0b0;
    --text: #1a1a1a; --text-muted: #474747; --text-faint: #5f5f5f; --neutral-soft: #e7e7e7;
    --primary: #3d3d3d; --primary-hover: #262626; --primary-soft: #dedede; --on-primary: #ffffff;
    --link: #1f1f1f; --link-hover: #000000; --brand-teal: #4d4d4d; --accent: #4d4d4d;
    --shell-bg: #383838; --shell-hover: #4a4a4a; --shell-active: #565656; --shell-text: #f2f2f2; --shell-text-muted: #bcbcbc;
    --shell-strong: #ffffff; --shell-line: rgb(255 255 255 / 0.2);
    --sitemap-bg: #d9d9d9; --sitemap-active: #f8f8f8;
    --search-bg: #f2f2f2; --search-text: #1a1a1a; --search-icon: #5f5f5f;
    --radius: 4px; --radius-sm: 4px; --radius-lg: 4px;
}
:root[data-theme="siyah"], [data-theme-preview="siyah"] {
    color-scheme: dark;
    --bg: #0a0a0a; --app-bg: #0a0a0a; --surface: #161616; --surface-muted: #1d1d1d; --border: #2e2e2e; --border-strong: #444444;
    --text: #f7f7f7; --text-muted: #c4c4c4; --text-faint: #9a9a9a; --neutral-soft: #242424;
    --primary: #f2f2f2; --primary-hover: #ffffff; --primary-soft: #2c2c2c; --on-primary: #0a0a0a;
    --link: #ffffff; --link-hover: #ffffff; --brand-teal: #e6e6e6; --accent: #e6e6e6;
    --ok: #74d67a; --ok-soft: #142a16; --warning: #f2c14e; --warning-soft: #2e2510; --error: #ff7b7b; --error-soft: #331616;
    --shell-bg: #000000; --shell-hover: #1c1c1c; --shell-active: #2a2a2a; --shell-text: #f2f2f2; --shell-text-muted: #9e9e9e;
    --shell-strong: #ffffff; --shell-line: rgb(255 255 255 / 0.18);
    --sitemap-bg: #101010; --sitemap-active: #262626;
    --search-bg: #1d1d1d; --search-text: #f2f2f2; --search-icon: #9e9e9e; --search-border: #3a3a3a;
    --radius: 4px; --radius-sm: 4px; --radius-lg: 4px;
    --elev-1: 0 0 0 1px #262626; --shadow-pop: 0 0 0 1px #333333, 0 12px 28px rgb(0 0 0 / 0.6);
}
/* Tek renkte bağlantılar renkle değil alt çizgiyle ayrılır */
:root:is([data-theme="siyah-beyaz"], [data-theme="gri"], [data-theme="siyah"]) .content :is(.table td a, .kv a, .process-flow__note, p a, .party-link) { text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 3px; }
:root:is([data-theme="siyah-beyaz"], [data-theme="gri"], [data-theme="siyah"]) .content :is(.table td a, .kv a, p a):hover { text-decoration-color: currentColor; }
:root:is([data-theme="siyah-beyaz"], [data-theme="gri"], [data-theme="siyah"]) .brand-word__num { color: inherit; }
:root:is([data-theme="siyah-beyaz"], [data-theme="gri"], [data-theme="siyah"]) .record-icon { background: var(--text); color: var(--surface); }
:root[data-theme="siyah"] :is(.alert--warning, .alert--error, .alert--ok, .alert--info) { border-color: var(--border); color: var(--text); }
:root[data-theme="siyah"] :is(.ui-state--error, .ui-empty--error, .button--danger) { border-color: var(--border-strong); }
:root[data-theme="siyah"] .ui-state__title { color: var(--error); }
:root[data-theme="siyah"] .timeline__avatar { background: #3a3a3a; }
:root[data-theme="siyah"] .button:hover { background: var(--neutral-soft); }

/* =====================================================================
   Yazı düzeni (tüm temalar): başlıklar kalın, menü ince ve okunaklı
   ===================================================================== */
.page-header h1, .page-header--compact h1, .doc-header__title h1, .view-card > .page-header h1 { font-weight: 700; letter-spacing: -0.01em; }
.card__header h2, .ui-section .card__header h2, .fasttab > summary, .is-tabbed .fasttab.is-grouped > summary, .factbox__part h3,
.modal__head h2, .side-panel__head h2, .dcard .dh h3, .section-title { font-weight: 700; }
.sitemap__heading { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin: 18px 16px 4px; }
.sitemap__item, .sitemap__sub { font-weight: 350; font-size: 14px; letter-spacing: .005em; }
.sitemap__item.is-active { font-weight: 600; }
.sitemap__switch .sitemap__label strong { font-weight: 700; }
.table th, .table--dense th { font-weight: 700; }
.doc-tabs__tab, .views a { font-weight: 350; }
.doc-tabs__tab.is-active, .views a.is-active { font-weight: 700; }
.appbar__company { font-weight: 700; }

/* =====================================================================
   Menü simgeleri: her ekranın kendi çizimi; daraltılmış menüde büyük ve net
   ===================================================================== */
.nav-icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sitemap__item .nav-icon { color: var(--text); }
.sitemap__item.is-active .nav-icon { color: var(--primary); stroke-width: 1.8; }
.sitemap__area-icon .nav-icon, .sitemap__area-option .nav-icon { width: 18px; height: 18px; }
.app.is-collapsed .sitemap__item { min-height: 44px; }
.app.is-collapsed .sitemap__item .nav-icon { width: 24px; height: 24px; stroke-width: 1.5; }
.app.is-collapsed .sitemap__item.is-active { background: var(--sitemap-active); }
.app.is-collapsed .sitemap__group + .sitemap__group { margin-top: 6px; padding-top: 6px; }

/* =====================================================================
   Program görünümü: masaüstü kısayolundan açılan pencerede (html.is-app) web izleri kalkar
   ===================================================================== */
:root.is-app { overscroll-behavior: none; }
:root.is-app body { -webkit-user-select: none; user-select: none; }
:root.is-app :is(input, textarea, select, [contenteditable], .table td, .kv dd, .prose, .timeline__text, .field-static, .doc-status dd, pre, code) { -webkit-user-select: text; user-select: text; }
:root.is-app :is(button, .button, .menu__trigger, .menu__item, .sitemap__item, .doc-tabs__tab, .views a, summary, label, .chip) { cursor: default; }
:root.is-app * { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
:root.is-app ::-webkit-scrollbar { width: 10px; height: 10px; }
:root.is-app ::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 5px; border: 2px solid transparent; background-clip: padding-box; }
:root.is-app .auth-legal { display: none; }
/* Tüm temalarda Windows program yazısı: Segoe UI (yerel sistem yazı tipi) */
:root[data-theme], [data-theme-preview] { --font-sans: 'Segoe UI', 'Segoe UI Variable Text', -apple-system, 'Helvetica Neue', 'Inter', sans-serif; }
:root[data-theme="siyah"] .avatar, :root[data-theme="siyah"] .sitemap__area-icon { color: #0a0a0a; }
/* Filtreli liste maddeleri (görünüm) menüde gizli; yalnız o görünüm açıkken seçili olarak görünür */
.sitemap__item.is-variant:not(.is-active), li:has(> .sitemap__item.is-variant:not(.is-active)) { display: none; }
.sitemap__group:not(:has(.sitemap__item:not(.is-planned):not(.is-variant), .sitemap__item.is-active)) { display: none; }
/* Görünüm kartı başlığındaki düğmeler: şeffaf zeminde yazı her zaman okunur (birincil düğme dahil) */
.view-card > .page-header .actions .button, .view-card > .page-header .actions .button--primary { color: var(--text); font-weight: 600; }
.view-card > .page-header .actions .button--primary .icon { color: var(--primary); }

/* Bilgi balonu: "i" simgesinin üzerine gelince, odakta veya tıklayınca açıklama görünür */
.view-card__info { position: relative; }
/* Kapalıyken yerleşimden çıkar (K96): görünmez balon sayfayı yatay taşırmasın */
.info-pop { display: none; }
.info-pop {
    position: absolute; z-index: 60; top: calc(100% + 8px); left: -8px; width: max-content; max-width: min(420px, 70vw);
    padding: 10px 12px; border-radius: 6px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-pop);
    font-size: 13px; font-weight: 400; line-height: 1.5; letter-spacing: 0; white-space: normal; text-align: left; cursor: auto;
    opacity: 0; visibility: hidden; transform: translateY(-2px); transition: opacity .12s, transform .12s, visibility .12s;
}
.info-pop::before { content: ""; position: absolute; top: -5px; left: 14px; width: 10px; height: 10px; background: var(--surface); transform: rotate(45deg); box-shadow: -1px -1px 1px rgb(0 0 0 / 0.06); }
.view-card__info:hover .info-pop, .view-card__info:focus-visible .info-pop, .view-card__info.is-open .info-pop { display: block; opacity: 1; visibility: visible; transform: none; }
.view-card__info.is-open { background: var(--neutral-soft); color: var(--text); }

/* Taşınabilir pencereler ve filtre paneli */
.is-drag-handle { cursor: move; touch-action: none; }
:root.is-app .is-drag-handle { cursor: move; }
.is-dragging { transition: none !important; user-select: none; }
.filters-more__panel.is-fixed { position: fixed; right: auto !important; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; z-index: 70; padding: 0 14px 14px; }
.filters-more__head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; gap: 10px; margin: 0 -14px 12px; padding: 10px 8px 10px 14px; background: var(--surface); border-bottom: 1px solid var(--border); }
.filters-more__head strong { font-weight: 700; }
.filters-more__hint { font-size: 12px; color: var(--text-muted); margin-right: auto; }
.filters-more__head .icon-button { width: 28px; height: 28px; font-size: 13px; }
.view-card > .filters .filters-more__panel { left: 0; right: auto; }
.panel-resizer { position: absolute; top: 0; bottom: 0; left: -3px; width: 7px; cursor: col-resize; touch-action: none; }
.panel-resizer:hover, .panel-resizer:active { background: color-mix(in srgb, var(--primary) 35%, transparent); }
.side-panel, .task-panel { max-width: 92vw; }

/* Üst çubuk: yarı saydam tesis silüeti (public/assets/brand/tesis.svg) logo ve yazıların arkasında.
   Maske ile çizilir; rengi üst çubuk yazı rengidir, böylece her temada uyumlu ve okunaklı kalır. */
.appbar { position: sticky; isolation: isolate; }
.appbar::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: var(--shell-strong, #fff); opacity: .13;
    -webkit-mask: url("../brand/tesis.svg") left bottom / auto 100% repeat-x;
            mask: url("../brand/tesis.svg") left bottom / auto 100% repeat-x;
}
.appbar::after {   /* arama kutusunun ve simgelerin arkasını sakinleştir: ortadan sağa hafif koyulaşma */
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(90deg, transparent 0%, transparent 30%, var(--shell-bg) 48%, var(--shell-bg) 62%, transparent 80%);
    opacity: .55;
}
.appbar > * { position: relative; }
:root:is([data-theme="sade"]) .appbar::before { background: #18181b; opacity: .07; }
.appbar .menu__panel, .appbar .search-suggest { z-index: 80; }
.appbar__brand, .appbar__context { text-shadow: 0 0 6px var(--shell-bg), 0 0 2px var(--shell-bg); }
.appbar__plant { color: var(--shell-text); opacity: .85; }

/* Satış siparişi blokajı (SAT-16): ileti çubuğu, sağda kaldır / reddet */
.order-block { align-items: flex-start; margin: 0 0 12px; }
.order-block > div:first-of-type { flex: 1; min-width: 0; }
.order-block .small { display: block; margin-top: 2px; }
.order-block__actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; }

/* ---- Satış Ana Sayfası (özet + uyarı + aksiyon). Fluent kart; tüm kutular bağlantı. ---- */
.sd-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 12px; margin: 0 0 16px; }
.sd-kpi { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--text); text-decoration: none; min-height: 112px; }
a.sd-kpi:hover { background: var(--surface-muted); }
a.sd-kpi:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.sd-kpi__label { font-size: 13px; color: var(--text-muted); }
.sd-kpi__value { font-size: 26px; font-weight: 600; line-height: 1.15; font-variant-numeric: tabular-nums; }
.sd-kpi__value small { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.sd-kpi--warn .sd-kpi__value { color: var(--warning); }
.sd-kpi--locked { justify-content: center; }
.sd-kpi__trend, .sd-kpi__target { font-size: 12px; }
.sd-kpi__trend--up, .sd-trend--up { color: var(--ok); }
.sd-kpi__trend--down, .sd-trend--down { color: var(--error); }
.sd-kpi__trend--flat { color: var(--text-muted); }
.sd-kpi__target { color: var(--text); }

.sd-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sd-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px 16px; min-width: 0; }
.sd-card--wide { grid-column: 1 / -1; }
.sd-card__head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 10px; }
.sd-card__head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.sd-card__note { font-size: 12px; color: var(--text-muted); }
.sd-empty { margin: 8px 0; color: var(--text-muted); }
.sd-foot { margin: 8px 0 0; }

.sd-chart-filters { display: flex; gap: 6px; margin-left: auto; flex-wrap: wrap; }
.sd-chart-filters select { height: var(--control-h-sm); }
.sd-chart__svg { width: 100%; height: auto; display: block; }
.sd-chart__grid { stroke: var(--border); stroke-width: 1; }
.sd-chart__axis { fill: var(--text-muted); font-size: 11px; }
.sd-chart__bar { fill: var(--primary); }
.sd-chart__bar:hover { fill: var(--primary-hover); }
.sd-chart__budget { fill: none; stroke: var(--warning); stroke-width: 2.4; stroke-linejoin: round; }
.sd-chart__last { fill: none; stroke: var(--text-muted); stroke-width: 1.8; stroke-dasharray: 5 4; }
.sd-chart__missing { fill: var(--error); font-size: 10px; }
.sd-chart__table { margin-top: 6px; font-size: 13px; }
.sd-chart__table summary { cursor: pointer; color: var(--link); }
.sd-legend { display: flex; flex-wrap: wrap; gap: 14px; list-style: none; margin: 0 0 4px; padding: 0; font-size: 12px; color: var(--text-muted); }
.sd-legend__sw { display: inline-block; width: 14px; height: 10px; margin-right: 6px; vertical-align: -1px; border-radius: 2px; }
.sd-legend__sw--actual { background: var(--primary); }
.sd-legend__sw--budget { height: 3px; vertical-align: 2px; background: var(--warning); }
.sd-legend__sw--last { height: 0; border-top: 2px dashed var(--text-muted); vertical-align: 3px; border-radius: 0; }
.sd-legend__unit { margin-left: auto; }

.sd-alerts { list-style: none; margin: 0; padding: 0; }
.sd-alert { display: flex; align-items: center; gap: 8px; padding: 9px 6px; border-bottom: 1px solid var(--border); color: var(--text); text-decoration: none; }
.sd-alerts li:last-child .sd-alert { border-bottom: 0; }
.sd-alert:hover { background: var(--surface-muted); }
.sd-alert__dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; background: var(--text-faint); }
.sd-alert--critical .sd-alert__dot { background: var(--error); }
.sd-alert--warn .sd-alert__dot { background: var(--warning); }
.sd-alert--notice .sd-alert__dot { background: #c9a227; }
.sd-alert__go { margin-left: auto; color: var(--text-faint); }

.sd-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sd-tile { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); text-decoration: none; }
.sd-tile:hover { background: var(--surface-muted); border-color: var(--border-strong); }
.sd-tile__label { font-size: 13px; color: var(--text-muted); }
.sd-tile__value { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sd-tile--warn .sd-tile__value { color: var(--warning); }
.sd-tile__hint { font-size: 12px; color: var(--text-muted); }

.sd-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sd-bars li { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; align-items: center; gap: 10px; font-size: 13px; }
.sd-bars__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-bars__track { height: 12px; background: var(--surface-muted); border-radius: 2px; overflow: hidden; }
.sd-bars__fill { display: block; height: 100%; background: var(--primary); }
.sd-bars__none .sd-bars__fill { background: var(--text-faint); }
.sd-bars__value { font-variant-numeric: tabular-nums; white-space: nowrap; }

.sd-funnel { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.sd-funnel__step > a, .sd-funnel__step.is-off { display: flex; flex-direction: column; gap: 4px; height: 100%; padding: 10px 12px; background: var(--primary-soft); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%, 10px 50%); padding-left: 20px; }
.sd-funnel__step:first-child > a, .sd-funnel__step.is-off:first-child { clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%); padding-left: 12px; }
.sd-funnel__step > a:hover { background: var(--neutral-soft); }
.sd-funnel__step.is-off { background: var(--surface-muted); color: var(--text-muted); }
.sd-funnel__stage { font-size: 13px; font-weight: 600; }
.sd-funnel__value { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sd-funnel__note { font-size: 12px; color: var(--text-muted); }

@media (max-width: 1100px) {
    .sd-grid { grid-template-columns: minmax(0, 1fr); }
    .sd-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sd-funnel { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sd-funnel__step > a, .sd-funnel__step.is-off { clip-path: none; padding-left: 12px; }
}

/* ---- Teklif Yönetimi: satır ayrıntısı, fiyat yapısı, onay matrisi ---- */
.line-extra { margin-top: 4px; font-size: 12px; }
.line-extra > summary { cursor: pointer; color: var(--link); }
.line-extra__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 10px; margin-top: 6px; min-width: 320px; }
.line-extra__grid label { display: flex; flex-direction: column; gap: 2px; color: var(--text-muted); }
.line-extra__grid input { height: var(--control-h-sm); }
.price-structures { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.price-structure h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.price-structure__total td { font-weight: 600; border-top: 2px solid var(--border-strong); }
.text-warning { color: var(--warning); }
.approval-matrix input[type="number"] { width: 90px; }
.approval-matrix select[multiple] { min-width: 220px; min-height: 64px; }

/* ---------- Kayıt kartı penceresi (Müşteri Kartı) ve sekmeler ---------- */
.modal--xl { --modal-w: min(1360px, 96vw); height: 92vh; max-height: 92vh; }
.record-card__eyebrow { margin: 0 0 2px; font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.record-card__summary { flex: none; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding: 10px 18px; border-bottom: 1px solid var(--border); background: var(--surface-muted); }
.record-card__identity { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.record-card__identity .mono { font-weight: 600; }
.record-card__figures { display: flex; flex-wrap: wrap; gap: 4px 22px; margin: 0; }
.record-card__figures div { min-width: 96px; }
.record-card__figures dt { font-size: 11.5px; color: var(--text-muted); }
.record-card__figures dd { margin: 0; font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }
.record-card__figures small, .record-card__kpis small { font-size: 11px; font-weight: 400; color: var(--text-muted); }
.record-card__warning { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 18px; border-bottom: 1px solid var(--border); background: var(--warning-soft); font-size: 13px; }
.record-card__body { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 260px; }
.record-card__main { min-width: 0; overflow-y: auto; padding: 0 18px 18px; }
.record-card__aside { overflow-y: auto; padding: 14px 16px; border-left: 1px solid var(--border); background: var(--surface-muted); }
.record-card__aside h3 { margin: 0 0 10px; font-size: 14px; }
.record-card__kpis { display: grid; grid-template-columns: 1fr; gap: 8px; margin: 0 0 12px; }
.record-card__kpis div { display: flex; justify-content: space-between; gap: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border); }
.record-card__kpis dt { font-size: 12.5px; color: var(--text-muted); }
.record-card__kpis dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.record-card__links { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 10px; font-size: 13px; }
.record-card__h { margin: 16px 0 8px; font-size: 13px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.record-card__facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 16px; margin: 0 0 8px; }
.record-card__facts dt { font-size: 12px; color: var(--text-muted); }
.record-card__facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.record-card__add { margin-top: 12px; }
.record-card__add > summary { list-style: none; width: max-content; }
.record-card__add > summary::-webkit-details-marker { display: none; }
.record-card__add[open] > form { margin-top: 10px; padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.record-card__notes { list-style: none; margin: 12px 0 0; padding: 0; }
.record-card__notes li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.record-card__notes li.is-warning { border-left: 3px solid var(--warning); padding-left: 10px; }
.record-card__notes p { margin: 4px 0 0; white-space: pre-line; }
.record-card__note-form { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.tabs { position: sticky; top: 0; z-index: 2; display: flex; gap: 2px; margin: 0 -18px 14px; padding: 0 18px; overflow-x: auto; border-bottom: 1px solid var(--border); background: var(--surface); scrollbar-width: thin; }
.tabs [role="tab"] { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 10px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.tabs [role="tab"]:hover { color: var(--text); }
.tabs [role="tab"][aria-selected="true"] { border-bottom-color: var(--primary); color: var(--primary); font-weight: 600; }
.tabs__n { font-size: 11px; color: var(--text-faint); font-variant-numeric: tabular-nums; }
.tabs__panel { padding-top: 2px; }
.checkbox-row { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.check-list { display: grid; gap: 6px; }
.col-actions { width: 40px; text-align: right; }
@media (max-width: 900px) {
    .record-card__body { grid-template-columns: 1fr; overflow-y: auto; }
    .record-card__main, .record-card__aside { overflow: visible; }
    .record-card__aside { border-left: 0; border-top: 1px solid var(--border); }
    .modal--xl { width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; margin: 0; }
}

/* ---- Kayıt penceresi (standart): kenarda küçük boşlukla ekranı kaplar; kenarlardan boyutlanır; Daralt ile alta iner ---- */
.popup-host { position: fixed; inset: 0; z-index: 300; }
.popup-host.is-minimized { display: none; }
.popup-host__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .28); }
.popup-win { position: absolute; display: flex; flex-direction: column; background: var(--bg); border-radius: 8px; overflow: hidden;
    box-shadow: 0 0 2px rgba(0, 0, 0, .2), 0 16px 48px rgba(0, 0, 0, .3); }
.popup-win.is-fill { inset: 10px; }
.popup-win__bar { display: flex; align-items: center; gap: 4px; height: 40px; padding: 0 6px 0 14px; background: var(--shell-bg); color: var(--shell-text); flex: 0 0 auto; cursor: move; user-select: none; }
.popup-win__title { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popup-win__bar .button { background: transparent; color: var(--shell-text); border-color: transparent; cursor: pointer; }
.popup-win__bar .button:hover { background: var(--shell-hover); }
.popup-win__bar .button .icon { color: var(--shell-text); width: 16px; height: 16px; }
.popup-win__frame { flex: 1; width: 100%; border: 0; background: var(--bg); }
.popup-win.is-dragging .popup-win__frame { pointer-events: none; }
.popup-win.is-dragging, .popup-win.is-dragging * { user-select: none; }
.popup-win__loading { position: absolute; top: 40px; left: 0; right: 0; height: 2px; background: var(--primary); animation: popup-load 1s ease-in-out infinite; transform-origin: left; }
@keyframes popup-load { 0% { transform: scaleX(0); } 60% { transform: scaleX(.8); } 100% { transform: scaleX(1); opacity: 0; } }
/* Kenar ve köşe tutamakları (görünmez, 6 px) */
.popup-win__edge { position: absolute; z-index: 2; }
.popup-win__edge--n, .popup-win__edge--s { left: 8px; right: 8px; height: 6px; cursor: ns-resize; }
.popup-win__edge--n { top: 0; } .popup-win__edge--s { bottom: 0; }
.popup-win__edge--e, .popup-win__edge--w { top: 8px; bottom: 8px; width: 6px; cursor: ew-resize; }
.popup-win__edge--e { right: 0; } .popup-win__edge--w { left: 0; }
.popup-win__edge--ne, .popup-win__edge--nw, .popup-win__edge--se, .popup-win__edge--sw { width: 12px; height: 12px; }
.popup-win__edge--ne { top: 0; right: 0; cursor: nesw-resize; } .popup-win__edge--sw { bottom: 0; left: 0; cursor: nesw-resize; }
.popup-win__edge--nw { top: 0; left: 0; cursor: nwse-resize; } .popup-win__edge--se { bottom: 0; right: 0; cursor: nwse-resize; }
/* Daraltılmış pencere: sol altta şerit */
.popup-chip { position: fixed; left: 12px; bottom: 12px; z-index: 310; display: flex; align-items: center; gap: 8px; max-width: min(420px, calc(100vw - 24px));
    height: 38px; padding: 0 6px 0 12px; border: 0; border-radius: 6px; background: var(--shell-bg); color: var(--shell-text); font: inherit; font-weight: 600;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .3); cursor: pointer; }
.popup-chip:hover { background: var(--shell-hover); }
.popup-chip .icon { width: 16px; height: 16px; flex: 0 0 16px; }
.popup-chip__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.popup-chip__close { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 4px; font-size: 18px; font-weight: 400; }
.popup-chip__close:hover { background: rgba(255, 255, 255, .15); }
@media (max-width: 700px) { .popup-win.is-fill { inset: 0; border-radius: 0; } }
html.has-popup, html.has-popup body { overflow: hidden; }
/* Pencere içindeki sayfa: menü, üst çubuk ve konum satırı yok; içerik tam genişlik */
html.is-popup .appbar, html.is-popup .sidebar, html.is-popup .sidebar-backdrop, html.is-popup .subbar, html.is-popup .skip-link { display: none !important; }
html.is-popup .app__body { display: block; }
html.is-popup .app__main { margin: 0; width: 100%; }
html.is-popup .content { padding-top: 12px; }
html.is-popup .doc-page__main > .doc-commandbar { top: 8px; }
html.is-popup .doc-commandbar__back, html.is-popup .doc-header__title > a.icon-button:first-child { display: none; }
.popup-win__min { width: 34px; justify-content: center; padding: 0 !important; }
.popup-win__min .icon { width: 18px !important; height: 18px !important; }

/* ---- "+ Yeni müşteri" penceresi (customer-new.js): satış ekranının üstünde, kayıt penceresi görünümüyle ekranı kaplar ---- */
dialog.customer-new { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; overflow: hidden; }
dialog.customer-new::backdrop { background: rgba(0, 0, 0, .28); }
dialog.customer-new .popup-win__bar { cursor: default; }
.record-card__picked { background: var(--ok-soft); }

/* ---------- Satış siparişi (kullanıcı tanımı "4. Satış Siparişleri", 7 Ekim 2026) ---------- */
.doc-status--summary > div { min-width: 96px; }
.status-lights { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.status-lights a { text-decoration: none; color: inherit; }
.status-lights a:hover .badge { text-decoration: underline; }
/* Kalem ayrıntısı açılır kutusu */
.line-more { position: relative; display: inline-block; }
.line-more > summary { list-style: none; white-space: nowrap; }
.line-more > summary::-webkit-details-marker { display: none; }
.line-more > summary .count-pill { margin-left: 4px; }
.line-more__panel { position: absolute; z-index: 40; right: 0; top: calc(100% + 6px); width: min(640px, 86vw); max-height: 70vh; overflow: auto;
    padding: 12px 14px; background: var(--surface); border-radius: 6px; box-shadow: var(--shadow-pop); text-align: left; }
.line-more__head { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 8px; }
.line-more__head + .form-grid { margin-bottom: 12px; }
.line-more__foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.line-more__foot [data-line-more-close] { margin-left: auto; }
.line-plan { min-width: 0 !important; }
.line-plan input[type="date"] { min-width: 132px; }
.line-plan .plan-ok { color: var(--ok); }
.line-plan + .line-more__foot .text-error { color: var(--error); }
/* Doküman ve not formları */
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border); }
.inline-form .field { min-width: 180px; }
.inline-form input[type="file"] { height: auto; padding: 5px; }
.note-form { display: grid; grid-template-columns: 200px minmax(0, 1fr) auto; gap: 10px; align-items: end; margin-bottom: 12px; }
.note-form .field-error { grid-column: 1 / -1; }
@media (max-width: 760px) { .note-form { grid-template-columns: minmax(0, 1fr); } }

/* ---- Tek sekme düzeni (kullanıcı kararı, 7 Ekim 2026): tüm uygulamada aynı ----
   Kayıt kartı sekmeleri (.doc-tabs__tab), liste görünümleri (.views a) ve pencere / müşteri kartı sekmeleri (.tabs [role=tab]):
   çerçeveli, üst köşeleri yuvarlak açık gri sekmeler; seçili sekme bordo dolgu + beyaz kalın yazı; altında bordo şerit. */
:root { --tab-accent: #7a1d3f; --tab-accent-text: #fff; --tab-bg: #eef0f3; --tab-bg-hover: #e2e5ea; --tab-border: #d3d7de; --tab-text: #2b2f36; }
:root[data-theme="siyah"], :root[data-theme="gece"], :root[data-theme="koyu"], :root[data-theme="grafit"], :root[data-theme="gece-mavisi"] { --tab-bg: #2a2d33; --tab-bg-hover: #353941; --tab-border: #444a54; --tab-text: #e6e8eb; }
.views, .doc-tabs, .tabs { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px; padding: 0 2px; border-bottom: 3px solid var(--tab-accent); overflow: visible; }
.views a, .doc-tabs__tab, .tabs [role="tab"] {
    position: relative; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 16px; margin: 0;
    border: 1px solid var(--tab-border); border-bottom: 0; border-radius: 7px 7px 0 0;
    background: var(--tab-bg); color: var(--tab-text); font-size: 13.5px; font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.views a::after, .doc-tabs__tab::after, .tabs [role="tab"]::after { content: none !important; }
.views a:hover, .doc-tabs__tab:hover, .tabs [role="tab"]:hover { background: var(--tab-bg-hover); color: var(--tab-text); }
.views a.is-active, .doc-tabs__tab.is-active, .tabs [role="tab"][aria-selected="true"] {
    background: var(--tab-accent); border-color: var(--tab-accent); color: var(--tab-accent-text); font-weight: 700;
}
.views a.is-active .count-pill, .tabs [role="tab"][aria-selected="true"] .tabs__n { background: rgba(255, 255, 255, .22); color: var(--tab-accent-text); }
.views a:focus-visible, .doc-tabs__tab:focus-visible, .tabs [role="tab"]:focus-visible { outline: 2px solid var(--tab-accent); outline-offset: 2px; }
.doc-tabs__tab.has-error::before { background: #ffb4b4; }
.doc-header--record > .doc-tabs { padding: 8px 12px 0; }
.tabs { position: sticky; top: 0; z-index: 2; margin: 0 -18px 14px; padding: 8px 18px 0; background: var(--surface); }
.view-card > .views { padding: 8px 12px 0; border-bottom: 3px solid var(--tab-accent); }
.view-card > .views a { height: 34px; }
/* Görünüm sekmeleri alt alta kırılmaz (K96): tek satır, taşarsa yatay kaydırma (ince çubuk); sekme küçülmez */
.views { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.views::-webkit-scrollbar { display: none; }
.views > a { flex: none; }

/* ---- Standart gezinme (SAP düzeni): her sayfada Geri (F3) ve Ana menü (Shift+F3) ---- */
.commandbar__nav { flex: none; display: flex; align-items: center; gap: 2px; margin-right: 8px; padding-right: 8px; border-right: 1px solid var(--border); }
.commandbar__navbtn { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border-radius: var(--radius-sm); color: var(--text); font-size: 13px; font-weight: 500; text-decoration: none; white-space: nowrap; }
.commandbar__navbtn:hover { background: var(--surface-muted); color: var(--text); }
.commandbar__navbtn .icon { width: 16px; height: 16px; color: var(--primary); }
@media (max-width: 700px) { .commandbar__navbtn { padding: 0 6px; font-size: 0; } .commandbar__navbtn .icon { margin: 0; } }

/* ---------- Müşteri kartı: düzenlenebilir adres satırları (kartın Kaydet'iyle) ---------- */
.address-rows { display: grid; gap: 12px; margin: 8px 0 12px; }
.address-row { border: 1px solid var(--border, #d1d1d1); border-radius: 4px; padding: 8px 12px 12px; margin: 0; min-width: 0; }
.address-row > legend { display: flex; align-items: center; gap: 8px; padding: 0 6px; font-size: 13px; }
.address-row[disabled] { opacity: .85; }

/* ---- Ortak "Dışa aktar" menüsü: Excel / PDF / PowerPoint (konum satırında ve kayıt penceresi şeridinde) ---- */
.export-menu { position: relative; display: inline-flex; }
.export-menu__trigger { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.export-menu__trigger:hover { background: var(--surface-muted); }
.export-menu__trigger .icon { width: 15px; height: 15px; color: var(--primary); }
.export-menu__trigger:disabled { opacity: .7; cursor: progress; }
.export-menu__panel { position: absolute; top: calc(100% + 4px); right: 0; z-index: 320; min-width: 230px; padding: 4px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-pop); }
.export-menu__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; }
.export-menu__item:hover, .export-menu__item:focus-visible { background: var(--surface-muted); }
.export-menu__ext { display: inline-block; min-width: 44px; padding: 1px 0; border-radius: 3px; background: var(--tab-accent, #7a1d3f); color: #fff; font-size: 11px; font-weight: 700; text-align: center; }
.export-menu--dark .export-menu__trigger { background: transparent; border-color: transparent; color: var(--shell-text); cursor: pointer; }
.export-menu--dark .export-menu__trigger:hover { background: var(--shell-hover); }
.export-menu--dark .export-menu__trigger .icon { color: var(--shell-text); }
.export-menu--dark .export-menu__panel { color: var(--text); }
.subbar__right .export-menu { margin-right: 8px; }

/* ---- Açılır-kapanır menü grupları (akordeon): başlık düğme, alt maddeler kapalı; açık grup ok aşağı ---- */
button.sitemap__heading { display: flex; align-items: center; justify-content: space-between; width: calc(100% - 12px); margin: 2px 6px; padding: 8px 6px; border: 0; border-radius: var(--radius-sm); background: none; color: var(--text); font: inherit; font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; }
button.sitemap__heading:hover { background: var(--surface-muted); }
.sitemap__group-chevron { width: 16px; height: 16px; flex: none; color: var(--text-muted); transition: transform .15s; transform: rotate(-90deg); }
.sitemap__group.is-open .sitemap__group-chevron { transform: none; }
.sitemap__group:not(.is-open) > ul { display: none; }
.sitemap__group:first-child button.sitemap__heading { margin-top: 6px; }
/* Daraltılmış menüde (yalnız simgeler) gruplar her zaman açık */
.app.is-collapsed .sitemap__group > ul { display: block; }
.app.is-collapsed button.sitemap__heading { display: none; }
/* Bulunulan ekranın grubu kapalıyken de belli olsun */
.sitemap__group.is-current > button.sitemap__heading { color: var(--tab-accent, #7a1d3f); box-shadow: inset 3px 0 0 var(--tab-accent, #7a1d3f); }

/* ---- Müşteri 360° (Satış — Genel Bakış kartlarıyla aynı dil: sd-*) ---- */
.c360-pick { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; }
.c360-pick select { min-width: 320px; height: var(--control-h-sm); }
.c360-id { margin: 0 0 14px; padding: 12px 16px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border-left: 4px solid var(--tab-accent, #7a1d3f); }
.c360-id h2 { margin: 0 0 4px; font-size: 20px; }
.c360-id p { margin: 2px 0; }
.c360-tag { padding: 1px 6px; border-radius: 3px; background: var(--tab-accent, #7a1d3f); color: #fff; font-size: 12px; }
.c360-dot { display: inline-block; width: 9px; height: 9px; margin: 0 4px 0 2px; border-radius: 50%; background: var(--ok); }
.c360-dot.is-off { background: var(--text-faint); }
.c360-score { display: flex; align-items: baseline; gap: 6px; margin: 0 0 10px; }
.c360-score__value { font-size: 42px; font-weight: 700; line-height: 1; color: var(--tab-accent, #7a1d3f); }
.c360-score__of { color: var(--text-muted); }
.c360-score__label { margin-left: 8px; font-weight: 600; }
.c360-sub { margin: 14px 0 6px; font-size: 13px; font-weight: 700; }
.c360-meter { height: 10px; margin: 8px 0 4px; border-radius: 5px; background: var(--surface-muted); overflow: hidden; }
.c360-meter span { display: block; height: 100%; background: var(--primary); }
.c360-meter span.is-high { background: var(--error); }
.c360-list { list-style: none; margin: 0; padding: 0; }
.c360-list li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.c360-big { margin: 10px 0 2px; font-size: 14px; }
.c360-big strong { font-size: 24px; }
.c360-alert-ok .sd-alert__dot { background: var(--ok); }
.c360-contacts { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.c360-contact { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 13px; }

/* Müşteri 360° — 7 blok + Dikkat Gerektirenler (kullanıcı tasarımı, 7 Ekim 2026) */
.c360-id__head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 8px; }
.c360-id__head h2 { margin: 0; }
.c360-id__code { font-weight: 600; color: var(--text-muted); }
.c360-state { display: inline-flex; align-items: center; font-size: 13px; }
.c360-tag--soft { background: var(--primary-soft); color: var(--primary); }
.c360-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 18px; margin: 0; }
.c360-facts div { min-width: 0; }
.c360-facts dt { font-size: 12px; color: var(--text-muted); }
.c360-facts dd { margin: 0; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.c360-kpis { display: grid; grid-template-columns: 2fr 2fr 2fr 1fr 1fr; gap: 12px; margin: 0 0 16px; }
.c360-q { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.c360-q__title { font-size: 12px; font-weight: 600; color: var(--text-muted); letter-spacing: .01em; padding-left: 2px; border-left: 3px solid var(--tab-accent, #7a1d3f); padding-left: 6px; }
.c360-q__kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; flex: 1; }
.c360-kpi { min-height: 100px; }
.c360-kpi .sd-kpi__value { font-size: 22px; }
@media (max-width: 1280px) { .c360-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .c360-kpis { grid-template-columns: 1fr; } }
.c360-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.c360-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.c360-aside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 12px; }
@media (max-width: 1100px) { .c360-layout { grid-template-columns: 1fr; } .c360-aside { position: static; order: -1; } }
.c360-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 900px) { .c360-pair { grid-template-columns: 1fr; } }
.c360-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 6px; }
@media (max-width: 900px) { .c360-cols { grid-template-columns: 1fr; } }
.c360-n { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; background: var(--tab-accent, #7a1d3f); color: #fff; font-size: 12px; font-weight: 700; vertical-align: 1px; }
.c360-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px 16px; margin: 0 0 12px; padding: 10px 12px; background: var(--surface-muted); border-radius: var(--radius-sm); }
.c360-strip dt { font-size: 12px; color: var(--text-muted); }
.c360-strip dd { margin: 0; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.c360-strip--docs { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 12px; }
.c360-strip--docs dd { font-weight: 500; }
.c360-spark { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; align-items: end; height: 120px; margin: 4px 0 6px; }
.c360-spark__col { display: flex; flex-direction: column; align-items: center; gap: 2px; height: 100%; min-width: 0; }
.c360-spark__val { font-size: 11px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.c360-spark__bar { flex: 1; width: 70%; display: flex; align-items: flex-end; background: var(--surface-muted); border-radius: 2px; }
.c360-spark__bar span { display: block; width: 100%; background: var(--primary); border-radius: 2px; }
.c360-spark__bar span.is-neg { background: var(--error); }
.c360-spark__lbl { font-size: 10.5px; color: var(--text-muted); white-space: nowrap; }
.c360-fill--late { background: var(--warning) !important; }
.c360-links { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0 0; font-size: 13px; }
.c360-list li.is-muted { color: var(--text-muted); }
.c360-ok { display: flex; align-items: center; gap: 4px; margin: 4px 0; color: var(--text-muted); }
.c360-attention { border-top: 3px solid var(--error); }
.c360-attention .sd-alert { align-items: flex-start; font-size: 13.5px; }
.c360-attention .sd-alert__dot { margin-top: 4px; }
.c360-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 13px; }
.c360-notes li { display: flex; flex-direction: column; gap: 2px; padding: 6px 10px; border-left: 3px solid var(--border); background: var(--surface-muted); }
.c360-notes li.is-warning { border-left-color: var(--warning); }

/* Sipariş revizyonu (SAT-17) */
.revision-band { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 12px; }
.revision-band > div { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.revision-band .field { margin-top: 4px; }
.revision-band textarea { width: 100%; }
.line-lock { margin-top: 3px; font-size: 11.5px; color: var(--warning); white-space: nowrap; }
.revision { padding: 10px 0; border-bottom: 1px solid var(--border); }
.revision:last-child { border-bottom: 0; }
.revision h3 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 14px; }
.revision__reason { margin: 0 0 8px; font-size: 13px; }

/* Ödeme koşulları ve ödeme planı */
.pt-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .pt-layout { grid-template-columns: 1fr; } }
.pt-list { display: flex; flex-direction: column; padding: 4px 0; max-height: calc(100vh - 220px); overflow: auto; }
.pt-list__item { display: flex; flex-direction: column; gap: 2px; padding: 8px 12px; border-left: 3px solid transparent; color: var(--text); text-decoration: none; }
.pt-list__item:hover { background: var(--surface-muted); }
.pt-list__item.is-active { border-left-color: var(--tab-accent, #7a1d3f); background: var(--primary-soft); }
.pt-list__item.is-muted { opacity: .65; }
.pt-list__code { display: flex; gap: 6px; align-items: center; font-weight: 600; }
.pt-list__rule { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-editor { padding: 14px 16px; }
.pt-editor__head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin-bottom: 10px; }
.pt-editor__name { flex: 1 1 260px; }
.pt-templates { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.pt-lines input[type=number], .pt-lines input[type=text] { width: 72px; }
.pt-lines select { min-width: 110px; }
.pt-editor__foot { display: flex; align-items: center; gap: 12px; margin: 8px 0 14px; }
.pt-editor__foot .button--primary { margin-left: auto; }
.pt-preview { border-top: 1px solid var(--border); padding-top: 12px; }
.pt-preview h2 { font-size: 15px; margin: 0 0 8px; }
.pt-preview__inputs { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px; }
.pay-plan { margin-top: 8px; }

/* Denkleştirme: solda faturalar, sağda ödemeler */
.clr { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; margin-bottom: 18px; }
@media (max-width: 1000px) { .clr { grid-template-columns: 1fr; } .clr__credits { order: -1; } }
.clr__head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px; padding: 12px 14px 8px; }
.clr__head h2 { margin: 0; font-size: 15px; }
.clr__head .button { margin-left: auto; }
.clr__sel { width: 34px; text-align: center; }
.clr__amount { width: 120px; text-align: right; }
.clr .is-late { color: var(--error); font-weight: 600; }
.clr tr.is-selected td { background: #e8f0fe; }
.clr__credits { display: flex; flex-direction: column; padding-bottom: 6px; position: sticky; top: 12px; max-height: calc(100vh - 140px); overflow: auto; }
.clr__credit { display: flex; flex-direction: column; gap: 2px; margin: 0 10px 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text); text-decoration: none; }
.clr__credit:hover { background: var(--surface-muted); }
.clr__credit.is-active { border-color: var(--primary); box-shadow: inset 3px 0 0 var(--primary); background: var(--primary-soft); }
.clr__credit-no { font-weight: 600; }
.clr__credit-amt { font-variant-numeric: tabular-nums; }
.clr__none { padding: 0 14px; }
.clr__bar { grid-column: 1 / -1; position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 14px; border-top: 2px solid var(--primary); background: var(--surface); box-shadow: 0 -4px 12px rgb(11 31 58 / .08); font-variant-numeric: tabular-nums; }
.clr__bar .button--primary { margin-left: auto; }
.clr__warn { color: var(--warning); font-weight: 600; }
.clr__hint { grid-column: 1 / -1; margin: 0; }

/* e-Belge entegratör kurulumu */
.int-status { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px 18px; padding: 12px 16px; margin: 0 0 14px; }
.int-status .field-label { display: block; font-size: 12px; color: var(--text-muted); }
.int-test.is-ok { color: var(--ok); font-weight: 600; }
.int-test.is-fail { color: var(--error); font-weight: 600; }
.int-form { padding: 14px 16px; }
.int-form fieldset { border: 0; border-top: 1px solid var(--border); margin: 0; padding: 12px 0; }
.int-form fieldset:first-of-type { border-top: 0; }
.int-form legend { font-weight: 600; font-size: 14px; padding: 0; margin-bottom: 8px; }
.int-group { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; margin-bottom: 8px; }
.int-group__title { width: 100%; font-size: 12px; color: var(--text-muted); }
.int-provider { display: flex; flex-direction: column; gap: 2px; min-width: 180px; padding: 8px 12px 8px 30px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; position: relative; }
.int-provider input { position: absolute; left: 10px; top: 11px; }
.int-provider.is-active { border-color: var(--primary); background: var(--primary-soft); }
.int-provider__name { font-weight: 600; }
.int-provider__state { color: var(--text-muted); }
.int-note { margin: 4px 0 0; }
.int-form .segmented input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.int-form .segmented__item { cursor: pointer; }
.int-testform { display: flex; align-items: center; gap: 12px; margin: 10px 0 0; }

/* GİB e-Arşiv SMS onayı bandı */
.gib-sms { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.gib-sms > div { display: flex; flex-direction: column; gap: 2px; flex: 1 1 320px; }

/* Kod standardı ipucu (kod alanı etiketinin yanında) */
.code-format { margin-left: 6px; padding: 0 6px; border-radius: 3px; background: var(--primary-soft); color: var(--primary); font-size: 11.5px; font-weight: 500; }
.code-input { font-family: var(--font-mono); letter-spacing: .02em; }

/* TFRS Bilanço / Gelir Tablosu ağacı (finance/fs/report, K79) */
.fs-table .fs-name { white-space: normal; }
.fs-toggle { display: inline-flex; align-items: baseline; gap: 6px; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.fs-toggle:hover { color: var(--link); text-decoration: underline; }
.fs-toggle:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.fs-chev { display: inline-block; width: 0; height: 0; border-left: 5px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; transition: transform .12s; flex: none; }
.fs-toggle[aria-expanded="true"] .fs-chev { transform: rotate(90deg); }
.fs-leaf { padding-left: 11px; }
.fs-link { margin-left: 8px; color: var(--link); }
.fs-row--top td { font-weight: 600; background: var(--surface-muted); }
.fs-row--subtotal td { font-weight: 600; border-top: 1px solid var(--border-strong); }
.fs-row--main td, .fs-row--account td { color: var(--text); }
.fs-row--account .fs-toggle { font-variant-numeric: tabular-nums; }
.fs-row--partner td { color: var(--text-muted); }
.fs-row--partner a { color: var(--link); }
@media print {
    .fs-link, .fs-chev { display: none; }
    .fs-table tr[hidden] { display: none; }
}

/* Üst çubuk tesis etiketi bağlantıdır (Tesisler ekranı); koyu zeminde bağlantı rengi kullanılmaz */
a.appbar__plant:hover { color: var(--shell-text); text-decoration: underline; }

/* ---- Gelir tablosu Aylık + YTD (9 Ekim 2026): kolon grubu başlığı, bu yılın kolonları hafif gri ---- */
.fs-table th.fs-colgroup { text-align: center; font-weight: 600; border-bottom: 1px solid var(--border); }
.fs-table th.fs-colgroup + th.fs-colgroup { border-left: 1px solid var(--border); }
.fs-table :is(td, th).fs-cur { background: color-mix(in srgb, var(--neutral-soft) 70%, transparent); }
/* Finansal tablolar sık satır (kullanıcı isteği, 9 Ekim 2026): 30 px satır, 12 px başlık */
.fs-table > tbody > tr > td { height: 30px; padding-top: 3px; padding-bottom: 3px; line-height: 1.35; }
.fs-table > thead th { padding-top: 5px; padding-bottom: 5px; font-size: 12px; line-height: 1.3; }
/* Bilanço bölüm bantları ve bölüm toplamları (kullanıcı örneği, 9 Ekim 2026); eksi tutar parantezde kırmızı */
.fs-table tr.fs-row--band > td { background: var(--tab-accent, #7a1d3f); color: #fff; font-weight: 600; border-bottom-color: transparent; }
.fs-table tr.fs-row--band-0 > td { background: color-mix(in srgb, var(--tab-accent, #7a1d3f) 82%, #000); }
.fs-table tr.fs-row--band .fs-toggle, .fs-table tr.fs-row--band .fs-toggle:hover { color: #fff; }
.fs-table tr.fs-row--total > td { font-weight: 600; background: var(--surface-muted); border-top: 1px solid var(--border-strong); }
.fs-table tr.fs-row--total-0 > td { border-top-width: 2px; }
.fs-table td.is-neg { color: var(--error); }
/* Ara toplamlar (Brüt kâr, Faaliyet kârı, Dönem kârı…) koyu zeminde kalın (kullanıcı isteği, 9 Ekim 2026) */
.fs-table tr.fs-row--subtotal > td { background: color-mix(in srgb, var(--brand-navy, #17365d) 14%, var(--surface)); color: var(--text); font-weight: 700; border-top: 1px solid color-mix(in srgb, var(--brand-navy, #17365d) 35%, transparent); }
.fs-table tr.fs-row--subtotal > td.fs-cur { background: color-mix(in srgb, var(--brand-navy, #17365d) 20%, var(--surface)); }
.fs-table tr.fs-row--subtotal:last-child > td { background: color-mix(in srgb, var(--brand-navy, #17365d) 24%, var(--surface)); }
/* Excel ana hat düğmeleri: satır düzeyi 1–4, kolon grupları */
.fs-outline { display: inline-flex; align-items: center; gap: 2px; margin: 0 8px 0 4px; }
.fs-outline__label { margin-right: 4px; font-size: 12px; color: var(--text-muted); }
.fs-outline__btn { min-width: 26px; height: 26px; padding: 0 6px; border: 1px solid var(--border-strong); border-radius: 4px; background: var(--surface); color: var(--text); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.fs-outline__btn:hover { background: var(--neutral-soft); }
.fs-outline__btn.is-active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.fs-outline__btn--text { font-weight: 500; }
.fs-outline__btn--text[aria-pressed="false"] { color: var(--text-faint); text-decoration: line-through; background: var(--surface-muted); }
.fs-table.fs-hide-aylik [data-colgrp~="aylik"], .fs-table.fs-hide-ytd [data-colgrp~="ytd"], .fs-table.fs-hide-onceki [data-colgrp~="onceki"], .fs-table.fs-hide-fark [data-colgrp~="fark"] { display: none; }
/* İnsan Kaynakları › Organizasyon Şeması (K93): departman kutuları girintili, pozisyon ve çalışan satırları */
.hr-org { display: flex; flex-direction: column; gap: 8px; }
.hr-org__node { box-shadow: none; border: 1px solid var(--border); border-left: 3px solid var(--primary); }
.hr-org__node .card__body { padding: 10px 14px; }
.hr-org__title { margin: 0; font-size: 14px; font-weight: 600; }
.hr-org__manager { margin: 2px 0 6px; }
.hr-org__people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; margin: 0; padding: 0; list-style: none; }
.hr-org__people li { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--neutral-soft); font-size: 13px; }
.hr-org__role { color: var(--text-muted); }
@media print { .hr-org__node { break-inside: avoid; } }


/* ---- Ortak bütçe giriş grid'i (K125; public/assets/js/budget-grid.js) ---- */
.budget-grid__bar { flex-wrap: wrap; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.budget-grid__bar .button[aria-pressed="true"] { background: var(--primary-soft); border-color: var(--primary); }
.budget-grid__bar select { width: auto; max-width: 16em; }
.budget-grid__bar input[data-bg-percent] { width: 6em; }
.budget-grid__cols { position: relative; }
.budget-grid__cols > summary { list-style: none; }
.budget-grid__cols > summary::-webkit-details-marker { display: none; }
.budget-grid__colmenu { position: absolute; z-index: 20; top: calc(100% + 4px); left: 0; min-width: 220px; display: grid; gap: 4px; padding: 8px 10px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-pop); }
.budget-grid__colmenu label { display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.budget-matrix tr[data-bg-sim] td, .budget-matrix tr[data-bg-sim] th { color: var(--text-muted); }
.budget-matrix input[data-m]:disabled { background: var(--surface-muted); }
[data-bg-summary] { padding: 8px 12px; }

/* ---------- Denkleştirme (K126): iki taraf aynı biçimde, altta özet kutusu ---------- */
.clr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .clr { grid-template-columns: minmax(0, 1fr); } }
.clr__side { min-width: 0; }
.clr__table td { vertical-align: top; }
.clr__type { display: block; }
.clr__late { display: block; font-size: 12px; font-weight: 600; color: var(--error); }
.clr__amount { width: 110px; }
.clr__amount:disabled { background: transparent; border-color: transparent; }
.clr tr.is-selected td { background: var(--primary-soft); }
.clr tr.is-other-cur td { opacity: .45; }
.clr__box {
    grid-column: 1 / -1; position: sticky; bottom: 0; z-index: 5; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center;
    padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-top: 2px solid var(--primary); border-radius: var(--radius-sm);
    box-shadow: 0 -4px 12px rgb(0 0 0 / 0.06);
}
.clr__sum { display: flex; flex-wrap: wrap; gap: 6px 26px; margin: 0; }
.clr__sum > div { min-width: 0; }
.clr__sum dt { font-size: 12px; color: var(--text-muted); }
.clr__sum dd { margin: 0; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.clr__sum dd strong { font-size: 15px; }
.clr__sum-main dd strong { color: var(--primary); font-size: 17px; }
.clr__sum .is-warn dd strong { color: var(--warning); }
.clr__sum .is-info dd strong { color: var(--text); }
.clr__state { grid-column: 1; margin: 0; font-size: 13px; color: var(--text-muted); }
.clr__state.is-ok { color: var(--ok); font-weight: 600; }
.clr__state.is-warn { color: var(--warning); font-weight: 600; }
.clr__state.is-error { color: var(--error); font-weight: 600; }
.clr__actions { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
@media (max-width: 760px) { .clr__box { grid-template-columns: minmax(0, 1fr); } .clr__actions { grid-column: 1; grid-row: auto; justify-content: flex-start; } }
.clr__table th, .clr__table td { padding: 7px 8px; }
.clr__table td:first-child, .clr__table th:first-child { width: 32px; min-width: 0; padding-left: 10px; padding-right: 4px; }
.clr__table td:nth-child(2) strong { white-space: nowrap; }
.clr__table .clr__type { max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clr__table .clr__amount { width: 92px; height: 30px; }
/* Satış bütçesi grid'i (K129): satır grubu anahtar hücresi ve hesaplanan ciro */
.budget-matrix--sales .budget-matrix__keys { min-width: 260px; vertical-align: top; }
.budget-matrix__keys > select, .budget-matrix__keys > input { display: block; width: 100%; margin-bottom: 4px; }
.budget-matrix__pair { display: flex; gap: 4px; margin-bottom: 4px; }
.budget-matrix__pair > * { flex: 1 1 0; min-width: 0; }
.budget-matrix__calc { background: var(--surface-muted); color: var(--text); white-space: nowrap; }
.budget-matrix--sales tr[data-bg-calc] td { border-bottom: 2px solid var(--border-strong); }
.budget-derived { margin: 8px 12px; }
.budget-derived > summary { cursor: pointer; color: var(--text-muted); padding: 4px 0; }
/* Yatırım ve finansman kartları (K503) */
.capex-card { margin: 8px 12px; }
.capex-card .card__header { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.capex-card .lines-table input[data-m], .capex-card .lines-table input.num { min-width: 80px; }

/* Üst çubuk tesis seçici (MY-D3, K138): dar ekranda tesis göstergesiyle birlikte gizlenir */
@media (max-width: 1100px) { .appbar__plant-form { display: none; } }

/* Sapma Analizi (K512): lehte / aleyhte; önemli sapma satırı */
.va-fav { color: var(--ok); }
.va-unfav { color: var(--error); }
.va-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.va-dot--fav { background: var(--ok); }
.va-dot--unfav { background: var(--error); }
.va-row--material > td:first-child { box-shadow: inset 3px 0 0 var(--warning); }
/* Kâr köprüsü (SA2): yatay şelale */
.vb-chart { display: grid; gap: 4px; margin: .5rem 0 .25rem; }
.vb-row { display: grid; grid-template-columns: minmax(9rem, 16rem) 1fr minmax(6.5rem, auto); align-items: center; gap: .5rem; min-height: 24px; }
.vb-row:hover { background: var(--surface-muted); }
.vb-row--total .vb-label { font-weight: 600; }
.vb-label { font-size: .8125rem; line-height: 1.25; overflow-wrap: anywhere; }
.vb-track { position: relative; height: 16px; }
.vb-zero { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--border-strong); }
.vb-bar { position: absolute; top: 2px; height: 12px; border-radius: 2px; }
.vb-bar--total { background: var(--text-faint); }
.vb-bar--fav { background: var(--ok); }
.vb-bar--unfav { background: var(--error); }
.vb-value { font-variant-numeric: tabular-nums; text-align: right; font-size: .8125rem; }
.vb-legend { display: flex; gap: 1rem; flex-wrap: wrap; margin: .25rem 0 .75rem; }
.vb-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; position: static; }
.vb-notes { margin: .5rem 0 0 1rem; }
/* Sapma uyarıları, yorum ve açıklamalar (SA3) */
.vi-narrative { max-width: 72rem; margin-bottom: .75rem; }
.vi-narrative p { margin: 0 0 .5rem; line-height: 1.55; }
.vc-request { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: .75rem; }
.vc-table td { vertical-align: top; }
.vc-text { min-width: 18rem; max-width: 40rem; }
.vc-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: .25rem .75rem; margin-top: .25rem; }
.vc-details summary { cursor: pointer; color: var(--link, var(--accent)); }
.vc-form { display: grid; gap: .35rem; margin-top: .35rem; min-width: 16rem; }
.vc-form textarea { width: 100%; }
.vc-inline { display: inline; }
/* Yönetim raporları (YR1) */
.mr-table td, .mr-table th { white-space: nowrap; }
.mr-table td:first-child { white-space: normal; min-width: 14rem; }
.mr-row--bold td { font-weight: 600; }
.mr-row--bold td:first-child { border-top: 1px solid var(--border-strong); }
.mr-row--header th { background: transparent; text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--text); padding-top: 12px; }
.mr-row--blank td { height: 10px; padding: 0; border-bottom: 0; }
.mr-grid input, .mr-grid select { height: 30px; font-size: 13px; padding: 0 6px; }
.mr-grid select { min-width: 9rem; }
.mr-in--code { width: 7rem; }
.mr-in--label { min-width: 12rem; width: 100%; }
.mr-in--spec { min-width: 14rem; width: 100%; font-family: var(--font-mono, ui-monospace, monospace); }
.mr-in--num { width: 3.5rem; }
.mr-check { text-align: center; }
.mr-grid__actions { padding: 8px 12px; }
.mr-lines { margin: 0 0 1rem; }
.mr-lines summary { cursor: pointer; color: var(--link, var(--accent)); }
.mr-delete { display: block; margin-top: 1rem; }
/* Rapor paketleri (YR2) */
.mr-reopen { margin: 0 0 1rem; }
.mr-commentary { max-width: 60rem; margin-top: .75rem; }
.mr-commentary textarea { width: 100%; }
/* Bakım (BK1–BK3): takvim ızgarası, olay kutuları, analiz çubukları */
.mc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.mc-head { padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--text-muted); background: var(--surface-muted); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.mc-day { min-height: 84px; padding: 4px 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mc-day--out { background: var(--surface-muted); }
.mc-day--out .mc-num { color: var(--text-faint); }
.mc-day--today { box-shadow: inset 0 0 0 2px var(--accent); }
.mc-num { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.mc-ev { display: block; font-size: 11px; line-height: 1.3; padding: 2px 4px; border-radius: 3px; background: var(--surface-muted); border-left: 3px solid var(--border-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.mc-ev--order { background: var(--primary-soft); border-left-color: var(--accent); }
.mc-ev--late { border-left-color: var(--error); }
.mc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mb-cell { position: relative; min-width: 12rem; }
.mb-bar { position: absolute; left: 8px; top: 50%; height: 10px; margin-top: -5px; border-radius: 2px; background: var(--accent); opacity: .55; max-width: calc(100% - 16px); }
.mb-val { position: relative; padding-left: 4px; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .mc-day { min-height: 56px; } .mc-ev { font-size: 10px; } }
@media (max-width: 640px) { .vb-row { grid-template-columns: 7.5rem 1fr 5.5rem; } }
