:root {
    --bg: #f4f6f8;
    --surface: #fff;
    --surface-2: #f8fafb;
    --text: #17212b;
    --muted: #65717e;
    --line: #dfe4e8;
    --line-strong: #cbd3da;
    --navy: #071d33;
    --navy-2: #0d2945;
    --primary: #1464a5;
    --primary-hover: #0f4f83;
    --blue-soft: #eaf3fa;
    --danger: #c93742;
    --danger-soft: #fcecef;
    --warning: #a86100;
    --warning-soft: #fff4df;
    --success: #17765a;
    --success-soft: #e8f6f1;
    --shadow: 0 1px 2px rgba(13, 32, 50, .06), 0 8px 24px rgba(13, 32, 50, .04);
    --radius: 10px;
    --sidebar: 250px;
    color-scheme: light;
    font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif
}

[data-theme=dark] {
    --bg: #0c1620;
    --surface: #132230;
    --surface-2: #172a3a;
    --text: #edf3f7;
    --muted: #9dafbd;
    --line: #263b4c;
    --line-strong: #385066;
    --navy: #07131f;
    --navy-2: #0d2235;
    --primary: #4b9bd7;
    --primary-hover: #68afe2;
    --blue-soft: #17354c;
    --danger: #f06c75;
    --danger-soft: #3a2029;
    --warning: #f2b24f;
    --warning-soft: #3c301e;
    --success: #52b995;
    --success-soft: #17392f;
    --shadow: 0 1px 3px rgba(0, 0, 0, .28), 0 12px 34px rgba(0, 0, 0, .15);
    color-scheme: dark
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5
}

small {
    line-height: 1.45
}

a {
    color: inherit;
    text-decoration: none
}

button,
input,
select,
textarea {
    font: inherit
}

button {
    cursor: pointer
}

h1,
h2,
h3,
p {
    margin-top: 0
}

h1 {
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: -.03em;
    margin-bottom: 6px
}

h2 {
    font-size: 17px;
    letter-spacing: -.01em;
    margin-bottom: 4px
}

h3 {
    font-size: 14px;
    margin-bottom: 3px
}

small,
.muted {
    color: var(--muted)
}

.app-shell {
    min-height: 100vh
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar);
    background: var(--navy);
    color: #d9e5ef;
    display: flex;
    flex-direction: column;
    z-index: 30;
    border-right: 1px solid rgba(255, 255, 255, .06)
}

.brand {
    height: 76px;
    padding: 0 22px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .08)
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    background: #fff;
    color: #0b3458;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: -.04em;
    border-radius: 6px
}

.brand strong,
.brand small {
    display: block
}

.brand strong {
    font-size: 16px;
    letter-spacing: .01em
}

.brand small {
    color: #8ea7ba;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .12em
}

.main-nav {
    padding: 20px 12px;
    overflow: auto;
    flex: 1
}

.nav-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    color: #67839a;
    padding: 0 12px;
    margin: 16px 0 7px
}

.nav-label:first-child {
    margin-top: 0
}

.nav-link {
    height: 42px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    border-radius: 6px;
    color: #aebfcd;
    font-weight: 600;
    margin-bottom: 3px
}

.nav-link span {
    font-size: 18px;
    width: 20px;
    text-align: center;
    color: #8099ad
}

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

.nav-link.is-active {
    background: #123c60;
    color: #fff;
    box-shadow: inset 3px 0 0 #5fa8df
}

.nav-link.is-active span {
    color: #8bc2eb
}

.sidebar-foot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, .08)
}

.sidebar-user {
    min-width: 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    padding: 5px;
    margin: -5px;
    border-radius: 7px
}

.sidebar-user:hover,
.sidebar-user.is-active {
    background: rgba(255,255,255,.07)
}

.sidebar-foot strong,
.sidebar-foot small {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.sidebar-foot strong {
    font-size: 12px;
    color: #fff
}

.sidebar-foot small {
    font-size: 10px;
    color: #7892a7
}

.user-avatar,
.avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--primary);
    font-weight: 700;
    flex: 0 0 auto
}

.sidebar .user-avatar {
    background: #1b4b70;
    color: #fff
}

.sidebar-foot form {
    margin: 0
}

.sidebar-foot .icon-btn {
    color: #8ba1b3
}

.main-area {
    margin-left: var(--sidebar);
    min-height: 100vh
}

.topbar {
    height: 76px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 20
}

.global-search {
    border: 1px solid var(--line);
    background: var(--surface-2);
    color: var(--muted);
    height: 40px;
    width: min(480px, 50vw);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border-radius: 7px;
    text-align: left
}

.global-search span:nth-child(2) {
    flex: 1
}

.global-search kbd,
.search-box kbd {
    border: 1px solid var(--line-strong);
    background: var(--surface);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 10px;
    color: var(--muted);
    box-shadow: 0 1px 0 var(--line)
}

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

.page-wrap {
    padding: 28px 30px 60px;
    max-width: 1600px;
    margin: auto
}

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px
}

.page-head p {
    color: var(--muted);
    margin-bottom: 0
}

.eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .14em;
    color: var(--muted);
    margin-bottom: 7px
}

.back-link {
    display: inline-block;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 12px
}

.title-line {
    display: flex;
    align-items: center;
    gap: 12px
}

.title-line h1 {
    margin: 0
}

.btn {
    border: 0;
    border-radius: 6px;
    min-height: 38px;
    padding: 0 15px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap
}

.btn-primary {
    background: var(--primary);
    color: #fff
}

.btn-primary:hover {
    background: var(--primary-hover)
}

.btn-secondary {
    background: var(--surface);
    border: 1px solid var(--line-strong);
    color: var(--text)
}

.btn-secondary:hover,
.btn-ghost:hover {
    background: var(--surface-2)
}

.btn-danger {
    background: var(--danger);
    color: #fff
}

.btn-ghost {
    background: transparent;
    color: var(--text)
}

.btn-sm {
    min-height: 32px;
    padding: 0 11px;
    font-size: 12px
}

.btn-block {
    width: 100%;
    min-height: 44px
}

.icon-btn {
    border: 0;
    background: transparent;
    color: var(--text);
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    font-size: 18px
}

.icon-btn:hover {
    background: var(--surface-2)
}

.link-btn {
    border: 0;
    background: none;
    color: var(--primary);
    padding: 0;
    font-weight: 700
}

.mobile-only {
    display: none
}

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

.card-head {
    min-height: 62px;
    padding: 15px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line)
}

.card-head h2,
.card-head p {
    margin: 0
}

.card-head>a,
.card-head .link-btn {
    color: var(--primary);
    font-weight: 700;
    font-size: 12px
}

.priority-strip {
    display: grid;
    grid-template-columns: 1.6fr repeat(4, 1fr);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
    margin-bottom: 18px
}

.priority-main,
.metric {
    min-height: 104px;
    padding: 19px 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--line)
}

.priority-main {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 15px
}

.priority-main div {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: end;
    column-gap: 9px
}

.priority-main small {
    grid-column: 1/-1
}

.priority-main strong {
    font-size: 34px;
    line-height: 1
}

.priority-main span:last-child,
.metric span {
    color: var(--muted);
    font-size: 12px
}

.metric:last-child {
    border: 0
}

.metric small {
    font-size: 10px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: .1em
}

.metric strong {
    font-size: 25px;
    margin: 2px 0
}

.status-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 800;
    flex: 0 0 auto
}

.status-icon.danger {
    background: var(--danger-soft);
    color: var(--danger)
}

.status-icon.success {
    background: var(--success-soft);
    color: var(--success)
}

.status-icon.warning {
    background: var(--warning-soft);
    color: var(--warning)
}

.status-icon.neutral {
    background: var(--surface-2);
    color: var(--primary);
    border: 1px solid var(--line)
}

.danger-text {
    color: var(--danger) !important
}

.dashboard-grid,
.profile-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 18px
}

.span-12 {
    grid-column: span 12
}

.span-8 {
    grid-column: span 8
}

.span-7 {
    grid-column: span 7
}

.span-6 {
    grid-column: span 6
}

.span-5 {
    grid-column: span 5
}

.span-4 {
    grid-column: span 4
}

.list-rows {
    padding: 5px 0
}

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

.list-row:last-child {
    border-bottom: 0
}

.list-row:hover {
    background: var(--surface-2)
}

.list-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1
}

.list-copy strong,
.list-copy small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.danger-bg {
    background: var(--danger-soft);
    color: var(--danger)
}

.age {
    font-size: 11px;
    color: var(--muted);
    font-weight: 700
}

.badge {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-weight: 800
}

.badge.success {
    background: var(--success-soft);
    color: var(--success)
}

.badge.danger {
    background: var(--danger-soft);
    color: var(--danger)
}

.badge.warning {
    background: var(--warning-soft);
    color: var(--warning)
}

.badge.neutral {
    background: var(--surface-2);
    color: var(--muted);
    border: 1px solid var(--line)
}

.bucket-list {
    padding: 17px 19px
}

.bucket-list>div {
    display: grid;
    grid-template-columns: 90px 1fr 25px;
    gap: 10px;
    align-items: center;
    margin: 12px 0;
    font-size: 12px
}

.bar {
    height: 6px;
    background: var(--surface-2);
    border-radius: 4px;
    overflow: hidden
}

.bar i {
    display: block;
    height: 100%;
    border-radius: 4px
}

.bar .green {
    background: var(--success)
}

.bar .blue {
    background: var(--primary)
}

.bar .amber {
    background: var(--warning)
}

.bar .red {
    background: var(--danger)
}

.stat-list {
    padding: 8px 18px
}

.stat-list>div {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 41px;
    border-bottom: 1px solid var(--line)
}

.stat-list>div:last-child {
    border-bottom: 0
}

.stat-list>div>span:nth-child(2) {
    flex: 1
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%
}

.dot.red {
    background: var(--danger)
}

.dot.amber {
    background: var(--warning)
}

.dot.blue {
    background: var(--primary)
}

.dot.green {
    background: var(--success)
}

.quick-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 16px
}

.quick-links>* {
    border: 1px solid var(--line);
    background: var(--surface-2);
    padding: 11px;
    text-align: left;
    border-radius: 6px;
    color: var(--text);
    font-weight: 700
}

.quick-links>*:hover {
    border-color: var(--primary);
    color: var(--primary)
}

.timeline {
    padding: 15px 19px
}

.timeline>div {
    display: grid;
    grid-template-columns: 12px 1fr;
    gap: 11px;
    position: relative;
    padding-bottom: 16px
}

.timeline>div>span {
    width: 9px;
    height: 9px;
    background: var(--primary);
    border: 2px solid var(--surface);
    outline: 1px solid var(--primary);
    border-radius: 50%;
    margin-top: 5px;
    z-index: 1
}

.timeline>div:not(:last-child):after {
    content: "";
    position: absolute;
    left: 4px;
    top: 15px;
    bottom: 0;
    border-left: 1px solid var(--line-strong)
}

.timeline p {
    margin: 0 0 3px
}

.timeline.compact {
    padding: 8px 18px
}

.timeline.large {
    padding: 22px
}

.empty-compact {
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--muted)
}

.empty-compact>span {
    font-size: 28px
}

.empty-compact p {
    margin: 2px 0
}

.empty-mini {
    padding: 25px;
    text-align: center;
    color: var(--muted)
}

.empty-state {
    text-align: center;
    padding: 80px 20px
}

.empty-state.compact {
    padding: 50px 20px
}

.empty-icon {
    font-size: 28px;
    font-weight: 800;
    display: grid;
    place-items: center;
    margin: 0 auto 12px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--primary)
}

.filter-card {
    padding: 12px;
    margin-bottom: 16px
}

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

.filter-bar select {
    width: 160px;
    flex: 0 0 160px
}

.filter-bar>.btn {
    flex: 0 0 auto
}

.search-field {
    height: 41px;
    min-width: 0;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    border-radius: 6px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    flex: 1 1 auto
}

.search-field>span {
    width: 18px;
    flex: 0 0 18px;
    text-align: center;
    line-height: 1;
    color: var(--muted)
}

.search-field input {
    height: 39px;
    min-width: 0;
    border: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    outline: 0;
    box-shadow: none !important;
    width: 100%
}

.table-card {
    overflow: hidden
}

.data-table .tr {
    display: grid;
    grid-template-columns: 2.2fr 1fr 1fr 1fr .8fr 30px;
    align-items: center;
    gap: 16px;
    min-height: 62px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--line)
}

.data-table .tr:last-child {
    border-bottom: 0
}

.data-table a.tr:hover {
    background: var(--surface-2)
}

.data-table .th {
    min-height: 42px;
    background: var(--surface-2);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--muted);
    text-transform: uppercase
}

.data-table .tr>span {
    min-width: 0
}

.data-table .tr>span>small,
.data-table .tr>span>strong {
    display: block
}

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

.attention-cell {
    display: flex;
    gap: 5px
}

.data-table .six {
    grid-template-columns: 1.5fr 1fr 1fr 1fr .6fr .7fr
}

.data-table .four {
    grid-template-columns: 2fr 1fr 1fr 1fr
}

.cases-table .tr {
    grid-template-columns: 2fr 1.2fr .6fr .6fr 1fr .7fr
}

.case-detail .tr {
    grid-template-columns: 2fr .55fr .8fr 1fr 1fr 1fr
}

.simple-table .tr {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    align-items: center;
    min-height: 50px;
    padding: 9px 18px;
    border-bottom: 1px solid var(--line)
}

.simple-table .th {
    background: var(--surface-2);
    font-size: 10px;
    font-weight: 800;
    color: var(--muted);
    text-transform: uppercase
}

.recent-runs {
    margin-top: 18px
}

label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--text);
    font-weight: 700;
    font-size: 12px
}

label>span {
    color: var(--muted);
    font-weight: 400
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--text);
    border-radius: 6px;
    padding: 10px 11px;
    outline: 0
}

input,
select {
    height: 41px
}

textarea {
    resize: vertical;
    min-height: 88px
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 14%, transparent)
}

.form-layout,
.case-form {
    display: grid;
    gap: 16px;
    max-width: 1100px
}

.form-section {
    padding-bottom: 22px
}

.section-title {
    display: flex;
    gap: 13px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px
}

.section-title>span {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    font-size: 10px;
    color: var(--primary);
    font-weight: 800
}

.section-title h2,
.section-title p {
    margin: 0
}

.section-title p {
    color: var(--muted);
    font-size: 12px
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
    padding: 0 22px
}

.form-grid .span-2 {
    grid-column: span 2
}

.sticky-actions {
    position: sticky;
    bottom: 14px;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding: 12px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px)
}

.profile-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 22px
}

.profile-identity {
    display: flex;
    align-items: center;
    gap: 15px
}

.avatar.xl {
    width: 58px;
    height: 58px;
    font-size: 20px
}

.avatar.square {
    border-radius: 7px
}

.profile-identity p {
    margin: 5px 0 0;
    color: var(--muted)
}

.profile-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap
}

.action-menu {
    position: relative
}

.action-menu>summary {
    list-style: none;
    cursor: pointer;
    user-select: none
}

.action-menu>summary::-webkit-details-marker {
    display: none
}

.action-menu>summary span {
    transition: transform .18s
}

.action-menu[open]>summary span {
    transform: rotate(180deg)
}

.action-menu-panel {
    position: absolute;
    z-index: 25;
    top: calc(100% + 7px);
    right: 0;
    width: 285px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    box-shadow: var(--shadow)
}

.action-menu-panel a,
.action-menu-panel button {
    display: block;
    width: 100%;
    padding: 10px 11px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    text-align: left;
    cursor: pointer
}

.action-menu-panel a:hover,
.action-menu-panel button:hover {
    background: var(--surface-2)
}

.action-menu-panel strong,
.action-menu-panel small {
    display: block
}

.action-menu-panel small {
    margin-top: 2px;
    font-size: 12px
}

.profile-quick-menu .action-menu-panel {
    width: 275px
}

.tabs {
    display: flex;
    gap: 2px;
    overflow: auto;
    border-bottom: 1px solid var(--line);
    margin: 0 0 20px
}

.tabs a {
    padding: 12px 13px;
    border-bottom: 2px solid transparent;
    color: var(--muted);
    font-weight: 700;
    white-space: nowrap
}

.tabs a.active {
    color: var(--primary);
    border-color: var(--primary)
}

.tabs b {
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 8px;
    background: var(--surface-2)
}

.tab-panel {
    display: none
}

.tab-panel.active {
    display: block
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding: 20px
}

.detail-grid small,
.detail-grid strong {
    display: block
}

.detail-grid strong {
    margin-top: 3px
}

.attention-card {
    padding: 20px
}

.attention-card>div {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line)
}

.attention-card>div:last-child {
    border: 0
}

.assignment-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    padding: 17px
}

.assignment-cards>div {
    display: flex;
    gap: 11px;
    padding: 13px;
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 7px
}

.assignment-cards strong,
.assignment-cards small {
    display: block
}

.assignment-cards p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px
}

.section-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin: 25px 0 14px
}

.section-toolbar p {
    margin: 0;
    color: var(--muted)
}

.cards-list {
    display: grid;
    gap: 9px
}

.certification-row {
    display: grid;
    grid-template-columns: 42px 1.5fr .6fr 1fr auto auto;
    gap: 15px;
    align-items: center;
    padding: 15px 18px
}

.certification-row small,
.certification-row strong {
    display: block
}

.operation-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line)
}

.operation-row:last-child {
    border: 0
}

.operation-row>div {
    flex: 1
}

.operation-row h3,
.operation-row p {
    margin: 0
}

.operation-row p {
    color: var(--muted)
}

.check-icon {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    color: var(--muted)
}

.check-icon.done {
    background: var(--success-soft);
    border-color: transparent;
    color: var(--success)
}

.alert-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 16px
}

.alert-row>div {
    flex: 1
}

.alert-row h3,
.alert-row p {
    margin: 0
}

.operation-group {
    margin-bottom: 22px
}

.group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px
}

.group-title h2 {
    margin: 0
}

.group-title span,
.history-block summary span {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 1px 7px;
    font-size: 10px
}

.history-block {
    margin-top: 25px
}

.history-block summary {
    cursor: pointer;
    font-weight: 700;
    margin-bottom: 10px
}

.muted-row {
    opacity: .7
}

.alerts-page {
    grid-template-columns: repeat(2, 1fr)
}

.alert-card {
    padding: 18px
}

.alert-top {
    display: flex;
    align-items: center;
    gap: 11px
}

.alert-top>div {
    flex: 1
}

.alert-top h2,
.alert-top p {
    margin: 0
}

.alert-description {
    min-height: 52px;
    margin: 18px 0;
    color: var(--text)
}

.alert-actions {
    display: flex;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding-top: 13px
}

.view-switch {
    display: flex;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 7px;
    width: max-content;
    margin-bottom: 17px;
    padding: 3px
}

.view-switch a {
    padding: 7px 13px;
    border-radius: 5px;
    color: var(--muted);
    font-weight: 700;
    font-size: 12px
}

.view-switch a.active {
    background: var(--primary);
    color: #fff
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 17px
}

.summary-metric {
    background: var(--surface);
    border: 1px solid var(--line);
    padding: 15px;
    border-radius: 7px
}

.summary-metric small,
.summary-metric strong {
    display: block
}

.summary-metric small {
    font-size: 9px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: .08em
}

.summary-metric strong {
    font-size: 17px;
    margin-top: 5px
}

.summary-metric.accent {
    border-top: 3px solid var(--primary)
}

.case-items {
    display: grid;
    gap: 12px;
    padding: 0 22px 16px
}

.case-item {
    border: 1px solid var(--line);
    background: var(--surface-2);
    border-radius: 7px;
    padding: 15px
}

.case-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px
}

.case-item .form-grid {
    padding: 0
}

.case-grid {
    grid-template-columns: repeat(5, 1fr)
}

.case-grid .span-2 {
    grid-column: span 2
}

.case-form #addCaseItem {
    margin-left: 22px
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px
}

.admin-card {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 13px;
    padding: 18px
}

.admin-card>span {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 7px;
    background: var(--blue-soft);
    color: var(--primary);
    font-weight: 800;
    font-size: 18px
}

.admin-card h2,
.admin-card p {
    margin: 0
}

.admin-card p {
    color: var(--muted)
}

.admin-card:hover {
    border-color: var(--primary)
}

.settings-list {
    padding: 20px;
    max-width: 900px
}

.settings-list h2 {
    margin: 25px 0 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line)
}

.settings-list h2:first-child {
    margin-top: 0
}

.settings-list label {
    display: grid;
    grid-template-columns: 1fr 220px;
    align-items: center;
    padding: 13px 0;
    font-size: 14px
}

.settings-list small {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    line-height: 1.45
}

.settings-list label>span>strong {
    display: block;
    font-size: 14px;
    line-height: 1.4
}

.settings-list input {
    font-size: 14px
}

.catalog-table .tr {
    grid-template-columns: repeat(var(--catalog-columns), minmax(120px, 1fr));
    min-width: calc(var(--catalog-columns) * 155px)
}

.catalog-table .row-actions,
.admin-tariffs-table .row-actions {
    flex-wrap: wrap
}

.catalog-table .row-actions form,
.admin-tariffs-table .row-actions form,
.year-card form {
    margin: 0
}

.year-card {
    display: flex;
    flex-direction: column;
    gap: 10px
}

.year-card>a {
    display: block
}

.year-card.selected {
    border-color: var(--primary);
    box-shadow: inset 0 3px 0 var(--primary)
}

.year-card form .btn {
    width: 100%
}

.tariffs-table.admin-tariffs-table .tr {
    grid-template-columns: minmax(230px, 2fr) .5fr .9fr .7fr 1fr 1.2fr;
    min-width: 980px
}

.audit-filters {
    display: grid;
    grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
    align-items: end;
    gap: 12px;
    padding: 16px;
    margin-bottom: 16px
}

.audit-filter-actions {
    display: flex;
    gap: 7px
}

.audit-list {
    display: grid;
    gap: 9px
}

.audit-event {
    overflow: hidden
}

.audit-event>summary {
    display: grid;
    grid-template-columns: minmax(175px, .45fr) minmax(240px, 1.25fr) minmax(210px, .65fr) 18px;
    align-items: center;
    gap: 14px;
    min-height: 68px;
    padding: 12px 16px;
    list-style: none;
    cursor: pointer
}

.audit-action,
.audit-entity,
.audit-origin {
    min-width: 0
}

.audit-action .badge {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.25
}

.audit-entity strong,
.audit-entity small,
.audit-origin strong,
.audit-origin small {
    overflow-wrap: anywhere
}

.audit-event>summary::-webkit-details-marker {
    display: none
}

.audit-event>summary span strong,
.audit-event>summary span small {
    display: block
}

.audit-event>summary i {
    font-style: normal;
    color: var(--muted);
    transition: transform .18s
}

.audit-event[open]>summary i {
    transform: rotate(180deg)
}

.audit-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
    border-top: 1px solid var(--line);
    background: var(--surface-2)
}

.audit-detail>div {
    min-width: 0
}

.audit-detail small {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em
}

.audit-detail pre {
    min-height: 58px;
    max-height: 280px;
    overflow: auto;
    margin: 0;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    font: 12px/1.5 Consolas, monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere
}

.audit-agent {
    grid-column: 1 / -1
}

.audit-agent p {
    margin: 0;
    color: var(--muted);
    overflow-wrap: anywhere
}

.form-note {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5
}

.account-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start
}

.account-card {
    padding: 22px
}

.account-card .card-head {
    margin-bottom: 4px
}

.account-card label small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4
}

.account-security-note {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--surface-2)
}

.account-security-note>span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--success-soft);
    color: var(--success);
    font-weight: 800
}

.account-security-note p,
.account-security-note strong,
.account-security-note small {
    display: block;
    margin: 0
}

.account-security-note small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px
}

.upload-card {
    text-align: center;
    padding: 55px
}

.upload-icon {
    font-size: 30px;
    width: 66px;
    height: 66px;
    display: grid;
    place-items: center;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: var(--blue-soft);
    color: var(--primary)
}

.upload-form {
    max-width: 520px;
    margin: 25px auto 0;
    display: grid;
    gap: 12px
}

.mapping-card {
    padding-bottom: 20px
}

.mapping-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 9px 15px;
    align-items: center;
    padding: 20px;
    max-width: 800px
}

.mapping-grid>strong {
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase
}

.mapping-card>h3 {
    padding: 0 20px
}

.preview-table {
    overflow: auto;
    margin: 0 20px;
    border: 1px solid var(--line)
}

.preview-table table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap
}

.preview-table th,
.preview-table td {
    padding: 9px 12px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 12px
}

.preview-table th {
    background: var(--surface-2)
}

.modal {
    width: min(600px, calc(100vw - 30px));
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    padding: 0;
    box-shadow: 0 25px 80px rgba(0, 0, 0, .3)
}

.modal.small {
    width: min(480px, calc(100vw - 30px))
}

.modal::backdrop {
    background: rgba(5, 15, 25, .62);
    backdrop-filter: blur(2px)
}

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 22px 14px;
    border-bottom: 1px solid var(--line)
}

.modal-head h2 {
    font-size: 20px
}

.quick-tabs {
    display: flex;
    border-bottom: 1px solid var(--line);
    padding: 0 20px
}

.quick-tabs>* {
    border: 0;
    background: none;
    padding: 11px 13px;
    color: var(--muted);
    font-weight: 700
}

.quick-tabs .active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary)
}

.quick-form,
.stack-form {
    padding: 20px 22px;
    display: grid;
    gap: 15px
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 5px
}

.hidden {
    display: none !important
}

.search-modal {
    width: min(680px, calc(100vw - 30px));
    top: -25vh
}

.search-box {
    height: 60px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 18px;
    border-bottom: 1px solid var(--line)
}

.search-box input {
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 17px;
    flex: 1
}

.search-results {
    max-height: 430px;
    overflow: auto;
    padding: 8px
}

.search-hint {
    padding: 30px;
    text-align: center;
    color: var(--muted)
}

.search-section-title {
    font-size: 9px;
    font-weight: 800;
    color: var(--muted);
    letter-spacing: .1em;
    padding: 10px 10px 4px
}

.search-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 6px
}

.search-result:hover {
    background: var(--surface-2)
}

.search-result span {
    flex: 1
}

.search-result strong,
.search-result small {
    display: block
}

.toast {
    position: fixed;
    right: 24px;
    top: 90px;
    z-index: 100;
    min-width: 280px;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
    border-left: 4px solid var(--success);
    padding: 13px 14px;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    border-radius: 6px
}

.toast-error {
    border-left-color: var(--danger)
}

.toast-warning {
    border-left-color: var(--warning)
}

.toast button {
    border: 0;
    background: none;
    color: var(--muted)
}

.auth-body {
    background: var(--surface)
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr
}

.auth-intro {
    background: linear-gradient(150deg, #06192b, #0c3657);
    color: #fff;
    padding: 48px clamp(40px, 7vw, 110px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden
}

.auth-intro:after {
    content: "";
    position: absolute;
    width: 500px;
    height: 500px;
    border: 1px solid rgba(255, 255, 255, .1);
    transform: rotate(35deg);
    right: -280px;
    bottom: -140px
}

.auth-intro .brand {
    padding: 0;
    border: 0;
    height: auto
}

.auth-intro h1 {
    font-size: clamp(36px, 4vw, 58px);
    letter-spacing: -.045em;
    line-height: 1.06
}

.auth-intro>div>p:last-child {
    font-size: 17px;
    color: #a9c2d5;
    max-width: 530px
}

.auth-intro footer {
    color: #7293aa;
    font-size: 12px
}

.auth-panel {
    display: grid;
    place-items: center;
    padding: 30px;
    position: relative
}

.auth-card {
    width: min(400px, 100%)
}

.auth-card h2 {
    font-size: 28px
}

.auth-card>.muted {
    margin-bottom: 25px
}

.auth-theme {
    position: absolute;
    right: 25px;
    top: 25px
}

.inline-alert {
    padding: 11px;
    border-radius: 6px;
    margin-bottom: 16px
}

.inline-alert.error {
    background: var(--danger-soft);
    color: var(--danger)
}

.portfolio-warning {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
    border-color: color-mix(in srgb, var(--warning) 35%, var(--line));
    background: color-mix(in srgb, var(--warning) 9%, var(--surface));
}

.portfolio-warning>span {
    color: var(--muted);
    font-size: 12px;
}

.portfolio-warning>div {
    display: grid;
    gap: 4px;
}

.portfolio-warning a {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

.btn.is-loading {
    cursor: wait;
    opacity: .72;
}

.token-reveal {
    background: var(--navy-2);
    color: #fff;
    border-radius: 8px;
    padding: 22px;
    margin-bottom: 16px
}

.token-reveal code {
    display: block;
    padding: 14px;
    background: #061624;
    border: 1px solid #31536d;
    border-radius: 6px;
    color: #9bd4ff;
    overflow: auto;
    margin: 12px 0
}

.token-reveal p:last-child {
    color: #9bb2c3;
    margin: 0
}

.year-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 16px
}

.year-card {
    padding: 16px
}

.year-card small,
.year-card strong,
.year-card span {
    display: block
}

.year-card strong {
    font-size: 24px
}

.year-card p {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 11px
}

.tariffs-table .tr {
    grid-template-columns: 2fr .5fr .8fr .7fr 1fr
}

.case-parameters {
    margin-bottom: 22px;
    overflow: hidden
}

.case-parameters>summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 13px 18px;
    cursor: pointer
}

.case-parameters>summary::-webkit-details-marker,
.case-breakdown>summary::-webkit-details-marker {
    display: none
}

.case-parameters>summary>span:first-child {
    display: flex;
    flex-direction: column;
    flex: 1
}

.case-parameters>summary small {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .1em
}

.case-parameters .summary-hint {
    color: var(--primary);
    font-size: 11px;
    font-weight: 700
}

.case-parameters>summary i,
.breakdown-chevron {
    font-style: normal;
    color: var(--muted);
    transition: transform .2s
}

.case-parameters[open]>summary i,
.case-breakdown[open] .breakdown-chevron {
    transform: rotate(180deg)
}

.parameter-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    border-top: 1px solid var(--line);
    background: var(--surface-2)
}

.parameter-grid>div {
    padding: 14px;
    border-right: 1px solid var(--line)
}

.parameter-grid>div:last-child {
    border: 0
}

.parameter-grid small,
.parameter-grid strong {
    display: block
}

.parameter-grid small {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .07em;
    color: var(--muted)
}

.parameter-grid strong {
    font-size: 12px;
    margin-top: 4px
}

.simulator-detail {
    display: grid;
    gap: 10px
}

.simulator-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin: 7px 0 5px
}

.simulator-heading h2,
.simulator-heading p {
    margin: 0
}

.simulator-heading p {
    color: var(--muted);
    font-size: 12px
}

.simulator-heading>span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700
}

.case-breakdown {
    overflow: hidden
}

.case-breakdown>summary {
    list-style: none;
    display: grid;
    grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(120px, 1fr)) 84px 18px;
    align-items: center;
    gap: 16px;
    min-height: 78px;
    padding: 12px 18px;
    cursor: pointer
}

.case-breakdown>summary:hover {
    background: var(--surface-2)
}

.case-person {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0
}

.case-person>span:last-child {
    min-width: 0
}

.case-person strong,
.case-person small,
.case-summary-value small,
.case-summary-value strong {
    display: block
}

.case-person strong,
.case-person small {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.case-summary-value small {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .07em;
    color: var(--muted)
}

.case-summary-value strong {
    font-size: 12px;
    margin-top: 3px
}

.margin-pill {
    justify-self: end;
    min-width: 70px;
    text-align: center;
    padding: 6px 8px;
    border-radius: 5px;
    background: var(--warning-soft);
    color: var(--warning);
    font-weight: 800
}

.margin-pill.positive {
    background: var(--success-soft);
    color: var(--success)
}

.margin-pill.negative {
    background: var(--danger-soft);
    color: var(--danger)
}

.negative {
    color: var(--danger) !important
}

.breakdown-content {
    border-top: 1px solid var(--line);
    background: var(--surface-2);
    padding: 14px
}

.breakdown-group {
    display: grid;
    grid-template-columns: 210px 1fr;
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 3px solid var(--line-strong);
    border-radius: 7px;
    margin-bottom: 9px;
    overflow: hidden
}

.breakdown-group:last-child {
    margin-bottom: 0
}

.breakdown-group.income {
    border-left-color: var(--primary)
}

.breakdown-group.payroll {
    border-left-color: #8f5bb7
}

.breakdown-group.costs {
    border-left-color: var(--warning)
}

.breakdown-group.result {
    border-left-color: var(--success)
}

.breakdown-title {
    display: flex;
    gap: 10px;
    padding: 15px;
    border-right: 1px solid var(--line);
    background: var(--surface-2)
}

.breakdown-title>span {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--primary);
    font-size: 9px;
    font-weight: 800;
    flex: 0 0 auto
}

.breakdown-title h3,
.breakdown-title p {
    margin: 0
}

.breakdown-title p {
    color: var(--muted);
    font-size: 10px;
    margin-top: 3px
}

.breakdown-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(135px, 1fr))
}

.breakdown-metrics>div {
    padding: 14px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    min-height: 65px
}

.breakdown-metrics>div:last-child {
    border-right: 0
}

.breakdown-metrics small,
.breakdown-metrics strong {
    display: block
}

.breakdown-metrics small {
    font-size: 8px;
    font-weight: 800;
    letter-spacing: .07em;
    color: var(--muted)
}

.breakdown-metrics strong {
    font-size: 13px;
    margin-top: 4px
}

.breakdown-metrics .featured {
    background: var(--blue-soft)
}

.breakdown-metrics .featured strong {
    color: var(--primary)
}

/* Tamaños mínimos de lectura para textos auxiliares y etiquetas densas. */
.brand small,
.nav-label,
.sidebar-foot small,
.global-search kbd,
.search-box kbd,
.eyebrow,
.metric small,
.badge,
.data-table .th,
.simple-table .th,
.section-title>span,
.tabs b,
.group-title span,
.history-block summary span,
.mapping-grid>strong,
.search-section-title,
.case-parameters>summary small,
.parameter-grid small,
.case-summary-value small,
.breakdown-title>span,
.breakdown-metrics small {
    font-size: 11px;
    line-height: 1.35
}

.age,
.assignment-cards p,
.case-parameters .summary-hint,
.simulator-heading>span,
.year-card p,
.breakdown-title p {
    font-size: 12px;
    line-height: 1.45
}

.result-metrics .margin-result {
    background: var(--success-soft)
}

.result-metrics .margin-result strong {
    color: var(--success);
    font-size: 16px
}

@media(max-width:1180px) {
    :root {
        --sidebar: 220px
    }

    .priority-strip {
        grid-template-columns: 1.4fr repeat(2, 1fr)
    }

    .metric:nth-child(4),
    .metric:nth-child(5) {
        display: none
    }

    .dashboard-grid .span-4 {
        grid-column: span 6
    }

    .summary-grid {
        grid-template-columns: repeat(3, 1fr)
    }

    .case-grid {
        grid-template-columns: repeat(3, 1fr)
    }

    .admin-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .parameter-grid {
        grid-template-columns: repeat(5, 1fr)
    }

    .case-breakdown>summary {
        grid-template-columns: minmax(240px, 2fr) repeat(2, 1fr) 84px 18px
    }

    .case-breakdown>summary .case-summary-value:nth-of-type(4) {
        display: none
    }

    .breakdown-group {
        grid-template-columns: 180px 1fr
    }
}

@media(max-width:820px) {
    .sidebar {
        transform: translateX(-100%);
        transition: .2s
    }

    .sidebar.open {
        transform: translateX(0)
    }

    .main-area {
        margin-left: 0
    }

    .mobile-only {
        display: grid
    }

    .topbar {
        height: 64px;
        padding: 0 15px
    }

    .global-search {
        width: auto;
        flex: 1;
        margin: 0 10px
    }

    .global-search span:nth-child(2),
    .global-search kbd {
        display: none
    }

    .page-wrap {
        padding: 20px 15px 50px
    }

    .page-head,
    .profile-head {
        align-items: flex-start
    }

    .priority-strip {
        grid-template-columns: 1fr 1fr
    }

    .priority-main {
        grid-column: span 2
    }

    .metric:nth-child(3) {
        border: 0
    }

    .dashboard-grid,
    .profile-grid {
        display: block
    }

    .dashboard-grid>.card,
    .profile-grid>.card {
        margin-bottom: 14px
    }

    .alerts-page {
        grid-template-columns: 1fr
    }

    .data-table {
        overflow-x: auto
    }

    .data-table .tr {
        min-width: 850px
    }

    .summary-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .admin-grid {
        grid-template-columns: 1fr
    }

    .auth-layout {
        grid-template-columns: 1fr
    }

    .auth-intro {
        display: none
    }

    .auth-panel {
        min-height: 100vh
    }

    .certification-row {
        grid-template-columns: 40px 1fr auto
    }

    .certification-row>div:nth-child(3),
    .certification-row>div:nth-child(4) {
        display: none
    }

    .case-grid {
        grid-template-columns: 1fr 1fr
    }

    .section-toolbar {
        align-items: flex-start
    }

    .toast {
        left: 15px;
        right: 15px;
        top: 75px
    }

    .profile-actions {
        margin-top: 12px
    }

    .profile-head {
        display: block
    }

    .parameter-grid {
        grid-template-columns: repeat(3, 1fr)
    }

    .case-breakdown>summary {
        grid-template-columns: 1fr 100px 18px
    }

    .case-breakdown>summary .case-summary-value {
        display: none
    }

    .breakdown-group {
        grid-template-columns: 1fr
    }

    .breakdown-title {
        border-right: 0;
        border-bottom: 1px solid var(--line)
    }

    .breakdown-metrics {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media(max-width:560px) {
    h1 {
        font-size: 24px
    }

    .page-head {
        display: block
    }

    .page-head>.btn,
    .page-head>button {
        margin-top: 15px
    }

    .priority-strip {
        display: block
    }

    .priority-main,
    .metric {
        border-right: 0;
        border-bottom: 1px solid var(--line)
    }

    .metric {
        min-height: 75px
    }

    .priority-strip .metric:nth-child(4),
    .priority-strip .metric:nth-child(5) {
        display: none
    }

    .global-search {
        display: none
    }

    .filter-bar {
        align-items: stretch;
        flex-direction: column
    }

    .filter-bar select {
        width: 100%;
        flex-basis: auto
    }

    .filter-bar>.btn {
        width: 100%
    }

    .search-field {
        width: 100%;
        flex: none
    }

    .form-grid,
    .detail-grid,
    .assignment-cards {
        grid-template-columns: 1fr
    }

    .form-grid .span-2 {
        grid-column: auto
    }

    .profile-identity {
        align-items: flex-start
    }

    .profile-actions {
        display: grid;
        grid-template-columns: 1fr 1fr
    }

    .case-grid {
        grid-template-columns: 1fr
    }

    .case-grid .span-2 {
        grid-column: auto
    }

    .summary-grid {
        grid-template-columns: 1fr 1fr
    }

    .settings-list label {
        grid-template-columns: 1fr
    }

    .operation-row {
        align-items: flex-start;
        flex-wrap: wrap
    }

    .operation-row>div {
        min-width: calc(100% - 50px)
    }

    .quick-links {
        grid-template-columns: 1fr
    }

    .top-actions .btn span+* {
        display: none
    }

    .auth-panel {
        padding: 20px
    }

    .mapping-grid {
        grid-template-columns: 1fr
    }

    .mapping-grid>strong {
        display: none
    }

    .view-switch {
        width: 100%;
        overflow: auto
    }

    .view-switch a {
        white-space: nowrap
    }

    .parameter-grid {
        grid-template-columns: repeat(2, 1fr)
    }

    .case-parameters .summary-hint {
        display: none
    }

    .case-breakdown>summary {
        grid-template-columns: 1fr 18px
    }

    .case-breakdown>summary .margin-pill {
        display: none
    }

    .breakdown-content {
        padding: 8px
    }

    .breakdown-metrics {
        grid-template-columns: 1fr 1fr
    }

    .simulator-heading {
        align-items: flex-start
    }

    .simulator-heading>span {
        display: none
    }
}

@media(max-width:1000px) {
    .audit-filters {
        grid-template-columns: repeat(2, minmax(160px, 1fr))
    }

    .audit-filter-actions {
        grid-column: 1 / -1
    }

    .account-grid {
        grid-template-columns: 1fr
    }
}

@media(max-width:600px) {
    .audit-filters,
    .audit-detail {
        grid-template-columns: 1fr
    }

    .audit-event>summary {
        grid-template-columns: minmax(115px, .55fr) minmax(0, 1fr) 18px;
        gap: 9px;
        padding: 11px
    }

    .audit-event>summary>span:nth-child(3) {
        display: none
    }

    .audit-agent {
        grid-column: auto
    }
}
