:root {
    --navy-950: #071426;
    --navy-900: #0b1f36;
    --navy-850: #102a46;
    --blue-700: #004fc4;
    --blue-600: #0f62fe;
    --blue-500: #2478ff;
    --blue-100: #dbeafe;
    --blue-050: #edf5ff;
    --ink-900: #111827;
    --ink-700: #344054;
    --ink-600: #475467;
    --ink-500: #667085;
    --line: #dfe3e8;
    --line-soft: #eaecf0;
    --surface: #ffffff;
    --surface-soft: #f7f8fa;
    --canvas: #f1f3f6;
    --success: #087a55;
    --success-soft: #e9f8f1;
    --danger: #b42318;
    --danger-soft: #fef3f2;
    --warning: #b54708;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
    --shadow-md: 0 12px 32px rgba(16, 24, 40, 0.10);
    --sidebar-width: 272px;
    --radius: 10px;
}

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

html {
    min-width: 320px;
    color-scheme: light;
}

body {
    margin: 0;
    color: var(--ink-900);
    background: var(--canvas);
    font-family: "Segoe UI", "IBM Plex Sans", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select {
    color: inherit;
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

svg {
    display: block;
    fill: currentColor;
}

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(15, 98, 254, 0.24);
    outline-offset: 2px;
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--blue-600);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--navy-900);
}

.brand-lockup > span:last-child {
    display: grid;
    line-height: 1.15;
}

.brand-lockup strong {
    font-size: 16px;
    font-weight: 650;
    letter-spacing: -0.01em;
}

.brand-lockup small {
    margin-top: 4px;
    color: var(--ink-500);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-lockup-light,
.brand-lockup-light small {
    color: #ffffff;
}

.brand-lockup-light small {
    opacity: 0.66;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(15, 98, 254, 0.22);
    background: var(--blue-600);
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.brand-lockup-light .brand-mark {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.1);
}

/* Authentication */

.login-page {
    min-height: 100vh;
    background: #ffffff;
}

.login-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(390px, 44%) 1fr;
}

.login-brand-panel {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: clamp(34px, 5vw, 72px);
    color: #ffffff;
    background:
        linear-gradient(142deg, rgba(7, 20, 38, 0.98), rgba(11, 47, 83, 0.96)),
        var(--navy-950);
}

.login-brand-panel::before {
    position: absolute;
    right: -19vw;
    bottom: -27vw;
    width: 58vw;
    height: 58vw;
    min-width: 560px;
    min-height: 560px;
    border: 1px solid rgba(83, 145, 255, 0.2);
    border-radius: 50%;
    box-shadow:
        0 0 0 90px rgba(15, 98, 254, 0.035),
        0 0 0 180px rgba(15, 98, 254, 0.025);
    content: "";
}

.login-brand-panel::after {
    position: absolute;
    top: 0;
    right: 12%;
    width: 1px;
    height: 100%;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.09), transparent);
    content: "";
}

.login-brand-panel > * {
    position: relative;
    z-index: 1;
}

.login-brand-copy {
    max-width: 580px;
    padding: 60px 0;
}

.login-brand-copy .eyebrow {
    color: #82afff;
}

.login-brand-copy h1 {
    max-width: 560px;
    margin-bottom: 24px;
    font-size: clamp(42px, 5.2vw, 74px);
    font-weight: 350;
    letter-spacing: -0.045em;
    line-height: 1.03;
}

.login-brand-copy > p:last-child {
    max-width: 490px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
}

.login-security-note {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
}

.security-dot,
.environment-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #42d392;
    box-shadow: 0 0 0 4px rgba(66, 211, 146, 0.11);
}

.login-form-panel {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 42px;
    background:
        linear-gradient(90deg, rgba(16, 24, 40, 0.025) 1px, transparent 1px),
        linear-gradient(rgba(16, 24, 40, 0.025) 1px, transparent 1px),
        #ffffff;
    background-size: 32px 32px;
}

.login-form-wrap {
    width: min(100%, 430px);
    padding: 12px 0;
}

.login-form-wrap h2 {
    margin-bottom: 12px;
    color: var(--navy-950);
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 550;
    letter-spacing: -0.035em;
    line-height: 1.16;
}

.form-intro {
    margin-bottom: 32px;
    color: var(--ink-500);
}

.auth-form,
.admin-form {
    display: grid;
}

.auth-form label,
.admin-form label {
    margin: 18px 0 7px;
    color: var(--ink-700);
    font-size: 13px;
    font-weight: 650;
}

.auth-form input,
.admin-form input,
.admin-form select {
    width: 100%;
    min-height: 48px;
    border: 1px solid #cbd2d9;
    border-radius: 5px;
    background: #ffffff;
    padding: 11px 13px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.auth-form input:hover,
.admin-form input:hover,
.admin-form select:hover {
    border-color: #98a2b3;
}

.auth-form input:focus,
.admin-form input:focus,
.admin-form select:focus {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.1);
    outline: none;
}

.password-field {
    position: relative;
}

.password-field input {
    padding-right: 76px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    border: 0;
    background: transparent;
    color: var(--blue-700);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
    transform: translateY(-50%);
}

.primary-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--blue-600);
    border-radius: 4px;
    background: var(--blue-600);
    padding: 11px 20px;
    color: #ffffff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.primary-button:hover {
    border-color: var(--blue-700);
    background: var(--blue-700);
}

.primary-button:active {
    transform: translateY(1px);
}

.secondary-button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd2d9;
    border-radius: 4px;
    background: #ffffff;
    padding: 9px 15px;
    color: var(--ink-700);
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}

.secondary-button:hover {
    border-color: #98a2b3;
    background: var(--surface-soft);
}

.auth-submit {
    width: 100%;
    margin-top: 26px;
}

.login-help,
.password-requirements {
    margin: 18px 0 0;
    color: var(--ink-500);
    font-size: 12px;
}

.alert {
    margin: 18px 0;
    border: 1px solid transparent;
    border-radius: 5px;
    padding: 13px 15px;
    font-size: 13px;
}

.alert-error {
    border-color: #fecdca;
    background: var(--danger-soft);
    color: var(--danger);
}

.alert-success {
    border-color: #abefc6;
    background: var(--success-soft);
    color: #05603a;
}

.password-change-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 32px;
    background:
        linear-gradient(145deg, rgba(237, 245, 255, 0.92), rgba(247, 248, 250, 0.8)),
        var(--canvas);
}

.password-change-shell {
    width: min(100%, 560px);
}

.password-change-shell > .brand-lockup {
    margin-bottom: 24px;
}

.password-change-card {
    border-top: 4px solid var(--blue-600);
    background: #ffffff;
    padding: clamp(28px, 6vw, 50px);
    box-shadow: var(--shadow-md);
}

.password-change-card h1 {
    margin: 14px 0 12px;
    color: var(--navy-950);
    font-size: 32px;
    font-weight: 550;
    letter-spacing: -0.035em;
    line-height: 1.17;
}

.password-change-card > p {
    color: var(--ink-500);
}

.step-label,
.hero-label,
.module-state,
.table-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 10px;
    font-weight: 750;
    letter-spacing: 0.06em;
    line-height: 1;
    text-transform: uppercase;
}

.step-label,
.module-state {
    background: var(--blue-050);
    color: var(--blue-700);
}

.module-state.is-live {
    background: var(--success-soft);
    color: var(--success);
}

/* Admin shell */

.admin-layout {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    z-index: 50;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    width: var(--sidebar-width);
    flex-direction: column;
    overflow-y: auto;
    background: var(--navy-950);
    color: #ffffff;
}

.sidebar::after {
    position: absolute;
    right: -140px;
    bottom: -150px;
    width: 310px;
    height: 310px;
    border: 1px solid rgba(73, 134, 239, 0.15);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.sidebar-brand {
    width: 100%;
    min-height: 88px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    padding: 21px 24px;
}

.sidebar-nav {
    position: relative;
    z-index: 1;
    flex: 1;
    padding: 25px 14px;
}

.sidebar-label {
    margin: 0 12px 12px;
    color: rgba(255, 255, 255, 0.38);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sidebar-nav a {
    position: relative;
    display: flex;
    min-height: 46px;
    align-items: center;
    gap: 12px;
    margin: 3px 0;
    border-radius: 5px;
    padding: 10px 12px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 150ms ease, background-color 150ms ease;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.sidebar-nav a.is-active {
    background: rgba(34, 112, 255, 0.2);
    color: #ffffff;
}

.sidebar-nav a.is-active::before {
    position: absolute;
    top: 9px;
    bottom: 9px;
    left: -14px;
    width: 3px;
    background: #6da0ff;
    content: "";
}

.nav-icon {
    display: grid;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    place-items: center;
}

.nav-icon svg {
    width: 19px;
    height: 19px;
}

.sidebar-environment {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.035);
    padding: 14px;
}

.sidebar-environment > span:last-child {
    display: grid;
    line-height: 1.25;
}

.sidebar-environment small {
    color: rgba(255, 255, 255, 0.42);
    font-size: 10px;
}

.sidebar-environment strong {
    font-size: 12px;
    font-weight: 600;
}

.admin-workspace {
    min-width: 0;
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

.topbar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    height: 88px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    padding: 0 clamp(24px, 4vw, 54px);
    backdrop-filter: blur(12px);
}

.topbar-title p {
    margin-bottom: 2px;
    color: var(--ink-500);
    font-size: 11px;
}

.topbar-title h1 {
    margin: 0;
    color: var(--navy-950);
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.topbar-account {
    display: flex;
    align-items: center;
    gap: 11px;
}

.account-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 3px;
    background: var(--blue-050);
    color: var(--blue-700);
    font-size: 13px;
    font-weight: 750;
}

.account-copy {
    display: grid;
    min-width: 132px;
    line-height: 1.25;
}

.account-copy strong {
    font-size: 13px;
    font-weight: 650;
}

.account-copy small {
    margin-top: 3px;
    color: var(--ink-500);
    font-size: 10px;
}

.text-button {
    min-height: 34px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #ffffff;
    padding: 7px 12px;
    color: var(--ink-700);
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.text-button:hover {
    border-color: #aeb7c2;
    background: var(--surface-soft);
}

.sidebar-toggle {
    display: none;
    width: 40px;
    height: 40px;
    align-content: center;
    justify-items: center;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
}

.sidebar-toggle span {
    width: 18px;
    height: 2px;
    background: var(--navy-900);
}

.workspace-content {
    width: min(100%, 1480px);
    margin: 0 auto;
    padding: clamp(28px, 4vw, 52px);
}

.workspace-content > .alert {
    margin: 0 0 24px;
}

.credentials-once {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.credentials-once span {
    display: grid;
    gap: 3px;
    border: 1px solid rgba(5, 96, 58, 0.18);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.7);
    padding: 10px 12px;
}

.credentials-once small {
    font-size: 10px;
    text-transform: uppercase;
}

.credentials-once code {
    overflow-wrap: anywhere;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
}

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

.page-heading h2 {
    margin-bottom: 7px;
    color: var(--navy-950);
    font-size: clamp(28px, 3.1vw, 40px);
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 1.08;
}

.page-heading > div > p:last-child {
    margin-bottom: 0;
    color: var(--ink-500);
}

.page-status {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    padding: 8px 12px;
    color: var(--ink-600);
    font-size: 11px;
    box-shadow: var(--shadow-sm);
}

.page-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #17b26a;
}

.dashboard-hero {
    position: relative;
    display: flex;
    min-height: 238px;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
    overflow: hidden;
    background: linear-gradient(112deg, var(--navy-950), #123c67);
    padding: clamp(28px, 4vw, 48px);
    color: #ffffff;
}

.dashboard-hero::after {
    position: absolute;
    top: -130px;
    right: -100px;
    width: 390px;
    height: 390px;
    border: 1px solid rgba(255, 255, 255, 0.11);
    border-radius: 50%;
    box-shadow: 0 0 0 62px rgba(15, 98, 254, 0.08), 0 0 0 124px rgba(15, 98, 254, 0.045);
    content: "";
}

.dashboard-hero > * {
    position: relative;
    z-index: 1;
}

.dashboard-hero > div:first-child {
    max-width: 700px;
}

.hero-label {
    margin-bottom: 16px;
    background: rgba(110, 162, 255, 0.16);
    color: #b9d2ff;
}

.dashboard-hero h3 {
    margin-bottom: 14px;
    font-size: clamp(27px, 3.2vw, 42px);
    font-weight: 400;
    letter-spacing: -0.038em;
    line-height: 1.1;
}

.dashboard-hero p {
    max-width: 670px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.68);
}

.hero-system-card {
    display: flex;
    min-width: 190px;
    align-items: center;
    gap: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    padding: 18px;
    backdrop-filter: blur(5px);
}

.hero-system-card > span:last-child {
    display: grid;
}

.hero-system-card small {
    color: rgba(255, 255, 255, 0.54);
    font-size: 10px;
}

.hero-system-card strong {
    margin-top: 3px;
    font-size: 14px;
}

.system-ring {
    position: relative;
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border: 1px solid rgba(82, 210, 154, 0.34);
    border-radius: 50%;
}

.system-ring i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #42d392;
    box-shadow: 0 0 14px rgba(66, 211, 146, 0.75);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-right: 1px solid var(--line);
    background: #ffffff;
}

.metric-grid article {
    display: grid;
    min-height: 142px;
    border-bottom: 1px solid var(--line);
    border-left: 1px solid var(--line);
    padding: 23px 25px;
}

.metric-grid span {
    color: var(--ink-500);
    font-size: 11px;
}

.metric-grid strong {
    align-self: end;
    color: var(--navy-950);
    font-size: 32px;
    font-weight: 450;
    line-height: 1;
}

.metric-grid small {
    margin-top: 7px;
    color: var(--ink-500);
    font-size: 10px;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin: 48px 0 18px;
}

.section-heading h3,
.panel-heading h3 {
    margin: 0;
    color: var(--navy-950);
    font-size: 22px;
    font-weight: 550;
    letter-spacing: -0.025em;
}

.section-heading > span,
.panel-heading > span {
    color: var(--ink-500);
    font-size: 11px;
}

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

.module-card {
    display: flex;
    min-height: 260px;
    flex-direction: column;
    border: 1px solid var(--line);
    background: #ffffff;
    padding: 27px;
    box-shadow: var(--shadow-sm);
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.module-card:hover {
    border-color: #b9c3cf;
    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.07);
    transform: translateY(-2px);
}

.module-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.module-icon {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    background: var(--navy-900);
    color: #ffffff;
}

.module-icon svg {
    width: 22px;
    height: 22px;
}

.module-card h4 {
    margin: 24px 0 9px;
    color: var(--navy-950);
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.module-card p {
    margin-bottom: 20px;
    color: var(--ink-500);
    font-size: 13px;
}

.module-card a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    color: var(--blue-700);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.module-card a svg {
    width: 15px;
    height: 15px;
    transition: transform 150ms ease;
}

.module-card a:hover svg {
    transform: translateX(3px);
}

/* Activity log */

.activity-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.activity-summary-grid article {
    display: flex;
    min-height: 132px;
    align-items: center;
    gap: 17px;
    border: 1px solid var(--line);
    background: #ffffff;
    padding: 21px;
    box-shadow: var(--shadow-sm);
}

.activity-summary-icon {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    place-items: center;
    background: var(--blue-050);
    color: var(--blue-700);
}

.activity-summary-icon svg {
    width: 21px;
    height: 21px;
}

.activity-summary-icon.is-green {
    background: var(--success-soft);
    color: var(--success);
}

.activity-summary-icon.is-orange {
    background: #fff4e8;
    color: var(--warning);
}

.activity-summary-icon.is-slate {
    background: #f2f4f7;
    color: var(--ink-600);
}

.activity-summary-grid article > div {
    display: grid;
    min-width: 0;
}

.activity-summary-grid small {
    overflow: hidden;
    color: var(--ink-500);
    font-size: 10px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}

.activity-summary-grid strong {
    margin: 3px 0;
    color: var(--navy-950);
    font-size: 27px;
    font-weight: 500;
    line-height: 1.1;
}

.activity-summary-grid article > div > span {
    color: var(--ink-500);
    font-size: 10px;
}

.activity-signal {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 20px;
    border: 1px solid #fedf89;
    border-left: 4px solid #f79009;
    background: #fffaeb;
    padding: 16px 18px;
    color: #7a2e0e;
}

.activity-signal > span {
    display: grid;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: #f79009;
    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
}

.activity-signal strong {
    display: block;
    font-size: 13px;
}

.activity-signal p {
    margin: 3px 0 0;
    color: #934d18;
    font-size: 12px;
}

.activity-panel {
    overflow: hidden;
}

.activity-toolbar {
    display: flex;
    min-height: 104px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--line);
    padding: 22px 25px;
}

.activity-toolbar h3 {
    margin: 0;
    color: var(--navy-950);
    font-size: 22px;
    font-weight: 550;
    letter-spacing: -0.025em;
}

.activity-toolbar .eyebrow {
    margin-bottom: 3px;
}

.activity-toolbar p:last-child {
    margin: 4px 0 0;
    color: var(--ink-500);
    font-size: 11px;
}

.activity-toolbar-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.activity-toolbar-actions .primary-button {
    min-height: 40px;
    padding: 9px 15px;
    font-size: 12px;
}

.activity-filters {
    display: grid;
    grid-template-columns: 140px 175px 155px minmax(210px, 1fr) auto auto;
    align-items: end;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
    padding: 17px 25px;
}

.activity-filters label {
    display: grid;
    min-width: 0;
    gap: 6px;
}

.activity-filters label > span {
    color: var(--ink-600);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.activity-filters select,
.activity-filters input {
    width: 100%;
    height: 40px;
    min-width: 0;
    border: 1px solid #cbd2d9;
    border-radius: 4px;
    background: #ffffff;
    padding: 8px 10px;
    color: var(--ink-700);
    font-size: 12px;
}

.activity-filters select:focus,
.activity-filters input:focus {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.1);
    outline: 0;
}

.filter-button {
    height: 40px;
    border: 1px solid var(--navy-900);
    border-radius: 4px;
    background: var(--navy-900);
    padding: 8px 15px;
    color: #ffffff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 650;
}

.filter-button:hover {
    background: var(--navy-850);
}

.clear-filter-link {
    align-self: center;
    color: var(--blue-700);
    font-size: 11px;
    font-weight: 650;
    text-decoration: none;
}

.activity-list {
    position: relative;
    padding: 7px 0;
}

.activity-list::before {
    position: absolute;
    top: 24px;
    bottom: 24px;
    left: 142px;
    width: 1px;
    background: var(--line);
    content: "";
}

.activity-entry {
    position: relative;
    display: grid;
    min-height: 145px;
    grid-template-columns: 114px 31px minmax(0, 1fr);
    padding: 22px 25px 22px 20px;
}

.activity-entry + .activity-entry {
    border-top: 1px solid var(--line-soft);
}

.activity-time {
    display: grid;
    align-content: start;
    justify-items: end;
    padding: 4px 17px 0 0;
    line-height: 1.25;
}

.activity-time strong {
    color: var(--navy-950);
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
}

.activity-time span {
    margin-top: 4px;
    color: var(--ink-500);
    font-size: 10px;
}

.activity-node {
    position: relative;
    z-index: 1;
    width: 11px;
    height: 11px;
    margin-top: 8px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: var(--blue-600);
    box-shadow: 0 0 0 1px var(--blue-600);
}

.activity-entry.status-success .activity-node {
    background: #17b26a;
    box-shadow: 0 0 0 1px #17b26a;
}

.activity-entry.status-warning .activity-node {
    background: #f79009;
    box-shadow: 0 0 0 1px #f79009;
}

.activity-entry.status-error .activity-node {
    background: #f04438;
    box-shadow: 0 0 0 1px #f04438;
}

.activity-entry-body {
    min-width: 0;
    padding-left: 4px;
}

.activity-entry-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.activity-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.activity-category,
.activity-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.05em;
    line-height: 1;
    text-transform: uppercase;
}

.activity-category {
    background: var(--blue-050);
    color: var(--blue-700);
}

.activity-category.category-security {
    background: #f4f3ff;
    color: #5925dc;
}

.activity-category.category-account {
    background: #eef4ff;
    color: #3538cd;
}

.activity-category.category-subscription {
    background: #ecfdf3;
    color: #067647;
}

.activity-category.category-system {
    background: #f2f4f7;
    color: var(--ink-600);
}

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

.activity-status.status-info {
    background: #f2f4f7;
    color: var(--ink-600);
}

.activity-status.status-warning {
    background: #fff4e8;
    color: var(--warning);
}

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

.activity-entry-heading code {
    overflow: hidden;
    max-width: 45%;
    color: var(--ink-500);
    font-family: Consolas, "Courier New", monospace;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-entry h4 {
    margin: 11px 0 5px;
    color: var(--navy-950);
    font-size: 15px;
    font-weight: 650;
}

.activity-entry-body > p {
    margin-bottom: 12px;
    color: var(--ink-500);
    font-size: 12px;
}

.activity-context {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.activity-context span {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    color: var(--ink-700);
    font-size: 11px;
}

.activity-context small {
    color: var(--ink-500);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.activity-details {
    margin-top: 14px;
    border-top: 1px dashed var(--line);
    padding-top: 10px;
}

.activity-details summary {
    width: max-content;
    color: var(--blue-700);
    cursor: pointer;
    font-size: 10px;
    font-weight: 650;
}

.activity-details dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 20px;
    margin: 13px 0 0;
    border-left: 2px solid var(--blue-100);
    background: var(--surface-soft);
    padding: 13px 15px;
}

.activity-details dl > div {
    min-width: 0;
}

.activity-details dt {
    color: var(--ink-500);
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
}

.activity-details dd {
    margin: 3px 0 0;
    overflow-wrap: anywhere;
    color: var(--ink-700);
    font-family: Consolas, "Courier New", monospace;
    font-size: 10px;
}

.activity-empty {
    display: grid;
    min-height: 350px;
    place-items: center;
    align-content: center;
    padding: 38px;
    text-align: center;
}

.activity-empty > span {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    background: var(--blue-050);
    color: var(--blue-700);
}

.activity-empty svg {
    width: 26px;
    height: 26px;
}

.activity-empty h4 {
    margin: 17px 0 5px;
    color: var(--navy-950);
    font-size: 16px;
}

.activity-empty p {
    margin: 0;
    color: var(--ink-500);
    font-size: 12px;
}

.activity-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-top: 1px solid var(--line);
    background: var(--surface-soft);
    padding: 16px;
}

.activity-pagination a {
    display: grid;
    min-width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #ffffff;
    padding: 0 10px;
    color: var(--ink-600);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
}

.activity-pagination a:hover,
.activity-pagination a.is-current {
    border-color: var(--blue-600);
    background: var(--blue-600);
    color: #ffffff;
}

/* Codex logbook */

.codex-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.codex-summary-grid article {
    position: relative;
    display: grid;
    min-height: 126px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #ffffff;
    padding: 22px;
    box-shadow: var(--shadow-sm);
}

.codex-summary-grid article::after {
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
    background: var(--blue-600);
    content: "";
    opacity: 0.8;
}

.codex-summary-grid small {
    color: var(--ink-500);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.codex-summary-grid strong {
    align-self: end;
    color: var(--navy-950);
    font-size: 30px;
    font-weight: 450;
    line-height: 1;
}

.codex-summary-grid span {
    margin-top: 6px;
    color: var(--ink-500);
    font-size: 10px;
}

.codex-workbench {
    overflow: hidden;
}

.codex-toolbar {
    display: flex;
    min-height: 104px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--line);
    padding: 22px 25px;
}

.codex-toolbar h3 {
    margin: 0;
    color: var(--navy-950);
    font-size: 22px;
    font-weight: 550;
    letter-spacing: -0.025em;
}

.codex-toolbar .eyebrow {
    margin-bottom: 3px;
}

.codex-toolbar p:last-child {
    margin: 4px 0 0;
    color: var(--ink-500);
    font-size: 11px;
}

.codex-storage-note {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    padding: 8px 12px;
    color: var(--ink-600);
    font-size: 10px;
}

.codex-storage-note i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #17b26a;
    box-shadow: 0 0 0 3px rgba(23, 178, 106, 0.12);
}

.codex-filters {
    display: grid;
    grid-template-columns: 170px 180px minmax(240px, 1fr) auto auto;
    align-items: end;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
    padding: 17px 25px;
}

.codex-filters label {
    display: grid;
    min-width: 0;
    gap: 6px;
}

.codex-filters label > span {
    color: var(--ink-600);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.codex-filters select,
.codex-filters input {
    width: 100%;
    height: 40px;
    min-width: 0;
    border: 1px solid #cbd2d9;
    border-radius: 4px;
    background: #ffffff;
    padding: 8px 10px;
    color: var(--ink-700);
    font-size: 12px;
}

.codex-filters select:focus,
.codex-filters input:focus {
    border-color: var(--blue-600);
    box-shadow: 0 0 0 3px rgba(15, 98, 254, 0.1);
    outline: 0;
}

.codex-layout {
    display: grid;
    min-height: 740px;
    grid-template-columns: minmax(290px, 340px) minmax(0, 1fr);
}

.codex-report-list {
    border-right: 1px solid var(--line);
    background: var(--surface-soft);
}

.codex-report-link {
    position: relative;
    display: block;
    min-height: 190px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
    padding: 21px 20px;
    text-decoration: none;
    transition: background-color 150ms ease;
}

.codex-report-link::before {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 3px;
    background: transparent;
    content: "";
}

.codex-report-link:hover {
    background: #ffffff;
}

.codex-report-link.is-selected {
    background: #ffffff;
}

.codex-report-link.is-selected::before {
    background: var(--blue-600);
}

.codex-report-link-top,
.codex-report-link-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.codex-report-link-top time {
    color: var(--ink-500);
    font-size: 9px;
}

.codex-report-link > strong {
    display: block;
    margin: 14px 0 7px;
    color: var(--navy-950);
    font-size: 14px;
    font-weight: 650;
    line-height: 1.3;
}

.codex-report-link > p {
    display: -webkit-box;
    overflow: hidden;
    min-height: 38px;
    margin-bottom: 15px;
    color: var(--ink-500);
    font-size: 11px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.codex-report-link-meta {
    justify-content: flex-start;
}

.codex-report-link-meta code,
.codex-report-link-meta > span:last-child {
    color: var(--ink-500);
    font-family: Consolas, "Courier New", monospace;
    font-size: 9px;
}

.codex-type,
.codex-status,
.codex-impact {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.045em;
    line-height: 1;
    text-transform: uppercase;
}

.codex-type {
    background: var(--blue-050);
    color: var(--blue-700);
}

.codex-type.type-investigation {
    background: #f4f3ff;
    color: #5925dc;
}

.codex-type.type-deployment {
    background: #ecfdf3;
    color: #067647;
}

.codex-type.type-maintenance {
    background: #fff4e8;
    color: var(--warning);
}

.codex-type.type-recommendation {
    background: #fdf2fa;
    color: #c11574;
}

.codex-status {
    background: #f2f4f7;
    color: var(--ink-600);
}

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

.codex-status.status-in_progress {
    background: var(--blue-050);
    color: var(--blue-700);
}

.codex-status.status-planned {
    background: #f4f3ff;
    color: #5925dc;
}

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

.codex-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 15px;
    color: var(--ink-500);
    font-size: 9px;
}

.codex-pagination a {
    color: var(--blue-700);
    font-weight: 650;
    text-decoration: none;
}

.codex-report-detail {
    min-width: 0;
    background: #ffffff;
}

.codex-report-hero {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    padding: clamp(28px, 4vw, 48px);
}

.codex-report-hero::after {
    position: absolute;
    top: -90px;
    right: -90px;
    width: 260px;
    height: 260px;
    border: 1px solid rgba(15, 98, 254, 0.08);
    border-radius: 50%;
    box-shadow: 0 0 0 45px rgba(15, 98, 254, 0.025), 0 0 0 90px rgba(15, 98, 254, 0.018);
    content: "";
    pointer-events: none;
}

.codex-report-hero > * {
    position: relative;
    z-index: 1;
}

.codex-report-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.codex-impact {
    background: #f2f4f7;
    color: var(--ink-600);
}

.codex-impact.impact-high,
.codex-impact.impact-critical {
    background: #fff4e8;
    color: var(--warning);
}

.codex-impact.impact-critical {
    background: var(--danger-soft);
    color: var(--danger);
}

.codex-report-hero h3 {
    max-width: 790px;
    margin: 19px 0 12px;
    color: var(--navy-950);
    font-size: clamp(27px, 3.1vw, 42px);
    font-weight: 450;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.codex-report-hero > p {
    max-width: 800px;
    margin-bottom: 0;
    color: var(--ink-500);
    font-size: 14px;
}

.codex-report-actions {
    margin-top: 25px;
}

.codex-report-actions .primary-button {
    min-height: 40px;
    padding: 9px 15px;
    font-size: 12px;
}

.codex-report-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
}

.codex-report-facts > div {
    min-width: 0;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 16px 21px;
}

.codex-report-facts > div:nth-child(3n) {
    border-right: 0;
}

.codex-report-facts > div:nth-last-child(-n + 3) {
    border-bottom: 0;
}

.codex-report-facts dt {
    color: var(--ink-500);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.codex-report-facts dd {
    margin: 5px 0 0;
    overflow: hidden;
    color: var(--ink-700);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.codex-report-facts code {
    font-family: Consolas, "Courier New", monospace;
    font-size: 10px;
}

.codex-section-stack {
    display: grid;
    gap: 18px;
    padding: clamp(25px, 4vw, 44px);
}

.codex-section {
    border: 1px solid var(--line);
    background: #ffffff;
}

.codex-section > header {
    display: flex;
    align-items: center;
    gap: 13px;
    border-bottom: 1px solid var(--line-soft);
    background: var(--surface-soft);
    padding: 15px 18px;
}

.codex-section > header > span {
    display: grid;
    width: 35px;
    height: 35px;
    flex: 0 0 auto;
    place-items: center;
    background: var(--navy-900);
    color: #ffffff;
}

.codex-section > header svg {
    width: 17px;
    height: 17px;
}

.codex-section h4,
.codex-tags-section h4,
.codex-files-section h4,
.codex-artifacts-heading h4 {
    margin: 0;
    color: var(--navy-950);
    font-size: 14px;
    font-weight: 650;
}

.codex-section > header p {
    margin: 2px 0 0;
    color: var(--ink-500);
    font-size: 10px;
}

.codex-rich-text {
    color: var(--ink-700);
    font-size: 12px;
    line-height: 1.75;
    padding: 19px 21px;
    overflow-wrap: anywhere;
}

.codex-section-recommendations {
    border-left: 3px solid var(--blue-600);
}

.codex-tags-section,
.codex-files-section,
.codex-artifacts-section {
    margin: 0 clamp(25px, 4vw, 44px) clamp(25px, 4vw, 44px);
    border-top: 1px solid var(--line);
    padding-top: 24px;
}

.codex-tags-section > div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.codex-tags-section span {
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    padding: 5px 9px;
    color: var(--ink-600);
    font-size: 9px;
    font-weight: 650;
}

.codex-files-section ul {
    display: grid;
    gap: 6px;
    margin: 13px 0 0;
    padding: 0;
    list-style: none;
}

.codex-files-section li {
    position: relative;
    border: 1px solid var(--line-soft);
    background: var(--surface-soft);
    padding: 9px 12px 9px 30px;
    color: var(--ink-700);
}

.codex-files-section li::before {
    position: absolute;
    top: 12px;
    left: 13px;
    width: 7px;
    height: 9px;
    border: 1px solid var(--blue-600);
    content: "";
}

.codex-files-section code {
    font-family: Consolas, "Courier New", monospace;
    font-size: 10px;
    overflow-wrap: anywhere;
}

.codex-artifacts-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 13px;
}

.codex-artifacts-heading .eyebrow {
    margin-bottom: 3px;
}

.codex-artifacts-heading > span {
    color: var(--ink-500);
    font-size: 10px;
}

.codex-artifact {
    border: 1px solid var(--line);
    background: #ffffff;
}

.codex-artifact + .codex-artifact {
    margin-top: 9px;
}

.codex-artifact summary {
    display: flex;
    min-height: 62px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 15px;
    cursor: pointer;
    list-style: none;
}

.codex-artifact summary::-webkit-details-marker {
    display: none;
}

.codex-artifact summary > span {
    display: grid;
}

.codex-artifact summary strong {
    color: var(--ink-900);
    font-size: 11px;
}

.codex-artifact summary small {
    margin-top: 3px;
    color: var(--ink-500);
    font-size: 9px;
}

.codex-artifact summary i {
    color: var(--blue-700);
    font-size: 9px;
    font-style: normal;
    font-weight: 700;
    text-transform: uppercase;
}

.codex-artifact[open] summary {
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
}

.codex-artifact pre {
    max-height: 560px;
    margin: 0;
    overflow: auto;
    background: var(--navy-950);
    padding: 18px;
    color: #d9e5f3;
    font-family: Consolas, "Courier New", monospace;
    font-size: 10px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
}

.codex-artifact > p {
    margin: 0;
    border-top: 1px solid var(--line-soft);
    padding: 11px 15px;
    color: var(--ink-600);
    font-size: 10px;
    overflow-wrap: anywhere;
}

.codex-artifact-restricted {
    color: var(--warning) !important;
}

.codex-empty {
    display: grid;
    min-height: 480px;
    place-items: center;
    align-content: center;
    padding: 42px;
    text-align: center;
}

.codex-empty > span {
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    background: var(--navy-900);
    color: #ffffff;
}

.codex-empty svg {
    width: 27px;
    height: 27px;
}

.codex-empty h4 {
    margin: 17px 0 5px;
    color: var(--navy-950);
    font-size: 16px;
}

.codex-empty p {
    margin: 0;
    color: var(--ink-500);
    font-size: 12px;
}

/* Prepared module views */

.module-placeholder {
    display: grid;
    min-height: 480px;
    grid-template-columns: minmax(250px, 0.8fr) minmax(420px, 1.2fr);
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.placeholder-visual {
    position: relative;
    display: grid;
    min-height: 430px;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(145deg, var(--navy-950), #12385e);
    color: #ffffff;
}

.placeholder-visual > span {
    position: relative;
    z-index: 2;
    display: grid;
    width: 96px;
    height: 96px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.07);
}

.placeholder-visual svg {
    width: 42px;
    height: 42px;
}

.placeholder-visual i {
    position: absolute;
    width: 290px;
    height: 290px;
    border: 1px solid rgba(112, 160, 246, 0.14);
    border-radius: 50%;
}

.placeholder-visual i:nth-of-type(2) {
    width: 430px;
    height: 430px;
}

.placeholder-visual i:nth-of-type(3) {
    width: 570px;
    height: 570px;
}

.placeholder-copy {
    align-self: center;
    padding: clamp(32px, 5vw, 66px);
}

.placeholder-copy h3 {
    max-width: 670px;
    margin: 20px 0 14px;
    color: var(--navy-950);
    font-size: clamp(26px, 3vw, 39px);
    font-weight: 450;
    letter-spacing: -0.037em;
    line-height: 1.12;
}

.placeholder-copy > p {
    max-width: 680px;
    color: var(--ink-500);
}

.placeholder-copy ul {
    display: grid;
    gap: 12px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
}

.placeholder-copy li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    color: var(--ink-700);
    font-size: 13px;
}

.placeholder-copy li span {
    display: grid;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 50%;
    background: var(--blue-050);
    color: var(--blue-700);
    font-size: 11px;
    font-weight: 800;
}

/* User management */

.users-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(310px, 0.6fr);
    align-items: start;
    gap: 20px;
}

.panel {
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

.panel-heading {
    display: flex;
    min-height: 82px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid var(--line);
    padding: 19px 23px;
}

.panel-heading .eyebrow {
    margin-bottom: 5px;
}

.users-table-wrap {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th,
.users-table td {
    border-bottom: 1px solid var(--line-soft);
    padding: 17px 19px;
    text-align: left;
    vertical-align: middle;
}

.users-table tr:last-child td {
    border-bottom: 0;
}

.users-table th {
    background: var(--surface-soft);
    color: var(--ink-500);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.users-table td {
    color: var(--ink-600);
    font-size: 12px;
}

.users-table td:first-child {
    min-width: 210px;
}

.users-table td strong,
.users-table td small {
    display: block;
}

.users-table td strong {
    color: var(--ink-900);
    font-size: 13px;
}

.users-table td small {
    margin-top: 3px;
    color: var(--ink-500);
}

.table-status {
    background: #f2f4f7;
    color: var(--ink-600);
}

.table-status.is-active {
    background: var(--success-soft);
    color: var(--success);
}

.create-user-panel > p {
    margin: 0;
    padding: 22px 23px 0;
    color: var(--ink-500);
    font-size: 12px;
}

.admin-form {
    padding: 2px 23px 25px;
}

.admin-form .primary-button {
    margin-top: 24px;
}

/* Database error page */

.system-page {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 28px;
    background: var(--navy-950);
    color: #ffffff;
}

.system-message {
    width: min(100%, 560px);
    border-left: 4px solid var(--blue-500);
    background: rgba(255, 255, 255, 0.06);
    padding: 34px;
}

.system-message > span {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    background: var(--blue-600);
    font-size: 11px;
    font-weight: 800;
}

.system-message h1 {
    margin: 24px 0 12px;
    font-size: 31px;
    font-weight: 450;
    letter-spacing: -0.035em;
}

.system-message p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 1180px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .activity-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .activity-search-field {
        grid-column: span 2;
    }

    .users-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 960px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        min-height: 410px;
        padding: 34px;
    }

    .login-brand-copy {
        padding: 46px 0;
    }

    .login-brand-copy h1 {
        font-size: 46px;
    }

    .login-form-panel {
        min-height: 560px;
    }

    .sidebar {
        visibility: hidden;
        transform: translateX(-100%);
        transition: transform 200ms ease, visibility 200ms ease;
    }

    .admin-page.sidebar-open .sidebar {
        visibility: visible;
        box-shadow: 14px 0 40px rgba(0, 0, 0, 0.25);
        transform: translateX(0);
    }

    .admin-page.sidebar-open::after {
        position: fixed;
        z-index: 40;
        inset: 0;
        background: rgba(7, 20, 38, 0.52);
        content: "";
    }

    .admin-workspace {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: grid;
    }

    .topbar {
        justify-content: flex-start;
        gap: 18px;
    }

    .topbar-account {
        margin-left: auto;
    }

    .module-placeholder {
        grid-template-columns: 1fr;
    }

    .activity-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .activity-search-field {
        grid-column: auto;
    }

    .codex-filters {
        grid-template-columns: 1fr 1fr;
    }

    .codex-search-field {
        grid-column: 1 / -1;
    }

    .codex-layout {
        grid-template-columns: 1fr;
    }

    .codex-report-list {
        display: grid;
        max-height: 540px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        overflow-y: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .codex-report-link:nth-child(odd) {
        border-right: 1px solid var(--line);
    }

    .codex-pagination {
        grid-column: 1 / -1;
    }

    .placeholder-visual {
        min-height: 260px;
    }
}

@media (max-width: 720px) {
    .login-brand-panel {
        min-height: 360px;
    }

    .login-brand-copy {
        padding: 34px 0;
    }

    .login-brand-copy h1 {
        margin-bottom: 16px;
        font-size: 38px;
    }

    .login-brand-copy > p:last-child {
        font-size: 15px;
    }

    .login-form-panel {
        min-height: 520px;
        padding: 46px 24px;
    }

    .topbar {
        height: 74px;
        padding: 0 18px;
    }

    .topbar-title p,
    .account-copy {
        display: none;
    }

    .topbar-title h1 {
        font-size: 17px;
    }

    .account-avatar {
        display: none;
    }

    .workspace-content {
        padding: 26px 18px 42px;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
    }

    .page-heading h2 {
        font-size: 31px;
    }

    .dashboard-hero {
        min-height: 330px;
        align-items: flex-start;
        flex-direction: column;
        justify-content: center;
        gap: 25px;
    }

    .hero-system-card {
        min-width: min(100%, 260px);
    }

    .module-grid {
        grid-template-columns: 1fr;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .credentials-once {
        grid-template-columns: 1fr;
    }

    .activity-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .activity-filters {
        grid-template-columns: 1fr 1fr;
        padding: 17px 18px;
    }

    .activity-search-field {
        grid-column: 1 / -1;
    }

    .activity-list::before {
        left: 89px;
    }

    .activity-entry {
        grid-template-columns: 62px 25px minmax(0, 1fr);
        padding: 20px 18px 20px 12px;
    }

    .activity-time {
        padding-right: 10px;
    }

    .activity-time strong {
        font-size: 11px;
    }

    .activity-time span {
        font-size: 8px;
    }

    .activity-entry-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .activity-entry-heading code {
        max-width: 100%;
    }

    .activity-details dl {
        grid-template-columns: 1fr;
    }

    .codex-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .codex-filters {
        padding: 17px 18px;
    }

    .codex-report-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .codex-report-facts > div,
    .codex-report-facts > div:nth-child(3n) {
        border-right: 1px solid var(--line);
        border-bottom: 1px solid var(--line);
    }

    .codex-report-facts > div:nth-child(2n) {
        border-right: 0;
    }

    .codex-report-facts > div:nth-last-child(-n + 2) {
        border-bottom: 0;
    }

    .users-table,
    .users-table tbody,
    .users-table tr,
    .users-table td {
        display: block;
        width: 100%;
    }

    .users-table thead {
        display: none;
    }

    .users-table tr {
        border-bottom: 1px solid var(--line);
        padding: 12px 18px;
    }

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

    .users-table td,
    .users-table tr:last-child td {
        display: grid;
        min-width: 0;
        grid-template-columns: 112px minmax(0, 1fr);
        border-bottom: 1px solid var(--line-soft);
        padding: 10px 0;
    }

    .users-table td::before {
        color: var(--ink-500);
        content: attr(data-label);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }
}

@media (max-width: 520px) {
    .login-brand-panel {
        min-height: 320px;
        padding: 25px;
    }

    .login-brand-copy {
        padding-bottom: 15px;
    }

    .login-brand-copy h1 {
        font-size: 32px;
    }

    .login-security-note {
        display: none;
    }

    .login-form-panel {
        padding: 38px 22px;
    }

    .password-change-page {
        padding: 18px;
    }

    .password-change-card {
        padding: 26px 21px;
    }

    .metric-grid {
        grid-template-columns: 1fr;
    }

    .metric-grid article {
        min-height: 122px;
    }

    .module-card {
        min-height: 245px;
        padding: 23px;
    }

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

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

    .activity-summary-grid article {
        min-height: 112px;
    }

    .activity-toolbar {
        padding: 20px;
    }

    .activity-toolbar-actions {
        width: 100%;
    }

    .activity-toolbar-actions a {
        flex: 1;
    }

    .activity-filters {
        grid-template-columns: 1fr;
    }

    .activity-search-field {
        grid-column: auto;
    }

    .clear-filter-link {
        justify-self: center;
        padding: 5px;
    }

    .activity-list::before {
        display: none;
    }

    .activity-entry {
        grid-template-columns: 1fr;
        padding: 20px;
    }

    .activity-time {
        display: flex;
        align-items: baseline;
        justify-items: initial;
        gap: 8px;
        padding: 0 0 9px;
    }

    .activity-time span {
        margin: 0;
    }

    .activity-node {
        display: none;
    }

    .activity-entry-body {
        padding-left: 0;
    }

    .codex-toolbar {
        padding: 20px;
    }

    .codex-storage-note {
        align-self: stretch;
        justify-content: center;
    }

    .codex-filters {
        grid-template-columns: 1fr;
    }

    .codex-search-field {
        grid-column: auto;
    }

    .codex-report-list {
        display: block;
        max-height: 520px;
    }

    .codex-report-link:nth-child(odd) {
        border-right: 0;
    }

    .codex-report-hero {
        padding: 27px 21px;
    }

    .codex-report-actions .primary-button {
        width: 100%;
    }

    .codex-report-facts {
        grid-template-columns: 1fr;
    }

    .codex-report-facts > div,
    .codex-report-facts > div:nth-child(2n),
    .codex-report-facts > div:nth-child(3n),
    .codex-report-facts > div:nth-last-child(-n + 2) {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }

    .codex-report-facts > div:last-child {
        border-bottom: 0;
    }

    .codex-section-stack {
        padding: 22px 17px;
    }

    .codex-tags-section,
    .codex-files-section,
    .codex-artifacts-section {
        margin-right: 17px;
        margin-left: 17px;
    }

    .codex-artifacts-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .placeholder-copy {
        padding: 30px 22px;
    }

    .panel-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }
}

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

/* Customer account management */

.customer-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.customer-summary-grid article {
    display: grid;
    min-height: 126px;
    align-content: center;
    border: 1px solid var(--line);
    border-top: 3px solid var(--blue-600);
    background: #fff;
    padding: 19px 21px;
    box-shadow: var(--shadow-sm);
}

.customer-summary-grid article.has-attention { border-top-color: #f79009; }
.customer-summary-grid small { color: var(--ink-500); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; }
.customer-summary-grid strong { margin: 5px 0 1px; color: var(--navy-950); font-size: 30px; font-weight: 500; line-height: 1; }
.customer-summary-grid span { color: var(--ink-500); font-size: 12px; }

.customer-directory-panel { overflow: visible; }

.customer-directory-toolbar {
    position: relative;
    display: flex;
    min-height: 94px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--line);
    padding: 20px 24px;
}

.customer-directory-toolbar h3 { margin-bottom: 2px; font-size: 20px; font-weight: 600; }
.customer-directory-toolbar p:last-child { margin-bottom: 0; color: var(--ink-500); font-size: 12px; }
.customer-create-disclosure { position: relative; z-index: 15; }
.customer-create-disclosure > summary { list-style: none; cursor: pointer; }
.customer-create-disclosure > summary::-webkit-details-marker { display: none; }

.customer-create-form {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: grid;
    width: min(480px, calc(100vw - 48px));
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--blue-600);
    background: #fff;
    padding: 22px;
    box-shadow: 0 22px 55px rgba(16, 24, 40, .2);
}

.customer-create-form > div { display: grid; gap: 6px; }
.customer-create-form > div:nth-child(4) { grid-column: 1 / -1; }
.customer-create-form > p { grid-column: 1 / -1; margin: 0; color: var(--ink-500); font-size: 12px; }
.customer-create-form > .primary-button { justify-self: start; }

.customer-create-form label,
.customer-filters label,
.customer-form-grid label,
.customer-note-form > label,
.customer-phone-grid label {
    color: var(--ink-600);
    font-size: 11px;
    font-weight: 650;
}

.customer-create-form input,
.customer-filters input,
.customer-filters select,
.customer-form-grid input,
.customer-note-form textarea,
.customer-phone-grid input {
    width: 100%;
    border: 1px solid #cfd5dd;
    border-radius: 3px;
    background: #fff;
    padding: 10px 11px;
    font: inherit;
}

.customer-create-form input:focus,
.customer-filters input:focus,
.customer-filters select:focus,
.customer-form-grid input:focus,
.customer-note-form textarea:focus,
.customer-phone-grid input:focus {
    border-color: var(--blue-600);
    outline: 3px solid rgba(15, 98, 254, .12);
}

.customer-checkbox { display: inline-flex !important; align-items: center; gap: 9px; }
.customer-checkbox input { width: 17px !important; height: 17px; padding: 0; accent-color: var(--blue-600); }
.customer-create-form > .customer-checkbox { grid-column: 1 / -1; }

.customer-filters {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 220px auto auto;
    align-items: end;
    gap: 12px;
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
    padding: 16px 24px;
}

.customer-filters label { display: grid; gap: 5px; }
.customer-filters .clear-filter-link { align-self: center; }

.customer-workbench { display: grid; min-height: 680px; grid-template-columns: minmax(330px, 38%) minmax(0, 1fr); }
.customer-list { max-height: calc(100vh - 300px); overflow-y: auto; border-right: 1px solid var(--line); background: #fbfcfd; }

.customer-list-item {
    position: relative;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    border-bottom: 1px solid var(--line-soft);
    padding: 17px 18px;
    color: inherit;
    text-decoration: none;
    transition: background-color .15s ease, box-shadow .15s ease;
}

.customer-list-item:hover { background: var(--blue-050); }
.customer-list-item.is-selected { background: #fff; box-shadow: inset 4px 0 0 var(--blue-600); }
.customer-avatar,
.customer-detail-avatar { display: grid; place-items: center; border-radius: 3px; background: var(--navy-900); color: #fff; font-weight: 700; }
.customer-avatar { width: 42px; height: 42px; font-size: 14px; }
.customer-list-copy { min-width: 0; }
.customer-list-heading { display: flex; align-items: center; gap: 8px; }
.customer-list-heading strong { overflow: hidden; color: var(--ink-900); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.customer-list-copy > small { display: block; overflow: hidden; margin-top: 2px; color: var(--ink-500); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.customer-status-dot { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--danger); }
.customer-status-dot.is-active { background: #12a875; box-shadow: 0 0 0 3px rgba(18, 168, 117, .11); }
.customer-list-meta { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 9px; color: var(--ink-600); font-size: 10px; }
.customer-last-seen { display: block; margin-top: 6px; color: var(--ink-500); font-size: 10px; }
.customer-action-badge { grid-column: 2; justify-self: start; border-radius: 999px; background: #fff4e5; padding: 3px 7px; color: var(--warning); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .04em; }
.customer-pagination { display: flex; align-items: center; justify-content: space-between; padding: 16px; color: var(--ink-600); font-size: 11px; }
.customer-pagination a { color: var(--blue-700); font-weight: 650; text-decoration: none; }
.customer-list-empty { padding: 48px 24px; text-align: center; }
.customer-list-empty p { color: var(--ink-500); font-size: 12px; }

.customer-detail { min-width: 0; background: #fff; }
.customer-detail-hero { display: flex; min-height: 126px; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding: 25px 28px; background: linear-gradient(115deg, #fff 55%, #edf5ff); }
.customer-detail-identity { display: flex; min-width: 0; align-items: center; gap: 15px; }
.customer-detail-avatar { width: 56px; height: 56px; flex: 0 0 auto; background: var(--blue-600); font-size: 20px; }
.customer-detail-identity h3 { overflow: hidden; margin-bottom: 2px; font-size: 23px; font-weight: 550; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.customer-detail-identity p:last-child { overflow: hidden; margin: 0; color: var(--ink-500); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.customer-hero-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.customer-status-badge,
.customer-type-badge,
.customer-password-badge { border-radius: 999px; padding: 6px 9px; font-size: 9px; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
.customer-status-badge.is-active { background: var(--success-soft); color: var(--success); }
.customer-status-badge.is-blocked { background: var(--danger-soft); color: var(--danger); }
.customer-type-badge { background: var(--blue-050); color: var(--blue-700); }
.customer-password-badge { background: #fff4e5; color: var(--warning); }

.customer-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.customer-facts div { min-width: 0; border-right: 1px solid var(--line); padding: 14px 16px; }
.customer-facts div:last-child { border-right: 0; }
.customer-facts dt { color: var(--ink-500); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.customer-facts dd { overflow: hidden; margin: 3px 0 0; color: var(--ink-900); font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.customer-detail-sections { padding: 22px; }
.customer-section { margin-bottom: 12px; border: 1px solid var(--line); background: #fff; }
.customer-section > summary { display: flex; min-height: 68px; cursor: pointer; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 17px; list-style: none; }
.customer-section > summary::-webkit-details-marker { display: none; }
.customer-section > summary > span { display: grid; }
.customer-section > summary strong { color: var(--navy-950); font-size: 13px; }
.customer-section > summary small { color: var(--ink-500); font-size: 10px; }
.customer-section > summary i { color: var(--blue-700); font-size: 10px; font-style: normal; font-weight: 700; }
.customer-section[open] > summary { border-bottom: 1px solid var(--line-soft); background: #fbfcfd; }
.customer-section[open] > summary i { font-size: 0; }
.customer-section[open] > summary i::after { content: "Sluiten"; font-size: 10px; }
.customer-section-body { padding: 19px; }

.customer-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.customer-form-grid label { display: grid; gap: 5px; }
.customer-form-wide { grid-column: 1 / -1; }
.customer-form-grid > .primary-button { justify-self: start; }
.customer-security-actions { display: grid; gap: 8px; margin-top: 22px; }
.customer-security-actions article { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line-soft); padding-top: 13px; }
.customer-security-actions strong { font-size: 12px; }
.customer-security-actions p { margin: 2px 0 0; color: var(--ink-500); font-size: 10px; }
.secondary-button.is-danger { border-color: #f3b7b2; color: var(--danger); }

.customer-note-form textarea { display: block; margin-top: 7px; resize: vertical; }
.customer-note-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 12px; }
.customer-note-footer small { color: var(--ink-500); font-size: 10px; }
.customer-readonly-note { color: var(--ink-600); font-size: 12px; white-space: normal; }
.customer-vehicle-grid { display: grid; gap: 9px; }
.customer-vehicle-grid article { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line-soft); background: var(--surface-soft); padding: 12px; }
.customer-plate { display: inline-flex; min-width: 88px; justify-content: center; border: 2px solid #151515; border-radius: 3px; background: #f7c800; padding: 5px 8px; color: #111; font-size: 11px; font-weight: 800; letter-spacing: .05em; }
.customer-vehicle-grid article div { display: grid; }
.customer-vehicle-grid strong { font-size: 12px; }
.customer-vehicle-grid small { color: var(--ink-500); font-size: 10px; }
.customer-vehicle-grid article > form { margin-left: auto; }
.customer-vehicle-access-form { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(150px, .7fr) auto; align-items: end; gap: 10px; margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 14px; }
.customer-vehicle-access-form label { display: grid; gap: 5px; }
.customer-empty-copy { margin: 0; color: var(--ink-500); font-size: 12px; }

.customer-notification-form { display: grid; gap: 18px; }
.customer-notification-block { display: grid; gap: 10px; }
.customer-notification-block > header,
.customer-device-section > header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.customer-notification-block > header strong,
.customer-device-section > header strong { font-size: 12px; }
.customer-notification-block > header small,
.customer-device-section > header small { color: var(--ink-500); font-size: 10px; }
.customer-phone-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.customer-phone-grid label { display: grid; gap: 5px; }
.customer-rule-list,
.customer-geofence-list { display: grid; border: 1px solid var(--line-soft); }
.customer-rule-list article,
.customer-geofence-list article { display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line-soft); padding: 12px; }
.customer-rule-list article:last-child,
.customer-geofence-list article:last-child { border-bottom: 0; }
.customer-rule-list article > strong { margin-right: auto; font-size: 11px; }
.customer-toggle { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-600); font-size: 10px; }
.customer-toggle input { accent-color: var(--blue-600); }
.customer-geofence-list article > div { display: grid; min-width: 0; margin-right: auto; }
.customer-geofence-list article > div strong { font-size: 11px; }
.customer-geofence-list article > div small { overflow: hidden; color: var(--ink-500); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.customer-notification-form > .primary-button { justify-self: start; }
.customer-vehicle-preference-list { display: grid; gap: 9px; }
.customer-vehicle-preference-list > article { border: 1px solid var(--line-soft); background: var(--surface-soft); }
.customer-vehicle-preference-list > article > header { display: flex; align-items: baseline; justify-content: space-between; padding: 10px 12px; }
.customer-vehicle-preference-list > article > header strong { font-size: 11px; }
.customer-vehicle-preference-list > article > header small { color: var(--ink-500); font-size: 9px; }
.customer-vehicle-preference-list .customer-rule-list { border-width: 1px 0 0; background: #fff; }
.customer-device-section { display: grid; gap: 10px; margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.customer-device-list { display: grid; gap: 7px; }
.customer-device-list article { display: grid; grid-template-columns: 34px minmax(120px, 1fr) repeat(3, minmax(70px, auto)); align-items: center; gap: 10px; border: 1px solid var(--line-soft); padding: 11px; }
.customer-device-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 3px; background: var(--blue-050); color: var(--blue-700); }
.customer-device-icon svg { width: 16px; height: 16px; }
.customer-device-list article > div { display: grid; min-width: 0; }
.customer-device-list article > div strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.customer-device-list article small { color: var(--ink-500); font-size: 8px; text-transform: uppercase; letter-spacing: .04em; }
.customer-device-list article > span:not(.customer-device-icon) { display: grid; }
.customer-device-list article > span strong { font-size: 10px; }

.customer-login-list { display: grid; }
.customer-login-list article { display: grid; grid-template-columns: 115px minmax(0, 1fr) auto; align-items: center; gap: 13px; border-bottom: 1px solid var(--line-soft); padding: 10px 0; }
.customer-login-list article:last-child { border-bottom: 0; }
.customer-login-list time { color: var(--ink-500); font-size: 9px; }
.customer-login-list article > div { display: grid; }
.customer-login-list strong { font-size: 11px; }
.customer-login-list small { color: var(--ink-500); font-size: 9px; }
.customer-login-list article > span { color: var(--ink-500); font-size: 9px; }
.customer-detail-empty { display: grid; min-height: 590px; place-content: center; justify-items: center; padding: 40px; text-align: center; }
.customer-detail-empty > span { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 50%; background: var(--blue-050); color: var(--blue-700); }
.customer-detail-empty svg { width: 25px; }
.customer-detail-empty h3 { margin: 18px 0 6px; font-size: 20px; font-weight: 550; }
.customer-detail-empty p { max-width: 440px; color: var(--ink-500); font-size: 12px; }

@media (max-width: 1250px) {
    .customer-workbench { grid-template-columns: 320px minmax(0, 1fr); }
    .customer-list-meta span:nth-child(3) { display: none; }
    .customer-facts { grid-template-columns: 1fr 1fr; }
    .customer-facts div:nth-child(2) { border-right: 0; }
    .customer-facts div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
    .customer-device-list article { grid-template-columns: 34px minmax(120px, 1fr) repeat(2, minmax(62px, auto)); }
    .customer-device-list article > span:last-child { display: none; }
}

@media (max-width: 960px) {
    .customer-summary-grid { grid-template-columns: 1fr 1fr; }
    .customer-list { max-height: 500px; }
}

@media (max-width: 820px) {
    .customer-filters { grid-template-columns: 1fr 180px; }
    .customer-filters .filter-button { justify-self: start; }
    .customer-workbench { display: block; }
    .customer-list { border-right: 0; border-bottom: 1px solid var(--line); }
    .customer-list-item.is-selected { box-shadow: inset 4px 0 0 var(--blue-600), inset 0 -1px 0 var(--line); }
}

@media (max-width: 620px) {
    .customer-summary-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .customer-summary-grid article { min-height: 105px; padding: 14px; }
    .customer-summary-grid strong { font-size: 25px; }
    .customer-directory-toolbar { align-items: flex-start; flex-direction: column; }
    .customer-create-disclosure { width: 100%; }
    .customer-create-disclosure > summary { justify-content: center; }
    .customer-create-form { position: static; width: 100%; grid-template-columns: 1fr; margin-top: 10px; box-shadow: var(--shadow-md); }
    .customer-create-form > div:nth-child(4) { grid-column: auto; }
    .customer-create-form > .customer-checkbox,
    .customer-create-form > p { grid-column: auto; }
    .customer-filters { grid-template-columns: 1fr; }
    .customer-list { max-height: 440px; }
    .customer-detail-hero { align-items: flex-start; flex-direction: column; padding: 22px 18px; }
    .customer-hero-badges { justify-content: flex-start; }
    .customer-detail-identity { max-width: 100%; }
    .customer-detail-avatar { width: 47px; height: 47px; }
    .customer-detail-identity h3 { font-size: 19px; }
    .customer-detail-sections { padding: 12px; }
    .customer-section-body { padding: 15px; }
    .customer-form-grid,
    .customer-phone-grid { grid-template-columns: 1fr; }
    .customer-security-actions article { align-items: flex-start; flex-direction: column; }
    .customer-vehicle-grid article { align-items: flex-start; flex-wrap: wrap; }
    .customer-vehicle-grid article > form { width: calc(100% - 100px); margin-left: 100px; }
    .customer-vehicle-access-form { grid-template-columns: 1fr; }
    .customer-note-footer { align-items: flex-start; flex-direction: column; }
    .customer-geofence-list article { align-items: flex-start; flex-wrap: wrap; }
    .customer-geofence-list article > div { width: 100%; }
    .customer-device-list article { grid-template-columns: 34px minmax(0, 1fr); }
    .customer-device-list article > span:not(.customer-device-icon) { display: none; }
    .customer-login-list article { grid-template-columns: 1fr; gap: 3px; }
    .customer-login-list article > span { display: none; }
}

/* SSH / PuTTY guide */
.ssh-quick-card {
    display: grid;
    grid-template-columns: minmax(260px, .8fr) minmax(420px, 1.2fr);
    gap: 28px;
    border: 1px solid var(--line);
    background: linear-gradient(120deg, #fff 48%, #edf5ff);
    padding: 28px;
}
.ssh-quick-card h3 { margin: 5px 0 8px; color: var(--navy-950); font-size: 22px; font-weight: 550; }
.ssh-quick-card > div > p:last-child { max-width: 520px; margin: 0; color: var(--ink-500); font-size: 12px; line-height: 1.65; }
.ssh-connection-grid { display: grid; grid-template-columns: 1fr 1fr; margin: 0; border: 1px solid var(--line); background: rgba(255, 255, 255, .82); }
.ssh-connection-grid div { min-width: 0; padding: 14px 16px; }
.ssh-connection-grid div:nth-child(odd) { border-right: 1px solid var(--line); }
.ssh-connection-grid div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
.ssh-connection-grid dt { color: var(--ink-500); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; }
.ssh-connection-grid dd { margin: 5px 0 0; }
.ssh-connection-grid code { color: var(--navy-950); font-size: 12px; font-weight: 700; }

.ssh-notice { display: flex; align-items: center; gap: 15px; margin-top: 14px; border-left: 4px solid var(--blue-600); background: var(--blue-050); padding: 16px 18px; }
.ssh-notice > span { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; background: #fff; color: var(--blue-700); }
.ssh-notice svg { width: 19px; }
.ssh-notice strong { color: var(--navy-950); font-size: 12px; }
.ssh-notice p { margin: 3px 0 0; color: var(--ink-600); font-size: 11px; line-height: 1.55; }

.ssh-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.ssh-steps article { display: grid; min-width: 0; grid-template-columns: 48px minmax(0, 1fr); gap: 16px; border: 1px solid var(--line); background: #fff; padding: 22px; }
.ssh-step-number { display: grid; width: 42px; height: 42px; place-items: center; background: var(--navy-900); color: #fff; font-size: 11px; font-weight: 750; letter-spacing: .06em; }
.ssh-steps h3 { margin: 1px 0 10px; color: var(--navy-950); font-size: 15px; font-weight: 600; }
.ssh-steps p,
.ssh-steps li { color: var(--ink-600); font-size: 11px; line-height: 1.65; }
.ssh-steps ul { display: grid; gap: 4px; margin: 0; padding-left: 17px; }
.ssh-steps p { margin: 0 0 9px; }
.ssh-code-block { display: block; overflow-wrap: anywhere; border: 1px solid #cbd6e2; background: #071426; padding: 11px 12px; color: #d9ecff; font-size: 10px; line-height: 1.6; user-select: all; }
.ssh-step-status { display: flex; align-items: center; gap: 7px; margin-top: 11px !important; color: var(--warning) !important; font-weight: 650; }
.ssh-step-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--warning); }
.ssh-step-status.is-ready { color: var(--success) !important; }
.ssh-step-status.is-ready i { background: var(--success); }
.ssh-key-fingerprint { display: block; overflow-wrap: anywhere; color: var(--ink-500); font-size: 9px; }
.ssh-paths { margin-top: 14px; }
.ssh-path-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ssh-path-grid div { display: grid; gap: 5px; border-right: 1px solid var(--line); padding: 18px; }
.ssh-path-grid div:last-child { border-right: 0; }
.ssh-path-grid code { color: var(--blue-700); font-size: 12px; font-weight: 700; }
.ssh-path-grid span { color: var(--ink-500); font-size: 10px; }

@media (max-width: 900px) {
    .ssh-quick-card { grid-template-columns: 1fr; }
    .ssh-path-grid { grid-template-columns: 1fr 1fr; }
    .ssh-path-grid div:nth-child(2) { border-right: 0; }
    .ssh-path-grid div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 650px) {
    .ssh-quick-card { padding: 20px; }
    .ssh-connection-grid,
    .ssh-steps,
    .ssh-path-grid { grid-template-columns: 1fr; }
    .ssh-connection-grid div,
    .ssh-connection-grid div:nth-child(odd),
    .ssh-path-grid div { border-right: 0; border-bottom: 1px solid var(--line); }
    .ssh-connection-grid div:last-child,
    .ssh-path-grid div:last-child { border-bottom: 0; }
    .ssh-steps article { grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding: 17px; }
    .ssh-step-number { width: 36px; height: 36px; }
}
