/* U-POS Mobil ekranlarına xas komponentlər. Ümumi dizayn sistemi pos.css-dədir — burada yalnız onun
   üzərində qurulan əlavələr var (lisenziya kodu, qiymətləndirmə, tarixçə). */

/* ---------- Lisenziya kodu ---------- */
.input-code {
    font-family: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .12em;
    font-variant-numeric: tabular-nums;
}

.input.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px var(--danger-soft);
}

.field-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12.5px;
    color: var(--muted);
}

.field-meta .is-error {
    color: var(--danger);
}

.field-meta strong {
    font-variant-numeric: tabular-nums;
}

.code-progress {
    height: 4px;
    border-radius: 999px;
    background: var(--border);
    overflow: hidden;
}

.code-progress span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transition: width .2s ease, background-color .2s ease;
}

.code-progress.is-complete span { background: var(--success); }
.code-progress.is-invalid span { background: var(--danger); }

.shake {
    animation: pos-shake .4s;
}

@keyframes pos-shake {
    20%, 60% { transform: translateX(-6px); }
    40%, 80% { transform: translateX(6px); }
}

/* ---------- Giriş / aktivləşdirmə ekranları (_AuthLayout) ----------
   Rənglər yalnız pos.css tokenlərindən gəlir — qaranlıq rejim öz-özünə işləyir. */
.auth {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Fondakı iki yumşaq işıq ləkəsi (əsas mavi + açıq mavi) və yuxarıda sönən nöqtəli tor */
.auth-glow {
    position: absolute;
    inset: 0 0 auto;
    height: 460px;
    z-index: -1;
    pointer-events: none;
    background-image: radial-gradient(color-mix(in srgb, var(--primary) 16%, transparent) 1px, transparent 1.5px);
    background-size: 18px 18px;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
    mask-image: linear-gradient(to bottom, #000 0%, transparent 75%);
}

.auth-glow span {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
}

.auth-glow span:first-child {
    width: 280px;
    height: 280px;
    top: -110px;
    left: -90px;
    background: color-mix(in srgb, var(--primary) 30%, transparent);
}

.auth-glow span:last-child {
    width: 240px;
    height: 240px;
    top: -60px;
    right: -100px;
    background: color-mix(in srgb, var(--primary-2) 28%, transparent);
}

/* Loqo — arxasında yumşaq parıltı və nazik halqa */
.auth-logo {
    position: relative;
    display: inline-block;
}

.auth-logo::before {
    content: "";
    position: absolute;
    inset: -14px;
    border-radius: 34px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    opacity: .22;
    filter: blur(18px);
    z-index: -1;
}

.auth .auth-brand img {
    width: 72px;
    height: 72px;
    border-radius: 26px;
    border: 1px solid color-mix(in srgb, var(--primary) 12%, var(--border));
    box-shadow: 0 12px 30px -8px color-mix(in srgb, var(--primary) 40%, transparent);
}

.auth .auth-brand h1 {
    margin-top: 14px;
    font-size: 22px;
}

/* Səhifə ekranın şaquli mərkəzində */
.auth {
    justify-content: center;
}

/* Böyük kart: yuxarıda loqo (yumşaq mavi fon), altında səhifənin məzmunu */
.auth-shell {
    position: relative;
    border-radius: 28px;
    border: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .04),
        0 28px 56px -24px color-mix(in srgb, var(--primary) 32%, transparent);
    overflow: hidden;
}

.auth-shell::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
}

.auth .auth-shell .auth-brand {
    margin: 0;
    padding: 30px 20px 22px;
    background:
        radial-gradient(80% 100% at 50% 0%, color-mix(in srgb, var(--primary-2) 14%, transparent), transparent 70%),
        linear-gradient(180deg, color-mix(in srgb, var(--primary) 7%, var(--surface)), var(--surface));
    border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

/* Səhifənin öz kartı böyük kartın içində düz görünür */
.auth-body > .card {
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.auth .card-pad {
    padding: 22px 20px 24px;
}

/* Kartdan sonra gələn qeyd (aktivləşdirmə) — kartın aşağı hissəsində */
.auth-body > .notice {
    margin: 0 16px 16px;
}

.auth h2 {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.auth .lead {
    line-height: 1.5;
}

/* Sahələr: fokusda ikon da əsas rəngə keçir */
.auth .field label {
    color: var(--text);
}

.auth .input {
    min-height: 52px;
    background: var(--surface-2);
    border-color: transparent;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.auth .input:focus {
    background: var(--surface);
    border-color: var(--primary);
}

.auth .input-icon > .bx {
    transition: color .15s ease;
}

.auth .input-icon:focus-within > .bx {
    color: var(--primary);
}

.auth .input-icon .trail:hover {
    color: var(--primary);
}

/* Əsas düymə: yüngül parıltı */
.auth .btn-primary {
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 24px -6px color-mix(in srgb, var(--primary) 55%, transparent);
}

.auth .btn-primary::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, .18), transparent 55%);
    pointer-events: none;
}

@media (hover: hover) {
    .auth .btn-primary:hover {
        filter: brightness(1.06);
    }
}

/* Alt sətir: təhlükəsizlik qeydi və versiya */
.auth-foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.auth-foot span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.auth-foot .bx {
    font-size: 15px;
    color: var(--success);
}

.auth-foot .dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: currentColor;
    opacity: .6;
}

/* Açılış animasiyası */
.auth-shell,
.auth-foot {
    animation: auth-rise .5s cubic-bezier(.2, .8, .2, 1) both;
}

.auth-foot { animation-delay: .12s; }

@keyframes auth-rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-shell,
    .auth-foot,
    .status-pill .pulse::after {
        animation: none;
    }
}

/* Lisenziya kodu sahəsinin sağındakı kamera düyməsi */
.input-icon .input.has-scan {
    padding-right: 56px;
}

.scan-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 12px;
    background: var(--primary-soft);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, transform .12s ease;
}

.scan-btn:active {
    transform: translateY(-50%) scale(.92);
}

.scan-btn.is-active {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: var(--on-primary);
}

/* Giriş ekranında cihazın adı */
.device-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 1px solid color-mix(in srgb, var(--success) 18%, transparent);
    background: linear-gradient(135deg, var(--success-soft), color-mix(in srgb, var(--success-soft) 30%, var(--surface)));
    font-size: 14px;
}

.device-chip .icon-box {
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.device-chip-text {
    flex: 1;
    min-width: 0;
}

.device-chip strong {
    display: block;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.device-chip small {
    color: var(--text-2);
    font-size: 12.5px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    padding: 4px 10px 4px 8px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--success);
    font-size: 12px;
    font-weight: 700;
}

.status-pill .pulse {
    position: relative;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
}

.status-pill .pulse::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--success);
    animation: status-pulse 1.8s ease-out infinite;
}

@keyframes status-pulse {
    from { transform: scale(1); opacity: .6; }
    to { transform: scale(2.8); opacity: 0; }
}

/* Şifrəni göstər düyməsi — input-icon içində sağda */
.input-icon .input.has-trail {
    padding-right: 50px;
}

.input-icon .trail {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 22px;
}

.btn-danger {
    --btn-bg: var(--danger);
    --btn-fg: #fff;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--danger) 30%, transparent);
}

/* Göndərilən formanın düyməsi */
.btn.is-busy {
    pointer-events: none;
    opacity: .75;
}

/* ---------- Əsas səhifə ---------- */

/* Diqqət tələb edən zolaq (təsdiq gözləyən sənədlər) — tms.css-dəki status-banner */
a.status-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--text);
}

.status-banner .label {
    flex: 1;
    min-width: 0;
    font-size: 13px;
    color: var(--text-2);
}

.status-banner .label strong {
    display: block;
    font-size: 15px;
    color: var(--text);
}

.status-banner .chevron {
    color: var(--muted);
    font-size: 22px;
}

.tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 138px;
    padding: 16px;
}

.tile .icon-box {
    margin-bottom: 10px;
}

.tile strong {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
}

.tile small {
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.35;
}

.tile .chip {
    position: absolute;
    top: 12px;
    right: 12px;
}

.tile .tile-count {
    position: absolute;
    top: 12px;
    right: 12px;
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--warning);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Üst paneldə istifadəçi baş hərfləri */
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-size: 13.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.avatar.lg {
    width: 52px;
    height: 52px;
    font-size: 18px;
}

/* ---------- Siyahıdan seçim (şöbə, işçi) ---------- */
a.list-row,
button.list-row {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

a.list-row:active,
button.list-row:active {
    background: var(--surface-2);
}

.list-row .label strong {
    display: block;
    color: var(--text);
    font-weight: 600;
}

.list-row .label small {
    display: block;
    color: var(--muted);
    font-size: 12.5px;
}

.list-row .chevron {
    color: var(--muted);
    font-size: 22px;
}

.list-row.is-selected {
    background: var(--primary-soft);
}

.list-row.is-selected .check {
    color: var(--primary);
    font-size: 22px;
}

.list-search {
    margin-bottom: 12px;
}

/* ---------- Qiymətləndirmə forması ---------- */
.subject {
    display: flex;
    align-items: center;
    gap: 12px;
}

.subject h2 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.01em;
}

.subject small {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.criterion {
    padding: 16px;
}

.criterion-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 4px;
}

.criterion-no {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.criterion.is-answered .criterion-no {
    background: var(--success);
    color: #fff;
}

.criterion-head h3 {
    flex: 1;
    font-size: 15.5px;
    font-weight: 700;
    line-height: 1.35;
    padding-top: 2px;
}

.criterion-head .chip {
    margin-top: 2px;
}

.criterion > p {
    margin: 0 0 12px 36px;
    color: var(--text-2);
    font-size: 13.5px;
}

.criterion.is-missing {
    box-shadow: 0 0 0 2px var(--danger), var(--shadow);
}

.options {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .12s ease;
}

.option:active {
    transform: scale(.985);
}

.option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.option-radio {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
    transition: border .15s ease;
}

.option-body {
    flex: 1;
    min-width: 0;
}

.option-body strong {
    display: block;
    font-weight: 600;
}

.option-body small {
    display: block;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.35;
}

.option-score {
    min-width: 44px;
    padding: 4px 8px;
    border-radius: 10px;
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.option:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.option:has(input:checked) .option-radio {
    border: 7px solid var(--primary);
}

.option:has(input:checked) .option-score {
    background: var(--primary);
    color: var(--on-primary);
}

.option:has(input:focus-visible) {
    box-shadow: 0 0 0 4px var(--primary-soft);
}

/* Alt paneldə canlı bal */
.score-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 10px 10px 16px;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--border);
}

.score-bar .score-text {
    flex: 1;
    min-width: 0;
}

.score-bar small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.score-bar strong {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}

.score-bar strong small {
    display: inline;
    font-size: 13px;
}

.score-bar .btn {
    min-height: 48px;
}

/* ---------- Bal halqası ---------- */
.score-ring {
    --p: 0;
    --ring: var(--primary);
    position: relative;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: conic-gradient(var(--ring) calc(var(--p) * 1%), var(--ring-track, var(--border)) 0);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.score-ring::before {
    content: "";
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    background: var(--ring-bg, var(--surface));
}

.score-ring span {
    position: relative;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.score-ring.sm {
    width: 52px;
    height: 52px;
}

.score-ring.sm::before {
    inset: 5px;
}

.score-ring.sm span {
    font-size: 13px;
}

.hero .score-ring {
    --ring: #fff;
    --ring-track: rgba(255, 255, 255, .22);
    --ring-bg: color-mix(in srgb, #0f4fc4 70%, #1fa8f0);
}

.hero-score {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.hero-score .big {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
}

.hero-score .big small {
    font-size: 16px;
    opacity: .75;
}

.hero .chip {
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

/* Sənəd kartında işçi və bal */
.eval-card .doc-head {
    align-items: center;
}

.eval-person {
    display: flex;
    align-items: center;
    gap: 12px;
}

.eval-person .label {
    flex: 1;
    min-width: 0;
}

.eval-person strong {
    display: block;
    font-size: 15.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.eval-person small {
    display: block;
    color: var(--muted);
    font-size: 12.5px;
}

/* Sənəddə meyar sətri */
.line-score {
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.line-score small {
    color: var(--muted);
    font-weight: 600;
}

/* ---------- Filtr çipləri ---------- */
.filter-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    margin: 12px calc(var(--gutter) * -1) 0;
    padding: 0 var(--gutter) 2px;
    scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar {
    display: none;
}

.filter-chips a {
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-2);
    font-size: 13.5px;
    font-weight: 600;
    box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border);
}

.filter-chips a.active {
    background: var(--primary);
    color: var(--on-primary);
    box-shadow: none;
}

/* ---------- Status tarixçəsi (zaman xətti) ---------- */
.timeline {
    position: relative;
    padding: 16px 16px 4px;
}

.timeline-item {
    position: relative;
    display: flex;
    gap: 12px;
    padding-bottom: 16px;
}

.timeline-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: 15px;
    top: 34px;
    bottom: 2px;
    width: 2px;
    border-radius: 2px;
    background: var(--border);
}

.timeline-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--tone-soft, var(--primary-soft));
    color: var(--tone, var(--primary));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

.timeline-body {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

.timeline-body strong {
    display: block;
    font-size: 14.5px;
}

.timeline-body .meta {
    margin-top: 2px;
}

.timeline-body .note {
    margin-top: 8px;
    background: var(--surface-2);
}

.timeline-body .note .bx {
    color: var(--muted);
}

/* ---------- Vəziyyət ekranları ---------- */
.state {
    min-height: 60dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 6px;
}

.state .icon-box {
    width: 72px;
    height: 72px;
    border-radius: 24px;
    font-size: 34px;
    margin-bottom: 10px;
}

.state h2 {
    font-size: 20px;
    font-weight: 800;
}

.state p {
    color: var(--text-2);
    font-size: 14px;
}

/* Kamera skaneri (lisenziya) */
.scanner video {
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* ---------- Ana səhifə: üst panel yoxdur, salam kartı ən yuxarıdadır ---------- */
.no-appbar .content {
    padding-top: calc(var(--safe-top) + 16px);
}

.hero-home {
    padding: 18px 10px 18px 18px;
    overflow: visible; /* menyu kartdan kənara açılır */
}

.hero-home::after {
    content: none;
}

.hero-home .hero-top {
    align-items: center; /* ⋮ düyməsi kartın şaquli ortasında */
    margin-bottom: 0;
}

.hero-who {
    flex: 1;
    min-width: 0;
}

.hero-home h2 {
    line-height: 1.25;
}

.hero-home .menu {
    z-index: 5;
}

.hero-home .menu > .icon-btn {
    color: #fff;
}

.hero-home .menu > .icon-btn:active,
.hero-home .menu > .icon-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, .18);
}

.hero-home .menu-pop {
    color: var(--text);
}

/* ---------- Bölmə başlıqları: böyük hərflə yox, adi yazı ilə ---------- */
.section-head h2 {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -.01em;
    text-transform: none;
    color: var(--text);
}

/* Əməliyyat qrupunun adı (bir neçə qrup olanda) */
.group-head {
    margin: 0 4px 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.tiles + .group-head {
    margin-top: 18px;
}

/* ---------- Üst panel: ağ zolaq, alt küncləri yumru ---------- */
.appbar {
    margin-bottom: 12px;
    border-radius: 0 0 24px 24px;
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: 0 8px 24px -14px rgba(15, 23, 42, .22);
}

/* ---------- Alt naviqasiya: ekranın altına yapışıq, üst küncləri yumru ---------- */
.tabbar {
    border-top: 0;
    border-radius: 24px 24px 0 0;
    background: var(--surface);
    box-shadow: 0 -8px 28px -12px rgba(15, 23, 42, .22);
}

.tabbar-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    grid-auto-flow: row;
    align-items: stretch;
    padding: 0 6px;
}

.tab-group {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
}

.tabbar a {
    gap: 4px;
    transition: color .2s ease;
}

.tabbar a {
    position: relative;
}

.tabbar a .tab-icon {
    width: 52px;
    height: 30px;
    border-radius: 999px;
    font-size: 23px;
    background: none;
    transition: background-color .2s ease, color .2s ease;
}

/* Seçili bölmə: ikonun arxasında açıq mavi fon, yuxarıda qısa xətt, qalın yazı */
.tabbar a.active {
    font-weight: 700;
}

.tabbar a.active .tab-icon {
    background: var(--primary-soft);
}

.tabbar a.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 22px;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--primary);
    transform: translateX(-50%);
}

.tabbar a:active .tab-icon {
    transform: scale(.9);
}

/* Ortadakı "+" — paneldən yuxarı qalxan dairə, altında yazı */
.tab-fab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    min-width: 76px;
    padding: 0 0 9px;
    border: 0;
    background: none;
    color: var(--muted); /* yazı digər bölmələr kimi — rəng yalnız dairədədir, seçili bölmə ilə qarışmasın */
    font: inherit;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
}

.tab-fab-circle {
    width: 58px;
    height: 58px;
    margin-top: -26px;
    border: 5px solid var(--surface);
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: var(--on-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 10px 24px -4px color-mix(in srgb, var(--primary) 55%, transparent);
    transition: transform .15s ease, filter .15s ease;
}

.tab-fab:active .tab-fab-circle {
    transform: scale(.92);
}

@media (hover: hover) {
    .tab-fab:hover .tab-fab-circle {
        filter: brightness(1.06);
    }
}

/* "+" pəncərəsi */
.new-list + .group-head {
    margin-top: 16px;
}

.new-list .list-row .label strong {
    display: block;
    color: var(--text);
}

.new-list .list-row .label small {
    display: block;
    color: var(--muted);
    font-size: 12.5px;
}

.new-list .chevron {
    color: var(--muted);
    font-size: 22px;
}

.new-empty {
    box-shadow: none;
    background: var(--surface-2);
    border-radius: var(--radius);
}

/* ---------- Sənədlər: sənəd tipləri ---------- */
.doc-types {
    display: grid;
    gap: 10px;
}

.doc-type {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 12px 14px 16px;
}

.doc-type .label {
    flex: 1;
    min-width: 0;
}

.doc-type .label strong {
    display: block;
    font-size: 15.5px;
    font-weight: 700;
    color: var(--text);
}

.doc-type .label small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.35;
}

.doc-type .chevron {
    color: var(--muted);
    font-size: 22px;
}

.doc-count {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--warning);
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---------- Profil ---------- */
/* İkonlu menyu siyahısı (Profil) */
.nav-list form {
    margin: 0;
}

.nav-list .list-row .label strong {
    display: block;
    color: var(--text);
    font-weight: 600;
}

.nav-list .list-row .label small {
    display: block;
    color: var(--muted);
    font-size: 12.5px;
}

.nav-list .chevron {
    color: var(--muted);
    font-size: 22px;
}

.nav-list .list-row.is-danger .label strong {
    color: var(--danger);
}

/* ---------- Təsdiq tarixçəm ---------- */
.decision-list .list-row {
    align-items: flex-start;
}

.decision-list .decision-note {
    margin-top: 4px;
    color: var(--text-2);
    font-style: italic;
    overflow-wrap: anywhere;
}

.decision-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.decision-meta small {
    color: var(--muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

.group-head:first-child {
    margin-top: 4px;
}

.decision-list + .group-head {
    margin-top: 18px;
}

/* ---------- Əsas səhifə: günün satışı (Home/_DailySales) ---------- */
.icon-btn.sm {
    width: 34px;
    height: 34px;
    font-size: 20px;
    color: var(--muted);
}

.icon-btn.is-spinning .bx {
    animation: pos-spin .7s linear infinite;
}

.section-head:has(.icon-btn) {
    margin-bottom: 6px;
}

.sales-card {
    padding: 14px;
}

.sales-card + .sales-card {
    margin-top: 0;
}

/* Ümumi kart — əsas rəngin yüngül çalarında, mağaza kartlarından seçilsin */
.sales-card.is-total {
    background: linear-gradient(160deg, var(--primary-soft), var(--surface) 70%);
}

.sales-head {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sales-title {
    flex: 1;
    min-width: 0;
}

.sales-title strong {
    display: block;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sales-title small {
    color: var(--muted);
    font-size: 12.5px;
}

.sales-head .chip {
    flex-shrink: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sales-net {
    margin: 12px 2px 12px;
}

.sales-net span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.sales-net strong {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.sales-net strong small {
    font-size: 16px;
    font-weight: 700;
    color: var(--muted);
}

.sales-card .stat strong {
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sales-foot {
    display: flex;
    gap: 6px;
    margin: 8px 6px 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.sales-foot .bx {
    font-size: 15px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Yüklənmə yeri tutucusu */
.skeleton {
    border-radius: var(--radius);
    background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
    background-size: 200% 100%;
    animation: pos-skeleton 1.2s ease-in-out infinite;
    box-shadow: var(--shadow);
}

.skeleton.sales {
    height: 190px;
}

@keyframes pos-skeleton {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton,
    .icon-btn.is-spinning .bx {
        animation: none;
    }
}

/* ---------- Üst panelin ikon düymələri (AppbarActions): filter, yeni sənəd ---------- */
.appbar .icon-btn {
    width: 40px;
    height: 40px;
    font-size: 22px;
}

/* Əsas əməliyyat — "+" yeni sənəd */
.icon-btn.is-primary {
    background: var(--primary);
    color: var(--on-primary);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary) 30%, transparent);
}

.icon-btn.is-primary:active {
    background: var(--primary);
    transform: scale(.94);
}

/* Filter standartdan fərqlidir — ikonun küncündə nöqtə */
.icon-btn.has-dot {
    position: relative;
    color: var(--primary);
}

.icon-btn.has-dot::after {
    content: "";
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--warning);
    box-shadow: 0 0 0 2px var(--bg);
}

/* "Əməliyyatlar" düyməsi: uzun yazı sığsın. Əməliyyat ekranında (Layout: operationActive) seçili görünür —
   dairənin ağ kənarı loqo mavisinin açıq çalarına keçir, yazı digər seçili bölmələr kimi mavi olur. */
.tab-fab {
    min-width: 88px;
}

.tab-fab.active .tab-fab-circle {
    border-color: color-mix(in srgb, var(--primary) 28%, var(--surface));
}

.tab-fab.active {
    color: var(--primary);
    font-weight: 700;
}

/* ---------- Çoxlu seçim (filter: şöbələr) — pos.js data-pos-multi ---------- */
.multi-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.multi-count {
    color: var(--primary);
    font-size: 12.5px;
    font-weight: 700;
}

.multi-actions {
    display: flex;
    justify-content: space-between;
    margin: 6px 2px;
}

.link-btn {
    border: 0;
    background: none;
    padding: 6px 2px;
    color: var(--primary);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

/* Uzun siyahı pəncərəni böyütməsin — öz içində sürüşür */
.multi-list {
    max-height: 290px;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: none;
    border: 1px solid var(--border);
}

.multi-list .list-row {
    position: relative;
    min-height: 48px;
    cursor: pointer;
    user-select: none;
}

.multi-list input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.multi-list .check {
    color: transparent;
    width: 24px;
    height: 24px;
    border: 2px solid var(--border);
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.multi-list .list-row.is-selected .check {
    color: var(--on-primary);
    background: var(--primary);
    border-color: var(--primary);
    font-size: 18px;
}

.multi-list input[type="checkbox"]:focus-visible + .label strong {
    text-decoration: underline;
}

.multi-empty {
    margin: 8px 4px 0;
    font-size: 13px;
}

/* ---------- Qiymətləndirmə sənədi (Evaluation/Details): başlıq kartı ---------- */
/* Solda şöbə, işçi, vəzifə və ən altda status; sağda bal qrafiki. Fon ikonu qrafiklə üst-üstə düşməsin deyə gizlədilir. */
.eval-hero::after {
    display: none;
}

.eval-hero-body {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.eval-hero-info {
    flex: 1;
    min-width: 0;
}

.eval-hero-info small {
    display: block;
    opacity: .78;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.eval-hero-info .hero-model {
    margin-top: 2px;
}

.eval-hero-status {
    margin-top: 14px;
}

.eval-hero-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.eval-hero-score small {
    font-size: 12.5px;
    font-weight: 600;
    opacity: .85;
    white-space: nowrap;
}

/* ---------- ⋮ menyusunda rəngli əməliyyatlar və say nişanı ---------- */
.menu-item.is-success,
.menu-item.is-success .bx {
    color: var(--success);
}

.menu-item.is-danger,
.menu-item.is-danger .bx {
    color: var(--danger);
}

.menu-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Tarixçə pəncərədədir — kartın kölgəsi fonla qarışmasın */
.sheet .timeline {
    box-shadow: none;
}
