:root {
    color-scheme: light;
    --navy-950: #101a24;
    --navy-900: #172431;
    --navy-800: #233442;
    --slate-700: #405260;
    --slate-500: #6f7f8a;
    --slate-300: #c9d2d8;
    --slate-200: #dde4e8;
    --slate-100: #eef2f4;
    --surface: #ffffff;
    --green-700: #39755e;
    --green-600: #4d8c72;
    --green-100: #e7f2ed;
    --red-700: #9b3d46;
    --red-100: #f8e8ea;
    --shadow: 0 22px 60px rgba(18, 31, 42, 0.13);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--slate-100);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--navy-900);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

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

.login-body {
    display: grid;
    place-items: center;
    padding: 32px;
    background:
        radial-gradient(circle at 12% 15%, rgba(77, 140, 114, 0.16), transparent 30%),
        linear-gradient(135deg, #e9eef0 0%, #f7f9fa 55%, #e8eeef 100%);
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    width: min(1040px, 100%);
    min-height: 620px;
    overflow: hidden;
    border: 1px solid rgba(23, 36, 49, 0.08);
    border-radius: 28px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.brand-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(44px, 7vw, 82px);
    color: #fff;
    background:
        linear-gradient(155deg, rgba(77, 140, 114, 0.22), transparent 50%),
        var(--navy-950);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    margin-bottom: 34px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    color: #fff;
    background: var(--green-600);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.brand-mark-small {
    width: 42px;
    height: 42px;
    margin: 0;
    border-radius: 13px;
    font-size: 15px;
}

.eyebrow {
    margin: 0 0 14px;
    color: #8fc5ad;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
}

.brand-panel h1,
.welcome-card h1 {
    margin: 0;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.brand-copy {
    max-width: 560px;
    margin: 24px 0 34px;
    color: #c5d0d7;
    font-size: 18px;
    line-height: 1.7;
}

.security-list {
    display: grid;
    gap: 13px;
    margin: 0;
    padding: 0;
    color: #d9e2e6;
    list-style: none;
}

.security-list li::before {
    content: "✓";
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin-right: 11px;
    border-radius: 50%;
    color: #b9ddcd;
    background: rgba(77, 140, 114, 0.23);
    font-size: 12px;
    font-weight: 800;
}

.login-card {
    align-self: center;
    padding: clamp(36px, 5.5vw, 66px);
}

.login-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--green-700);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green-600);
    box-shadow: 0 0 0 5px var(--green-100);
}

.login-card h2 {
    margin: 20px 0 10px;
    font-size: 30px;
    letter-spacing: -0.035em;
}

.login-card > p {
    margin: 0 0 30px;
    color: var(--slate-500);
    line-height: 1.6;
}

label {
    display: block;
    margin: 18px 0 8px;
    color: var(--navy-800);
    font-size: 13px;
    font-weight: 750;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 0 15px;
    border: 1px solid var(--slate-300);
    border-radius: 12px;
    outline: none;
    background: #fbfcfc;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select {
    height: 50px;
}

textarea {
    min-height: 96px;
    padding-top: 13px;
    padding-bottom: 13px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--green-600);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(77, 140, 114, 0.13);
}

button {
    min-height: 46px;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 800;
}

.login-card button {
    width: 100%;
    margin-top: 24px;
    color: #fff;
    background: var(--green-700);
    box-shadow: 0 10px 24px rgba(57, 117, 94, 0.2);
}

.login-card button:hover {
    background: #2f654f;
}

.login-note {
    margin-top: 24px !important;
    padding-top: 20px;
    border-top: 1px solid var(--slate-200);
    font-size: 12px;
}

.alert {
    margin: 18px 0;
    padding: 13px 15px;
    border-radius: 11px;
    font-size: 13px;
    line-height: 1.5;
}

.alert-error {
    color: var(--red-700);
    background: var(--red-100);
}

.alert-success {
    color: var(--green-700);
    background: var(--green-100);
}

.app-body {
    padding-left: 272px;
    background: #f1f4f5;
}

.sidebar {
    position: fixed;
    z-index: 30;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: 272px;
    min-height: 100vh;
    overflow-y: auto;
    padding: 28px 20px 22px;
    color: #fff;
    background:
        radial-gradient(circle at 12% 9%, rgba(77, 140, 114, 0.22), transparent 26%),
        var(--navy-950);
    box-shadow: 16px 0 48px rgba(16, 26, 36, 0.08);
}

.sidebar-brand,
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sidebar-brand {
    padding: 0 8px 26px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
    text-decoration: none;
}

.sidebar-brand-copy,
.sidebar-user-copy,
.nav-copy {
    display: grid;
    gap: 3px;
}

.sidebar-brand-copy strong {
    font-size: 15px;
    letter-spacing: -0.01em;
}

.sidebar-brand-copy small,
.sidebar-user-copy small,
.nav-copy small {
    color: #93a3ad;
    font-size: 11px;
    line-height: 1.35;
}

.sidebar-navigation {
    margin-top: 30px;
}

.sidebar-label {
    margin: 0 12px 12px;
    color: #70838f;
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.16em;
}

.main-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.main-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 62px;
    padding: 10px 12px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: #c4ced4;
    text-decoration: none;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.main-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.055);
}

.main-nav a.active {
    color: #fff;
    border-color: rgba(143, 197, 173, 0.16);
    background: linear-gradient(110deg, rgba(77, 140, 114, 0.26), rgba(255, 255, 255, 0.055));
}

.main-nav a.active::after {
    position: absolute;
    top: 14px;
    right: -1px;
    bottom: 14px;
    width: 3px;
    border-radius: 3px 0 0 3px;
    background: #8fc5ad;
    content: "";
}

.nav-index {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #9baab3;
    background: rgba(255, 255, 255, 0.065);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.04em;
}

.main-nav a.active .nav-index {
    color: #d5eee3;
    background: rgba(77, 140, 114, 0.3);
}

.nav-copy strong {
    font-size: 12px;
    font-weight: 800;
}

.sidebar-footer {
    display: grid;
    gap: 14px;
    margin-top: auto;
    padding: 22px 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user {
    min-width: 0;
}

.user-avatar {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: #b9ddcd;
    background: rgba(77, 140, 114, 0.2);
}

.user-avatar svg,
.sidebar-logout svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sidebar-user-copy {
    min-width: 0;
}

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

.sidebar-user-copy strong {
    font-size: 13px;
}

.button-secondary {
    min-height: 38px;
    padding: 0 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

.sidebar-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 44px;
    font-size: 12px;
}

.sidebar-logout:hover {
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.11);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border: 0;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.button-primary {
    color: #fff;
    background: var(--green-700);
    box-shadow: 0 10px 24px rgba(57, 117, 94, 0.18);
}

.button-primary:hover {
    background: #2f654f;
}

.button-danger {
    color: #fff;
    background: var(--red-700);
    box-shadow: 0 10px 24px rgba(155, 61, 70, 0.16);
}

.button-danger:hover {
    background: #83323a;
}

.button-secondary-light {
    border: 1px solid var(--slate-300);
    color: var(--navy-800);
    background: #fff;
}

.button-compact {
    min-height: 36px;
    padding: 0 13px;
    border-radius: 10px;
    font-size: 12px;
}

.app-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 42px auto;
}

.welcome-card {
    padding: clamp(34px, 5vw, 58px);
    border-radius: 22px;
    color: #fff;
    background:
        linear-gradient(115deg, rgba(77, 140, 114, 0.25), transparent 60%),
        var(--navy-900);
    box-shadow: 0 16px 42px rgba(23, 36, 49, 0.12);
}

.welcome-card h1 {
    font-size: clamp(30px, 4vw, 46px);
}

.welcome-card > p:last-child {
    max-width: 720px;
    margin: 18px 0 0;
    color: #c7d1d7;
    line-height: 1.7;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.metric-card {
    min-height: 220px;
    padding: 28px;
    border: 1px solid #e1e7ea;
    border-radius: 18px;
    background: #fff;
}

.metric-card-link {
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.metric-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(23, 36, 49, 0.09);
}

.metric-icon {
    display: inline-grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    color: var(--green-700);
    background: var(--green-100);
    font-size: 12px;
    font-weight: 850;
}

.metric-card h2 {
    margin: 22px 0 10px;
    font-size: 19px;
}

.metric-card p {
    min-height: 54px;
    margin: 0 0 22px;
    color: var(--slate-500);
    font-size: 14px;
    line-height: 1.6;
}

.metric-card-muted {
    background: #f8fafb;
}

.dashboard-shell {
    display: grid;
    gap: 22px;
}

.dashboard-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
}

.dashboard-heading h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
    letter-spacing: -0.045em;
}

.dashboard-heading > div:first-child > p:last-child {
    margin: 10px 0 0;
    color: var(--slate-500);
    line-height: 1.6;
}

.dashboard-heading .eyebrow {
    color: var(--green-700);
}

.dashboard-heading-meta {
    display: grid;
    justify-items: end;
    gap: 9px;
    color: var(--slate-500);
    font-size: 12px;
    font-weight: 700;
}

.dashboard-system-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 11px;
    border: 1px solid #d5e8df;
    border-radius: 999px;
    color: var(--green-700);
    background: #f5faf7;
}

.dashboard-system-status > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green-600);
    box-shadow: 0 0 0 4px rgba(77, 140, 114, 0.12);
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.dashboard-kpi {
    position: relative;
    min-width: 0;
    overflow: hidden;
    padding: 22px 23px;
    border: 1px solid #dfe6e9;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(23, 36, 49, 0.035);
}

.dashboard-kpi::after {
    position: absolute;
    top: 0;
    right: 0;
    width: 64px;
    height: 64px;
    border-radius: 0 0 0 64px;
    background: rgba(57, 117, 94, 0.055);
    content: '';
}

.dashboard-kpi-positive::after {
    background: rgba(77, 140, 114, 0.12);
}

.dashboard-kpi-attention::after {
    background: rgba(155, 61, 70, 0.1);
}

.dashboard-kpi-label {
    display: block;
    margin-bottom: 12px;
    color: var(--slate-500);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-kpi > strong {
    display: block;
    font-size: 31px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.dashboard-kpi p {
    margin: 9px 0 0;
    color: var(--slate-500);
    font-size: 12px;
    line-height: 1.45;
}

.dashboard-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.85fr);
    align-items: start;
    gap: 18px;
}

.dashboard-panel {
    min-width: 0;
    padding: 24px;
}

.dashboard-panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 22px;
}

.dashboard-panel-heading h2 {
    margin: 5px 0 0;
    font-size: 19px;
    letter-spacing: -0.025em;
}

.dashboard-panel-heading > a {
    color: var(--green-700);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.dashboard-panel-heading > a:hover {
    text-decoration: underline;
}

.dashboard-panel-kicker {
    color: var(--slate-500);
    font-size: 10px;
    font-weight: 850;
    letter-spacing: 0.1em;
}

.dashboard-portfolio-health {
    display: grid;
    grid-template-columns: 112px 1fr;
    align-items: center;
    gap: 24px;
    padding: 20px;
    border: 1px solid #e3e9ec;
    border-radius: 14px;
    background: #f8faf9;
}

.dashboard-ratio {
    display: grid;
    place-content: center;
    width: 94px;
    height: 94px;
    border-radius: 50%;
    background:
        radial-gradient(circle closest-side, #f8faf9 72%, transparent 73% 99%),
        conic-gradient(var(--green-600) var(--dashboard-ratio), var(--slate-200) 0);
    text-align: center;
}

.dashboard-ratio strong {
    font-size: 21px;
    letter-spacing: -0.04em;
}

.dashboard-ratio span {
    margin-top: 2px;
    color: var(--slate-500);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-portfolio-copy > strong {
    font-size: 15px;
}

.dashboard-portfolio-copy p {
    margin: 7px 0 15px;
    color: var(--slate-500);
    font-size: 12px;
    line-height: 1.55;
}

.dashboard-progress {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--slate-200);
}

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

.dashboard-subheading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 25px 0 8px;
}

.dashboard-subheading h3 {
    margin: 0;
    font-size: 14px;
}

.dashboard-subheading span {
    color: var(--slate-500);
    font-size: 11px;
}

.dashboard-customer-list,
.dashboard-activity-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dashboard-customer-list li {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 13px;
    min-height: 65px;
    border-bottom: 1px solid var(--slate-200);
}

.dashboard-customer-list li:last-child,
.dashboard-activity-list li:last-child {
    border-bottom: 0;
}

.dashboard-customer-avatar {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 11px;
    color: var(--green-700);
    background: var(--green-100);
    font-size: 11px;
    font-weight: 850;
}

.dashboard-customer-copy,
.dashboard-activity-copy {
    min-width: 0;
}

.dashboard-customer-copy strong,
.dashboard-activity-copy strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.dashboard-customer-copy small,
.dashboard-activity-copy small {
    display: block;
    margin-top: 4px;
    overflow: hidden;
    color: var(--slate-500);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-customer-list li > a {
    color: var(--green-700);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.dashboard-side-column {
    display: grid;
    gap: 18px;
}

.dashboard-activity-list li {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 56px;
    border-bottom: 1px solid var(--slate-200);
}

.dashboard-activity-list time {
    color: var(--slate-500);
    font-size: 10px;
    font-weight: 750;
}

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

.dashboard-activity-dot.is-success {
    background: var(--green-600);
    box-shadow: 0 0 0 4px rgba(77, 140, 114, 0.1);
}

.dashboard-activity-dot.is-attention {
    background: var(--red-700);
    box-shadow: 0 0 0 4px rgba(155, 61, 70, 0.1);
}

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

.dashboard-actions > a {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 11px;
    padding: 13px;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    color: inherit;
    background: #fbfcfc;
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease;
}

.dashboard-actions > a:hover {
    border-color: #b8d6c8;
    background: #f6faf8;
}

.dashboard-actions > a > span:first-child {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    color: var(--green-700);
    background: var(--green-100);
    font-size: 10px;
    font-weight: 850;
}

.dashboard-actions > a > span:last-child {
    min-width: 0;
}

.dashboard-actions strong,
.dashboard-actions small {
    display: block;
}

.dashboard-actions strong {
    font-size: 12px;
}

.dashboard-actions small {
    margin-top: 3px;
    overflow: hidden;
    color: var(--slate-500);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-compact-empty {
    padding: 24px 16px;
    border: 1px dashed var(--slate-300);
    border-radius: 12px;
    color: var(--slate-500);
    background: #fbfcfc;
    font-size: 12px;
    text-align: center;
}

.badge {
    display: inline-block;
    padding: 6px 9px;
    border-radius: 999px;
    color: var(--slate-700);
    background: var(--slate-100);
    font-size: 11px;
    font-weight: 800;
}

.badge-success {
    color: var(--green-700);
    background: var(--green-100);
}

.badge-danger {
    color: var(--red-700);
    background: var(--red-100);
}

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

.page-heading h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 44px);
    letter-spacing: -0.04em;
}

.page-heading > div > p:last-child {
    max-width: 760px;
    margin: 12px 0 0;
    color: var(--slate-500);
    line-height: 1.6;
}

.page-heading .eyebrow {
    color: var(--green-700);
}

.heading-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.content-card {
    padding: 28px;
    border: 1px solid #e1e7ea;
    border-radius: 18px;
    background: #fff;
}

.table-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    color: var(--slate-500);
    font-size: 13px;
}

.table-summary strong {
    color: var(--navy-900);
    font-size: 15px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

th,
td {
    padding: 15px 13px;
    border-bottom: 1px solid var(--slate-200);
    text-align: left;
    vertical-align: middle;
}

th {
    color: var(--slate-500);
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

td small,
.record-list small {
    display: block;
    margin-top: 4px;
    color: var(--slate-500);
}

.table-action {
    text-align: right;
}

.table-action a {
    color: var(--green-700);
    font-weight: 800;
    text-decoration: none;
}

.table-action .button {
    white-space: nowrap;
}

.empty-state {
    padding: 52px 24px;
    border: 1px dashed var(--slate-300);
    border-radius: 14px;
    text-align: center;
}

.empty-state h2 {
    margin: 0 0 8px;
}

.empty-state p,
.muted {
    color: var(--slate-500);
}

.customer-form {
    display: grid;
    gap: 20px;
}

.form-section {
    padding: clamp(24px, 4vw, 36px);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 24px;
}

.section-heading > span {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    color: var(--green-700);
    background: var(--green-100);
    font-size: 12px;
    font-weight: 850;
}

.section-heading h2 {
    margin: 0;
    font-size: 19px;
}

.section-heading p {
    margin: 6px 0 0;
    color: var(--slate-500);
    font-size: 13px;
    line-height: 1.5;
}

.section-heading.compact {
    margin-bottom: 20px;
}

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

.field-wide {
    grid-column: 1 / -1;
}

.field label {
    margin-top: 14px;
}

.field-help,
.field-error {
    display: block;
    margin-top: 7px;
    font-size: 12px;
    line-height: 1.4;
}

.field-help {
    color: var(--slate-500);
}

.field-error {
    color: var(--red-700);
    font-weight: 700;
}

.submit-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 28px;
    border: 1px solid rgba(57, 117, 94, 0.25);
    border-radius: 18px;
    background: var(--green-100);
}

.submit-card > div {
    display: grid;
    gap: 5px;
}

.submit-card span {
    color: var(--slate-700);
    font-size: 13px;
}

.status-card {
    border-color: rgba(57, 117, 94, 0.2);
}

.status-card-danger {
    border-color: rgba(155, 61, 70, 0.22);
    background: linear-gradient(135deg, #fff 0%, #fffafa 100%);
}

.status-card-danger .section-heading > span {
    color: var(--red-700);
    background: var(--red-100);
}

.confirmation-check {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin: 0;
    color: var(--slate-700);
    font-size: 13px;
    font-weight: 650;
    line-height: 1.55;
}

.confirmation-check input {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--green-700);
}

.edit-status-confirmation {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    background: var(--slate-100);
}

input[readonly] {
    color: var(--slate-500);
    background: var(--slate-100);
    cursor: not-allowed;
}

.status-card-danger .confirmation-check input {
    accent-color: var(--red-700);
}

.status-action {
    margin-top: 18px;
}

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

.section-space {
    margin-top: 20px;
}

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

.detail-list div {
    min-width: 0;
}

.detail-list dt {
    margin-bottom: 5px;
    color: var(--slate-500);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.detail-list dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 14px;
    line-height: 1.55;
}

.detail-wide {
    grid-column: 1 / -1;
}

.customer-token-card {
    border-color: rgba(57, 117, 94, 0.24);
    background: linear-gradient(135deg, #fff 0%, #f8fcfa 100%);
}

.customer-token-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.customer-token-output {
    color: var(--navy-900) !important;
    background: #fff !important;
    cursor: text !important;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 13px;
    letter-spacing: 0.025em;
}

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

.customer-token-actions .button {
    white-space: nowrap;
}

.customer-token-status {
    min-height: 20px;
    margin: 12px 0 0;
    color: var(--slate-500);
    font-size: 12px;
    line-height: 1.55;
}

.customer-token-status.is-error {
    color: var(--red-700);
    font-weight: 700;
}

.record-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.record-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--slate-200);
}

.record-list li:last-child {
    border-bottom: 0;
}

.audit-filter-card form {
    display: grid;
    gap: 20px;
}

.audit-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px 20px;
}

.audit-filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--slate-200);
}

.audit-table {
    min-width: 1120px;
}

.audit-table td {
    max-width: 290px;
}

.audit-event-code {
    overflow-wrap: anywhere;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--slate-200);
    color: var(--slate-500);
    font-size: 13px;
    font-weight: 700;
}

.pagination a {
    padding: 9px 13px;
    border: 1px solid var(--slate-300);
    border-radius: 10px;
    color: var(--navy-800);
    background: #fff;
    text-decoration: none;
}

.pagination a:hover {
    border-color: var(--green-600);
    color: var(--green-700);
}

body.modal-open {
    overflow: hidden;
}

.app-modal[hidden] {
    display: none;
}

.app-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    overflow-y: auto;
    padding: 28px;
    background: rgba(10, 20, 29, 0.72);
    backdrop-filter: blur(5px);
}

.modal-panel {
    width: min(780px, 100%);
    max-height: calc(100vh - 56px);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 32px 90px rgba(8, 18, 27, 0.32);
}

.modal-panel-wide {
    width: min(940px, 100%);
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 28px 30px 22px;
    border-bottom: 1px solid var(--slate-200);
}

.modal-header .eyebrow {
    margin-bottom: 9px;
    color: var(--green-700);
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    letter-spacing: -0.025em;
}

.modal-header p:last-child {
    max-width: 610px;
    margin: 8px 0 0;
    color: var(--slate-500);
    font-size: 13px;
    line-height: 1.55;
}

.modal-close {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--slate-200);
    border-radius: 11px;
    color: var(--slate-700);
    background: var(--slate-100);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--navy-900);
    background: #fff;
}

.modal-form {
    padding: 8px 30px 30px;
}

.access-restrictions {
    margin-top: 24px;
    padding: 22px;
    border: 1px solid var(--slate-200);
    border-radius: 16px;
    background: #f8faf9;
}

.access-restrictions-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.access-restrictions-heading h3 {
    margin: 0;
    font-size: 17px;
}

.access-restrictions-heading p {
    max-width: 620px;
    margin: 7px 0 0;
    color: var(--slate-500);
    font-size: 12px;
    line-height: 1.55;
}

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

.access-capability {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 78px;
    padding: 14px;
    border: 1px solid var(--slate-200);
    border-radius: 13px;
    background: #fff;
    cursor: pointer;
}

.access-capability:hover {
    border-color: #b9d5c9;
}

.access-capability.is-disabled {
    opacity: 0.64;
    cursor: not-allowed;
}

.access-capability input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--green-700);
}

.access-capability-copy {
    display: grid;
    gap: 4px;
}

.access-capability-copy strong {
    color: var(--navy-900);
    font-size: 13px;
}

.access-capability-copy small {
    color: var(--slate-500);
    font-size: 11px;
    line-height: 1.45;
}

.access-capability-status {
    padding: 5px 7px;
    border-radius: 999px;
    color: var(--green-700);
    background: var(--green-100);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.access-capability:not(:has(input:checked)) .access-capability-status {
    color: var(--slate-700);
    background: var(--slate-100);
}

.access-self-note {
    margin: 14px 0 0;
    color: var(--slate-700);
    font-size: 12px;
    font-weight: 700;
}

.modal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-top: 20px;
    padding-top: 22px;
    border-top: 1px solid var(--slate-200);
}

.modal-actions p {
    max-width: 400px;
    margin: 0;
    color: var(--slate-500);
    font-size: 12px;
    line-height: 1.5;
}

.modal-actions > div {
    display: flex;
    flex: 0 0 auto;
    gap: 10px;
}

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

    .brand-panel {
        min-height: 360px;
    }

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

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

    .dashboard-workspace {
        grid-template-columns: 1fr;
    }

    .app-body {
        padding-left: 0;
    }

    .sidebar {
        position: sticky;
        inset: 0 auto auto 0;
        flex-direction: row;
        align-items: center;
        width: 100%;
        min-height: 76px;
        overflow: visible;
        padding: 12px 18px;
        box-shadow: 0 10px 34px rgba(16, 26, 36, 0.12);
    }

    .sidebar-brand {
        flex: 0 0 auto;
        padding: 0;
        border-bottom: 0;
    }

    .sidebar-navigation {
        margin: 0 auto;
    }

    .sidebar-label,
    .nav-copy small,
    .sidebar-user {
        display: none;
    }

    .main-nav {
        flex-direction: row;
        gap: 5px;
    }

    .main-nav a {
        min-height: 48px;
        padding: 7px 10px;
        border-radius: 12px;
    }

    .main-nav a.active::after {
        display: none;
    }

    .nav-index {
        width: 30px;
        height: 30px;
        border-radius: 9px;
    }

    .sidebar-footer {
        display: block;
        flex: 0 0 auto;
        margin: 0;
        padding: 0;
        border-top: 0;
    }

    .sidebar-logout {
        width: auto;
        padding: 0 14px;
    }

    .form-grid,
    .detail-grid,
    .audit-filter-grid {
        grid-template-columns: 1fr;
    }

    .field-wide,
    .detail-wide {
        grid-column: auto;
    }
}

@media (max-width: 760px) {
    .login-body {
        display: block;
        padding: 0;
    }

    .login-shell {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .brand-panel,
    .login-card {
        padding: 34px 24px;
    }

    .brand-panel {
        min-height: 330px;
    }

    .sidebar {
        flex-wrap: wrap;
        gap: 12px;
        padding: 11px 14px 10px;
    }

    .sidebar-brand-copy small {
        display: none;
    }

    .sidebar-navigation {
        order: 3;
        width: 100%;
        margin: 0;
        overflow-x: auto;
        padding-top: 9px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        scrollbar-width: thin;
    }

    .main-nav {
        width: max-content;
        min-width: 100%;
    }

    .main-nav a {
        flex: 1 0 auto;
        min-height: 42px;
        padding: 6px 9px;
    }

    .nav-index {
        width: 27px;
        height: 27px;
    }

    .sidebar-footer {
        margin-left: auto;
    }

    .sidebar-logout {
        min-height: 40px;
        padding: 0 12px;
    }

    .page-heading,
    .dashboard-heading,
    .submit-card,
    .table-summary,
    .modal-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .customer-token-control {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .dashboard-heading {
        align-items: stretch;
    }

    .dashboard-heading-meta {
        justify-items: start;
    }

    .dashboard-kpi {
        padding: 18px;
    }

    .dashboard-kpi > strong {
        font-size: 26px;
    }

    .dashboard-portfolio-health {
        grid-template-columns: 1fr;
    }

    .dashboard-customer-list li {
        grid-template-columns: 40px minmax(0, 1fr) auto;
    }

    .dashboard-customer-list li > .badge {
        display: none;
    }

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

    .dashboard-panel {
        padding: 20px;
    }

    .heading-actions,
    .modal-actions > div,
    .audit-filter-actions {
        width: 100%;
    }

    .heading-actions .button,
    .modal-actions .button,
    .audit-filter-actions .button,
    .customer-token-actions .button {
        flex: 1;
    }

    .customer-token-actions {
        width: 100%;
    }

    .app-modal {
        align-items: end;
        padding: 12px;
    }

    .modal-panel {
        max-height: calc(100vh - 24px);
        border-radius: 18px;
    }

    .modal-header {
        padding: 22px 20px 18px;
    }

    .modal-form {
        padding: 4px 20px 22px;
    }

    .access-restrictions-heading {
        flex-direction: column;
    }

    .access-capability-grid {
        grid-template-columns: 1fr;
    }

    .app-shell {
        width: min(100% - 24px, 1180px);
        margin: 20px auto;
    }
}

@media (max-width: 470px) {
    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-customer-list li {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        gap: 10px;
    }
}
