/* Simple License — portal.
   Vizual dil simpler.az-ın işıqlı (cream) bölmələrindən götürülüb: cream fon, ink mətn,
   Plus Jakarta Sans, coral→magenta→violet→indigo qradiyenti, şüşə kartlar, nöqtə toru.
   Mobil birinci: bütün ekranlar 360 px-də də tam işlək qalır. */

@font-face {
    font-family: "Simple";
    src: url("/fonts/SimpleFont-Bold.ttf") format("truetype");
    font-weight: 700;
    font-display: swap;
}

:root {
    --ink: #0A0014;
    --ink-rich: #14081F;
    --cream: #FAFAF9;
    --cream-warm: #F5F1EE;

    --magenta: #EC4899;
    --violet: #A855F7;
    --indigo: #6366F1;
    --coral: #FB7185;

    --ink-muted: rgba(10, 0, 20, .62);
    --ink-faint: rgba(10, 0, 20, .45);
    --rule: rgba(10, 0, 20, .08);
    --rule-strong: rgba(10, 0, 20, .14);

    --ok: #047857;
    --ok-soft: rgba(4, 120, 87, .10);
    --warn: #B45309;
    --warn-soft: rgba(180, 83, 9, .10);
    --stop: #BE123C;
    --stop-soft: rgba(190, 18, 60, .10);

    --gradient-brand: linear-gradient(120deg, #FB7185 0%, #EC4899 35%, #A855F7 75%, #6366F1 100%);
    --shadow-soft: 0 4px 24px -8px rgba(10, 0, 20, .18);
    --shadow-premium: 0 24px 60px -20px rgba(10, 0, 20, .18);
    --expo: cubic-bezier(.16, 1, .3, 1);

    --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--cream);
    color: var(--ink);
    font: 15px/1.6 "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
    letter-spacing: -0.01em;
    overflow-x: hidden;
}

/* Dekorativ fon — simpler.az-ın cream bölmələri kimi. */
body::before, body::after { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; }
body::before {
    background:
        radial-gradient(46rem 30rem at 10% -12%, rgba(236, 72, 153, .10), transparent 62%),
        radial-gradient(42rem 28rem at 92% -6%, rgba(99, 102, 241, .10), transparent 62%);
}
body::after {
    background-image: radial-gradient(rgba(10, 0, 20, .06) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(to bottom, #000 5%, transparent 70%);
    -webkit-mask-image: linear-gradient(to bottom, #000 5%, transparent 70%);
}

.app { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 1.75rem 1rem 4rem; }
.app.narrow { max-width: 30rem; }

*:focus-visible { outline: 2px solid var(--magenta); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(236, 72, 153, .22); }

a.link { color: var(--indigo); text-decoration: none; font-weight: 600; }
a.link:hover { text-decoration: underline; }

/* ── brend ──────────────────────────────────────────────────────────────── */

.brandhead { text-align: center; margin: 1.5rem 0 2rem; }
.wordmark { width: min(220px, 60vw); height: auto; display: block; margin: 0 auto .75rem; }
.wordmark.small { width: 104px; margin: 0; }

.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.brand-sub {
    font-family: "Simple", "Plus Jakarta Sans", sans-serif;
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ink);
    padding-top: .1rem;
}

/* ── üst panel ──────────────────────────────────────────────────────────── */

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(250, 250, 249, .78);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--rule);
    transition: box-shadow .25s var(--expo), background .25s var(--expo);
}
/* Sürüşəndə üst panel səhifədən ayrılır — sərhəd xətti tək başına bunu vermir. */
.topbar.scrolled { box-shadow: 0 10px 30px -22px rgba(10, 0, 20, .55); background: rgba(250, 250, 249, .92); }

.topbar-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: .55rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Masaüstü: çekmece qabı yoxa çıxır, uşaqları üst panelin öz uşaqları kimi düzülür. */
.drawer { display: contents; }
.drawer-head { display: none; }

.nav { display: flex; align-items: center; gap: .1rem; flex: 1; min-width: 0; }
.nav-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
    color: var(--ink-muted);
    font-weight: 600;
    font-size: .9375rem;
    padding: .5rem .75rem;
    border-radius: 11px;
    white-space: nowrap;
    position: relative;
    transition: background .18s var(--expo), color .18s var(--expo);
}
.nav-icon { display: none; width: 20px; height: 20px; flex: 0 0 auto; fill: none;
            stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-link:hover { background: var(--cream-warm); color: var(--ink); }
.nav-link.active { color: var(--ink); background: rgba(236, 72, 153, .09); }
/* Aktiv bölmə: altdan qradiyent zolaq. Dolu qradiyent fon 6 bənddə səs-küy yaradır. */
.nav-link.active::after {
    content: "";
    position: absolute;
    left: .75rem; right: .75rem; bottom: .18rem;
    height: 2px; border-radius: 2px;
    background: var(--gradient-brand);
}

.topbar-end { display: flex; align-items: center; gap: .65rem; margin-left: auto; flex: 0 0 auto; }

.userchip { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.avatar {
    width: 2rem; height: 2rem; flex: 0 0 auto;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--gradient-brand);
    color: #fff;
    font-size: .6875rem; font-weight: 800; letter-spacing: .02em;
    box-shadow: 0 6px 16px -8px rgba(236, 72, 153, .8);
}
.userchip-meta { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.userchip-name { font-size: .8125rem; font-weight: 700; letter-spacing: -0.01em;
                 overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 9rem; }
.userchip-role { font-size: .6875rem; font-weight: 700; letter-spacing: .08em;
                 text-transform: uppercase; color: var(--ink-faint); }

.nav-toggle {
    display: none;
    width: 2.5rem; height: 2.5rem;
    padding: 0;
    margin-left: auto;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--rule-strong);
    color: var(--ink);
    box-shadow: var(--shadow-soft);
    place-items: center;
}

.nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 35;
    background: rgba(10, 0, 20, .42);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s var(--expo), visibility .28s var(--expo);
}
body.nav-open .nav-scrim { opacity: 1; visibility: visible; }
body.nav-open { overflow: hidden; }

/* Dar masaüstündə altı bənd, ad və çıxış düyməsi bir sətrə sığmır — ad gizlənir. */
@media (min-width: 1025px) and (max-width: 1180px) {
    .nav-link { padding: .5rem .58rem; font-size: .875rem; }
    .userchip-meta { display: none; }
}

/* ── səhifə başlığı ─────────────────────────────────────────────────────── */

.pagehead { margin: .5rem 0 1.5rem; }
.page-title {
    font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem);
    line-height: 1.1;
    margin: 0 0 .3rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.back { display: inline-block; margin-bottom: .5rem; color: var(--ink-faint); text-decoration: none; font-size: .875rem; font-weight: 600; }
.back:hover { color: var(--ink); }

h1 {
    font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem);
    line-height: 1.1;
    margin: 0 0 .4rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}
h2 { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 .9rem; }
h3 { font-size: .9375rem; font-weight: 700; margin: 1.25rem 0 .6rem; }

.lede { margin: 0; color: var(--ink-muted); }
.hint { margin: -.15rem 0 .9rem; color: var(--ink-faint); font-size: .875rem; }
.hint.mono { font-family: var(--mono); word-break: break-all; }
.foot { margin-top: 2rem; color: var(--ink-faint); font-size: .8125rem; text-align: center; }

/* ── kartlar ────────────────────────────────────────────────────────────── */

.card {
    background: rgba(255, 255, 255, .74);
    backdrop-filter: saturate(180%) blur(24px);
    -webkit-backdrop-filter: saturate(180%) blur(24px);
    border: 1px solid var(--rule);
    border-radius: 20px;
    padding: 1.35rem;
    margin-bottom: 1.15rem;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, var(--shadow-premium);
}

/* ── formalar və düymələr ───────────────────────────────────────────────── */

.form { display: flex; flex-direction: column; gap: .6rem; }
.form label { font-size: .8125rem; color: var(--ink-muted); font-weight: 500; }
.inline-form { display: flex; gap: .6rem; margin-bottom: 1rem; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 10rem; }

input, select {
    font: inherit;
    padding: .65rem .85rem;
    border: 1px solid var(--rule-strong);
    background: #fff;
    color: var(--ink);
    border-radius: 12px;
    max-width: 100%;
    transition: border-color .2s var(--expo), box-shadow .2s var(--expo);
}
input::placeholder { color: var(--ink-faint); }
input:hover, select:hover { border-color: rgba(10, 0, 20, .26); }
input:focus, select:focus { box-shadow: 0 0 0 4px rgba(236, 72, 153, .12); }

button {
    font: inherit;
    font-weight: 600;
    letter-spacing: -0.01em;
    padding: .65rem 1.2rem;
    border: 0;
    border-radius: 12px;
    background: var(--gradient-brand);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 12px 30px -12px rgba(236, 72, 153, .65);
    transition: transform .2s var(--expo), box-shadow .2s var(--expo);
}
button:hover:not(:disabled) { transform: translateY(-1px); }
button.ghost { background: #fff; border: 1px solid var(--rule-strong); color: var(--ink); box-shadow: var(--shadow-soft); }
button.ghost:hover:not(:disabled) { background: var(--cream-warm); }
button.small { padding: .4rem .8rem; font-size: .8125rem; }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.error { color: var(--stop); margin: .35rem 0 0; font-size: .9375rem; }

/* ── sayğaclar ──────────────────────────────────────────────────────────── */

.counters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-bottom: 1.15rem; }

/* Geniş ekranda sayğaclar BİR sətirdir — neçə olmasından asılı olmayaraq.
   `auto-flow: column` sayı koda yazmadan bunu verir. */
@media (min-width: 1025px) {
    .counters { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); grid-template-columns: none; }
    .counter { padding: .85rem .8rem; }
    .counter .value { font-size: 1.6rem; }
    .counter .label { font-size: .75rem; line-height: 1.3; }
}
.counter {
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(16px);
    -webkit-backdrop-filter: saturate(180%) blur(16px);
    border: 1px solid var(--rule);
    border-radius: 18px;
    padding: 1.05rem 1.2rem;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .9) inset, var(--shadow-soft);
    transition: transform .28s var(--expo), box-shadow .28s var(--expo), border-color .28s var(--expo);
}
.counter:hover {
    transform: translateY(-3px);
    border-color: rgba(236, 72, 153, .3);
    box-shadow: 0 14px 35px -12px rgba(10, 0, 20, .14), 0 1px 0 rgba(255, 255, 255, .9) inset;
}
.counter .value {
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.counter .label { color: var(--ink-muted); font-size: .8125rem; margin-top: .1rem; }
.counter.warn .value { background: none; color: var(--warn); }
.counter.stop .value { background: none; color: var(--stop); }

/* ── cədvəllər ──────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Uzun siyahı (tarixçə 200 sətir gətirir) altındakı hər şeyi ekrandan qovurdu: cədvəlin
   öz pəncərəsi var, səhifə deyil, o sürüşür. */
.table-wrap.scroll {
    max-height: 26rem;
    overflow-y: auto;
    border: 1px solid var(--rule);
    border-radius: 14px;
    padding: 0 .8rem;
    background: rgba(255, 255, 255, .6);
}
/* Sürüşən pəncərədə başlıq sətri görünən qalır — 200 sətirdən sonra «bu sütun nə idi?» */
.table-wrap.scroll thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #fff;
    padding-top: .6rem;
}
table { border-collapse: collapse; width: 100%; font-size: .9375rem; }
th {
    text-align: left;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-faint);
    padding: 0 .85rem .55rem 0;
    border-bottom: 1px solid var(--rule);
    white-space: nowrap;
}
td { padding: .65rem .85rem .65rem 0; border-bottom: 1px solid rgba(10, 0, 20, .06); vertical-align: top; }
td.num { font-family: var(--mono); font-size: .8125rem; font-variant-numeric: tabular-nums; }
td.wrap { white-space: normal; word-break: break-word; }
.nowrap { white-space: nowrap; }
.detail-cell { display: inline-block; max-width: 32rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

tr.selectable { cursor: pointer; transition: background .18s var(--expo); }
tr.selectable:hover td { background: rgba(236, 72, 153, .05); }

.sentinel { height: 1px; }
.more-wrap { display: flex; justify-content: center; margin-top: 1rem; }

/* ── cədvəl → kart (mobil) ──────────────────────────────────────────────── */

/* Detal ekranlarının cədvəlləri telefonda SƏTİR kimi oxunmur: altı sütun ekrana sığmır və
   sağa sürüşdürmək praktikada heç kimin etmədiyi hərəkətdir. Hər sətir karta çevrilir;
   sütun adı `data-label`-dan gəlir, ona görə başlıq sətrinə ehtiyac qalmır. */
@media (max-width: 640px) {
    .table-wrap.stacked table,
    .table-wrap.stacked tbody,
    .table-wrap.stacked tr,
    .table-wrap.stacked td { display: block; width: 100%; }
    .table-wrap.stacked thead { display: none; }
    .table-wrap.stacked { overflow-x: hidden; }

    .table-wrap.stacked tr {
        border: 1px solid var(--rule);
        border-radius: 14px;
        background: #fff;
        box-shadow: var(--shadow-soft);
        padding: .6rem .8rem;
        margin-bottom: .55rem;
    }
    .table-wrap.stacked td {
        border: 0;
        padding: .18rem 0;
        display: flex;
        gap: .8rem;
        justify-content: space-between;
        align-items: baseline;
        text-align: right;
    }
    .table-wrap.stacked td::before {
        content: attr(data-label);
        flex: 0 0 auto;
        text-align: left;
        font-size: .6875rem;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--ink-faint);
    }
    /* Boş başlıq = «məlumat yoxdur» sətri: onu iki sütuna bölmək mənasızdır. */
    .table-wrap.stacked td[data-label=""]::before { content: none; }
    .table-wrap.stacked .detail-cell { max-width: 100%; }
    .table-wrap.scroll { max-height: 22rem; padding: 0 .6rem; }
}

/* ── nişanlar ───────────────────────────────────────────────────────────── */

.pill {
    display: inline-block;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    padding: .2rem .55rem;
    border-radius: 999px;
    background: rgba(10, 0, 20, .06);
    color: var(--ink-muted);
    white-space: nowrap;
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.stop { background: var(--stop-soft); color: var(--stop); }

/* ── anonim status nəticəsi ─────────────────────────────────────────────── */

.result .headline { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 .8rem; }
.result dl, .detail { display: grid; grid-template-columns: auto 1fr; gap: .45rem 1.1rem; margin: 0; }
.result dt, .detail dt { color: var(--ink-faint); font-size: .875rem; }
.result dd, .detail dd { margin: 0; font-family: var(--mono); font-size: .875rem; word-break: break-word; }
.detail { margin-bottom: 1.15rem; }

/* ── hərəkət blokları ───────────────────────────────────────────────────── */

.actions { display: flex; flex-direction: column; gap: .65rem; }
.action-row { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.action-row > label { min-width: 5rem; color: var(--ink-faint); font-size: .875rem; }
.action-row .hint { margin: 0; }

/* ── tablar ─────────────────────────────────────────────────────────────── */

.tabs {
    display: flex;
    gap: .3rem;
    margin-bottom: 1rem;
    padding: .3rem;
    background: rgba(255, 255, 255, .7);
    border: 1px solid var(--rule);
    border-radius: 14px;
    width: fit-content;
    max-width: 100%;
    flex-wrap: wrap;
    box-shadow: var(--shadow-soft);
}
.tab {
    background: transparent;
    color: var(--ink-muted);
    border: 0;
    border-radius: 10px;
    padding: .45rem .9rem;
    font-weight: 600;
    font-size: .9375rem;
    box-shadow: none;
}
.tab:hover:not(.active) { background: var(--cream-warm); color: var(--ink); transform: none; }
.tab.active { background: var(--gradient-brand); color: #fff; }
.tabs.small .tab { font-size: .8125rem; padding: .35rem .7rem; }

.sub { font-size: .6875rem; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-faint); font-weight: 700; }

/* ── sənəd icazə matrisi ────────────────────────────────────────────────── */

.tree {
    max-height: 26rem;
    overflow-y: auto;
    border: 1px solid var(--rule);
    border-radius: 14px;
    padding: .7rem .9rem;
    background: rgba(255, 255, 255, .6);
}
.tree-page > summary { cursor: pointer; font-weight: 700; padding: .4rem 0; }
.tree-page > summary::marker { color: var(--violet); }
.tree-group { margin: .25rem 0 .65rem .8rem; }
.tree-documents { margin-left: 1.4rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.tree-line { display: flex; align-items: center; gap: .45rem; padding: .12rem 0; font-size: .9375rem; }
.tree-line input { width: auto; accent-color: var(--magenta); }
.tree-line .hint { margin: 0; font-size: .75rem; }

/* ── mobil ──────────────────────────────────────────────────────────────── */

/* ── çekmece: 1024 px-dən aşağı ─────────────────────────────────────────── */

@media (max-width: 1024px) {
    /* `backdrop-filter` sabit (fixed) övladlar üçün yeni istinad çərçivəsi yaradır — çekmece
       üst panelin içində qalıb ekranın hündürlüyünü ala bilmir. Mobildə bulanıqlıq əvəzinə
       demək olar tam qeyri-şəffaf fon: gözlə fərq yoxdur, düzülüş isə doğru işləyir. */
    .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(250, 250, 249, .96); }
    .topbar.scrolled { background: rgba(250, 250, 249, .98); }

    .topbar-inner { padding: .55rem .85rem; gap: .6rem; }
    .nav-toggle { display: grid; }

    .drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0; right: 0; bottom: 0;
        width: min(19rem, 84vw);
        z-index: 45;
        background: var(--cream);
        border-left: 1px solid var(--rule);
        box-shadow: -30px 0 60px -30px rgba(10, 0, 20, .45);
        padding: 1rem .85rem calc(1rem + env(safe-area-inset-bottom));
        overflow-y: auto;
        overscroll-behavior: contain;
        transform: translateX(101%);
        transition: transform .3s var(--expo);
    }
    body.nav-open .drawer { transform: none; }

    .drawer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: .5rem;
        padding: 0 .25rem .75rem .75rem;
        margin-bottom: .5rem;
        border-bottom: 1px solid var(--rule);
    }
    .drawer-title { font-size: .6875rem; font-weight: 700; letter-spacing: .14em;
                    text-transform: uppercase; color: var(--ink-faint); }
    .drawer-close {
        width: 2.25rem; height: 2.25rem;
        display: grid; place-items: center;
        padding: 0;
        font-size: 1.5rem; line-height: 1;
        background: #fff;
        border: 1px solid var(--rule-strong);
        color: var(--ink-muted);
        border-radius: 11px;
        box-shadow: none;
    }
    .drawer-close:hover { background: var(--cream-warm); color: var(--ink); }

    .nav { flex-direction: column; align-items: stretch; gap: .15rem; flex: 0 0 auto; }
    .nav-icon { display: block; }
    .nav-link { padding: .72rem .75rem; font-size: .9375rem; border-radius: 12px; }
    .nav-link.active { background: rgba(236, 72, 153, .1); }
    /* Mobildə aktiv nişan solda dayanır — barmaq altdakı 2 px zolağı görmür. */
    .nav-link.active::after { left: 0; right: auto; top: .55rem; bottom: .55rem; width: 3px; height: auto; }

    .topbar-end {
        margin: auto 0 0;
        flex-direction: column;
        align-items: stretch;
        gap: .7rem;
        padding-top: 1rem;
        border-top: 1px solid var(--rule);
    }
    .userchip { padding: 0 .2rem; }
    .avatar { width: 2.4rem; height: 2.4rem; font-size: .8125rem; }
    .userchip-name { font-size: .9375rem; max-width: none; }
    .logout { width: 100%; padding: .65rem 1rem; font-size: .9375rem; }
}

@media (max-width: 860px) {
    .app { padding: 1.25rem .85rem 3.5rem; }
    .card { padding: 1.1rem; border-radius: 16px; }
    .counters { grid-template-columns: repeat(auto-fit, minmax(45%, 1fr)); }
    .counter .value { font-size: 1.6rem; }
    .detail-cell { max-width: 14rem; }
    .result dl, .detail { grid-template-columns: 1fr; gap: .1rem .5rem; }
    .result dt, .detail dt { margin-top: .5rem; }
    .action-row > label { min-width: 100%; }
    /* Düymə mətni sətrə sığmayanda SÖZ deyil, SƏTİR qırılsın: yarı hündür düymə səliqəsiz görünür. */
    .action-row select { flex: 1; }
    .action-row button { flex: 1 1 auto; white-space: nowrap; }
    .tree-documents { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
    .counters { grid-template-columns: 1fr 1fr; }
    table { font-size: .875rem; }
    td { padding: .55rem .6rem .55rem 0; }
    .brand-sub { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* ── brend: kompakt işarə + «License» ───────────────────────────────────── */

.brand-mark { width: 34px; height: 34px; border-radius: 10px; display: block; }
.wordmark-sub {
    margin: .1rem 0 0;
    text-align: center;
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    color: var(--ink-muted);
}

/* ── kartlı siyahı ──────────────────────────────────────────────────────── */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
    gap: .8rem;
    align-items: start;
}

.tile {
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--rule-strong);
    border-radius: 18px;
    padding: 1.05rem 1.15rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    box-shadow: 0 4px 20px -6px rgba(10, 0, 20, .07);
    transition: transform .25s var(--expo), box-shadow .25s var(--expo), border-color .25s var(--expo);
}
.tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 45px -15px rgba(10, 0, 20, .16);
    border-color: rgba(236, 72, 153, .35);
}
.tile.is-off { opacity: .62; }

.tile-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.tile-title { font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }

.tile-facts { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem .8rem; margin: 0; }
.tile-facts dt { font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); }
.tile-facts dd { margin: 0; font-size: .9375rem; font-weight: 600; }

.tile-foot {
    display: flex; justify-content: space-between; gap: .5rem;
    padding-top: .55rem; border-top: 1px solid var(--rule);
    font-family: var(--mono); font-size: .75rem; color: var(--ink-muted);
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.tile-foot .dim { color: var(--ink-faint); }

/* Düymələr kartın içində, ayırıcı xəttin altında — şəbəkə xanası kimi asılı qalmır. */
.tile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    margin-top: -.15rem;
    padding-top: .6rem;
    border-top: 1px solid var(--rule);
}
.tile-actions button { flex: 1 1 auto; min-width: 5.5rem; }

/* Növ və məhsul — başlığın altında, faktlardan ayrı. */
.tile-tags { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin-top: -.2rem; }
.tag {
    font-size: .75rem; font-weight: 600;
    color: var(--ink-muted);
    background: rgba(10, 0, 20, .045);
    border-radius: 999px;
    padding: .18rem .6rem;
}

.pill.type { background: rgba(10, 0, 20, .07); color: var(--ink); }
.pill.type.mode-0 { background: var(--warn-soft); color: var(--warn); }
.pill.type.mode-1 { background: rgba(99, 102, 241, .12); color: var(--indigo); }
.pill.type.mode-2 { background: rgba(10, 0, 20, .07); color: var(--ink-muted); }
.pill.type.mode-3 { background: rgba(168, 85, 247, .14); color: #7E22CE; }

/* ── filtr çipləri ──────────────────────────────────────────────────────── */

.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .9rem; }
.chip {
    text-decoration: none;
    font-size: .875rem;
    font-weight: 600;
    color: var(--ink-muted);
    background: #fff;
    border: 1px solid var(--rule-strong);
    border-radius: 999px;
    padding: .35rem .85rem;
    white-space: nowrap;
}
.chip:hover { background: var(--cream-warm); color: var(--ink); }
.chip.active { background: var(--gradient-brand); border-color: transparent; color: #fff; }

/* ── + düyməsi və popup ─────────────────────────────────────────────────── */

.icon-button {
    width: 2.75rem; height: 2.75rem;
    padding: 0;
    border-radius: 14px;
    font-size: 1.5rem;
    line-height: 1;
    flex: 0 0 auto;
}
.pagehead.row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }

dialog#popup,
dialog#modules-dialog {
    border: 1px solid var(--rule);
    border-radius: 20px;
    padding: 0;
    width: min(30rem, calc(100vw - 2rem));
    background: var(--cream);
    color: var(--ink);
    box-shadow: var(--shadow-premium);
}
dialog#popup[open],
dialog#modules-dialog[open] {
    animation: pop-in .28s var(--expo) both;
}
@keyframes pop-in {
    from { opacity: 0; transform: scale(.95) translateY(12px); }
    to { opacity: 1; transform: none; }
}
dialog#popup::backdrop,
dialog#modules-dialog::backdrop { background: rgba(10, 0, 20, .45); backdrop-filter: blur(3px); }
.popup-form { display: flex; flex-direction: column; gap: .55rem; padding: 1.25rem; }
.popup-form h2 { margin: 0 0 .3rem; }
.popup-label { font-size: .8125rem; color: var(--ink-muted); font-weight: 600; margin-top: .35rem; }
.popup-form input, .popup-form select { width: 100%; }
.popup-actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: .9rem; }

/* ── kiçik detallar ─────────────────────────────────────────────────────── */

.mono { font-family: var(--mono); }
.break { word-break: break-all; }
dd.bad, .bad { color: var(--stop); font-weight: 700; }
a.counter { text-decoration: none; color: inherit; display: block; }

/* Üç xətt açıq vəziyyətdə çarpaza çevrilir — düymənin nə edəcəyi gözlə görünür. */
.burger { display: block; width: 1.05rem; height: 2px; background: var(--ink); border-radius: 2px;
          position: relative; transition: background .2s var(--expo); }
.burger::before, .burger::after {
    content: ""; position: absolute; left: 0; width: 1.05rem; height: 2px; border-radius: 2px;
    background: var(--ink); transition: transform .28s var(--expo), top .28s var(--expo);
}
.burger::before { top: -6px; }
.burger::after { top: 6px; }
body.nav-open .burger { background: transparent; }
body.nav-open .burger::before { top: 0; transform: rotate(45deg); }
body.nav-open .burger::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 860px) {
    .cards { grid-template-columns: 1fr; }
    .tile-facts { grid-template-columns: 1fr 1fr; }
    .pagehead.row { align-items: center; }
    .icon-button { width: 2.5rem; height: 2.5rem; font-size: 1.35rem; }
}

/* Dəyişikliyin maşına çatması — kartın altında bir sətir. */
.pickup { margin: 0; font-size: .75rem; font-weight: 600; }
.pickup.ok { color: var(--ok); }
.pickup.wait { color: var(--warn); }


/* ── saat zolağı (anonim ekran) ─────────────────────────────────────────── */

/* Yalnız saat göstərilir. Fərq varsa — bir sətir də o. Başqa heç nə. */
.clockstrip { display: flex; justify-content: center; margin: -.35rem 0 .5rem; }
.clockline {
    margin: 0;
    display: inline-flex;
    align-items: baseline;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: center;
    color: var(--ink-muted);
    font-size: .875rem;
}
.clock-time { font-family: var(--mono); font-size: 1rem; font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; }
.clock-drift { font-weight: 700; color: var(--warn); }
.clock-drift.bad { color: var(--stop); }

/* ── portal: məzmunun görünməsi ─────────────────────────────────────────── */

#outlet > * { animation: rise .32s var(--expo) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Yüklənmə: mətn əvəzinə nəbz — həmişə torun və ekranın mərkəzində. */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    color: var(--ink-muted);
    font-size: .95rem;
    font-weight: 600;
    margin: 2.5rem auto;
    padding: 2.5rem 1rem;
    width: 100%;
    text-align: center;
    grid-column: 1 / -1;
}
.loading::before {
    content: "";
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    border: 2.5px solid var(--rule-strong);
    border-top-color: var(--magenta);
    animation: spin .7s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }


/* ── maşın kartı ────────────────────────────────────────────────────────── */

.machine-head {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .8rem .9rem;
    margin-bottom: 1rem;
    border: 1px solid var(--rule);
    border-radius: 14px;
    background: linear-gradient(120deg, rgba(236, 72, 153, .06), rgba(99, 102, 241, .06));
}
.machine-icon { width: 30px; height: 30px; flex: 0 0 auto; color: var(--violet); }
.machine-title { min-width: 0; }
.machine-name {
    margin: 0;
    font-family: var(--mono);
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    word-break: break-all;
}
.machine-sub { margin: .1rem 0 0; color: var(--ink-muted); font-size: .8125rem; }

/* ── giriş ekranı ───────────────────────────────────────────────────────── */

.auth { padding: 1.6rem 1.5rem; }
.auth-step { display: flex; flex-direction: column; gap: .75rem; animation: rise .3s var(--expo) both; }

.field-label { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
               color: var(--ink-faint); margin: .35rem 0 -.35rem .2rem; }
.field-wrap { position: relative; display: flex; }
.field-wrap input { width: 100%; padding-left: 2.85rem; padding-top: .8rem; padding-bottom: .8rem; }
.field-icon {
    position: absolute; left: .95rem; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; pointer-events: none;
    fill: none; stroke: var(--ink-faint); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
    transition: stroke .2s var(--expo);
}
.field-wrap:focus-within .field-icon { stroke: var(--magenta); }

button.wide { width: 100%; display: flex; align-items: center; justify-content: center; gap: .5rem;
              padding: .85rem 1.2rem; }
.btn-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7;
            stroke-linecap: round; stroke-linejoin: round; }

/* «və ya» ayırıcısı — iki giriş yolunun bərabər olduğunu göstərir. */
.or { position: relative; text-align: center; margin: .35rem 0; }
.or::before { content: ""; position: absolute; inset-inline: 0; top: 50%; height: 1px; background: var(--rule); }
.or span { position: relative; background: rgba(255, 255, 255, .92); padding: 0 .75rem;
           font-size: .6875rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
           color: var(--ink-faint); }

.auth-hint { margin: -.2rem 0 0; text-align: center; font-size: .6875rem; font-weight: 600;
             letter-spacing: .05em; color: var(--ink-faint); }

.step-head { display: flex; align-items: flex-start; gap: .75rem; margin-bottom: .35rem; }
.step-head h2 { margin: 0; font-size: 1.0625rem; }
.step-sub { margin: .15rem 0 0; font-size: .8125rem; color: var(--ink-muted); }
.step-icon {
    flex: 0 0 auto; width: 2.5rem; height: 2.5rem; display: grid; place-items: center;
    border-radius: 13px; background: rgba(168, 85, 247, .12);
}
.step-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--violet);
                 stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.step-head.warn .step-icon { background: var(--warn-soft); }
.step-head.warn .step-icon svg { stroke: var(--warn); }

.steps { margin: 0; padding-left: 1.15rem; color: var(--ink-muted); font-size: .875rem; line-height: 1.65; }
.steps b { color: var(--ink); }

.qr-frame { display: flex; justify-content: center; }
.qr-frame img { width: 12.5rem; height: 12.5rem; border-radius: 16px; background: #fff;
                border: 1px solid var(--rule); padding: .5rem; }

.secret-box { border: 1px solid var(--rule); border-radius: 14px; padding: .7rem .85rem;
              background: rgba(255, 255, 255, .7); }
.secret-label { margin: 0 0 .35rem; font-size: .6875rem; font-weight: 700; letter-spacing: .1em;
                text-transform: uppercase; color: var(--ink-faint); }
.secret-row { display: flex; align-items: center; gap: .5rem; }
.secret-row code { flex: 1; font-family: var(--mono); font-size: .8125rem; word-break: break-all; }

/* Altı xana: rəqəm-rəqəm yazmaq telefon klaviaturasında ən az səhv edilən formadır. */
.otp { display: flex; justify-content: center; gap: .45rem; direction: ltr; }
.otp-box {
    width: 2.75rem; height: 3.4rem; padding: 0;
    text-align: center; font-family: var(--mono); font-size: 1.25rem;
    border-radius: 14px;
}
.otp-box:focus { border-color: var(--violet); }

.code-field { width: 100%; text-align: center; font-family: var(--mono); font-size: 1.05rem;
              letter-spacing: .18em; text-transform: uppercase; padding: .85rem; }

.codes-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem;
              border: 1px solid var(--warn-soft); border-radius: 14px;
              background: var(--warn-soft); padding: .8rem; }
.codes-grid code { text-align: center; font-family: var(--mono); font-size: .875rem; color: var(--warn); }

.auth-links { display: flex; justify-content: space-between; gap: .5rem; }
.linkish { background: none; border: 0; box-shadow: none; padding: .35rem .1rem;
           color: var(--ink-faint); font-size: .8125rem; font-weight: 600; }
.linkish:hover { color: var(--ink); transform: none; }

/* Səhv kod: forma «başını yırğalayır» — mesajı oxumadan da anlaşılır. */
.shake { animation: shake .35s var(--expo); }
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ── lisenziyanın vaxt vəziyyəti: rəngli kənar ──────────────────────────── */

.tile.is-expired, .tile.is-soon { border-left-width: 4px; border-left-style: solid; }
.tile.is-expired { border-left-color: var(--stop); background: linear-gradient(90deg, var(--stop-soft), #fff 42%); }
.tile.is-soon { border-left-color: var(--warn); background: linear-gradient(90deg, var(--warn-soft), #fff 42%); }
.tile.is-off { opacity: .55; filter: grayscale(.35); }

/* Profil keçidi — üst paneldəki istifadəçi bloku. */
a.userchip { text-decoration: none; color: inherit; border-radius: 12px; padding: .2rem .3rem;
             transition: background .18s var(--expo); }
a.userchip:hover { background: var(--cream-warm); }
#fresh-codes { margin-top: .8rem; }

/* ── toast bildirişləri ─────────────────────────────────────────────────── */

.toasts {
    position: fixed;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    z-index: 60;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .5rem;
    pointer-events: none;
}
.toast {
    pointer-events: auto;
    cursor: pointer;
    max-width: min(24rem, calc(100vw - 2rem));
    padding: .7rem 1rem;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--rule);
    border-left: 4px solid var(--ok);
    box-shadow: var(--shadow-premium);
    font-size: .875rem;
    font-weight: 600;
    color: var(--ink);
    animation: toast-in .28s var(--expo) both;
}
.toast.warn { border-left-color: var(--warn); }
.toast.stop { border-left-color: var(--stop); }
.toast.leaving { animation: toast-out .22s var(--expo) both; }

@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(14px); } }

@media (max-width: 560px) {
    .toasts { left: 1rem; right: 1rem; align-items: stretch; }
    .toast { max-width: none; }
}

/* ── kliklə kopyalama ───────────────────────────────────────────────────── */

.copy-chip { display: inline-flex; align-items: center; gap: .3rem; max-width: 100%; }
.copy-chip > span { overflow: hidden; text-overflow: ellipsis; }
.copy-btn {
    flex: 0 0 auto;
    width: 1.6rem; height: 1.6rem;
    display: grid; place-items: center;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 7px;
    box-shadow: none;
    color: var(--ink-faint);
    transition: background .15s var(--expo), color .15s var(--expo);
}
.copy-btn svg { width: 14px; height: 14px; fill: none; stroke: currentColor;
                stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.copy-btn:hover { background: rgba(10, 0, 20, .07); color: var(--ink); transform: none; }
/* Təsdiq: nişan qısa müddət «✓»-ə çevrilir, mesaj gözləməyə ehtiyac qalmır. */
.copy-btn.copied { color: var(--ok); background: var(--ok-soft); }
.copy-btn.copied svg { display: none; }
.copy-btn.copied::after { content: "✓"; font-size: .8rem; font-weight: 800; }

/* ── yüklənmə ───────────────────────────────────────────────────────────── */

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    padding: 2.5rem 1rem;
    color: var(--ink-faint);
    font-size: .875rem;
}
.loading::before {
    width: 1.85rem; height: 1.85rem;
    border-width: 2.5px;
}

/* ── siyahı paneli: yapışqan axtarış + görünüş keçidi ───────────────────── */

/* Üst panelin hündürlüyü — yapışqan elementlər ona söykənir. */
:root { --topbar-h: 3.35rem; }

/* Çiplər və axtarış sətri BİR yapışqan blokdadır. Ayrı duranda panelin mənfi üst kənarı
   (kartın kənarına çatmaq üçün lazımdır) çiplərin üstünü örtürdü — düymələrlə axtarış
   qutusu bir-birinin içinə keçmiş görünürdü. */
.list-bar {
    position: sticky;
    top: var(--topbar-h);
    z-index: 15;
    display: flex;
    flex-direction: column;
    /* Kartın öz kənarına qədər uzanır ki, altındakı sətirlər kənardan görünməsin. */
    margin: -1.35rem -1.35rem .2rem;
    padding: 1rem 1.35rem .35rem;
    background: linear-gradient(rgba(255, 255, 255, .96) 86%, rgba(255, 255, 255, 0));
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.list-tools { display: flex; align-items: flex-start; gap: .6rem; }
.list-bar .chips { margin-bottom: .6rem; }
.list-bar .inline-form { flex: 1; margin-bottom: .6rem; }

.view-toggle {
    display: flex;
    gap: .2rem;
    padding: .22rem;
    border: 1px solid var(--rule-strong);
    border-radius: 12px;
    background: #fff;
    flex: 0 0 auto;
}
.view-btn {
    width: 2.15rem; height: 2.15rem;
    display: grid; place-items: center;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 9px;
    box-shadow: none;
    color: var(--ink-faint);
}
.view-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor;
                stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.view-btn:hover { background: var(--cream-warm); color: var(--ink); transform: none; }
.view-btn.active { background: var(--gradient-brand); color: #fff; }

@media (max-width: 640px) {
    .list-bar { margin: -1.1rem -1.1rem .2rem; padding: .85rem 1.1rem .35rem; }
    .view-toggle { display: none; }   /* mobildə cədvəl onsuz da oxunmur */

    /* Çiplər iki sətrə qırılıb yapışqan panelin yarısını yeməsin: bir sətir, yana sürüşür. */
    .list-bar .chips {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        margin-bottom: .5rem;
        padding-bottom: .15rem;
    }
    .list-bar .chips::-webkit-scrollbar { display: none; }
}

/* ── axtarışlı şirkət seçimi ────────────────────────────────────────────── */

.suggest {
    position: relative;
    max-height: 14rem;
    overflow-y: auto;
    margin-top: .3rem;
    border: 1px solid var(--rule-strong);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}
.suggest-item {
    display: flex;
    justify-content: space-between;
    gap: .6rem;
    width: 100%;
    padding: .55rem .75rem;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    color: var(--ink);
    font-weight: 600;
    font-size: .875rem;
    text-align: left;
}
.suggest-item:hover { background: var(--cream-warm); transform: none; }
.suggest-item .dim { color: var(--ink-faint); font-family: var(--mono); font-size: .75rem; }
.suggest-item.create { color: var(--indigo); }

/* ── kart və cədvəl detalları ───────────────────────────────────────────── */

.tile-facts .span-2 { grid-column: 1 / -1; }
.tile.flat { cursor: default; }
.tile.flat:hover { transform: none; box-shadow: var(--shadow-soft); }
.audit-detail { margin: 0; font-size: .75rem; color: var(--ink-muted); word-break: break-word; }

.menus-search { width: 100%; margin-bottom: .7rem; }

/* ── maşın kartının WMI blokları ────────────────────────────────────────── */

.machine-group {
    margin-top: .6rem;
    border: 1px solid var(--rule);
    border-radius: 14px;
    background: rgba(255, 255, 255, .7);
    padding: .5rem .85rem;
}
.machine-group > summary { cursor: pointer; font-weight: 700; font-size: .9375rem; padding: .3rem 0; }
.machine-group > summary::marker { color: var(--violet); }
.wmi-block { padding: .5rem 0; border-top: 1px solid var(--rule); }
.wmi-block:first-of-type { border-top: 0; }
.wmi-index { margin: 0 0 .3rem; font-size: .6875rem; font-weight: 700; letter-spacing: .1em;
             text-transform: uppercase; color: var(--ink-faint); }
.detail.tight { gap: .2rem .9rem; margin-bottom: .4rem; }
.wmi-all > summary { cursor: pointer; font-size: .75rem; color: var(--ink-faint); padding: .2rem 0; }
.wmi-all[open] > summary { color: var(--ink-muted); }

/* Brend sözü daha oxunaqlı və iri. */
.brand-sub { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; }
@media (max-width: 460px) { .brand-sub { font-size: 1.35rem; } }

/* Paylaşma səhifəsindəki sənəd siyahısı popup-u. Çərçivəsi yuxarıdakı `dialog#popup` ilə
   ortaqdır; burada yalnız başlıq sətri və siyahının özü var. */
.dialog-head {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 1rem 1.25rem .6rem;
    border-bottom: 1px solid var(--rule);
}
.dialog-head .hint { margin: 0; flex: 1; }
.dialog-head .ghost { border: 0; background: none; cursor: pointer; font-size: 1.4rem; line-height: 1; color: var(--ink-muted); }
.dialog-head .ghost:hover { color: var(--ink); }

ul.modules {
    margin: 0;
    padding: .75rem 1.25rem 1.25rem 2.25rem;
    max-height: min(60vh, 26rem);
    overflow-y: auto;
}
ul.modules li { padding: .15rem 0; }

/* Cədvəldəki «+N» — mətn kimi görünən, amma toxunula bilən düymə. */
button.hint.more {
    border: 0;
    background: none;
    padding: 0 .15rem;
    margin: 0;
    cursor: pointer;
    font: inherit;
    color: var(--ink-faint);
    text-decoration: underline dotted;
}
button.hint.more:hover { color: var(--ink); }
