:root {
    --navy-950: #0b1628;
    --navy-900: #10213b;
    --navy-800: #173154;
    --blue-700: #195fa8;
    --blue-600: #2474c6;
    --blue-100: #dceefe;
    --blue-50: #f0f7ff;
    --slate-900: #172033;
    --slate-700: #46536a;
    --slate-500: #69758a;
    --slate-300: #cbd3df;
    --slate-200: #e0e6ee;
    --slate-100: #edf1f6;
    --slate-50: #f7f9fc;
    --green-700: #157347;
    --green-100: #d9f4e7;
    --amber-700: #9b5b08;
    --amber-100: #fff0ce;
    --red-700: #b4232f;
    --red-100: #fee6e8;
    --white: #fff;
    --sidebar-width: 268px;
    --sidebar-compact-width: 76px;
    --shadow-sm: 0 1px 2px rgba(11, 22, 40, .05), 0 4px 12px rgba(11, 22, 40, .04);
    --shadow-md: 0 16px 40px rgba(11, 22, 40, .16);
    --radius-sm: 7px;
    --radius-md: 12px;
    --radius-lg: 18px;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--slate-900);
    background: var(--slate-50);
    font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--slate-50); }
body { min-width: 320px; min-height: 100vh; margin: 0; background: var(--slate-50); color: var(--slate-900); }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }

.sr-only {
    position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important;
    margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important; border: 0 !important;
}
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 100; padding: .7rem 1rem; border-radius: var(--radius-sm); background: var(--white); color: var(--blue-700); }
.skip-link:focus { top: 1rem; }

.app-shell { min-height: 100vh; }
.app-sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 30; display: flex; width: var(--sidebar-width);
    flex-direction: column; padding: 24px 18px 18px; overflow-y: auto; color: #dfe9f7;
    background: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 64%, #122844 100%);
}
.brand { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 0 8px; }
.brand-mark {
    display: grid; width: 42px; height: 42px; place-items: center; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.22);
    border-radius: 13px; background: linear-gradient(145deg, #3589df, #1b65ae); color: var(--white); font-weight: 800; letter-spacing: -.04em;
    box-shadow: 0 8px 20px rgba(0, 0, 0, .2);
}
.brand-copy { display: flex; min-width: 0; flex: 1; flex-direction: column; }
.brand-copy strong { color: var(--white); font-size: .88rem; line-height: 1.18; text-wrap: balance; }
.brand-copy small { margin-top: 2px; color: #90a5c0; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-collapse-button { position: fixed; top: 76px; left: calc(var(--sidebar-width) - 15px); z-index: 35; display: grid; width: 30px; height: 30px; place-items: center; padding: 0; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; color: #dce9f7; background: var(--navy-800); box-shadow: 0 5px 14px rgba(4,12,24,.28); font-size: 1.15rem; line-height: 1; cursor: pointer; transition: left .2s ease, background .15s, transform .15s; }
.sidebar-collapse-button:hover { background: var(--blue-700); transform: scale(1.05); }

.environment-card { display: grid; grid-template-columns: 1fr auto; gap: 8px 10px; margin: 25px 6px 19px; padding: 13px; border: 1px solid rgba(255,255,255,.09); border-radius: var(--radius-md); background: rgba(255,255,255,.045); }
.environment-badge { width: max-content; padding: 3px 8px; border-radius: 99px; font-size: .68rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.environment-badge.is-development { color: #ffd58f; background: rgba(218, 139, 28, .18); }
.environment-badge.is-production { color: #a7efd0; background: rgba(40, 175, 116, .18); }
.environment-meta { overflow: hidden; color: #8fa5c1; font-size: .73rem; text-overflow: ellipsis; white-space: nowrap; }
.environment-meta:last-child { grid-column: 1 / -1; }

.primary-nav { flex: 1; }
.nav-label { margin: 22px 10px 7px; color: #6f87a5; font-size: .65rem; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.primary-nav a { display: flex; align-items: center; gap: 12px; margin: 3px 0; padding: 10px 12px; border-radius: 9px; color: #aebed2; font-size: .88rem; font-weight: 550; text-decoration: none; transition: background .16s, color .16s, transform .16s; }
.primary-nav a:hover { color: var(--white); background: rgba(255,255,255,.075); transform: translateX(2px); }
.primary-nav a.is-active { color: var(--white); background: linear-gradient(90deg, rgba(45, 128, 210, .35), rgba(45, 128, 210, .13)); box-shadow: inset 3px 0 #4a9aeb; }
.nav-icon { display: grid; width: 22px; place-items: center; color: #75a8dc; font-size: 1.05rem; }
.sidebar-footer { display: flex; flex-direction: column; gap: 3px; margin: 18px 7px 0; padding: 15px 10px 3px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-footer span { color: #7189a6; font-size: .7rem; }
.sidebar-footer strong { overflow: hidden; color: #dbe7f5; font-size: .82rem; text-overflow: ellipsis; }

.app-workspace { display: flex; min-height: 100vh; margin-left: var(--sidebar-width); flex-direction: column; transition: margin-left .2s ease; }
.app-topbar { display: flex; min-height: 88px; align-items: center; gap: 18px; padding: 18px clamp(24px, 4vw, 52px); border-bottom: 1px solid var(--slate-200); background: rgba(255,255,255,.94); backdrop-filter: blur(12px); }
.app-topbar h1 { margin: 2px 0 0; font-size: clamp(1.25rem, 2vw, 1.55rem); letter-spacing: -.025em; }
.eyebrow { margin: 0; color: var(--slate-500); font-size: .68rem; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.quiet-action, .logout-action { padding: 8px 11px; border-radius: var(--radius-sm); font-size: .8rem; font-weight: 650; text-decoration: none; }
.quiet-action { color: var(--slate-700); }
.quiet-action:hover { background: var(--slate-100); }
.logout-action { border: 1px solid var(--slate-200); color: var(--slate-700); background: var(--white); }
.logout-action:hover { color: var(--red-700); border-color: #efbfc4; background: #fff8f8; }
.menu-button { display: none; width: 40px; height: 40px; border: 1px solid var(--slate-200); border-radius: var(--radius-sm); color: var(--slate-700); background: var(--white); cursor: pointer; }

.app-content { width: 100%; max-width: 1520px; margin: 0 auto; padding: clamp(28px, 4vw, 50px); flex: 1; }
.app-footer { display: flex; justify-content: space-between; gap: 20px; padding: 20px clamp(24px, 4vw, 52px); border-top: 1px solid var(--slate-200); color: var(--slate-500); background: var(--white); font-size: .72rem; }
.openapi-link { color: var(--blue-700); font-weight: 700; text-decoration: none; }
.openapi-link:hover { text-decoration: underline; }

.message-stack { display: grid; gap: 10px; margin-bottom: 22px; }
.message { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid; border-radius: var(--radius-md); font-size: .84rem; box-shadow: var(--shadow-sm); }
.message-success { border-color: #addfc7; color: #145c3b; background: #edfaf4; }
.message-error { border-color: #efbdc2; color: #92202a; background: #fff3f4; }
.message-symbol { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; color: var(--white); font-size: .72rem; font-weight: 800; }
.message-success .message-symbol { background: var(--green-700); }
.message-error .message-symbol { background: var(--red-700); }
.message-dismiss { border: 0; color: currentColor; background: transparent; font-size: 1.2rem; cursor: pointer; opacity: .7; }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 30px; margin-bottom: 27px; }
.page-heading h2 { margin: 4px 0 7px; font-size: clamp(1.65rem, 3vw, 2.25rem); letter-spacing: -.04em; line-height: 1.1; }
.page-heading p:not(.section-kicker) { max-width: 680px; margin: 0; color: var(--slate-500); font-size: .92rem; line-height: 1.6; }
.section-kicker { margin: 0; color: var(--blue-700); font-size: .69rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.narrow-heading { max-width: 900px; align-items: start; }

.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border: 1px solid transparent; border-radius: 8px; font-size: .82rem; font-weight: 700; line-height: 1; text-decoration: none; cursor: pointer; transition: box-shadow .15s, background .15s, border-color .15s, transform .15s; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid rgba(36, 116, 198, .28); outline-offset: 2px; }
.button-primary { color: var(--white); background: var(--blue-700); box-shadow: 0 5px 14px rgba(25,95,168,.18); }
.button-primary:hover { background: #12518f; box-shadow: 0 7px 18px rgba(25,95,168,.24); }
.button-secondary { border-color: var(--slate-300); color: var(--slate-700); background: var(--white); }
.button-secondary:hover { background: var(--slate-50); }
.button-danger { color: var(--white); background: var(--red-700); }
.button-danger:hover { background: #921923; }

.metric-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card { display: flex; min-height: 92px; flex-direction: column; justify-content: center; padding: 17px 20px; border: 1px solid var(--slate-200); border-radius: var(--radius-md); background: var(--white); box-shadow: var(--shadow-sm); }
.metric-card span { color: var(--slate-500); font-size: .72rem; font-weight: 650; }
.metric-card strong { margin-top: 5px; font-size: 1.55rem; letter-spacing: -.04em; }
.metric-card .metric-text { font-size: 1.05rem; letter-spacing: -.015em; }

.content-card, .form-card { border: 1px solid var(--slate-200); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow-sm); }
.table-toolbar { display: flex; align-items: center; gap: 18px; padding: 17px 20px; border-bottom: 1px solid var(--slate-200); }
.search-field { display: flex; width: min(430px, 100%); align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--slate-300); border-radius: 8px; color: var(--slate-500); background: var(--white); }
.search-field:focus-within { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(36,116,198,.11); }
.search-field input { width: 100%; height: 38px; padding: 0; border: 0; outline: 0; color: var(--slate-900); background: transparent; font-size: .82rem; }
.result-count { margin-left: auto; color: var(--slate-500); font-size: .75rem; }
.result-count strong { color: var(--slate-900); }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 12px 18px; border-bottom: 1px solid var(--slate-200); color: var(--slate-500); background: var(--slate-50); font-size: .68rem; font-weight: 750; letter-spacing: .055em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 15px 18px; border-bottom: 1px solid var(--slate-100); vertical-align: middle; font-size: .82rem; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcfe; }
.actions-column { width: 1%; text-align: right !important; }
.identity-cell { display: flex; min-width: 175px; align-items: center; gap: 11px; }
.identity-cell > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.identity-cell strong { font-size: .84rem; }
.identity-cell small { color: var(--slate-500); font-size: .69rem; }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; flex: 0 0 auto; border: 1px solid #c9ddf1; border-radius: 9px; color: var(--blue-700); background: var(--blue-50); font-size: .77rem; font-weight: 800; }
.status-pill, .account-pill { display: inline-flex; align-items: center; border-radius: 99px; white-space: nowrap; }
.status-pill { padding: 5px 9px; font-size: .68rem; font-weight: 700; }
.status-admin { color: #70490e; background: var(--amber-100); }
.status-standard { color: #31506f; background: #e8f0f8; }
.account-list { display: flex; max-width: 560px; flex-wrap: wrap; gap: 6px; }
.account-pill { gap: 7px; padding: 5px 8px; border: 1px solid #d9e2ec; color: #344862; background: #f8fafc; font-size: .7rem; }
.account-pill small { padding-left: 7px; border-left: 1px solid #d9e2ec; color: var(--slate-500); }
.muted { color: var(--slate-500); font-size: .75rem; }
.actions-cell { text-align: right; white-space: nowrap; }
.table-action { display: inline-flex; padding: 6px 7px; border: 0; border-radius: 6px; color: var(--blue-700); background: transparent; font-size: .72rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.table-action:hover { background: var(--blue-50); }
.danger-action { color: var(--red-700); }
.danger-action:hover { background: #fff1f2; }
.empty-state { display: flex; min-height: 310px; align-items: center; justify-content: center; flex-direction: column; padding: 45px 25px; text-align: center; }
.empty-state.compact { min-height: 230px; }
.empty-state h3 { margin: 13px 0 5px; font-size: 1.05rem; }
.empty-state p { max-width: 390px; margin: 0 0 18px; color: var(--slate-500); font-size: .82rem; line-height: 1.5; }
.empty-icon { display: grid; width: 52px; height: 52px; place-items: center; border-radius: 15px; color: var(--blue-700); background: var(--blue-50); font-size: 1.4rem; }

.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 28px; color: var(--slate-500); font-size: .75rem; }
.breadcrumb a { color: var(--blue-700); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.form-layout { display: grid; max-width: 900px; gap: 16px; }
.password-form { max-width: 680px; }
.form-card { padding: clamp(22px, 4vw, 34px); }
.form-section-heading { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 27px; }
.step-number { display: grid; width: 30px; height: 30px; place-items: center; flex: 0 0 auto; border-radius: 9px; color: var(--blue-700); background: var(--blue-100); font-size: .72rem; font-weight: 800; }
.form-section-heading h3 { margin: 1px 0 4px; font-size: 1rem; }
.form-section-heading p { margin: 0; color: var(--slate-500); font-size: .78rem; line-height: 1.45; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px; padding-left: 44px; }
.full-field { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 7px; color: var(--slate-700); font-size: .76rem; font-weight: 700; }
.field > input, .password-input { width: 100%; min-height: 43px; border: 1px solid var(--slate-300); border-radius: 8px; color: var(--slate-900); background: var(--white); }
.field > input { padding: 9px 12px; }
.field > input:focus, .password-input:focus-within { border-color: var(--blue-600); outline: 0; box-shadow: 0 0 0 3px rgba(36,116,198,.1); }
.field small { color: var(--slate-500); font-size: .68rem; font-weight: 450; }
.password-input { display: flex; overflow: hidden; }
.password-input input { min-width: 0; flex: 1; padding: 9px 12px; border: 0; outline: 0; background: transparent; }
.password-input button { padding: 0 12px; border: 0; border-left: 1px solid var(--slate-200); color: var(--blue-700); background: var(--slate-50); font-size: .7rem; font-weight: 750; cursor: pointer; }
.password-rules { display: flex; grid-column: 1 / -1; flex-wrap: wrap; gap: 7px; }
.password-rules span { padding: 5px 8px; border-radius: 99px; color: var(--slate-500); background: var(--slate-100); font-size: .67rem; }
.password-rules span::before { content: "○"; margin-right: 5px; }
.password-rules span.is-valid { color: var(--green-700); background: var(--green-100); }
.password-rules span.is-valid::before { content: "✓"; }
.selection-toolbar { display: flex; justify-content: space-between; gap: 12px; padding: 0 0 12px 44px; color: var(--slate-500); font-size: .72rem; }
.selection-toolbar strong { color: var(--slate-900); }
.text-button { padding: 3px 5px; border: 0; color: var(--blue-700); background: transparent; font-size: .7rem; font-weight: 700; cursor: pointer; }
.account-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-left: 44px; }
.account-option { position: relative; display: flex; min-width: 0; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--slate-200); border-radius: 9px; cursor: pointer; transition: border .15s, background .15s; }
.account-option:hover { border-color: #a9c9e8; background: var(--blue-50); }
.account-option:has(input:checked) { border-color: #8bb8e3; background: var(--blue-50); }
.account-option input { position: absolute; opacity: 0; pointer-events: none; }
.custom-checkbox { display: grid; width: 18px; height: 18px; place-items: center; flex: 0 0 auto; border: 1.5px solid #aeb9c7; border-radius: 5px; background: var(--white); }
.account-option input:checked + .custom-checkbox { border-color: var(--blue-700); color: var(--white); background: var(--blue-700); }
.account-option input:checked + .custom-checkbox::after { content: "✓"; font-size: .7rem; font-weight: 800; }
.account-option > span:last-child { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.account-option strong { overflow: hidden; font-size: .77rem; text-overflow: ellipsis; white-space: nowrap; }
.account-option small { color: var(--slate-500); font-size: .66rem; }
.inline-note { display: flex; grid-column: 1 / -1; flex-direction: column; gap: 3px; padding: 12px 14px; border: 1px solid #cfe2f4; border-radius: 9px; color: var(--slate-700); background: var(--blue-50); font-size: .74rem; }
.inline-note strong { color: var(--slate-900); }
.form-actions { display: flex; justify-content: flex-end; gap: 9px; padding: 8px 0 0; }
.form-alert { display: flex; flex-direction: column; gap: 3px; padding: 13px 15px; border: 1px solid #efbdc2; border-radius: var(--radius-md); color: #92202a; background: #fff3f4; font-size: .78rem; }

.confirmation-dialog { width: min(450px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.confirmation-dialog::backdrop { background: rgba(5, 15, 28, .58); backdrop-filter: blur(2px); }
.dialog-card { display: flex; align-items: center; flex-direction: column; padding: 30px; text-align: center; }
.dialog-symbol { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; font-size: 1.15rem; font-weight: 850; }
.danger-symbol { color: var(--red-700); background: var(--red-100); }
.dialog-card h2 { margin: 17px 0 7px; font-size: 1.25rem; }
.dialog-card p { margin: 0; color: var(--slate-500); font-size: .82rem; line-height: 1.55; }
.dialog-actions { display: flex; width: 100%; justify-content: flex-end; gap: 8px; margin-top: 25px; }

@media (min-width: 801px) {
    .app-sidebar { transition: width .2s ease, padding .2s ease; }
    .sidebar-compact .app-sidebar { width: var(--sidebar-compact-width); padding-inline: 10px; }
    .sidebar-compact .app-workspace { margin-left: var(--sidebar-compact-width); }
    .sidebar-compact .sidebar-collapse-button { left: calc(var(--sidebar-compact-width) - 15px); }
    .sidebar-compact .brand { justify-content: center; padding: 0; }
    .sidebar-compact .brand-copy,
    .sidebar-compact .environment-card,
    .sidebar-compact .nav-label,
    .sidebar-compact .primary-nav a > span:last-child,
    .sidebar-compact .sidebar-footer { display: none; }
    .sidebar-compact .primary-nav { padding-top: 50px; }
    .sidebar-compact .primary-nav a { justify-content: center; gap: 0; padding: 11px 0; }
    .sidebar-compact .primary-nav a:hover { transform: none; }
    .sidebar-compact .nav-icon { width: 30px; font-size: 1.15rem; }
}

@media (max-width: 1050px) {
    :root { --sidebar-width: 238px; }
    .app-sidebar { padding-inline: 13px; }
    .data-table th, .data-table td { padding-inline: 13px; }
}

@media (max-width: 800px) {
    .sidebar-collapse-button { display: none; }
    .app-sidebar { transform: translateX(-102%); box-shadow: var(--shadow-md); transition: transform .2s ease; }
    .app-sidebar.is-open { transform: translateX(0); }
    .app-workspace { margin-left: 0; }
    .menu-button { display: grid; place-items: center; }
    .app-topbar { min-height: 76px; padding: 14px 20px; }
    .quiet-action { display: none; }
    .app-content { padding: 28px 20px; }
    .metric-row { grid-template-columns: 1fr; }
    .metric-card { min-height: 75px; }
    .field-grid, .account-picker { grid-template-columns: 1fr; padding-left: 0; }
    .selection-toolbar { padding-left: 0; }
}

@media (max-width: 560px) {
    .page-heading { align-items: stretch; flex-direction: column; }
    .page-heading > .button { width: 100%; }
    .table-toolbar { align-items: stretch; flex-direction: column; }
    .result-count { margin-left: 0; }
    .data-table th:nth-child(2), .data-table td:nth-child(2) { display: none; }
    .actions-cell { white-space: normal; }
    .form-card { padding: 20px 17px; }
    .form-section-heading { margin-bottom: 20px; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .button { width: 100%; }
    .app-footer { flex-direction: column; gap: 4px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

.auth-body { background: var(--navy-950); }
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(380px, 1.1fr) minmax(420px, .9fr); }
.auth-brand-panel { display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; padding: clamp(35px, 6vw, 80px); color: var(--white); background: radial-gradient(circle at 20% 25%, #1b4c7d 0, transparent 36%), linear-gradient(145deg, #0b1628, #102a48); }
.auth-brand { display: flex; align-items: center; gap: 13px; }
.auth-brand > span:last-child { display: flex; flex-direction: column; gap: 3px; }
.auth-brand small { color: #8fa7c3; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.auth-message { max-width: 580px; }
.auth-message h1 { margin: 10px 0 18px; font-size: clamp(2.5rem, 5vw, 4.8rem); letter-spacing: -.065em; line-height: .98; }
.auth-message > p:last-child { max-width: 510px; color: #aabbd0; line-height: 1.7; }
.auth-environment { display: flex; flex-wrap: wrap; gap: 15px; color: #829ab7; font-size: .72rem; }
.auth-form-panel { display: grid; min-height: 100vh; place-items: center; padding: 35px; background: var(--white); }
.auth-form { display: grid; width: min(390px, 100%); gap: 19px; }
.auth-form h2 { margin: -7px 0 -12px; font-size: 2rem; letter-spacing: -.045em; }
.auth-form > p:not(.section-kicker) { margin: 0 0 9px; color: var(--slate-500); font-size: .85rem; }
.auth-submit { width: 100%; min-height: 46px; margin-top: 5px; }
.standalone-message { display: flex; min-height: 100vh; align-items: center; justify-content: center; flex-direction: column; padding: 30px; text-align: center; }
.standalone-message h1 { margin: 14px 0 5px; font-size: 2rem; }
.standalone-message p:not(.section-kicker) { margin: 0 0 22px; color: var(--slate-500); }
@media (max-width: 800px) { .auth-shell { grid-template-columns: 1fr; } .auth-brand-panel { display: none; } }

.wide-content { max-width: 1780px; }
.filter-card { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 13px; margin-bottom: 18px; padding: 20px; border: 1px solid var(--slate-200); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow-sm); }
.compact-filter { grid-template-columns: repeat(4, minmax(160px, 1fr)) auto; }
.filter-card .field > input, .filter-card .field select { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid var(--slate-300); border-radius: 7px; color: var(--slate-900); background: var(--white); }
.filter-submit { align-self: end; min-height: 39px; }
.pagination-bar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 14px 0; color: var(--slate-500); font-size: .73rem; }
.pagination-bar > div { display: flex; align-items: center; gap: 7px; }
.page-button, .pagination-bar select { min-height: 32px; padding: 6px 9px; border: 1px solid var(--slate-300); border-radius: 7px; color: var(--slate-700); background: var(--white); cursor: pointer; }
.page-button:disabled { cursor: not-allowed; opacity: .45; }
.dense-table { min-width: 1100px; }
.dense-table td { vertical-align: top; }
.cell-note { display: block; max-width: 250px; margin-top: 4px; overflow: hidden; color: var(--slate-500); font-size: .66rem; text-overflow: ellipsis; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.file-group { display: grid; min-width: 170px; gap: 8px; }
.file-group > div { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 6px; }
.file-group a, .file-group span:not(.file-kind) { overflow: hidden; color: var(--blue-700); font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }
.file-group small { grid-column: 2; color: var(--slate-500); font-size: .62rem; }
.file-kind { padding: 2px 4px; border-radius: 4px; color: var(--slate-500); background: var(--slate-100); font-size: .58rem; font-weight: 750; text-transform: uppercase; }
.log-list { display: grid; gap: 12px; }
.log-card { border: 1px solid var(--slate-200); border-radius: var(--radius-md); background: var(--white); box-shadow: var(--shadow-sm); }
.log-card > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px 18px; border-bottom: 1px solid var(--slate-100); }
.log-card > header > div:first-child { display: flex; align-items: center; gap: 10px; }
.log-card > header strong { font-size: .8rem; }
.log-meta, .log-timeline { display: flex; flex-wrap: wrap; gap: 10px; color: var(--slate-500); font-size: .68rem; }
.log-timeline { padding: 10px 18px; background: var(--slate-50); }
.log-timeline a { margin-left: auto; color: var(--blue-700); text-decoration: none; }
.payload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--slate-200); }
.payload-grid details { min-width: 0; padding: 13px 18px; background: var(--white); }
.payload-grid summary { color: var(--blue-700); font-size: .72rem; font-weight: 750; cursor: pointer; }
.payload-grid pre { max-height: 430px; overflow: auto; padding: 12px; border-radius: 7px; color: #dbe8f7; background: var(--navy-950); font-size: .68rem; white-space: pre-wrap; word-break: break-word; }
@media (max-width: 1100px) { .filter-card { grid-template-columns: repeat(3, minmax(140px, 1fr)); } .compact-filter { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 650px) { .filter-card, .compact-filter { grid-template-columns: 1fr; } .pagination-bar, .pagination-bar > div { align-items: stretch; flex-direction: column; } .payload-grid { grid-template-columns: 1fr; } .log-card > header { align-items: flex-start; flex-direction: column; } }

/* Configuration screens */
.button-small { min-height: 32px; padding: 6px 10px; font-size: .74rem; }
.button-quiet-danger { border-color: #efc5c9; color: var(--red-700); background: #fff8f8; }
.section-tabs { display: flex; gap: 4px; margin-bottom: 28px; padding: 5px; overflow-x: auto; border: 1px solid var(--slate-200); border-radius: 10px; background: var(--white); box-shadow: var(--shadow-sm); }
.section-tabs a { padding: 9px 15px; border-radius: 7px; color: var(--slate-500); font-size: .8rem; font-weight: 700; text-decoration: none; white-space: nowrap; }
.section-tabs a:hover { color: var(--slate-900); background: var(--slate-50); }
.section-tabs a.is-active { color: var(--blue-700); background: var(--blue-50); }
.cell-subtext { display: block; margin-top: 3px; color: var(--slate-500); font-size: .7rem; }
.table-actions, .badge-list, .inline-actions, .row-actions { display: flex; align-items: center; gap: 7px; }
.table-actions { justify-content: flex-end; }
.table-actions form { margin: 0; }
.badge-list, .inline-actions { flex-wrap: wrap; }
.parameter-table td { vertical-align: top; }
.parameter-table code { color: var(--navy-800); font-size: .76rem; }
.table-input { width: min(360px, 100%); min-height: 36px; padding: 7px 9px; border: 1px solid var(--slate-300); border-radius: 7px; color: var(--slate-900); background: var(--white); font-size: .78rem; }
.section-form { margin-bottom: 22px; overflow: hidden; }
.compact-card { max-width: 940px; padding: 26px; }
.form-section { padding: 26px; border-bottom: 1px solid var(--slate-200); }
.form-section-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 20px; }
.form-section-heading > span { display: grid; width: 31px; height: 31px; place-items: center; flex: 0 0 auto; border-radius: 9px; color: var(--blue-700); background: var(--blue-50); font-size: .69rem; font-weight: 800; }
.form-section-heading h3, .card-heading h3 { margin: 0; font-size: 1rem; }
.form-section-heading p, .card-heading p { margin: 4px 0 0; color: var(--slate-500); font-size: .76rem; line-height: 1.45; }
.form-grid { display: grid; gap: 16px; }
.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.four-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.field { display: flex; min-width: 0; flex-direction: column; gap: 6px; color: var(--slate-700); font-size: .75rem; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid var(--slate-300); border-radius: 8px; color: var(--slate-900); background: var(--white); font-size: .82rem; font-weight: 450; }
.field input[type=file] { padding: 7px; }
.field small { color: var(--slate-500); font-size: .68rem; font-weight: 450; }
.field.compact { max-width: 130px; }
.toggle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.toggle-card { display: flex; min-height: 76px; align-items: center; gap: 12px; padding: 14px; border: 1px solid var(--slate-200); border-radius: 10px; background: var(--slate-50); cursor: pointer; }
.toggle-card:has(input:checked) { border-color: #a9cdef; background: var(--blue-50); box-shadow: inset 3px 0 var(--blue-600); }
.toggle-card input { width: 18px; height: 18px; accent-color: var(--blue-700); }
.toggle-card span { display: flex; flex-direction: column; gap: 3px; }
.toggle-card strong { font-size: .82rem; }
.toggle-card small { color: var(--slate-500); font-size: .69rem; }
.section-form > .form-actions { padding: 20px 26px; border-top: 1px solid var(--slate-200); background: var(--slate-50); }
.split-actions { justify-content: space-between; }
.provider-panel, .client-card, .device-card, .add-panel { margin-top: 14px; padding: 17px; border: 1px solid var(--slate-200); border-radius: 11px; background: var(--slate-50); }
.provider-heading, .client-card-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.provider-heading > div:not(.form-section-heading) { display: flex; flex-direction: column; gap: 3px; }
.provider-heading small { color: var(--slate-500); font-size: .69rem; }
.repeat-row { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(190px, 1.4fr) 120px auto; align-items: end; gap: 11px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--slate-200); }
.repeat-row.wide { grid-template-columns: repeat(3, minmax(130px, 1fr)) 105px repeat(3, minmax(90px, .7fr)) auto; }
.icon-button { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid var(--slate-300); border-radius: 7px; background: var(--white); cursor: pointer; }
.icon-button.danger { color: var(--red-700); }
.inline-empty { margin: 13px 0 0; color: var(--slate-500); font-size: .76rem; }
.client-card { background: var(--white); }
.client-card-header { margin-bottom: 15px; }
.inline-actions { margin-top: 15px; color: var(--slate-500); font-size: .73rem; }
.device-card { display: block; margin: 0 26px 14px; }
.add-panel { margin: 0 26px 26px; }
.add-panel summary { color: var(--blue-700); font-size: .8rem; font-weight: 750; cursor: pointer; }
.add-panel form { margin-top: 18px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dashboard-grid .span-two { grid-column: 1 / -1; }
.card-heading { padding: 18px 20px; border-bottom: 1px solid var(--slate-200); }
.worker-list { display: grid; }
.worker-row { display: grid; grid-template-columns: 1fr auto 70px; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--slate-100); }
.worker-row:last-child { border-bottom: 0; }
.worker-row > div { display: flex; flex-direction: column; gap: 3px; }
.worker-row strong { font-size: .82rem; }
.worker-row small { color: var(--slate-500); font-size: .7rem; }
.detail-list { margin: 0; padding: 10px 20px 17px; }
.detail-list > div { display: flex; justify-content: space-between; gap: 18px; padding: 9px 0; border-bottom: 1px solid var(--slate-100); font-size: .76rem; }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: var(--slate-500); }
.detail-list dd { margin: 0; font-weight: 650; text-align: right; overflow-wrap: anywhere; }
.compact-form, .card-action-body { display: grid; gap: 13px; padding: 18px 20px 20px; }
.async-result { color: var(--slate-700); font-size: .76rem; }
@media (max-width: 1100px) { .four-columns, .toggle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .repeat-row, .repeat-row.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .two-columns, .three-columns, .four-columns, .toggle-grid, .dashboard-grid { grid-template-columns: 1fr; } .dashboard-grid .span-two { grid-column: auto; } .worker-row { grid-template-columns: 1fr auto; } .worker-row button { grid-column: 1 / -1; } .repeat-row, .repeat-row.wide { grid-template-columns: 1fr; } .field.compact { max-width: none; } }
