/* =====================================================================
   Qəbul — üslub vərəqi
   Rəng məntiqi: MAVİ = dövlət sifarişi, QIZILI = ödənişli, QIRMIZI = risk.
   Rəng burada bəzək deyil — məlumat daşıyır.
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;700;800&family=IBM+Plex+Mono:wght@400;600&family=IBM+Plex+Sans:wght@400;500;600&display=swap');

:root {
    --ink:    #101A33;
    --paper:  #EEF1F7;
    --card:   #FFFFFF;
    --form:   #2A44C8;
    --form-d: #1B2E96;
    --gold:   #9C6A04;
    --gold-l: #F0E2C0;
    --alarm:  #C81E2E;
    --alarm-l:#FBE7E9;
    --safe:   #0F7A54;
    --slate:  #5A6685;
    --rule:   #D5DCEA;

    --display: 'Archivo', system-ui, sans-serif;
    --body:    'IBM Plex Sans', system-ui, sans-serif;
    --mono:    'IBM Plex Mono', ui-monospace, monospace;

    --pad: clamp(1rem, 4vw, 2.5rem);
    --maxw: 1180px;
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 16px;
    line-height: 1.55;
}

a { color: var(--form); text-decoration-thickness: 1px; text-underline-offset: 2px; }

:focus-visible {
    outline: 3px solid var(--form);
    outline-offset: 2px;
    border-radius: 2px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

/* ---------- Demo xəbərdarlığı ---------- */
.demo-strip {
    background: var(--ink);
    color: #FFD98A;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.02em;
    padding: 7px var(--pad);
    text-align: center;
}
.demo-strip b { color: #fff; }

/* ---------- Başlıq ---------- */
.site-head {
    background: var(--card);
    border-bottom: 1px solid var(--rule);
    position: sticky;
    top: 0;
    z-index: 40;
}
.site-head .wrap {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 62px;
}
.brand {
    font-family: var(--mono);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.brand-mark {
    width: 22px; height: 22px;
    background: var(--form);
    border-radius: 3px;
    position: relative;
    flex: none;
}
.brand-mark::after {
    content: '';
    position: absolute;
    left: 4px; right: 4px; bottom: 4px;
    height: 5px;
    background: #FFD98A;
    border-radius: 1px;
}
.site-nav { margin-left: auto; display: flex; gap: 1.4rem; align-items: center; }
.site-nav a {
    color: var(--slate);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
}
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); }
.site-nav .btn { color: #fff; }

@media (max-width: 720px) {
    .site-nav { gap: .9rem; font-size: 13px; }
    .site-nav a { font-size: 13px; }
    .site-nav .hide-sm { display: none; }
}

/* ---------- Düymələr ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background: var(--form);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: .7rem 1.15rem;
    font-family: var(--body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s ease, transform .1s ease;
}
.btn:hover { background: var(--form-d); }
.btn:active { transform: translateY(1px); }
.btn--ghost {
    background: transparent;
    color: var(--ink);
    border: 1px solid var(--rule);
}
.btn--ghost:hover { background: #fff; border-color: var(--slate); }
.btn--sm { padding: .42rem .7rem; font-size: 13.5px; border-radius: 5px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem); }
.hero-grid {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: center;
}
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.eyebrow {
    font-family: var(--mono);
    font-size: 12.5px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--form);
    margin: 0 0 1rem;
}
h1.hero-title {
    font-family: var(--display);
    font-weight: 800;
    font-size: clamp(2.3rem, 6.2vw, 4rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
    margin: 0 0 1.1rem;
}
h1.hero-title em {
    font-style: normal;
    color: var(--alarm);
    position: relative;
    white-space: nowrap;
}
h1.hero-title em::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: .08em;
    height: .09em;
    background: repeating-linear-gradient(90deg, var(--alarm) 0 6px, transparent 6px 11px);
}
.hero-lede {
    font-size: clamp(1rem, 1.6vw, 1.16rem);
    color: var(--slate);
    max-width: 44ch;
    margin: 0 0 1.8rem;
}
.hero-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

/* ---------- İMZA ELEMENT: nərdivan ---------- */
.ladder {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 1.1rem 1.1rem 1rem;
    box-shadow: 0 1px 0 rgba(16,26,51,.04), 0 12px 32px -18px rgba(16,26,51,.35);
}
.ladder-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--slate);
    padding-bottom: .7rem;
    border-bottom: 1px solid var(--rule);
    margin-bottom: .3rem;
}
.rung {
    display: grid;
    grid-template-columns: 26px 1fr auto;
    gap: .7rem;
    align-items: center;
    padding: .55rem 0;
    border-bottom: 1px dotted var(--rule);
}
.rung:last-of-type { border-bottom: none; }
.rung-no {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--slate);
    text-align: right;
}
.rung-body { min-width: 0; }
.rung-name {
    font-size: 14.5px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rung-meta {
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--slate);
    display: flex;
    gap: .5rem;
    align-items: center;
    margin-top: 2px;
}
.tag {
    font-family: var(--mono);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .04em;
    padding: 1px 5px;
    border-radius: 3px;
    text-transform: uppercase;
}
.tag--state { background: #E3E8FB; color: var(--form-d); }
.tag--paid  { background: var(--gold-l); color: var(--gold); }

.rung-bar {
    width: clamp(78px, 22%, 130px);
    display: flex;
    align-items: center;
    gap: .5rem;
}
.bar-track {
    flex: 1;
    height: 7px;
    background: #E6EAF3;
    border-radius: 4px;
    overflow: hidden;
}
.bar-fill {
    height: 100%;
    border-radius: 4px;
    background: var(--form);
    width: 0;
    transition: width .5s cubic-bezier(.22,.8,.3,1);
}
.bar-fill[data-level="safe"] { background: var(--safe); }
.bar-fill[data-level="mid"]  { background: var(--form); }
.bar-fill[data-level="low"]  { background: #B9C1D8; }
.bar-pct {
    font-family: var(--mono);
    font-size: 12.5px;
    font-weight: 600;
    min-width: 34px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Deşik zonası — səhifənin yadda qalan yeri */
.hole {
    margin-top: .5rem;
    border-radius: 8px;
    border: 1.5px dashed var(--alarm);
    background:
        repeating-linear-gradient(135deg,
            var(--alarm-l) 0 9px,
            #fff 9px 18px);
    padding: .85rem .9rem;
    display: flex;
    gap: .75rem;
    align-items: flex-start;
}
.hole-pct {
    font-family: var(--display);
    font-weight: 800;
    font-size: 1.9rem;
    line-height: 1;
    color: var(--alarm);
    font-variant-numeric: tabular-nums;
}
.hole-text { font-size: 13.5px; color: var(--ink); }
.hole-text b { display: block; font-size: 12px; font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--alarm); margin-bottom: 2px; }

.ladder-foot {
    margin-top: .8rem;
    padding-top: .7rem;
    border-top: 1px solid var(--rule);
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 13px;
    color: var(--slate);
}
.ladder-foot strong {
    font-family: var(--display);
    font-size: 1.35rem;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

/* ---------- Bölmələr ---------- */
.section { padding: clamp(2rem, 5vw, 3.5rem) 0; }
.section--alt { background: var(--card); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
h2.sec-title {
    font-family: var(--display);
    font-weight: 700;
    font-size: clamp(1.5rem, 3.2vw, 2.1rem);
    letter-spacing: -0.025em;
    margin: 0 0 .6rem;
}
.sec-lede { color: var(--slate); max-width: 62ch; margin: 0 0 2rem; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 780px) { .steps { grid-template-columns: 1fr; gap: 1.1rem; } }
.step { border-top: 2px solid var(--ink); padding-top: .85rem; }
.step-k {
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: .08em;
    color: var(--form);
    text-transform: uppercase;
    margin-bottom: .35rem;
}
.step h3 { font-family: var(--display); font-size: 1.12rem; margin: 0 0 .4rem; letter-spacing: -.015em; }
.step p { margin: 0; font-size: 14.5px; color: var(--slate); }

/* ---------- Qurucu ---------- */
.builder {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (max-width: 940px) { .builder { grid-template-columns: 1fr; } }

.panel {
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 10px;
    overflow: hidden;
}
.panel-head {
    padding: .85rem 1rem;
    border-bottom: 1px solid var(--rule);
    display: flex;
    align-items: center;
    gap: .6rem;
    flex-wrap: wrap;
}
.panel-head h2 {
    font-family: var(--display);
    font-size: 1.02rem;
    margin: 0;
    letter-spacing: -.015em;
}
.panel-body { padding: 1rem; }

.field { display: flex; flex-direction: column; gap: .32rem; margin-bottom: .9rem; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field .hint { font-size: 12.5px; color: var(--slate); }
input[type=text], input[type=number], input[type=password], input[type=search], select {
    font-family: var(--body);
    font-size: 15px;
    padding: .62rem .7rem;
    border: 1px solid var(--rule);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    width: 100%;
}
input[type=number] { font-family: var(--mono); font-weight: 600; }
input:focus, select:focus { border-color: var(--form); }

.score-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }

.catalog { max-height: 460px; overflow-y: auto; margin: 0; padding: 0; list-style: none; }
.cat-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: .6rem;
    align-items: center;
    padding: .6rem .25rem;
    border-bottom: 1px dotted var(--rule);
}
.cat-item:last-child { border-bottom: none; }
.cat-name { font-size: 14.5px; font-weight: 500; }
.cat-meta { font-family: var(--mono); font-size: 11.5px; color: var(--slate); margin-top: 1px; }
.cat-add { display: flex; gap: .3rem; }

.empty {
    text-align: center;
    padding: 2.4rem 1rem;
    color: var(--slate);
    font-size: 14.5px;
}
.empty b { display: block; color: var(--ink); font-family: var(--display); font-size: 1.05rem; margin-bottom: .3rem; }

.issue {
    display: flex;
    gap: .6rem;
    padding: .7rem .8rem;
    border-radius: 7px;
    font-size: 13.8px;
    margin-bottom: .5rem;
    border: 1px solid;
}
.issue--hole { background: var(--alarm-l); border-color: #F0BEC3; color: #7A1119; }
.issue--note { background: #FFF8E6; border-color: #EBD9A6; color: #6B4E06; }
.issue--ok   { background: #E9F6F0; border-color: #B6DFCC; color: #0B5A3E; }

.list-row {
    display: grid;
    grid-template-columns: 22px 1fr auto;
    gap: .6rem;
    align-items: center;
    padding: .5rem 0;
    border-bottom: 1px dotted var(--rule);
}
.row-tools { display: flex; gap: .2rem; }
.icon-btn {
    border: 1px solid var(--rule);
    background: #fff;
    border-radius: 5px;
    width: 27px; height: 27px;
    font-size: 13px;
    line-height: 1;
    cursor: pointer;
    color: var(--slate);
}
.icon-btn:hover { border-color: var(--slate); color: var(--ink); }
.icon-btn--del:hover { border-color: var(--alarm); color: var(--alarm); }

/* ---------- Cədvəl ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--rule); border-radius: 10px; }
table.data { border-collapse: collapse; width: 100%; font-size: 14px; }
table.data th {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--slate);
    text-align: left;
    padding: .7rem .8rem;
    border-bottom: 1px solid var(--rule);
    white-space: nowrap;
    position: sticky; top: 0; background: var(--card);
}
table.data td { padding: .58rem .8rem; border-bottom: 1px solid #EDF0F6; }
table.data tr:last-child td { border-bottom: none; }
table.data td.num { font-family: var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
table.data td.state { color: var(--form-d); font-weight: 600; }
table.data td.paid  { color: var(--gold); font-weight: 600; }
table.data tbody tr:hover { background: #F7F9FD; }

.filters { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filters input[type=search] { max-width: 300px; }
.filters select { max-width: 190px; }

/* ---------- Auth ---------- */
.auth-card {
    max-width: 400px;
    margin: clamp(2rem,6vw,4rem) auto;
    background: var(--card);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 1.6rem;
}
.auth-card h1 { font-family: var(--display); font-size: 1.5rem; margin: 0 0 .3rem; letter-spacing: -.02em; }
.auth-card .sub { color: var(--slate); font-size: 14px; margin: 0 0 1.3rem; }
.alert { background: var(--alarm-l); border: 1px solid #F0BEC3; color: #7A1119; padding: .65rem .8rem; border-radius: 6px; font-size: 13.5px; margin-bottom: 1rem; }
.notice { background: #E9F6F0; border: 1px solid #B6DFCC; color: #0B5A3E; padding: .65rem .8rem; border-radius: 6px; font-size: 13.5px; margin-bottom: 1rem; }

/* ---------- Alt ---------- */
.site-foot {
    border-top: 1px solid var(--rule);
    margin-top: 3rem;
    padding: 2rem 0 3rem;
    font-size: 13px;
    color: var(--slate);
}
.site-foot .wrap { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: space-between; }
.disclaimer { max-width: 52ch; }

/* ---------- Yüklənmə ardıcıllığı ---------- */
@media (prefers-reduced-motion: no-preference) {
    .stagger > * { animation: rise .5s cubic-bezier(.22,.8,.3,1) backwards; }
    .stagger > *:nth-child(1) { animation-delay: .04s; }
    .stagger > *:nth-child(2) { animation-delay: .10s; }
    .stagger > *:nth-child(3) { animation-delay: .16s; }
    .stagger > *:nth-child(4) { animation-delay: .22s; }
    @keyframes rise { from { opacity: 0; transform: translateY(10px); } }
}
@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}

/* ---------- Mobil dəqiqləşdirmələr ---------- */
@media (max-width: 520px) {
    .rung { grid-template-columns: 20px 1fr; row-gap: .3rem; }
    .rung-bar { grid-column: 2; width: 100%; }
    .rung-name { white-space: normal; }
    .hero-actions .btn { flex: 1 1 100%; }
    .panel-body { padding: .85rem; }
    .catalog { max-height: 340px; }
    .cat-item { grid-template-columns: 1fr; }
    .cat-add { justify-content: flex-start; }
    .demo-strip { font-size: 11px; line-height: 1.4; text-align: left; }
    .site-foot .wrap { flex-direction: column; gap: .8rem; }
}

/* Sürüşdürmə zolağı — kataloq üçün */
.catalog::-webkit-scrollbar { width: 9px; }
.catalog::-webkit-scrollbar-thumb { background: #C9D2E4; border-radius: 5px; }
.catalog::-webkit-scrollbar-track { background: transparent; }
