/* =========================================================
   Hazırlıq Mərkəzi — dizayn sistemi (UI prototipinə uyğun)
   ========================================================= */

:root {
    --navy: #13233F;
    --navy-2: #1A2D4D;
    --navy-active: #22375C;
    --navy-line: #34507E;
    --nav-text: #C9D3E3;
    --nav-muted: #9FB0C9;

    --primary: #2B6BE4;
    --primary-dark: #174AA6;
    --primary-soft: #E8EFFC;
    --primary-tint: #F0F5FE;
    --info-bg: #F4F7FD;
    --info-line: #DCE5F5;

    --bg: #F4F6F9;
    --surface: #FFFFFF;
    --surface-2: #F8FAFC;
    --line: #E3E8EF;
    --line-soft: #EEF1F5;
    --input-line: #CBD3DE;

    --text: #18212F;
    --text-2: #33404F;
    --muted: #556274;
    --disabled: #9AA7B8;

    --ok: #17734A;
    --ok-bg: #E3F4EC;
    --warn: #8A5A12;
    --warn-bg: #FDF1DC;
    --bad: #A8341F;
    --bad-bg: #FBE7E3;
    --bad-line: #F0C4BA;

    --radius: 12px;
    --radius-sm: 10px;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

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

html, body { margin: 0; }

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

a { color: #1F5FD1; }
a:hover { color: var(--primary-dark); }

h1, h2, h3 { margin: 0; }

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

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

/* ---------------- App layout ---------------- */

.app { min-height: 100vh; display: flex; flex-wrap: wrap; }

.sidebar {
    flex: 1 1 248px;
    max-width: 100%;
    background: var(--navy);
    color: var(--nav-text);
    padding: 24px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 22px; color: inherit; text-decoration: none; }
.brand:hover { color: inherit; }
.brand-logo {
    width: 40px; height: 40px; border-radius: 10px; background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 11px;
    overflow: hidden; flex: none;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.brand-name { color: #fff; font-weight: 700; font-size: 15px; line-height: 1.25; }
.brand-sub { font-size: 12px; color: var(--nav-muted); }

.nav-section { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: var(--nav-muted); padding: 8px 12px; }
.nav-section + .nav-link { margin-top: 0; }
.nav-section.spaced { padding-top: 18px; }

.nav-link {
    display: flex; align-items: center; gap: 12px; padding: 0 12px; min-height: 44px;
    border-radius: 8px; color: var(--nav-text); text-decoration: none; font-size: 14px;
}
.nav-link:hover { background: var(--navy-2); color: #fff; }
.nav-link.active { background: var(--navy-active); color: #fff; font-weight: 600; }

.nav-note {
    margin: 18px 4px 0; padding: 12px; border-radius: 10px; border: 1px dashed var(--navy-line);
    font-size: 12px; line-height: 1.5; color: var(--nav-muted);
}

.user-card {
    margin-top: 24px; padding: 14px 12px; border-radius: 10px; background: var(--navy-2);
    display: flex; align-items: center; gap: 10px;
}
.avatar {
    width: 36px; height: 36px; border-radius: 999px; background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex: none;
}
.avatar.soft { background: var(--primary-soft); color: var(--primary-dark); font-size: 12px; }
.user-card .name { color: #fff; font-size: 14px; font-weight: 600; }
.user-card .role { font-size: 12px; color: var(--nav-muted); }
.icon-btn-nav {
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    color: var(--nav-text); border-radius: 8px; border: 0; background: transparent; cursor: pointer;
}
.icon-btn-nav:hover { background: var(--navy-active); color: #fff; }

.main {
    flex: 999 1 560px;
    min-width: 0;
    padding: 28px 32px 48px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.page-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -0.01em; }
.page-sub { font-size: 14px; color: var(--muted); margin-top: 4px; }

/* ---------------- Cards ---------------- */

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.card.flush { padding: 0; overflow: hidden; gap: 0; }

/* ---------------- Pop-up pəncərələr (<dialog>) ---------------- */

dialog.modal {
    width: min(480px, calc(100vw - 32px));
    max-height: min(640px, calc(100vh - 64px));
    padding: 0;
    border: none;
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
dialog.modal::backdrop { background: rgba(18, 24, 38, .55); }
.modal-body { display: flex; flex-direction: column; gap: 16px; padding: 22px 24px; overflow-y: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--line-soft); }
.card-title { font-size: 17px; font-weight: 700; }
.card-title.lg { font-size: 18px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

.info-box {
    padding: 14px; border-radius: var(--radius); background: var(--info-bg); border: 1px solid var(--info-line);
    display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap;
}

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.kpi .label { font-size: 13px; color: var(--muted); font-weight: 600; }
.kpi .value { font-size: 26px; font-weight: 800; }
.kpi .hint { font-size: 13px; color: var(--muted); }
.kpi.dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.kpi.dark .label, .kpi.dark .hint { color: var(--nav-text); }

.split { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.split > .grow { flex: 1 1 520px; min-width: 0; }
.split > .side { flex: 1 1 320px; min-width: 0; }

.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.grid-auto .full { grid-column: 1 / -1; }

/* ---------------- Forms ---------------- */

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; font-weight: 600; }
.field .help { font-size: 12px; color: var(--muted); }
.field-error { font-size: 12px; font-weight: 600; color: var(--bad); }

.input, .select, .textarea {
    height: 44px;
    border: 1px solid var(--input-line);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--text);
    background: #fff;
    width: 100%;
}
.textarea { height: auto; padding: 10px 12px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.input.sm, .select.sm { height: 40px; border-radius: 9px; }
.input.num { text-align: right; }
.input-validation-error { border-color: var(--bad) !important; }
.input[readonly] { background: var(--surface-2); color: var(--muted); cursor: default; }

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

.form-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.form-row > .grow { flex: 2 1 220px; }
.form-row > .shrink { flex: 1 1 130px; }

/* ---------------- Buttons ---------------- */

.btn {
    min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
    font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex;
    align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap;
}
.btn.sm { min-height: 36px; padding: 0 12px; border-radius: 8px; font-size: 13px; }
.btn.lg { min-height: 50px; font-size: 16px; font-weight: 700; }
.btn.block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; font-weight: 700; }
.btn-primary:hover { background: #2259C6; color: #fff; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: var(--navy-active); color: #fff; }
.btn-outline { background: #fff; color: var(--text); border-color: var(--input-line); }
.btn-outline:hover { background: var(--surface-2); color: var(--text); }
.btn-outline-primary { background: #fff; color: var(--primary-dark); border-color: var(--primary); }
.btn-outline-primary:hover { background: var(--primary-tint); }
.btn-danger-outline { background: #fff; color: var(--bad); border-color: var(--bad-line); }
.btn-danger-outline:hover { background: var(--bad-bg); }
.btn-soft { background: var(--primary-soft); color: var(--primary-dark); }
.btn-link { background: transparent; color: var(--primary-dark); border: 0; }
.btn:disabled, .btn.disabled { background: var(--disabled); color: #fff; border-color: var(--disabled); cursor: not-allowed; }

.icon-btn {
    width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--input-line); background: #fff;
    color: var(--text-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.icon-btn.danger { color: var(--bad); }
.icon-btn:hover { background: var(--surface-2); }

/* ---------------- Tables ---------------- */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; padding: 10px 12px; background: var(--surface-2); }
.table td { padding: 10px 12px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.table .right { text-align: right; }
.table .muted { color: var(--muted); }
.table .strong { font-weight: 700; }

/* ---------------- Badges ---------------- */

.badge { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-muted { background: var(--line-soft); color: var(--text-2); }
.badge-dark { background: var(--navy); color: #fff; }
.badge-primary { background: var(--primary-soft); color: var(--primary-dark); }

.chip { padding: 6px 10px; border-radius: 8px; background: var(--line-soft); font-size: 13px; }
.chip.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------------- Alerts ---------------- */

.alert { padding: 14px 16px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 600; display: flex; gap: 10px; align-items: flex-start; }
.alert-success { background: var(--ok-bg); color: var(--ok); }
.alert-error { background: var(--bad-bg); color: var(--bad); }
.alert-info { background: var(--info-bg); color: var(--text-2); border: 1px solid var(--info-line); font-weight: 500; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.validation-summary-valid { display: none; }

/* ---------------- Settings layout ---------------- */

.settings { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.settings-nav {
    flex: 1 1 220px; max-width: 100%; background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 8px; display: flex; flex-direction: column; gap: 2px;
}
.settings-nav a {
    min-height: 44px; padding: 0 12px; border-radius: 8px; color: var(--text-2); font-size: 14px;
    font-weight: 600; text-decoration: none; display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.settings-nav a:hover { background: var(--surface-2); color: var(--text); }
.settings-nav a.active { background: var(--primary-soft); color: var(--primary-dark); }
.settings-nav .soon { font-size: 11px; font-weight: 600; color: var(--muted); }
.settings-body { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.subtabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.subtabs a {
    min-height: 44px; padding: 0 14px; display: flex; align-items: center; color: var(--muted);
    font-size: 14px; font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent;
}
.subtabs a.active { color: var(--navy); border-bottom-color: var(--primary); }

.row-item {
    display: grid; grid-template-columns: minmax(160px, 1fr) 100px auto 92px 104px 112px 40px;
    align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--radius-sm);
    border: 1px solid var(--line);
}
.row-item.inactive { background: var(--surface-2); }
.row-item .name-input { min-width: 0; font-weight: 600; border-color: var(--line); }
.row-item .price-input { width: 100%; }
.row-item .usage-slot { justify-self: start; white-space: nowrap; }
.row-item .check { white-space: nowrap; }
.list { display: flex; flex-direction: column; gap: 6px; overflow-x: auto; }
@media (max-width: 720px) {
    .row-item { grid-template-columns: minmax(140px, 1fr) 90px auto; }
    .row-item .usage-slot, .row-item .check { grid-column: 1 / -1; }
}

.logo-preview {
    width: 96px; height: 96px; border-radius: 16px; background: var(--navy); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; overflow: hidden;
}
.logo-preview img { width: 100%; height: 100%; object-fit: contain; background: #fff; }

/* ---------------- Login ---------------- */

.login { min-height: 100vh; display: flex; flex-wrap: wrap; }
.login-hero {
    flex: 1 1 480px; min-width: 0; background: var(--navy); color: #fff; padding: 56px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 48px; min-height: 640px;
    position: relative; overflow: hidden;
}
.login-hero .rings { position: absolute; right: -180px; bottom: -180px; pointer-events: none; }
.login-hero > * { position: relative; }
.login-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.login-brand .brand-logo { width: 176px; height: 176px; border-radius: 36px; font-size: 28px; }
.login-brand .title { font-size: 22px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.02em; }
.login-hero h1 { font-size: 44px; line-height: 1.12; font-weight: 800; letter-spacing: -0.02em; max-width: 520px; }
.login-hero p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--nav-text); max-width: 520px; }
.features { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.features div { display: flex; align-items: center; gap: 12px; font-size: 15px; color: #E3E9F2; }
.features .icon { stroke: #5B92F0; stroke-width: 2; width: 20px; height: 20px; }
.login-foot { font-size: 13px; color: var(--primary); text-align: center; margin-top: 8px; }

.login-main { flex: 1 1 480px; min-width: 0; display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.login-card { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 28px; }
.login-card h2 { font-size: 30px; font-weight: 800; letter-spacing: -0.01em; }
.login-card .lead { margin: 6px 0 0; font-size: 15px; color: var(--muted); }
.login-card form { display: flex; flex-direction: column; gap: 18px; }
.login-card .input { height: 48px; font-size: 15px; padding: 0 14px; }
.password-box { display: flex; align-items: center; border: 1px solid var(--input-line); border-radius: var(--radius-sm); background: #fff; height: 48px; }
.password-box:focus-within { outline: 2px solid var(--primary); outline-offset: 1px; }
.password-box input { flex: 1; min-width: 0; height: 46px; border: 0; border-radius: var(--radius-sm); padding: 0 14px; font-size: 15px; font-family: inherit; background: transparent; color: var(--text); }
.password-box input:focus { outline: none; }
.password-box button { width: 46px; height: 46px; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.login-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.login-row .note { font-size: 13px; color: var(--muted); }
.install-hint {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius);
    background: #fff; border: 1px solid var(--line); font-size: 13px; color: var(--text-2); line-height: 1.45;
}
.install-hint .icon { stroke: var(--primary); width: 22px; height: 22px; }
.demo-users { padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; }
.demo-users code { background: var(--line-soft); padding: 2px 6px; border-radius: 6px; color: var(--text); font-size: 12px; }

/* ---------------- Coming soon ---------------- */

.soon-card { align-items: flex-start; }
.soon-card ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.soon-card li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
.soon-card li .icon { stroke: var(--primary); margin-top: 1px; }

.progress { display: flex; flex-direction: column; gap: 8px; }
.progress-row { display: flex; align-items: center; gap: 12px; font-size: 14px; padding: 10px 0; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.progress-row:first-child { border-top: 0; }
.progress-row .part { width: 72px; font-weight: 700; flex: none; }
.progress-row .desc { flex: 1 1 260px; color: var(--text-2); }

/* ---------------- Responsive ---------------- */

@media (max-width: 720px) {
    .main { padding: 20px 16px 40px; }
    .login-hero { padding: 32px 24px; min-height: 0; }
    .login-hero h1 { font-size: 32px; }
    .sidebar { padding: 16px 12px; }
}

@media print {
    .sidebar, .no-print { display: none !important; }
    .main { padding: 0; }
    body { background: #fff; }
}

/* =========================================================
   Hissə 2–5 komponentləri
   ========================================================= */

.muted { color: var(--muted); }
.strong { font-weight: 700; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.spacer { flex: 1; }
.hidden { display: none !important; }
.ok-text { color: var(--ok); }
.bad-text { color: var(--bad); }
.primary-text { color: #1F5FD1; }

/* Wizard addımları */
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; flex-wrap: wrap; }
.steps li { flex: 1 1 150px; }
.step-btn {
    width: 100%; min-height: 52px; display: flex; align-items: center; gap: 10px; padding: 8px 12px;
    border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--text);
    font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left;
}
.step-btn .n {
    width: 28px; height: 28px; flex: none; border-radius: 999px; background: var(--line-soft); color: var(--text-2);
    display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
}
.step-btn.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.step-btn.active .n { background: var(--primary); color: #fff; }
.step-btn.done .n { background: var(--ok-bg); color: var(--ok); }
.wizard-step { display: none; }
.wizard-step.active { display: block; }
.wizard-nav { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.photo-box {
    width: 200px; height: 240px; border-radius: 12px; border: 2px dashed var(--input-line); background: var(--surface-2);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    color: var(--muted); font-size: 13px; overflow: hidden; position: relative;
}
.photo-box img, .photo-box video { width: 100%; height: 100%; object-fit: cover; }
.photo-col { flex: 0 0 200px; display: flex; flex-direction: column; gap: 10px; }

.segmented { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--line-soft); gap: 4px; flex-wrap: wrap; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
    display: flex; align-items: center; min-height: 40px; padding: 0 16px; border-radius: 9px;
    color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer;
}
.segmented input:checked + span { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(19,35,63,.08); }
.segmented input:focus-visible + span { outline: 2px solid var(--primary); }

.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.choice {
    display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 12px; border-radius: 10px;
    border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 14px;
}
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-tint); }
.choice input { width: 18px; height: 18px; accent-color: var(--primary); }
.choice .price { margin-left: auto; color: var(--muted); font-size: 13px; }

.segment-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.segment-row .input { width: 76px; }

.calc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; font-size: 14px; }
.calc-grid .v { text-align: right; font-weight: 600; }
.plan-row { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; padding: 6px 8px; border-radius: 8px; background: var(--surface-2); }
.plan-row.paid { background: #EEF8F3; }
.plan-row.partial { background: #FEF7EA; }

.big-number { font-size: 52px; font-weight: 800; letter-spacing: .06em; color: var(--navy); }
.success-icon {
    width: 64px; height: 64px; border-radius: 999px; background: var(--ok-bg); color: var(--ok);
    display: flex; align-items: center; justify-content: center;
}
.success-icon .icon { width: 32px; height: 32px; stroke-width: 2.2; }

/* Ödəniş ekranı */
.result-item {
    display: flex; align-items: center; gap: 12px; padding: 10px 12px; min-height: 56px; border-radius: 10px;
    border: 1px solid var(--line); background: #fff; color: var(--text); text-decoration: none;
}
.result-item:hover { border-color: var(--primary); color: var(--text); }
.result-item.active { border-color: var(--primary); background: var(--primary-tint); }
.inst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.inst {
    display: flex; flex-direction: column; gap: 6px; padding: 12px; border-radius: 10px; border: 2px solid var(--line);
    background: #fff; cursor: pointer;
}
.inst .head { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.inst .month { font-size: 14px; font-weight: 700; }
.inst .amt { font-size: 13px; color: var(--text-2); }
.inst .st { font-size: 12px; font-weight: 600; }
.inst input { width: 18px; height: 18px; accent-color: var(--primary); }
.inst.tone-ok { border-color: #BFE3D0; background: #F1FAF5; cursor: default; }
.inst.tone-ok .st { color: var(--ok); }
.inst.tone-warn .st { color: var(--warn); }
.inst.tone-bad { border-color: var(--bad-line); }
.inst.tone-bad .st { color: var(--bad); }
.inst.tone-muted .st { color: var(--muted); }
.inst.selected { border-color: var(--primary); }
.inst.cancelled { opacity: .5; cursor: default; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.amount-input { height: 52px; font-size: 22px; font-weight: 800; }

/* Qrafik */
.bars { display: grid; grid-template-columns: repeat(auto-fit, minmax(48px, 1fr)); gap: 12px; align-items: end; min-height: 220px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bar-col .val { font-size: 11px; color: var(--muted); }
.bar-pair { display: flex; gap: 4px; align-items: end; height: 170px; }
.bar { width: 16px; border-radius: 4px 4px 0 0; }
.bar.exp { background: #B9CCF2; }
.bar.col { background: #1F4FA8; }
.bar-labels { display: grid; grid-template-columns: repeat(auto-fit, minmax(48px, 1fr)); gap: 12px; font-size: 13px; text-align: center; font-weight: 600; color: var(--text-2); }
.bar-labels .current { color: var(--primary-dark); }
.meter { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.meter > div { height: 8px; background: #1F4FA8; border-radius: 999px; }
.meter.ok > div { background: #1E8E5A; }

/* Tablar */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.tabs a {
    min-height: 44px; padding: 0 14px; display: flex; align-items: center; color: var(--muted);
    font-size: 14px; font-weight: 600; text-decoration: none; border-bottom: 3px solid transparent;
}
.tabs a.active { color: var(--navy); border-bottom-color: var(--primary); }

/* Şagird kartı */
.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile-photo {
    width: 96px; height: 116px; border-radius: 12px; background: var(--primary-soft); color: var(--primary-dark);
    display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; overflow: hidden; flex: none;
}
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.kv .k { font-size: 12px; color: var(--muted); }
.kv .v { font-weight: 700; }
.avatar-photo { width: 36px; height: 36px; border-radius: 999px; object-fit: cover; flex: none; }

/* Davamiyyət */
.att-row { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line-soft); flex-wrap: wrap; }
.att-opts { display: flex; gap: 6px; flex-wrap: wrap; }
.att-opts label { position: relative; }
.att-opts input { position: absolute; opacity: 0; pointer-events: none; }
.att-opts span {
    display: flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px;
    border: 1px solid var(--input-line); background: #fff; color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer;
}
.att-opts input:focus-visible + span { outline: 2px solid var(--primary); }
.att-opts .s1 input:checked + span { background: #1E8E5A; border-color: #1E8E5A; color: #fff; }
.att-opts .s2 input:checked + span { background: #C0392B; border-color: #C0392B; color: #fff; }
.att-opts .s3 input:checked + span { background: #B7791F; border-color: #B7791F; color: #fff; }
.att-opts .s4 input:checked + span { background: var(--text-2); border-color: var(--text-2); color: #fff; }

.pager { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pager a, .pager span { min-width: 36px; min-height: 36px; padding: 0 10px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; text-decoration: none; border: 1px solid var(--line); color: var(--text-2); background: #fff; }
.pager .current { background: var(--navy); color: #fff; border-color: var(--navy); }

.code-block { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; white-space: pre-wrap; word-break: break-word; color: var(--text-2); max-width: 520px; }

/* ---------------- Çap səhifələri ---------------- */

.print-page { background: #fff; color: #18212F; font-family: var(--font); }
.print-toolbar {
    position: sticky; top: 0; z-index: 10; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    padding: 12px 16px; background: var(--navy); color: #fff;
}
.print-toolbar .btn-outline { background: transparent; color: #fff; border-color: var(--navy-line); }
.print-sheet { margin: 24px auto; background: #fff; box-shadow: 0 2px 16px rgba(19,35,63,.12); }
.receipt { display: flex; flex-direction: column; gap: 12px; padding: 8mm; box-sizing: border-box; font-size: 12.5px; }
.receipt-head { display: flex; align-items: center; gap: 14px; padding-bottom: 10px; border-bottom: 2px solid var(--navy); }
.receipt-logo { width: 48px; height: 48px; border-radius: 10px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 800; overflow: hidden; flex: none; }
.receipt-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.receipt-title { font-size: 18px; font-weight: 800; letter-spacing: .04em; }
.receipt-info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px; padding: 10px 12px; border-radius: 8px; background: #F4F6F9; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt th, .receipt td { padding: 6px 4px; text-align: left; border-bottom: 1px solid #E3E8EF; }
.receipt .total { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border: 2px solid var(--navy); border-radius: 8px; }
.receipt .total .sum { font-size: 22px; font-weight: 800; }
.receipt .signs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: auto; }
.receipt .sign-line { height: 30px; border-bottom: 1px solid #18212F; }
.receipt-foot { display: flex; align-items: center; gap: 12px; padding-top: 10px; border-top: 1px dashed #9AA7B8; font-size: 10.5px; color: #33404F; }
.receipt-foot img { width: 64px; height: 64px; }
.cut-line { border-top: 1px dashed #9AA7B8; margin: 0 8mm; text-align: center; font-size: 10px; color: #556274; }
.cancelled-stamp {
    border: 3px solid var(--bad); color: var(--bad); font-weight: 800; font-size: 18px; text-align: center;
    padding: 6px; border-radius: 8px; letter-spacing: .1em;
}
.doc { padding: 12mm; box-sizing: border-box; font-size: 12.5px; display: flex; flex-direction: column; gap: 12px; }
.doc h1 { font-size: 18px; text-align: center; letter-spacing: .03em; }
.doc table { width: 100%; border-collapse: collapse; }
.doc th, .doc td { border: 1px solid #9AA7B8; padding: 6px 8px; text-align: left; }
.doc th { background: #F4F6F9; }

@media print {
    .print-toolbar { display: none !important; }
    .print-sheet { margin: 0; box-shadow: none; }
    body.print-page { background: #fff; }
    .page-break { page-break-after: always; }
}
