@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;0,800;1,300;1,400;1,600;1,700&family=Quicksand:wght@300;400;500;700&display=swap");

:root {
    --font: "Open Sans", "Segoe UI", system-ui, sans-serif;
    --font-head: "Quicksand", "Open Sans", sans-serif;
    --bg: #f4f5f7;
    --bg-elevated: #ffffff;
    --bg-muted: #eef0f3;
    --bg-sidebar: #1a2f4a;
    --bg-sidebar-2: #243b58;
    --text: #1c2430;
    --text-2: #3d4a5c;
    --text-3: #6b778c;
    --text-inv: #f3f6f9;
    --text-inv-2: #c5d0de;
    --border: #e2e6ec;
    --border-2: #cfd6e0;
    --accent: #1e4d8c;
    --accent-2: #163a6b;
    --accent-soft: #e8eef6;
    --gold: #9a7b32;
    --gold-soft: #f4eee0;
    --success: #1f6b57;
    --success-soft: #e7f3ef;
    --warning: #9a5b12;
    --warning-soft: #f7efe4;
    --danger: #a11d38;
    --danger-soft: #f8e8ec;
    --info: #1b5f86;
    --info-soft: #e7f1f6;
    --radius: 8px;
    --radius-sm: 6px;
    --radius-xs: 4px;
    --shadow: none;
    --shadow-lg: 0 8px 24px rgba(28, 36, 48, 0.1);
    --sidebar: 292px;
    --sidebar-min: 88px;
    --topbar: 64px;
    --ease: ease;
}

[data-theme="dark"] {
    --bg: #080c14;
    --bg-elevated: #111827;
    --bg-muted: #1a2333;
    --text: #f1f5f9;
    --text-2: #cbd5e1;
    --text-3: #94a3b8;
    --border: #243044;
    --border-2: #334155;
    --accent-soft: #172554;
    --gold-soft: #2a2316;
    --success-soft: #102422;
    --warning-soft: #2a1c10;
    --danger-soft: #2a1218;
    --info-soft: #102433;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 12px 32px rgba(0, 0, 0, 0.28);
}

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

html { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }
html, body { height: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, h4 { font-family: var(--font-head); }
ul { margin: 0; padding: 0; list-style: none; }

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

.sidebar {
    width: var(--sidebar);
    flex-shrink: 0;
    background: var(--bg-sidebar);
    color: var(--text-inv);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 40;
    transition: width 0.2s ease;
    border-right: 1px solid #13233a;
}

body.sidebar-collapsed .sidebar { width: var(--sidebar-min); }
body.sidebar-collapsed .brand-text,
body.sidebar-collapsed .nav-label,
body.sidebar-collapsed .nav-section-title,
body.sidebar-collapsed .nav-badge,
body.sidebar-collapsed .nav-caret,
body.sidebar-collapsed .nav-sub,
body.sidebar-collapsed .nav-tag,
body.sidebar-collapsed .sidebar-foot-label { display: none; }
body.sidebar-collapsed .brand { justify-content: center; padding-inline: 0; }
body.sidebar-collapsed .brand-logo {
    width: 36px;
    height: 36px;
    max-width: 36px;
    object-fit: cover;
    object-position: 6% center;
}
body.sidebar-collapsed .nav-link { justify-content: center; padding-inline: 0; }

.brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: var(--topbar);
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    background: #12263d;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: grid;
    place-items: center;
    flex-shrink: 0;
    overflow: hidden;
}

.brand-mark svg,
.brand-mark i { width: 18px; height: 18px; font-size: 18px; line-height: 1; }
.brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 3px;
}

.brand-text { line-height: 1.2; min-width: 0; }
.brand-text strong { display: block; font-size: 16px; font-weight: 700; font-family: var(--font-head); }
.brand-text span { font-size: 11px; color: #c4b07a; font-weight: 500; letter-spacing: 0.04em; }

.brand-logo {
    display: block;
    height: 28px;
    width: auto;
    max-width: 248px;
    object-fit: contain;
}

.nav {
    padding: 18px 14px;
    overflow: auto;
    flex: 1;
}

.nav::-webkit-scrollbar { width: 0; }

.nav-section-title {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #c5d2e6;
    padding: 16px 12px 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 8px;
    color: var(--text-inv-2);
    font-size: 14.5px;
    font-weight: 550;
    margin-bottom: 1px;
    position: relative;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-link svg,
.nav-link i { width: 20px; height: 20px; font-size: 20px; line-height: 1; flex-shrink: 0; opacity: 0.92; }

.nav-link:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}

.nav-link.is-active {
    background: #2c4a76;
    color: #fff;
    font-weight: 650;
    box-shadow: none;
}

.nav-link.is-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 2px;
    border-radius: 0;
    background: var(--gold);
}

.nav-toggle {
    width: 100%;
    background: none;
    border: 0;
    cursor: pointer;
    text-align: left;
}
.nav-toggle.is-parent { color: #fff; font-weight: 650; }
.nav-caret {
    margin-left: auto;
    display: grid;
    place-items: center;
    opacity: 0.55;
    transition: transform 0.18s var(--ease);
}
.nav-caret svg,
.nav-caret i { width: 16px; height: 16px; font-size: 16px; line-height: 1; }
.nav-group.is-open > .nav-toggle .nav-caret { transform: rotate(180deg); }
.nav-sub { display: none; padding: 2px 0 8px 36px; }
.nav-group.is-open > .nav-sub { display: block; }
.nav-child {
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    color: #b7c4d8;
}
.nav-child:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
}
.nav-child.is-active,
.nav-link.nav-child.is-active {
    background: #2c4a76;
    box-shadow: none;
    color: #fff;
    font-weight: 650;
}
.nav-child.is-active::before {
    display: block;
    top: 7px;
    bottom: 7px;
}
.nav-dot {
    display: none;
}
.nav-tag {
    margin-left: auto;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #1a1408;
    background: var(--gold);
    border-radius: 3px;
    padding: 2px 6px;
    font-weight: 600;
}

.nav-badge {
    margin-left: auto;
    background: #be123c;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    padding: 0 5px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: #1e4d8c;
    flex-shrink: 0;
}

.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.avatar.lg { width: 64px; height: 64px; font-size: 22px; }
img.avatar { object-fit: cover; }
.avatar.gold { background: #8a6f2e; }
.avatar.teal { background: #1f6b57; }
.avatar.rose { background: #a11d38; }
.avatar.slate { background: #4a5568; }

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    height: var(--topbar);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 22px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 30;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    border-radius: 6px;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: var(--text-2);
    position: relative;
}

.icon-btn:hover { border-color: var(--border-2); color: var(--text); }
.icon-btn svg,
.icon-btn i { width: 18px; height: 18px; font-size: 18px; line-height: 1; }

.topbar .icon-btn {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    border-radius: 50%;
}
.topbar .icon-btn:hover {
    background: var(--bg-muted);
    border-color: transparent;
    color: var(--text);
}

.icon-btn .note {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    background: var(--danger);
    color: #fff;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 700;
    display: grid;
    place-items: center;
    line-height: 1;
}

.search {
    flex: 1;
    max-width: 460px;
    position: relative;
}

.search svg,
.search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 1;
    color: var(--text-3);
    pointer-events: none;
}

.search input {
    width: 100%;
    height: 42px;
    border: 1px solid var(--border);
    background: var(--bg-muted);
    border-radius: 6px;
    padding: 0 14px 0 38px;
    outline: none;
}

.search input:focus {
    background: var(--bg-elevated);
    border-color: var(--accent);
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 2px;
}

.topbar-split {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 10px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 2px 0 4px;
    border: 0;
    background: transparent;
    cursor: pointer;
    height: 34px;
}

.user-chip:hover { color: var(--accent); }
.user-chip span { font-size: 13px; font-weight: 600; }
.user-chip svg,
.user-chip i { width: 14px; height: 14px; font-size: 14px; line-height: 1; color: var(--text-3); }

.app-footer {
    padding: 12px 28px 22px;
    font-size: 12px;
    color: var(--text-3);
    text-align: center;
}

.page {
    padding: 26px 28px 24px;
    flex: 1;
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 6px;
}

.breadcrumb a:hover { color: var(--accent); }

.page-head h1 {
    font-size: 22px;
    font-weight: 600;
}

.page-head p { color: var(--text-3); font-size: 13.5px; margin-top: 4px; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn {
    height: 38px;
    padding: 0 14px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn svg { width: 16px; height: 16px; }
.btn:hover { border-color: var(--border-2); }
.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-gold {
    background: var(--gold);
    color: #fff;
    border-color: var(--gold);
}
.btn-ghost { background: transparent; }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.btn-info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.btn-sm { height: 32px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-lg { height: 48px; padding: 0 18px; font-size: 14px; }
.btn-block { width: 100%; justify-content: center; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-1-2 { grid-template-columns: 1.4fr 1fr; }
.grid-2-1 { grid-template-columns: 1.6fr 1fr; }
.span-2 { grid-column: span 2; }

.card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.card-pad { padding: 18px 18px 16px; }
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.card-head h3 { font-size: 15px; font-weight: 600; }
.muted { font-size: 13px; color: var(--text-3); }
.card-head .muted { font-size: 12px; }

.kpi {
    padding: 18px;
    position: relative;
    overflow: hidden;
}

.kpi-label {
    font-size: 12px;
    color: var(--text-3);
    font-weight: 650;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kpi-icon {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: grid;
    place-items: center;
}

.kpi-icon svg { width: 16px; height: 16px; }
.kpi-icon.blue { background: var(--accent-soft); color: var(--accent); }
.kpi-icon.teal { background: var(--success-soft); color: var(--success); }
.kpi-icon.gold { background: var(--gold-soft); color: var(--gold); }
.kpi-icon.rose { background: var(--danger-soft); color: var(--danger); }

.kpi-value {
    font-size: 24px;
    font-weight: 600;
    margin: 10px 0 8px;
}

.delta {
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.delta.up { color: var(--success); }
.delta.down { color: var(--danger); }
.delta.warn { color: var(--warning); }
.delta + .hint { font-size: 12px; color: var(--text-3); margin-left: 8px; }

.spark { height: 42px; margin-top: 10px; }

.stat-tile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 20px;
    box-shadow: 0 8px 24px rgba(28, 36, 48, 0.06);
}
a.stat-tile { color: inherit; }
[data-theme="dark"] .stat-tile { box-shadow: var(--shadow); }
.stat-tile .stat-val {
    font-family: var(--font-head);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
}
.stat-tile .stat-lbl {
    margin-top: 4px;
    font-size: 13px;
    font-weight: 650;
    color: var(--text);
}
.stat-tile svg,
.stat-tile i {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    stroke-width: 1.6;
}
.stat-tile i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    line-height: 1;
}
.stat-tile.green .stat-val,
.stat-tile.green svg,
.stat-tile.green i { color: var(--success); }
.stat-tile.blue .stat-val,
.stat-tile.blue svg,
.stat-tile.blue i { color: var(--info); }
.stat-tile.rose .stat-val,
.stat-tile.rose svg,
.stat-tile.rose i { color: #c45b78; }
.stat-tile.orange .stat-val,
.stat-tile.orange svg,
.stat-tile.orange i { color: var(--warning); }
a.stat-tile:hover { border-color: var(--border-2); }
.stat-tile.is-active {
    border-color: var(--accent);
    background: var(--accent-soft);
}
.gchart { width: 100%; height: 340px; }
.gchart.short { height: 300px; }

.table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}
table.data {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 13.5px;
}

table.data th {
    text-align: left;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text);
    font-weight: 800;
    padding: 13px 16px;
    background: var(--bg-muted);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

table.data td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text);
}

table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--accent-soft); }
table.data td a { color: var(--accent); font-weight: 650; }
table.data td a:hover { text-decoration: underline; }
table.data th:has(> input),
table.data td:has(> input[type="checkbox"]) {
    width: 42px;
    padding-inline: 14px;
}

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

.person strong { display: block; font-size: 13px; }
.person span { font-size: 12px; color: var(--text-3); }

.badge {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge.ok { background: var(--success-soft); color: var(--success); }
.badge.warn { background: var(--warning-soft); color: var(--warning); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.neutral { background: var(--bg-muted); color: var(--text-2); }
.badge.gold { background: var(--gold-soft); color: #8a6a2a; }
.badge.done { background: #059669; color: #fff; }

.progress {
    height: 6px;
    background: var(--bg-muted);
    border-radius: 2px;
    overflow: hidden;
}

.progress > span {
    display: block;
    height: 100%;
    background: var(--accent);
    border-radius: inherit;
}

.list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row strong { display: block; font-size: 13px; }
.list-row span { font-size: 12px; color: var(--text-3); }

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
}

.topbar-pop { position: relative; }

.dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(340px, calc(100vw - 24px));
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    display: none;
    overflow: hidden;
    z-index: 50;
    box-shadow: var(--shadow-lg);
}

.dropdown.user-menu { width: 196px; }
.user-menu .dropdown-item { align-items: center; }
.user-menu .dropdown-item svg,
.user-menu .dropdown-item i { margin-top: 0; }

.dropdown form { display: block; }

button.dropdown-item {
    width: 100%;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
}

.dropdown.open { display: block; }
.dropdown-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-weight: 700;
    font-size: 13px;
}

.dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    font-size: 12.5px;
    border-bottom: 1px solid var(--border);
}

.dropdown-item:last-child { border-bottom: 0; }

.dropdown-item svg,
.dropdown-item i {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-2);
    margin-top: 2px;
}

.dropdown-item .avatar { margin-top: 1px; }

.dropdown-item > div:last-child {
    min-width: 0;
    flex: 1;
}

.dropdown-item:hover { background: var(--bg-muted); }
.dropdown-item p {
    color: var(--text-3);
    font-size: 11px;
    margin-top: 1px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.dropdown-item strong {
    display: block;
    font-size: 12.5px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8, 12, 20, 0.45);
    z-index: 35;
}

.overlay.show { display: block; }

.toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.field, .select {
    height: 40px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    border-radius: 6px;
    padding: 0 12px;
    outline: none;
}

.field:focus, .select:focus, textarea.field:focus {
    border-color: var(--accent);
}

textarea.field {
    height: auto;
    padding: 12px;
    width: 100%;
    resize: vertical;
    min-height: 110px;
}

.label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-2);
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .field,
.form-grid .select { width: 100%; }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); gap: 12px; }
.form-grid.cols-4 { grid-template-columns: repeat(4, 1fr); gap: 12px; }
.form-grid.cols-4 + .form-grid.cols-4 { margin-top: 12px; }
.form-bg-preview {
    width: 100%;
    max-height: 320px;
    object-fit: contain;
    object-position: top center;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    justify-content: flex-end;
}
.filter-actions .btn { width: 100%; justify-content: center; }

.search-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-checks {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.filter-checks label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 13px;
    font-weight: 650;
    color: var(--text-2);
    white-space: nowrap;
}

.filter-bar-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}
.search-options label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 650;
    color: var(--text-2);
    cursor: pointer;
}
.search-options input { accent-color: var(--accent); }

.field:disabled, .select:disabled {
    opacity: 0.55;
    background: var(--bg-muted);
    cursor: not-allowed;
}

.field.sm, .select.sm { height: 34px; font-size: 12.5px; }
.field.lg, .select.lg { height: 48px; font-size: 15px; padding: 0 14px; }

.field.solid, .select.solid,
.form-skin.solid .field,
.form-skin.solid .select {
    background: var(--bg-muted);
    border-color: transparent;
}
.field.solid:focus, .select.solid:focus,
.form-skin.solid .field:focus,
.form-skin.solid .select:focus {
    background: var(--bg-elevated);
    border-color: var(--accent);
}

.field.line, .select.line,
.form-skin.line .field,
.form-skin.line .select {
    border: 0;
    border-bottom: 1px solid var(--border-2);
    border-radius: 0;
    background: transparent;
    padding-left: 0;
    padding-right: 0;
}
.field.line:focus, .select.line:focus,
.form-skin.line .field:focus,
.form-skin.line .select:focus { border-bottom-color: var(--accent); }

.form-skin.sm .field, .form-skin.sm .select { height: 34px; font-size: 12.5px; }
.form-skin.lg .field, .form-skin.lg .select { height: 48px; font-size: 15px; padding: 0 14px; }

.input-wrap { position: relative; }
.input-wrap svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: var(--text-3);
    pointer-events: none;
}
.input-wrap .field { width: 100%; padding-left: 38px; }
.input-wrap.suffix svg { left: auto; right: 12px; }
.input-wrap.suffix .field { padding-left: 12px; padding-right: 38px; }

.input-group { display: flex; width: 100%; }
.input-group .addon {
    display: grid;
    place-items: center;
    padding: 0 12px;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 650;
    color: var(--text-2);
    white-space: nowrap;
}
.input-group .addon:first-child {
    border-right: 0;
    border-radius: 6px 0 0 6px;
}
.input-group .field {
    flex: 1;
    min-width: 0;
    width: auto;
    border-radius: 0 6px 6px 0;
}
.input-group.suffix .field { border-radius: 6px 0 0 6px; }
.input-group.suffix .addon:last-child {
    border-left: 0;
    border-radius: 0 6px 6px 0;
}

.field.is-ok, .select.is-ok { border-color: var(--success); }
.field.is-warn, .select.is-warn { border-color: var(--warning); }
.field.is-danger, .select.is-danger { border-color: var(--danger); }
.help { display: block; font-size: 12px; margin-top: 6px; color: var(--text-3); }
.help.ok { color: var(--success); }
.help.warn { color: var(--warning); }
.help.danger { color: var(--danger); }

.float-field { position: relative; }
.float-field .field {
    width: 100%;
    height: 50px;
    padding: 20px 12px 8px;
}
.float-field .label {
    position: absolute;
    left: 12px;
    top: 15px;
    margin: 0;
    font-size: 13px;
    font-weight: 650;
    color: var(--text-3);
    pointer-events: none;
    transition: 0.15s ease;
}
.float-field .field:focus ~ .label,
.float-field .field:not(:placeholder-shown) ~ .label {
    top: 5px;
    font-size: 10px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
}

.form-inline {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 12px 16px;
    align-items: center;
}
.form-inline .label { margin: 0; }
.form-inline .full { grid-column: 1 / -1; }

.choice-list { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-elevated);
    cursor: pointer;
    font-size: 13px;
    font-weight: 650;
}
.choice:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}
.choice input { accent-color: var(--accent); }

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: var(--text-2);
    cursor: pointer;
}
.check-row input { margin-top: 3px; accent-color: var(--accent); }
.check-row span { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }

.file-drop {
    border: 1px dashed var(--border-2);
    border-radius: 8px;
    padding: 22px 16px;
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
    background: var(--bg-muted);
}
.file-drop strong { display: block; color: var(--text); margin-bottom: 4px; font-size: 14px; }
.file-drop input { margin-top: 10px; }

.range-row { display: grid; gap: 8px; }
.range-row input[type="range"] { width: 100%; accent-color: var(--accent); }

.tabs {
    display: flex;
    gap: 6px;
    background: var(--bg-muted);
    padding: 4px;
    border-radius: 12px;
    width: fit-content;
}

.tab {
    border: 0;
    background: transparent;
    height: 34px;
    padding: 0 12px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 650;
    color: var(--text-3);
    cursor: pointer;
}

.tab.is-active { background: var(--bg-elevated); color: var(--text); box-shadow: var(--shadow); }

.tab-pane { display: none; }
.tab-pane.is-on { display: block; }

.profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.profile-hero .who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.profile-hero h1 { font-size: 22px; letter-spacing: -0.03em; }
.profile-hero .muted { margin-top: 2px; }

.status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: var(--warning-soft);
    border: 1px solid color-mix(in srgb, var(--warning) 18%, var(--border));
    border-radius: 12px;
}
.status-bar p { font-size: 13px; font-weight: 650; }

table.info { width: 100%; border-collapse: collapse; font-size: 13px; }
table.info th {
    text-align: left;
    color: var(--text-3);
    font-weight: 650;
    width: 42%;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
table.info td { padding: 10px 0; border-bottom: 1px solid var(--border); }
table.info tr:last-child th, table.info tr:last-child td { border-bottom: 0; }

.view-only { display: flex; }
.edit-only { display: none; }
.app-view { display: block; }
.app-edit { display: none; }
body.app-editing .view-only { display: none !important; }
body.app-editing .edit-only { display: flex; }
body.app-editing .app-view { display: none; }
body.app-editing .app-edit { display: block; }
body.app-editing .edit-only.actions { display: flex; }

.pager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-3);
}

.cal {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.cal .dow {
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-3);
    padding: 6px 0;
}

.cal .day {
    aspect-ratio: 1;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-elevated);
    display: flex;
    flex-direction: column;
    padding: 6px;
    font-size: 12px;
    min-height: 72px;
}

.cal .day.mute { color: var(--text-3); background: var(--bg-muted); }
.cal .day.today { border-color: var(--accent); background: var(--accent-soft); }
.cal .ev {
    margin-top: auto;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 6px;
    background: var(--accent-soft);
    color: var(--accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.msg {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
}

.msg:hover, .msg.is-active { background: var(--bg-muted); }
.msg.unread strong { font-weight: 800; }
.msg time { font-size: 11px; color: var(--text-3); margin-left: auto; white-space: nowrap; }

.login-wrap {
    min-height: 100%;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
}

.login-wrap.login-only {
    grid-template-columns: 1fr;
}

.login-wrap.login-only .login-panel {
    min-height: 100%;
}

.login-brand {
    height: auto;
    padding: 0 0 18px;
    margin-bottom: 8px;
    border-bottom: 1px solid var(--border);
    justify-content: center;
}

.login-brand .brand-logo {
    height: 72px;
    max-width: 100%;
}
.login-hero .brand-logo {
    height: 32px;
    max-width: 220px;
}
.login-card h2 {
    font-size: 24px;
    letter-spacing: -0.03em;
    margin-bottom: 6px;
}
.login-lead {
    color: var(--text-3);
    font-size: 13px;
    margin-bottom: 22px;
}
.login-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 18px;
    color: var(--text-3);
}
.login-foot {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 16px;
    text-align: center;
}

.login-hero {
    background: var(--bg-sidebar);
    color: #fff;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-hero h1 {
    font-size: 32px;
    font-weight: 600;
    line-height: 1.2;
    max-width: 520px;
}

.login-hero p { color: #93a0b5; max-width: 420px; margin-top: 14px; }

.login-panel {
    display: grid;
    place-items: center;
    padding: 32px;
    background: var(--bg);
}

.login-card {
    width: min(420px, 100%);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 28px;
}

.stat-pills { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 12px;
    border-radius: 12px;
    min-width: 120px;
}
.pill b { display: block; font-size: 18px; }
.pill span { font-size: 11px; color: #93a0b5; }

.mobile-nav {
    display: none;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    padding: 8px;
    z-index: 45;
    grid-template-columns: repeat(5, 1fr);
}

.mobile-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-3);
    padding: 8px 0;
    border-radius: 12px;
}

.mobile-nav a svg,
.mobile-nav a i { width: 18px; height: 18px; font-size: 18px; line-height: 1; }
.mobile-nav a.is-active { color: var(--accent); background: var(--accent-soft); }

.toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background: #0b1220;
    color: #fff;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: 0.28s var(--ease);
    z-index: 80;
}

.toast.show { transform: none; opacity: 1; }

.menu-btn { display: none; }
.search-btn { display: none; }

.kbd {
    font-size: 10px;
    font-weight: 700;
    border: 1px solid var(--border);
    background: var(--bg-muted);
    border-radius: 6px;
    padding: 2px 6px;
    color: var(--text-3);
}

.welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    margin-bottom: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.welcome h2 { font-size: 16px; font-weight: 600; }
.welcome p { color: var(--text-3); font-size: 13px; margin-top: 4px; }
.welcome-time { text-align: right; }
.welcome-time b { display: block; font-size: 18px; font-weight: 600; }
.welcome-time span { font-size: 12px; color: var(--text-3); }

.switch {
    width: 42px;
    height: 24px;
    border: 0;
    border-radius: 99px;
    background: var(--border-2);
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}
.switch::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    top: 3px;
    left: 3px;
    transition: 0.2s var(--ease);
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch.on { background: var(--accent); }
.switch.on::after { left: 21px; }

.cmdk {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    place-items: start center;
    padding-top: 12vh;
    background: rgba(8, 12, 20, 0.45);
}
.cmdk.open { display: grid; }
.cmdk-box {
    width: min(560px, 92vw);
    background: var(--bg-elevated);
    border-radius: 8px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}
.cmdk-box input {
    width: 100%;
    height: 54px;
    border: 0;
    outline: none;
    background: transparent;
    padding: 0 18px;
    border-bottom: 1px solid var(--border);
}
.cmdk-list { max-height: 320px; overflow: auto; padding: 8px; }
.cmdk-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
}
.cmdk-item svg { width: 16px; height: 16px; color: var(--text-3); }
.cmdk-item:hover, .cmdk-item.active { background: var(--accent-soft); color: var(--accent); }
.cmdk-foot {
    display: flex;
    justify-content: space-between;
    padding: 8px 14px;
    font-size: 11px;
    color: var(--text-3);
    border-top: 1px solid var(--border);
}

.modal-root {
    position: fixed;
    inset: 0;
    z-index: 85;
    display: none;
    place-items: center;
    background: rgba(8, 12, 20, 0.5);
    padding: 16px;
}
.modal-root.open { display: grid; }
.modal {
    width: min(480px, 100%);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 22px;
}
.modal h3 { margin-bottom: 4px; }
.modal .muted { margin-bottom: 16px; display: block; }
.modal.wide { width: min(960px, 100%); }
.modal-preview { margin-top: 8px; text-align: center; }
.modal-preview iframe {
    width: 100%;
    height: min(70vh, 560px);
    border: 0;
    background: var(--bg-muted);
    border-radius: 6px;
}
.modal-preview img { max-width: 100%; max-height: min(70vh, 560px); }

.kanban {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
}
.kanban-col {
    background: var(--bg-muted);
    border-radius: 8px;
    min-height: 440px;
    border: 1px dashed transparent;
}
.kanban-col.drag-over { border-color: var(--accent); background: var(--accent-soft); }
.kanban-col h4 {
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}
.kanban-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: grab;
    box-shadow: var(--shadow);
}
.kanban-card:active { cursor: grabbing; }
.kanban-card strong { display: block; font-size: 13px; margin-bottom: 6px; }
.kanban-card p { font-size: 12px; color: var(--text-3); }

.file-card {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
}
.file-ico {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
}
.file-ico.pdf { background: var(--danger-soft); color: var(--danger); }
.file-ico.xls { background: var(--success-soft); color: var(--success); }
.file-ico.doc { background: var(--info-soft); color: var(--info); }

.alert {
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 650;
    margin-bottom: 12px;
    display: none;
}
.alert.show { display: block; }
.alert.danger { background: var(--danger-soft); color: var(--danger); }

table.data tbody tr[hidden] { display: none; }

table.data.fit { min-width: 0; }
table.data.striped tbody tr:nth-child(even) { background: var(--bg-muted); }
table.data.striped tbody tr:hover { background: var(--accent-soft); }
table.data.compact th, table.data.compact td { padding: 8px 14px; font-size: 12.5px; }
table.data.comfortable th, table.data.comfortable td { padding: 16px 18px; }
table.data.sticky thead th {
    position: sticky;
    top: 0;
    background: var(--bg-muted);
    z-index: 1;
    box-shadow: 0 1px 0 var(--border);
}
table.data.bordered { border: 1px solid var(--border); }
table.data.bordered th,
table.data.bordered td { border: 1px solid var(--border); }
table.data.bordered tbody tr:last-child td { border-bottom: 1px solid var(--border); }
table.data.borderless th,
table.data.borderless td { border: 0; }
table.data.head-navy thead th {
    background: var(--bg-sidebar);
    color: var(--text-inv-2);
    border-bottom: 0;
}
table.data.head-navy.sticky thead th { background: var(--bg-sidebar); box-shadow: none; }
table.data.head-accent thead th {
    background: var(--accent);
    color: #fff;
    border-bottom: 0;
}
table.data.head-accent.sticky thead th { background: var(--accent); box-shadow: none; }
table.data.head-navy th[data-sort]::after,
table.data.head-accent th[data-sort]::after { color: inherit; opacity: 0.65; }
table.data tbody tr.row-ok { background: var(--success-soft); }
table.data tbody tr.row-info { background: var(--info-soft); }
table.data tbody tr.row-warn { background: var(--warning-soft); }
table.data tbody tr.row-danger,
table.data tbody tr.low { background: var(--danger-soft); }
table.data.money td.num, table.data td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
table.data th[data-sort] { cursor: pointer; user-select: none; }
table.data th[data-sort]::after { content: " ↕"; color: var(--text-3); font-size: 10px; }
table.data th.sort-asc::after { content: " ↑"; color: var(--accent); }
table.data th.sort-desc::after { content: " ↓"; color: var(--accent); }
table.data tbody tr.selected { background: var(--accent-soft); }
table.data.log { font-variant-numeric: tabular-nums; }
table.data.log td { font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

.bulk-bar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    background: var(--accent-soft);
    border-bottom: 1px solid var(--border);
}
.bulk-bar.show { display: flex; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
    height: 32px;
    padding: 0 12px;
    border-radius: 4px;
    background: var(--bg-elevated);
    font-size: 12px;
    font-weight: 650;
    cursor: pointer;
}
.chip.is-active { background: var(--accent); color: #fff; border-color: transparent; }

.expand-toggle {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-elevated);
    cursor: pointer;
}
.expand-child td {
    background: var(--bg-muted);
    padding-top: 8px;
    padding-bottom: 8px;
}

.matrix td, .matrix th { text-align: center; }
.matrix td:first-child, .matrix th:first-child { text-align: left; }
.dot-ok { color: var(--success); font-weight: 800; }
.dot-no { color: var(--border-2); }

.view-grid { display: none; }
body.view-cards .view-table { display: none; }
body.view-cards .view-grid { display: grid; }

.filter-side {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 16px;
}
.filter-card { padding: 16px; height: fit-content; position: sticky; top: 84px; }
.filter-card .label { margin-top: 12px; }

.pager-pages { display: flex; flex-wrap: wrap; gap: 6px; }
.pager-pages .btn { min-width: 36px; padding: 0 8px; justify-content: center; }
.pager-pages .btn.is-active { background: var(--accent); color: #fff; border-color: transparent; }

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
}
.row-actions .icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: var(--accent);
    overflow: visible;
}
.row-actions .icon-btn i {
    font-size: 17px;
}
.row-actions .icon-btn.danger { color: var(--danger); }
.row-actions .icon-btn.danger:hover { background: var(--danger-soft); border-color: transparent; }
table.data td .row-actions a,
table.data td .row-actions a:hover {
    font-weight: inherit;
    text-decoration: none;
}
.row-actions .icon-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    right: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(50%);
    padding: 5px 8px;
    border-radius: 6px;
    background: var(--text);
    color: var(--bg-elevated);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 40;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
}
.row-actions .icon-btn[data-tooltip]:hover::after,
.row-actions .icon-btn[data-tooltip]:focus-visible::after {
    opacity: 1;
}

.icon-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(108px, 1fr));
    gap: 10px;
}
.icon-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px 12px;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    border-radius: 12px;
    cursor: pointer;
    min-width: 0;
    color: var(--text-2);
}
.icon-tile:hover, .icon-tile:focus {
    border-color: var(--accent);
    color: var(--accent);
    outline: none;
}
.icon-tile svg { width: 22px; height: 22px; flex-shrink: 0; }
.icon-tile span {
    font-size: 11px;
    font-weight: 650;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.icon-tile[hidden] { display: none; }

.create-steps {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.create-steps span {
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--bg-muted);
    color: var(--text-3);
}
.create-steps span.is-on { background: var(--accent-soft); color: var(--accent); }

@media (max-width: 980px) {
    .filter-side { grid-template-columns: 1fr; }
    .filter-card { position: static; }
    .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 1200px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .form-grid.cols-3,
    .form-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-1-2, .grid-2-1, .grid-3 { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .sidebar {
        position: fixed;
        transform: translateX(-105%);
        width: min(86vw, 300px);
        box-shadow: var(--shadow-lg);
    }
    body.sidebar-open .sidebar { transform: none; }
    body.sidebar-collapsed .sidebar { width: min(86vw, 300px); }
    body.sidebar-collapsed .brand-text,
    body.sidebar-collapsed .nav-label,
    body.sidebar-collapsed .nav-section-title,
    body.sidebar-collapsed .nav-badge,
    body.sidebar-collapsed .nav-caret,
    body.sidebar-collapsed .nav-tag { display: block; }
    body.sidebar-collapsed .nav-sub { display: none; }
    body.sidebar-open .nav-group.is-open .nav-sub { display: block; }
    body.sidebar-collapsed .nav-link { justify-content: flex-start; padding-inline: 12px; }
    body.sidebar-collapsed .brand { justify-content: center; padding-inline: 20px; }
    body.sidebar-collapsed .brand-logo {
        width: auto;
        height: 28px;
        max-width: 248px;
        object-fit: contain;
        object-position: center;
    }
    .menu-btn { display: grid; }
    #collapseBtn { display: none; }
    .user-chip span, .search { display: none; }
    .topbar { padding: 0 12px; }
    body:has(.dropdown.open) .topbar { z-index: 55; }
    .topbar-split { display: none; }
    .notify-menu,
    .user-menu {
        position: fixed;
        top: calc(var(--topbar) + 6px);
        max-height: calc(100vh - var(--topbar) - 88px);
        max-height: calc(100dvh - var(--topbar) - 88px);
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    .notify-menu {
        left: 12px;
        right: 12px;
        width: auto;
    }
    .user-menu {
        left: auto;
        right: 12px;
        width: min(196px, calc(100vw - 24px));
    }
    .page { padding: 18px 14px 16px; }
    .app-footer { padding: 8px 14px 16px; }
    .table-wrap {
        margin-inline: -2px;
        padding-bottom: 4px;
    }
    table.data {
        min-width: 520px;
    }
    table.data th,
    table.data td {
        padding: 10px 10px;
    }
    .row-actions .icon-btn {
        width: 32px;
        height: 32px;
    }
    .login-wrap { grid-template-columns: 1fr; }
    .login-hero { min-height: 220px; padding: 28px 22px; }
    .login-hero h1 { font-size: 28px; }
    .mobile-nav { display: none; }
    .form-grid { grid-template-columns: 1fr; }
    .form-inline { grid-template-columns: 1fr; }
    .cal-wrap { overflow-x: auto; }
    .cal { min-width: 560px; }
    .search-btn { display: grid; }
    .welcome { flex-direction: column; align-items: flex-start; }
    .welcome-time { text-align: left; }
    .toast { bottom: 20px; left: 16px; right: 16px; }
    .kanban { grid-template-columns: repeat(4, minmax(240px, 1fr)); }
    .detail-layout { grid-template-columns: 1fr; }
}

.alert-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}
.alert-box.ok { background: var(--success-soft); color: var(--success); }
.alert-box.warn { background: var(--warning-soft); color: var(--warning); }
.alert-box.danger { background: var(--danger-soft); color: var(--danger); }
.alert-box.info { background: var(--info-soft); color: var(--info); }
.alert-box.gold { background: var(--gold-soft); color: #8a6a2a; }
.alert-box span { font-weight: 500; color: inherit; opacity: 0.85; }

.ui-swatch {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.spinner {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.ribbon {
    position: relative;
    overflow: hidden;
}
.ribbon::after {
    content: attr(data-ribbon);
    position: absolute;
    top: 12px;
    right: -28px;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 36px;
    transform: rotate(35deg);
}

.price-card {
    padding: 28px 22px;
    text-align: center;
    position: relative;
}
.price-card.is-featured {
    border-color: var(--accent);
}
.price-card .kpi-value { margin: 8px 0 4px; }
.price-list { text-align: left; margin: 18px 0; display: grid; gap: 8px; }
.price-list li { font-size: 13px; color: var(--text-2); }

.acc-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-elevated);
    overflow: hidden;
}
.acc-item + .acc-item { margin-top: 8px; }
.acc-item button {
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    padding: 14px 16px;
    font-weight: 700;
    cursor: pointer;
}
.acc-item .acc-body {
    display: none;
    padding: 0 16px 14px;
    font-size: 13px;
    color: var(--text-3);
}
.acc-item.is-open .acc-body { display: block; }

.otp-row { display: flex; gap: 8px; justify-content: center; margin: 18px 0; }
.otp-row input {
    width: 48px;
    height: 52px;
    text-align: center;
    font-size: 20px;
    font-weight: 600;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-muted);
}
.otp-row input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--bg-elevated);
}

.error-page {
    min-height: 100%;
    display: grid;
    place-items: center;
    padding: 40px 20px;
    text-align: center;
    background: var(--bg);
}
.error-page .error-code {
    font-size: 64px;
    font-weight: 600;
    line-height: 1;
    color: var(--accent);
}
.error-page h1 { margin: 12px 0 8px; font-size: 22px; font-weight: 600; }
.error-page p { color: var(--text-3); max-width: 420px; margin: 0 auto 22px; }

.chat-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - var(--topbar) - 120px);
    overflow: hidden;
}
.chat-list { border-right: 1px solid var(--border); overflow: auto; }
.chat-thread { display: flex; flex-direction: column; min-width: 0; }
.chat-thread .chat-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.chat-msgs {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: auto;
    background: var(--bg-muted);
}
.bubble {
    max-width: 72%;
    padding: 10px 12px;
    border-radius: 14px;
    font-size: 13px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}
.bubble.me {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    border-color: transparent;
}
.chat-compose {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
}
.integ-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 12px;
}
.invoice-sheet {
    max-width: 820px;
    margin: 0 auto;
    padding: 32px;
}
.invoice-sheet table { width: 100%; border-collapse: collapse; }
.invoice-sheet th, .invoice-sheet td { padding: 10px 0; border-bottom: 1px solid var(--border); text-align: left; font-size: 13px; }
.invoice-sheet td.num, .invoice-sheet th.num { text-align: right; }
.map-panel {
    height: 280px;
    border-radius: 8px;
    background: #1a2f4a;
    position: relative;
    overflow: hidden;
}
.map-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #c4b07a;
}
.demo-empty {
    padding: 48px 20px;
    text-align: center;
    color: var(--text-3);
}

.detail-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.detail-head .who { display: flex; align-items: center; gap: 14px; min-width: 0; }
.detail-head h1 { font-size: 22px; }
.detail-head .handle { color: var(--text-3); font-size: 13px; font-weight: 500; }
.detail-head .karar {
    margin-top: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
}
.btn-wa { color: var(--success); border-color: var(--success); background: var(--bg-elevated); }
.btn-wa:hover { background: var(--success-soft); }
.btn-doc { color: var(--accent); border-color: var(--accent); background: var(--bg-elevated); }
.btn-doc:hover { background: var(--accent-soft); }

.detail-layout {
    display: grid;
    grid-template-columns: 268px 1fr;
    gap: 16px;
    align-items: start;
    margin-bottom: 16px;
}
.detail-status {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.detail-status .status-pill {
    flex: 1;
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    background: var(--warning);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-radius: 6px;
    text-align: center;
    line-height: 1.25;
}
.detail-status .status-pill.ok { background: var(--success); }
.detail-status .status-pill.info { background: var(--info); }
.detail-status .status-pill.danger { background: var(--danger); }
.detail-status .select { width: 44px; padding: 0 6px; height: 36px; }

.detail-menu { display: grid; gap: 2px; }
.detail-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 9px 10px;
    border-radius: 6px;
    text-align: left;
    font-size: 13px;
    font-weight: 650;
    color: var(--text-2);
    cursor: pointer;
}
.detail-menu button svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }
.detail-menu button .count {
    margin-left: auto;
    font-size: 11px;
    color: var(--text-3);
    font-weight: 700;
}
.detail-menu button.is-active {
    background: var(--accent);
    color: #fff;
}
.detail-menu button.is-active svg { color: #fff; }
.detail-menu button.is-active .count { color: rgba(255,255,255,0.8); }
.detail-nav-foot { margin-top: 12px; }

.sheet { width: 100%; border-collapse: collapse; }
.sheet th {
    text-align: left;
    width: 220px;
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-3);
    font-weight: 700;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    vertical-align: top;
}
.sheet .colon {
    width: 14px;
    color: var(--text-3);
    padding: 12px 8px 12px 0;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.sheet td {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
    vertical-align: top;
}
.sheet tr:last-child th,
.sheet tr:last-child .colon,
.sheet tr:last-child td { border-bottom: 0; }

.dossier.is-editing .app-view { display: none; }
.dossier.is-editing .app-edit { display: block; }
.dossier.is-editing .view-only { display: none !important; }
.dossier.is-editing .edit-only { display: flex; }
.dossier .app-edit { display: none; }
.dossier .edit-only { display: none; }

.empty-note {
    padding: 28px 8px;
    color: var(--text-3);
    font-size: 13px;
}

.edit-cards { margin-bottom: 16px; }
.form-stack { display: grid; gap: 12px; }
.form-stack .field,
.form-stack .select,
.form-stack textarea { width: 100%; }
.form-stack textarea { min-height: 72px; resize: vertical; }

.pay-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 28px;
    align-items: start;
}
.pay-form .label:first-child { margin-top: 0; }
.pay-form .select { width: 100%; margin-bottom: 4px; }

@media (max-width: 980px) {
    .chat-layout { grid-template-columns: 1fr; }
    .chat-list { display: none; }
    .pay-split { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .grid-4 { grid-template-columns: 1fr; }
    .form-grid.cols-3,
    .form-grid.cols-4 { grid-template-columns: 1fr; }
    .page-head h1 { font-size: 22px; }
    .cal .day { min-height: 54px; }
    .otp-row input { width: 40px; height: 44px; }
}

/* Interview list: cards / table */
.btn-group {
    display: inline-flex;
    gap: 0;
}
.btn-group .btn {
    border-radius: 0;
}
.btn-group .btn:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}
.btn-group .btn:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}
.interview-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.interview-rank-cutoff {
    grid-column: 1 / -1;
    height: 0;
    border-top: 4px solid #3490dc;
    margin: 6px 0 12px;
    border-radius: 2px;
}
.interview-card {
    position: relative;
    background: var(--bg-elevated);
    border: none;
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.interview-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(32, 146, 149, 0.15);
}
.interview-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
}
.interview-card__link:hover {
    color: inherit;
    text-decoration: none;
}
.interview-card__meta {
    position: absolute;
    top: 0.4rem;
    left: 0.4rem;
    right: 0.4rem;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.3rem;
}
.interview-card__order {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 3.25rem;
    height: 3.25rem;
    padding: 0 0.5rem;
    background: linear-gradient(135deg, #209295 0%, #1a7578 100%);
    color: #fff;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1;
    border-radius: 0 0 2px 0;
    box-shadow: 0 3px 10px rgba(32, 146, 149, 0.35);
    letter-spacing: -0.02em;
}
.interview-card__order-hash {
    font-size: 0.75rem;
    font-weight: 700;
    opacity: 0.85;
    margin-right: 0.1rem;
    align-self: flex-start;
    margin-top: 0.35rem;
}
.interview-card__order--wide {
    font-size: 1.35rem;
    min-width: 3.75rem;
}
.interview-card--has-order .interview-card__meta {
    top: 0;
    left: 0;
    right: 0.4rem;
    padding-left: 3.5rem;
    min-height: 3.25rem;
    align-items: center;
}
.interview-card__time,
.interview-card__rank {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.45rem;
    border-radius: 0.35rem;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.interview-card__time {
    margin-left: auto;
    background: #f59e0b;
    color: #fff;
}
.interview-card__rank {
    min-width: 1.75rem;
    background: #209295;
    color: #fff;
}
.interview-card__body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 2rem 12px 14px;
}
.interview-card--has-order .interview-card__body {
    padding-top: 3.5rem;
}
.interview-card__photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e6f4f4;
    background: #e6f4f4;
}
.interview-card__photo--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #209295;
    font-size: 2rem;
}
.interview-card__name {
    margin: 4px 0 0;
    font-size: 0.9rem;
    font-weight: 600;
}
.interview-card__branch {
    margin: 0;
    font-size: 12px;
    color: var(--text-2);
}
.interview-card__score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    padding: 0.35rem 0.7rem;
    border-radius: 0.4rem;
    background: #209295;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
}
.interview-schedule-panel.is-hidden,
.interview-schedule-panel[hidden] {
    display: none !important;
}


/* Application detail (BYS-style) */
body.app-is-fullscreen .sidebar,
body.app-is-fullscreen .topbar,
body.app-is-fullscreen .app-footer,
body.app-is-fullscreen .mobile-nav,
body.app-is-fullscreen .overlay {
    display: none !important;
}
body.app-is-fullscreen .page {
    padding: 18px 22px 28px;
}
.app-detail-hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
    align-items: stretch;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 0.75rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.app-detail-hero--nav {
    grid-template-columns: 32px 1fr 32px;
}
.app-detail-hero__main {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 1.25rem;
    align-items: start;
}
.app-detail-hero--interview .app-detail-hero__main {
    grid-template-columns: auto minmax(0, 1.1fr) auto;
}
.app-detail-hero__nav {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}
.app-detail-hero__chevron {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 120px;
    font-size: 3rem;
    line-height: 1;
    color: #6b7785;
    text-decoration: none;
}
.app-detail-hero__chevron:hover { color: #209295; }
.app-detail-hero__chevron--disabled { opacity: 0.35; cursor: default; }
.app-detail-hero__photo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    width: 152px;
}
.app-detail-hero__photo {
    width: 152px;
    height: 152px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #e6f4f4;
    box-shadow: 0 4px 14px rgba(32, 146, 149, 0.2);
    background: #e6f4f4;
}
.app-detail-hero__photo--empty {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #209295;
    font-size: 3.4rem;
}
.app-detail-hero__order-jump {
    width: 152px;
    text-align: center;
}
.app-detail-hero__order-jump-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-2);
    margin-bottom: 0.2rem;
}
.app-detail-hero__order-select {
    min-width: 72px;
    padding: 4px 8px;
    font-size: 0.85rem;
}
.app-detail-hero__primary {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.75rem;
    min-width: 0;
}
.app-detail-hero__kicker {
    margin: 0 0 0.95rem;
    font-size: 0.88rem;
    font-weight: 500;
    color: #8b98a5;
    line-height: 1.3;
}
.app-detail-hero__facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 1.5rem;
    row-gap: 0.95rem;
    width: 100%;
}
.app-detail-hero__facts + .app-detail-hero__facts {
    margin-top: 0.95rem;
}
.app-detail-hero__facts--metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.app-hero-fact {
    min-width: 0;
}
.app-hero-fact__label {
    margin-bottom: 0.18rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9aa6b2;
    line-height: 1.2;
}
.app-hero-fact__value {
    font-size: 0.98rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.35;
    word-break: break-word;
}
.app-detail-hero__interview {
    margin-top: 0.55rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}
.app-detail-hero__interview-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-3);
    margin-bottom: 0.2rem;
}
.app-detail-hero__interview-line {
    font-size: 0.86rem;
    font-weight: 650;
    color: #222;
    line-height: 1.35;
}
.app-detail-hero__interview-note {
    margin-top: 0.35rem;
    font-size: 0.82rem;
    color: var(--text-2);
    line-height: 1.4;
}
.app-detail-hero__interview-note-label {
    font-weight: 700;
    color: #209295;
}
.app-detail-hero__aside {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 220px;
    max-width: 280px;
    background: #fafbfc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
}
.app-detail-hero__aside-row { width: 100%; }
.app-detail__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.32fr);
    gap: 1rem;
    align-items: start;
    margin-top: 0.5rem;
    margin-bottom: 16px;
}
.app-detail__body:has(.app-detail__need) {
    grid-template-columns: minmax(260px, 0.38fr) minmax(0, 1fr) minmax(240px, 0.32fr);
}
.app-detail__need {
    display: grid;
    gap: 0.75rem;
    align-content: start;
    min-width: 0;
}
.app-detail__side {
    position: sticky;
    top: 0.75rem;
    display: grid;
    gap: 0.75rem;
    align-content: start;
    min-width: 0;
}
.app-detail__docs { min-width: 0; }
.app-detail__refs { min-width: 0; }
.app-detail__content {
    display: grid;
    gap: 0.75rem;
    align-content: start;
    min-width: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}
.app-info-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 0.85rem;
    min-width: 0;
}
.app-info-card__title {
    margin: -0.75rem -0.85rem 0.55rem;
    padding: 0.55rem 0.85rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    background: #209295;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
}
.app-info-card--student .app-info-card__title {
    background: #167a6f;
}
.app-info-card--burs .app-info-card__title {
    background: #1c6e78;
}
.app-info-card--others .app-info-card__title {
    background: #3d6b8a;
}
.app-info-card--others .list-row {
    padding: 0.4rem 0;
}
.app-info-card__empty {
    margin: 0;
    font-size: 0.86rem;
}
.app-info-card--identity .app-info-card__title {
    background: #4d6570;
}
.app-info-card--pay .app-info-card__title {
    background: #5a6f78;
}
.app-info-card--pay .pay-split {
    grid-template-columns: 1fr;
    gap: 1rem;
}
.app-info-card--pay .table-wrap {
    overflow-x: auto;
}
.app-info-card__list {
    margin: 0;
    padding: 0;
}
.app-info-card__row {
    display: grid;
    grid-template-columns: minmax(96px, 38%) minmax(0, 1fr);
    gap: 0.35rem 0.65rem;
    padding: 0.28rem 0;
    border-bottom: 1px solid #f0f2f5;
}
.app-info-card__row:last-child { border-bottom: 0; }
.app-info-card__row dt {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-3);
    line-height: 1.35;
}
.app-info-card__row dd {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 600;
    color: #222;
    line-height: 1.35;
    word-break: break-word;
}
.app-docs-panel {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem;
}
.app-docs-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin: -0.75rem -0.75rem 0.65rem;
    padding: 0.55rem 0.75rem;
    background: #5f7378;
    border-radius: 12px 12px 0 0;
}
.app-docs-panel__title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
}
.app-docs-panel__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4rem;
    height: 1.4rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
}
.app-docs-panel__empty {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
}
.app-docs-panel__upload {
    display: inline-flex;
    width: 100%;
    justify-content: center;
    margin-top: 0.65rem;
}
.app-doc-cards {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.4rem;
}
.app-doc-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.45rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.45rem;
    background: #fafbfc;
}
.app-doc-card__ext {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.4rem;
    padding: 0.15rem 0.3rem;
    border-radius: 5px;
    background: #209295;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}
.app-doc-card__body { min-width: 0; }
.app-doc-card__title {
    display: block;
    color: #1f2937;
    font-size: 0.8rem;
    font-weight: 650;
    text-decoration: none;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
a.app-doc-card__title:hover { color: #209295; }
.app-ref-card {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: #fff;
}
.app-ref-card__title {
    margin: -0.75rem -0.75rem 0.65rem;
    padding: 0.45rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    background: #3d7a7c;
    border-radius: 10px 10px 0 0;
}
.app-ref-card__name {
    display: inline-block;
    background: #209295;
    color: #fff;
    border-radius: 6px;
    padding: 0.2rem 0.6rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.app-ref-card__phone {
    font-size: 0.85rem;
    color: var(--text-2);
    margin-bottom: 0.5rem;
}
.app-ref-card__relation-label {
    font-size: 0.78rem;
    color: var(--text-2);
    margin-bottom: 0.25rem;
}
.app-ref-card__relation {
    font-size: 0.88rem;
    line-height: 1.45;
}
.app-detail__meta {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    margin-bottom: 12px;
}
.app-detail__meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}
.app-detail__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #1a2744;
    letter-spacing: -0.02em;
    line-height: 1.2;
}
.app-detail__actions {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.app-detail__destroy {
    display: flex;
    align-items: center;
}
.app-detail__status-form .select { min-width: 180px; }
.app-interview-scores { margin-top: 10px; }
.app-interview-scores summary,
.app-detail__dossier > summary {
    cursor: pointer;
    color: #209295;
    font-weight: 650;
    font-size: 0.9rem;
}
.app-detail__dossier { margin-top: 12px; }
.adm-interview-timer { width: 100%; text-align: center; }
.adm-interview-timer__row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-bottom: 0.35rem;
}
.adm-interview-timer__adjust {
    width: 28px;
    height: 28px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #f1f3f5;
    color: #333;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}
.adm-interview-timer__display {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    height: 32px;
    padding: 0 0.5rem;
    border-radius: 8px;
    background: #209295;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
}
.adm-interview-timer.is-finished .adm-interview-timer__display { background: #dc3545; }
.adm-interview-timer__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
}
.adm-interview-timer__btn {
    border: none;
    background: transparent;
    color: #333;
    font-size: 1.15rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}
.adm-interview-timer__btn--bell:not(.is-on) { opacity: 0.35; }
.adm-interview-score-form { width: 100%; }
.adm-interview-score-form__label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-2);
    margin-bottom: 0.25rem;
}
.adm-interview-score-form__row { display: flex; gap: 0.35rem; }
.adm-interview-score-form__input { flex: 1; min-width: 0; }
.adm-interview-score-form__input--band-gray { border-color: #4b5563; box-shadow: inset 3px 0 0 #4b5563; }
.adm-interview-score-form__input--band-red { border-color: #dc2626; box-shadow: inset 3px 0 0 #dc2626; }
.adm-interview-score-form__input--band-orange { border-color: #ea580c; box-shadow: inset 3px 0 0 #ea580c; }
.adm-interview-score-form__input--band-yellow { border-color: #ca8a04; box-shadow: inset 3px 0 0 #ca8a04; }
.adm-interview-score-form__input--band-green-light { border-color: #65a30d; box-shadow: inset 3px 0 0 #65a30d; }
.adm-interview-score-form__input--band-green-dark { border-color: #166534; box-shadow: inset 3px 0 0 #166534; }
.adm-interview-score-form__feedback { margin-top: 0.35rem; }
.adm-interview-score-form__pill {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem 0.4rem;
    padding: 0.35rem 0.65rem;
    border-radius: 0.5rem;
    font-size: 0.72rem;
    font-weight: 600;
    background: #f1f5f9;
    color: #334155;
}
.adm-interview-score-form__pill-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #64748b;
}
.adm-interview-score-form__pill--gray .adm-interview-score-form__pill-dot { background: #4b5563; }
.adm-interview-score-form__pill--red .adm-interview-score-form__pill-dot { background: #dc2626; }
.adm-interview-score-form__pill--orange .adm-interview-score-form__pill-dot { background: #ea580c; }
.adm-interview-score-form__pill--yellow .adm-interview-score-form__pill-dot { background: #ca8a04; }
.adm-interview-score-form__pill--green-light .adm-interview-score-form__pill-dot { background: #65a30d; }
.adm-interview-score-form__pill--green-dark .adm-interview-score-form__pill-dot { background: #166534; }
.adm-interview-score-form__scale {
    display: flex;
    gap: 2px;
    margin-top: 0.45rem;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
}
.adm-interview-score-form__scale-seg { background: #cbd5e1; }
.adm-interview-score-form__scale-seg--gray { background: #4b5563; }
.adm-interview-score-form__scale-seg--red { background: #dc2626; }
.adm-interview-score-form__scale-seg--orange { background: #ea580c; }
.adm-interview-score-form__scale-seg--yellow { background: #ca8a04; }
.adm-interview-score-form__scale-seg--green-light { background: #65a30d; }
.adm-interview-score-form__scale-seg--green-dark { background: #166534; }
.adm-interview-score-form__scale-seg.is-active { outline: 2px solid #0f172a; outline-offset: 1px; }
.adm-interview-score-form__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.55rem;
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0;
}
.adm-interview-score-form__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.65rem;
    color: var(--text-2);
}
.adm-interview-score-form__legend-dot {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
}
.adm-interview-score-form__legend-dot--gray { background: #4b5563; }
.adm-interview-score-form__legend-dot--red { background: #dc2626; }
.adm-interview-score-form__legend-dot--orange { background: #ea580c; }
.adm-interview-score-form__legend-dot--yellow { background: #ca8a04; }
.adm-interview-score-form__legend-dot--green-light { background: #65a30d; }
.adm-interview-score-form__legend-dot--green-dark { background: #166534; }
@media (max-width: 1100px) {
    .app-detail__body,
    .app-detail__body:has(.app-detail__need) { grid-template-columns: 1fr; }
    .app-detail__side { position: static; }
    .app-detail-hero--nav { grid-template-columns: 28px 1fr 28px; }
    .app-detail-hero--interview .app-detail-hero__main,
    .app-detail-hero__main {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    .app-detail-hero__aside { max-width: none; }
    .app-detail-hero__facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .app-detail-hero__facts--metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

