:root {
    --tc-ink: #0b1f33;
    --tc-ink-deep: #061726;
    --tc-ink-soft: #123653;
    --tc-canvas: #f4f7f9;
    --tc-surface: #ffffff;
    --tc-surface-muted: #f8fafb;
    --tc-primary: #087da4;
    --tc-primary-hover: #066381;
    --tc-cyan: #45bddb;
    --tc-mint: #62d6b4;
    --tc-danger: #e53945;
    --tc-danger-soft: #fff1f2;
    --tc-warning: #e99717;
    --tc-warning-soft: #fff8e8;
    --tc-success: #15966a;
    --tc-success-soft: #eaf8f3;
    --tc-text: #10243a;
    --tc-muted: #617186;
    --tc-border: #d8e1e8;
    --tc-border-strong: #7d8fa2;
    --tc-focus: #087da4;
    --tc-focus-soft: rgba(8, 125, 164, 0.18);
    --tc-shadow-sm: 0 1px 2px rgba(11, 31, 51, 0.04);
    --tc-shadow-md: 0 12px 28px rgba(11, 31, 51, 0.08);
    --tc-sidebar-width: 280px;
    --tc-commandbar-height: 72px;
    --tc-radius-sm: 6px;
    --tc-radius: 8px;
    --tc-radius-lg: 12px;

    --navy: var(--tc-ink);
    --navy-soft: var(--tc-ink-soft);
    --gold: var(--tc-primary);
    --gold-soft: #d9f3fa;
    --text: var(--tc-text);
    --muted: var(--tc-muted);
    --line: var(--tc-border);
    --bg: var(--tc-canvas);
    --white: var(--tc-surface);
    --danger: var(--tc-danger);
    --danger-bg: var(--tc-danger-soft);
    --shadow: var(--tc-shadow-md);
}

html {
    color-scheme: light;
    background: var(--tc-canvas);
    scroll-behavior: smooth;
}

body {
    color: var(--tc-text);
    background: var(--tc-canvas);
    font-family: Inter, "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: var(--tc-primary);
    text-underline-offset: 3px;
}

a:hover {
    color: var(--tc-primary-hover);
}

:focus-visible {
    outline: 3px solid var(--tc-focus);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

[hidden] {
    display: none !important;
}

/* Application shell */

body.workspace-page {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--tc-sidebar-width) minmax(0, 1fr);
    gap: 0;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    transition: grid-template-columns 180ms ease;
}

.dashboard-layout {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--tc-sidebar-width) minmax(0, 1fr);
    gap: 0;
    margin: 0;
    padding: 0;
    transition: grid-template-columns 180ms ease;
}

.dashboard-content,
.workspace-page .app-shell {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    padding: calc(var(--tc-commandbar-height) + 34px) clamp(24px, 3vw, 46px) 56px;
}

.workspace-page .narrow-shell {
    width: 100%;
    max-width: 1180px;
    justify-self: center;
}

.workspace-page.create-user-page .app-shell,
.workspace-page.create-lead-page .app-shell {
    width: 100%;
    min-height: 100vh;
    padding: calc(var(--tc-commandbar-height) + 30px) clamp(24px, 3vw, 46px) 48px;
}

.dashboard-sidebar,
.workspace-sidebar {
    position: sticky;
    inset: 0 auto auto 0;
    z-index: 60;
    align-self: start;
    width: var(--tc-sidebar-width);
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 24px 16px 18px;
    border: 0;
    border-radius: 0;
    color: #fff;
    background: var(--tc-ink-deep);
    box-shadow: none;
    transition: width 180ms ease, padding 180ms ease, transform 220ms ease;
}

.sidebar-brand {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 2px 14px 16px;
}

.sidebar-brand > a {
    width: 150px;
    display: block;
}

.sidebar-brand img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 82px;
    object-fit: contain;
    object-position: left center;
}

.sidebar-brand-mark {
    display: none !important;
}

.sidebar-brand p {
    margin: 0;
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
}

.sidebar-close {
    position: absolute;
    top: 0;
    right: 2px;
    width: 34px;
    height: 34px;
    display: none;
    place-items: center;
    border: 0;
    border-radius: var(--tc-radius-sm);
    color: rgba(255, 255, 255, 0.7);
    background: transparent;
    cursor: pointer;
}

.sidebar-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-close .nav-icon {
    width: 18px;
    transform: rotate(180deg);
}

@media (min-width: 721px) {
    .sidebar-close {
        display: inline-grid;
    }
}

.sidebar-nav {
    display: grid;
    align-content: start;
    gap: 5px;
    min-height: 0;
    padding: 0 0 10px;
    overflow-x: visible;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar-nav a,
.sidebar-group > summary {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 10px 12px;
    border: 0;
    border-radius: var(--tc-radius-sm);
    color: rgba(255, 255, 255, 0.82);
    background: transparent;
    text-decoration: none;
    cursor: pointer;
    transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.sidebar-nav > a:hover,
.sidebar-group > summary:hover {
    color: #fff;
    background: rgba(69, 189, 219, 0.1);
    text-decoration: none;
}

.sidebar-nav > a.active,
.sidebar-group.active > summary {
    color: #fff;
    background: rgba(11, 152, 199, 0.2);
    box-shadow: inset 3px 0 0 var(--tc-cyan);
}

.sidebar-nav strong,
.sidebar-group > summary span {
    color: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
}

.sidebar-link-copy {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.sidebar-link-copy small {
    color: rgba(255, 255, 255, 0.48);
    font-size: 10px;
    line-height: 1.2;
}

.nav-icon {
    flex: 0 0 auto;
    width: 23px;
    height: 23px;
}

.sidebar-group {
    position: relative;
}

.sidebar-group > summary {
    list-style: none;
}

.sidebar-group > summary::-webkit-details-marker {
    display: none;
}

.sidebar-group-chevron {
    width: 15px;
    height: 15px;
    margin-left: auto;
    transition: transform 160ms ease;
}

.sidebar-group[open] .sidebar-group-chevron {
    transform: rotate(90deg);
}

.sidebar-subnav {
    display: grid;
    gap: 3px;
    margin: 3px 0 7px 35px;
    padding-left: 14px;
    border-left: 1px solid rgba(255, 255, 255, 0.13);
}

.sidebar-subnav a {
    min-height: 40px;
    display: grid;
    align-content: center;
    gap: 1px;
    padding: 7px 10px;
}

.sidebar-subnav a:hover,
.sidebar-subnav a.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

.sidebar-subnav a.active {
    box-shadow: inset 2px 0 0 var(--tc-cyan);
}

.sidebar-subnav span {
    margin: 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 11px;
    line-height: 1.2;
}

.sidebar-account {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 16px 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.account-avatar,
.command-avatar {
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--tc-cyan);
    border-radius: 50%;
    color: var(--tc-cyan);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.account-avatar {
    width: 42px;
    height: 42px;
}

.account-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

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

.account-copy strong {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.account-copy small {
    color: rgba(255, 255, 255, 0.5);
    font-size: 10px;
}

.sidebar-account > a {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    color: rgba(255, 255, 255, 0.65);
}

.sidebar-account > a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* Command bar */

.workspace-commandbar {
    position: fixed;
    z-index: 50;
    top: 0;
    right: 0;
    left: var(--tc-sidebar-width);
    height: var(--tc-commandbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 clamp(24px, 3vw, 46px);
    border-bottom: 1px solid var(--tc-border);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--tc-shadow-sm);
    transition: left 180ms ease;
}

.commandbar-start,
.commandbar-end {
    display: flex;
    align-items: center;
}

.commandbar-start {
    flex: 1 1 auto;
    gap: 12px;
    min-width: 0;
}

.commandbar-end {
    flex: 0 0 auto;
    gap: 12px;
}

.workspace-menu-toggle {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius-sm);
    color: var(--tc-text);
    background: var(--tc-surface);
    cursor: pointer;
}

.workspace-menu-toggle:hover {
    color: var(--tc-primary);
    border-color: rgba(8, 125, 164, 0.4);
    background: #f2f9fb;
}

.workspace-menu-toggle:focus-visible {
    outline: 3px solid rgba(8, 125, 164, 0.22);
    outline-offset: 2px;
    border-color: var(--tc-primary);
}

.commandbar-logo {
    display: none;
}

.command-icon {
    width: 21px;
    height: 21px;
}

.workspace-search {
    width: min(100%, 660px);
    height: 42px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 12px;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius-sm);
    color: var(--tc-muted);
    background: var(--tc-surface-muted);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.workspace-search:focus-within {
    border-color: var(--tc-primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--tc-focus-soft);
}

.workspace-search.is-unavailable {
    display: none;
}

.workspace-search input {
    min-width: 0;
    height: 40px;
    flex: 1;
    border: 0;
    padding: 0;
    outline: 0;
    color: var(--tc-text);
    background: transparent;
    box-shadow: none;
    font-size: 14px;
}

.workspace-search input:focus {
    border: 0;
    box-shadow: none;
}

.workspace-search kbd {
    min-width: 24px;
    padding: 2px 6px;
    border: 1px solid var(--tc-border);
    border-radius: 4px;
    color: var(--tc-muted);
    background: #fff;
    box-shadow: 0 1px 0 var(--tc-border);
    font-family: inherit;
    font-size: 11px;
    text-align: center;
}

.workspace-search-status {
    color: var(--tc-muted);
    font-size: 12px;
    white-space: nowrap;
}

.command-popover {
    position: relative;
}

.command-popover > summary {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 10px;
    list-style: none;
    border-radius: var(--tc-radius-sm);
    color: var(--tc-text);
    cursor: pointer;
}

.command-popover > summary::-webkit-details-marker {
    display: none;
}

.notification-popover > summary {
    width: 42px;
    justify-content: center;
    border: 1px solid transparent;
}

.command-popover > summary:hover,
.command-popover[open] > summary {
    border-color: var(--tc-border);
    background: var(--tc-surface-muted);
}

.command-avatar {
    width: 36px;
    height: 36px;
    color: var(--tc-primary);
}

.command-account-copy {
    display: grid;
    max-width: 190px;
}

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

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

.command-account-copy small {
    color: var(--tc-muted);
    font-size: 10px;
}

.command-account-chevron {
    width: 15px;
    height: 15px;
    transform: rotate(90deg);
}

.command-popover-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 290px;
    padding: 18px;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    background: #fff;
    box-shadow: 0 18px 50px rgba(11, 31, 51, 0.16);
}

.command-popover-panel p {
    margin: 7px 0 0;
    color: var(--tc-muted);
    font-size: 13px;
    line-height: 1.45;
}

.account-menu {
    display: grid;
    gap: 6px;
}

.account-menu > div {
    display: grid;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tc-border);
}

.account-menu > div span {
    color: var(--tc-muted);
    font-size: 11px;
}

.account-menu a {
    padding: 8px 0;
    color: var(--tc-text);
    font-size: 13px;
    font-weight: 600;
}

.sidebar-backdrop {
    display: none;
}

/* Page hierarchy */

.app-header {
    align-items: flex-end;
    gap: 24px;
    margin: 0 0 28px;
}

.app-header > div {
    min-width: 0;
}

.app-kicker {
    margin: 0 0 7px;
    color: var(--tc-primary);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.app-header h1 {
    margin: 0;
    color: var(--tc-text);
    font-size: clamp(30px, 3vw, 42px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.app-actions {
    gap: 10px;
}

.app-actions a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius-sm);
    color: var(--tc-text);
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.app-actions a:hover {
    border-color: var(--tc-primary);
    color: var(--tc-primary);
    text-decoration: none;
}

.app-actions a[href$="dashboard.php"],
.app-actions a[href$="logout.php"],
.app-actions a[href$="../dashboard.php"],
.app-actions a[href$="../logout.php"] {
    display: none;
}

.button-link,
button[type="submit"],
.small-button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--tc-primary);
    border-radius: var(--tc-radius-sm);
    padding: 0 18px;
    color: #fff;
    background: var(--tc-primary);
    box-shadow: none;
    font-size: 14px;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.button-link:hover,
button[type="submit"]:hover,
.small-button:hover {
    border-color: var(--tc-primary-hover);
    color: #fff;
    background: var(--tc-primary-hover);
    box-shadow: none;
    text-decoration: none;
    transform: translateY(-1px);
}

button[type="submit"]:active {
    transform: translateY(0);
}

button[type="submit"].is-submitting {
    opacity: 0.72;
    cursor: wait;
    pointer-events: none;
}

.notice,
.alert {
    margin: 0 0 20px;
    padding: 13px 15px;
    border-radius: var(--tc-radius-sm);
    font-size: 13px;
}

.notice {
    border: 1px solid rgba(11, 152, 199, 0.25);
    color: #0b6685;
    background: #edf9fc;
}

.alert {
    border: 1px solid rgba(229, 57, 69, 0.24);
    color: #bc2531;
    background: var(--tc-danger-soft);
}

/* Surfaces */

.data-panel,
.form-panel,
.dashboard-hero,
.request-details,
.analyst-filter-form,
.finance-filter-form,
.compliance-filter-form {
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    background: var(--tc-surface);
    box-shadow: var(--tc-shadow-sm);
}

.data-panel,
.form-panel {
    overflow: clip;
}

.section-heading {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--tc-border);
}

.section-heading h2 {
    margin: 2px 0 0;
    color: var(--tc-text);
    font-size: 20px;
    font-weight: 680;
    letter-spacing: -0.015em;
}

.section-heading > span {
    color: var(--tc-muted);
    font-size: 12px;
}

.dashboard-hero {
    grid-template-columns: minmax(240px, 0.68fr) minmax(0, 1.7fr);
    gap: 20px;
    margin: 0 0 22px;
    padding: 20px;
    box-shadow: var(--tc-shadow-sm);
}

.dashboard-hero h2 {
    color: var(--tc-text);
    font-size: 24px;
    font-weight: 680;
    white-space: normal;
}

.dashboard-hero p {
    color: var(--tc-muted);
    font-size: 13px;
}

.page-subtitle {
    max-width: 720px;
    margin: 10px 0 0;
    color: var(--tc-muted);
    font-size: 14px;
}

.dashboard-date {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius-sm);
    color: var(--tc-muted);
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

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

.overview-metric {
    min-height: 128px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 20px;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    background: #fff;
    box-shadow: var(--tc-shadow-sm);
}

.overview-metric-icon {
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(11, 152, 199, 0.2);
    border-radius: var(--tc-radius-sm);
    color: var(--tc-primary);
    background: #effafd;
}

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

.overview-metric > div {
    min-width: 0;
    display: grid;
}

.overview-metric > div > span {
    color: var(--tc-muted);
    font-size: 11px;
    font-weight: 650;
}

.overview-metric strong {
    margin: 2px 0 1px;
    color: var(--tc-text);
    font-size: 29px;
    font-weight: 720;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.overview-metric small {
    color: #8290a0;
    font-size: 10px;
    line-height: 1.3;
}

.dashboard-workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.65fr);
    gap: 18px;
    margin-bottom: 18px;
}

.attention-list,
.recent-activity-list {
    display: grid;
}

.attention-item {
    min-height: 74px;
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) auto 18px;
    align-items: center;
    gap: 13px;
    padding: 13px 18px;
    border-bottom: 1px solid var(--tc-border);
    color: var(--tc-text);
    text-decoration: none;
}

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

.attention-item:hover {
    color: var(--tc-text);
    background: #f8fcfd;
    text-decoration: none;
}

.attention-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tc-primary);
}

.attention-danger .attention-indicator {
    background: var(--tc-danger);
}

.attention-warning .attention-indicator {
    background: var(--tc-warning);
}

.attention-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

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

.attention-copy span {
    color: var(--tc-muted);
    font-size: 12px;
}

.attention-item small {
    color: var(--tc-muted);
    font-size: 11px;
    text-align: right;
}

.attention-arrow {
    color: #96a3b0;
    font-size: 22px;
}

.attention-empty {
    min-height: 130px;
    display: grid;
    place-content: center;
    gap: 5px;
    padding: 24px;
    color: var(--tc-muted);
    text-align: center;
}

.attention-empty strong {
    color: var(--tc-text);
    font-size: 14px;
}

.attention-empty span {
    font-size: 12px;
}

.dashboard-pipeline {
    display: grid;
    gap: 14px;
    padding: 20px;
}

.dashboard-pipeline > div {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 10px;
}

.dashboard-pipeline span,
.dashboard-pipeline strong {
    font-size: 11px;
}

.dashboard-pipeline > div > div {
    height: 8px;
    border-radius: 999px;
    background: #e7edf1;
    overflow: hidden;
}

.dashboard-pipeline i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--tc-primary);
}

.dashboard-pipeline strong {
    color: var(--tc-text);
    text-align: right;
}

.premium-position {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    border-top: 1px solid var(--tc-border);
    background: var(--tc-border);
}

.premium-position > div {
    min-width: 0;
    display: grid;
    gap: 3px;
    padding: 14px 13px;
    background: #fff;
}

.premium-position span {
    color: var(--tc-muted);
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.premium-position strong {
    color: var(--tc-text);
    font-size: 12px;
    font-weight: 680;
}

.premium-position .premium-outstanding strong {
    color: var(--tc-danger);
}

.recent-activity-panel {
    margin-bottom: 18px;
}

.recent-activity-item {
    min-height: 66px;
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr) minmax(120px, auto) 130px;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--tc-border);
}

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

.activity-mark {
    width: 8px;
    height: 8px;
    border: 2px solid var(--tc-primary);
    border-radius: 50%;
}

.recent-activity-item > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.recent-activity-item strong {
    font-size: 12px;
    font-weight: 650;
}

.recent-activity-item span,
.recent-activity-item small,
.recent-activity-item time {
    color: var(--tc-muted);
    font-size: 10px;
}

.recent-activity-item time {
    text-align: right;
}

.dashboard-leads-panel {
    margin-top: 18px;
}

.profile-grid {
    gap: 1px;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius-sm);
    overflow: hidden;
    background: var(--tc-border);
}

.profile-grid div {
    min-height: 64px;
    display: grid;
    align-content: center;
    gap: 5px;
    padding: 10px 13px;
    border: 0;
    border-radius: 0;
    background: #fff;
}

.profile-grid span,
.account-summary span,
.client-profile-grid span,
.payment-summary span {
    color: var(--tc-muted);
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.profile-grid strong {
    color: var(--tc-text);
    font-size: 13px;
    font-weight: 650;
}

/* Tables */

.register-toolbar {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    background: #fff;
    box-shadow: var(--tc-shadow-sm);
}

.register-toolbar-main {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) minmax(170px, 220px) minmax(180px, 230px);
    gap: 12px;
}

.register-search {
    min-width: 0;
    height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: 1px solid var(--tc-border-strong);
    border-radius: var(--tc-radius-sm);
    background: #fff;
}

.register-search:focus-within {
    border-color: var(--tc-primary);
    box-shadow: 0 0 0 4px var(--tc-focus);
}

.register-search svg {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    color: var(--tc-muted);
}

.register-search input {
    min-width: 0;
    height: 42px;
    flex: 1 1 auto;
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.register-search input:focus {
    border: 0;
    box-shadow: none;
}

.register-select select {
    height: 44px;
    font-size: 13px;
}

.register-toolbar-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--tc-border);
    color: var(--tc-muted);
    font-size: 12px;
}

.register-toolbar-meta > span {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    padding: 0 9px;
    border: 1px solid rgba(11, 152, 199, 0.22);
    border-radius: 5px;
    color: #087b9f;
    background: #f1fbfd;
}

.register-toolbar-meta strong {
    color: var(--tc-muted);
    font-size: 12px;
    font-weight: 650;
}

.register-panel {
    margin-bottom: 18px;
}

.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--tc-border-strong) transparent;
}

.data-table,
.sales-table {
    width: 100%;
    min-width: 760px;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th,
.data-table td {
    padding: 15px 16px;
    border-bottom: 1px solid var(--tc-border);
    color: var(--tc-text);
    font-size: 13px;
    line-height: 1.4;
    overflow-wrap: normal;
    word-break: normal;
}

.data-table th {
    position: sticky;
    z-index: 1;
    top: 0;
    color: #526276;
    background: #f8fafb;
    font-size: 11px;
    font-weight: 680;
    letter-spacing: 0.015em;
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background 150ms ease, box-shadow 150ms ease;
}

.data-table tbody tr:hover {
    background: #f8fcfd;
    box-shadow: inset 3px 0 0 var(--tc-primary);
}

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

.data-table td > span:not(.status-pill):not(.pep-status) {
    margin-top: 3px;
    color: var(--tc-muted);
    font-size: 11px;
}

.data-table td:first-child {
    font-weight: 620;
}

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

.table-actions a,
button.text-action {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    padding: 0 10px;
    border: 1px solid var(--tc-border);
    border-radius: 5px;
    color: var(--tc-primary);
    background: #fff;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
    text-decoration: none;
}

.table-actions a:hover,
button.text-action:hover {
    border-color: var(--tc-primary);
    color: var(--tc-primary-hover);
    background: #f1fbfd;
    text-decoration: none;
}

.status-pill,
.pep-status,
.finance-pending,
.protected-note {
    min-height: 28px;
    display: inline-flex !important;
    align-items: center;
    width: fit-content;
    margin: 0 !important;
    padding: 4px 9px;
    border: 1px solid rgba(11, 152, 199, 0.34);
    border-radius: 5px;
    color: #087b9f !important;
    background: #f1fbfd;
    font-size: 11px !important;
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
}

.pep-status.pep-alert {
    border-color: rgba(229, 57, 69, 0.35);
    color: var(--tc-danger) !important;
    background: var(--tc-danger-soft);
}

.pep-status.pep-unscreened,
.finance-pending,
.protected-note {
    border-color: rgba(233, 151, 23, 0.38);
    color: #9b6208 !important;
    background: var(--tc-warning-soft);
}

/* Forms */

.admin-form,
.workflow-form {
    gap: 24px;
    padding: clamp(20px, 2.4vw, 30px);
}

.workspace-page.create-lead-page .admin-form,
.workspace-page.create-user-page .admin-form {
    height: auto;
    display: grid;
    grid-template-rows: none;
    gap: 24px;
    padding: clamp(20px, 2.4vw, 30px);
}

.workspace-page.create-lead-page .form-grid,
.workspace-page.create-user-page .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.form-section-heading {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    margin: 5px 0 0;
    padding: 0 0 14px;
    border-bottom: 1px solid var(--tc-border);
}

.form-section-heading:first-child {
    margin-top: 0;
}

.form-section-heading > span {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--tc-primary);
    border-radius: 50%;
    color: var(--tc-primary);
    background: #effafd;
    font-size: 12px;
    font-weight: 700;
}

.form-section-heading h2 {
    margin: 0;
    color: var(--tc-text);
    font-size: 16px;
    font-weight: 680;
}

.form-section-heading p {
    margin: 3px 0 0;
    color: var(--tc-muted);
    font-size: 11px;
}

.workspace-page.create-lead-page .admin-form > button[type="submit"],
.workspace-page.create-user-page .admin-form > button[type="submit"] {
    width: auto;
    min-width: 210px;
    justify-self: end;
}

.form-submit-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.form-submit-row > a {
    min-width: 110px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--tc-border-strong);
    border-radius: var(--tc-radius-sm);
    color: var(--tc-text);
    background: #fff;
    font-size: 13px;
    font-weight: 650;
    text-decoration: none;
}

.form-submit-row > a:hover {
    border-color: var(--tc-primary);
    color: var(--tc-primary);
    text-decoration: none;
}

.form-submit-row > button[type="submit"] {
    width: auto;
    min-width: 210px;
}

.form-grid {
    gap: 18px 20px;
}

.field-group {
    gap: 7px;
}

.field-group label,
.label-row label,
.role-fieldset legend {
    color: #34465a;
    font-size: 12px;
    font-weight: 650;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="datetime-local"],
input[type="file"],
input[type="search"],
select,
textarea {
    height: 48px;
    border: 1px solid var(--tc-border-strong);
    border-radius: var(--tc-radius-sm);
    padding: 0 13px;
    color: var(--tc-text);
    background: #fff;
    box-shadow: none;
    font-size: 14px;
}

textarea {
    min-height: 112px;
    padding-top: 12px;
    line-height: 1.5;
}

input::placeholder,
textarea::placeholder {
    color: #93a1b0;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="file"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus {
    border-color: var(--tc-primary);
    background: #fff;
    box-shadow: 0 0 0 4px var(--tc-focus);
}

input[readonly] {
    color: var(--tc-muted);
    background: #f3f6f8;
}

.role-fieldset {
    padding: 16px;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    background: #fbfcfd;
}

.role-options {
    gap: 10px 14px;
}

.check-row {
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: var(--tc-radius-sm);
    color: var(--tc-text);
    background: #fff;
}

.check-row:hover {
    border-color: var(--tc-border);
}

.check-row:has(input:checked) {
    border-color: rgba(11, 152, 199, 0.4);
    color: #087b9f;
    background: #effafd;
}

.check-row input {
    width: 18px;
    height: 18px;
    accent-color: var(--tc-primary);
}

.product-interest-fieldset {
    padding: 10px;
}

.product-interest-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/* Workflow */

.broker-workflow-page .app-shell {
    max-width: 1520px;
}

.workflow-progress {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1px;
    margin: 0 0 14px;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    background: var(--tc-border);
    box-shadow: var(--tc-shadow-sm);
    overflow: hidden;
}

.workflow-progress-item {
    min-width: 0;
    min-height: 76px;
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-content: center;
    align-items: center;
    gap: 2px 10px;
    padding: 12px;
    color: var(--tc-text);
    background: #fff;
    text-decoration: none;
}

.workflow-progress-item:hover {
    color: var(--tc-text);
    background: #f8fcfd;
    text-decoration: none;
}

.workflow-progress-item > span {
    grid-row: 1 / span 2;
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--tc-border-strong);
    border-radius: 50%;
    color: var(--tc-muted);
    font-size: 11px;
    font-weight: 700;
}

.workflow-progress-item strong {
    overflow: hidden;
    color: inherit;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.workflow-progress-item small {
    color: var(--tc-muted);
    font-size: 9px;
    font-weight: 650;
}

.workflow-progress-item.is-complete > span {
    border-color: var(--tc-success);
    color: var(--tc-success);
    background: var(--tc-success-soft);
}

.workflow-progress-item.is-complete small {
    color: var(--tc-success);
}

.workflow-progress-item.is-current {
    box-shadow: inset 0 -3px 0 var(--tc-primary);
}

.workflow-progress-item.is-current > span {
    border-color: var(--tc-primary);
    color: #fff;
    background: var(--tc-primary);
}

.workflow-progress-item.is-current small {
    color: var(--tc-primary);
}

.workflow-progress-item.is-blocked {
    color: #7d8996;
    background: #fafbfc;
}

.broker-client-summary {
    margin-bottom: 14px;
}

.request-details {
    margin: 0 0 14px;
}

.request-details summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    color: var(--tc-text);
    font-size: 13px;
    font-weight: 650;
}

.workflow-step {
    margin-top: 14px;
    overflow: hidden;
}

.workflow-step-heading {
    min-height: 72px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--tc-border);
    background: #fff;
}

.workflow-step-heading h2 {
    color: var(--tc-text);
    font-size: 19px;
    font-weight: 680;
}

.workflow-step-state {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    padding: 0 9px;
    border: 1px solid rgba(11, 152, 199, 0.3);
    border-radius: 5px;
    color: var(--tc-primary);
    background: #f1fbfd;
    font-size: 10px;
    font-weight: 680;
}

.workflow-step.is-complete .workflow-step-state {
    border-color: rgba(21, 150, 106, 0.3);
    color: var(--tc-success);
    background: var(--tc-success-soft);
}

.workflow-step.is-blocked .workflow-step-state {
    border-color: rgba(229, 57, 69, 0.28);
    color: var(--tc-danger);
    background: var(--tc-danger-soft);
}

.workflow-step-number {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
    border: 1px solid var(--tc-primary);
    color: var(--tc-primary);
    background: #fff;
}

.workflow-step.is-complete .workflow-step-number {
    border-color: var(--tc-success);
    color: var(--tc-success);
    background: var(--tc-success-soft);
}

.workflow-step.is-current {
    border-color: var(--tc-primary);
    box-shadow: 0 0 0 1px rgba(11, 152, 199, 0.08);
}

.workflow-step.is-blocked {
    border-color: rgba(229, 57, 69, 0.35);
}

.workflow-step-toggle {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    margin-left: 0;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius-sm);
    color: var(--tc-text);
    background: #fff;
    cursor: pointer;
}

.workflow-step-toggle::before {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translate(-1px, -1px);
    transition: transform 160ms ease;
}

.workflow-step.is-collapsed .workflow-step-toggle::before {
    transform: rotate(-45deg);
}

.workflow-step.is-collapsed > :not(.workflow-step-heading) {
    display: none !important;
}

.workflow-subsection,
.workflow-history {
    border-color: var(--tc-border);
}

.workflow-subsection > h3,
.workflow-history > h3 {
    color: var(--tc-text);
    font-size: 15px;
    font-weight: 680;
}

.payment-summary {
    background: var(--tc-border);
}

.payment-summary div {
    min-height: 86px;
    align-content: center;
    padding: 14px 18px;
}

.payment-summary strong {
    color: var(--tc-text);
    font-size: 17px;
    font-weight: 680;
}

.payment-summary div:last-child strong {
    color: var(--tc-danger);
}

.installment-current {
    border-color: var(--tc-border);
    background: #f8fafb;
}

/* Analytics and module metrics */

.analyst-filter-form,
.finance-filter-form,
.compliance-filter-form {
    gap: 12px 14px;
    margin-bottom: 18px;
    padding: 16px;
}

.analyst-filter-form input,
.analyst-filter-form select,
.finance-filter-form input,
.finance-filter-form select,
.compliance-filter-form input,
.compliance-filter-form select {
    height: 42px;
    font-size: 12px;
}

.analyst-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.analyst-metric {
    min-height: 122px;
    padding: 18px;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    color: var(--tc-text);
    background: #fff;
    box-shadow: var(--tc-shadow-sm);
}

.analyst-metric:hover {
    border-color: var(--tc-primary);
    background: #fbfeff;
    text-decoration: none;
}

.analyst-metric span {
    color: var(--tc-muted);
    font-size: 11px;
    font-weight: 650;
    letter-spacing: 0.035em;
}

.analyst-metric strong {
    color: var(--tc-text);
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.analyst-metric small {
    color: var(--tc-primary);
    font-size: 11px;
    font-weight: 650;
}

.analyst-pipeline {
    padding: 18px 20px 22px;
}

.analyst-pipeline > div > div {
    height: 9px;
    border-radius: 99px;
    background: #e8eef2;
}

.analyst-pipeline i {
    border-radius: inherit;
    background: var(--tc-primary);
}

.insights-analysis-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
    gap: 16px;
    margin-bottom: 16px;
}

.insights-analysis-grid .analyst-panel {
    margin-bottom: 0;
}

.premium-analysis-values {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--tc-border);
}

.premium-analysis-values > div {
    min-width: 0;
    min-height: 88px;
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 14px;
    background: #fff;
}

.premium-analysis-values span {
    color: var(--tc-muted);
    font-size: 9px;
    font-weight: 650;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.premium-analysis-values strong {
    color: var(--tc-text);
    font-size: 13px;
    font-weight: 680;
}

.premium-analysis-values .is-outstanding strong {
    color: var(--tc-danger);
}

.analysis-warning {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    border-top: 1px solid rgba(233, 151, 23, 0.3);
    color: #8c5808;
    background: var(--tc-warning-soft);
    font-size: 11px;
    text-decoration: none;
}

.analysis-warning:hover {
    color: #744806;
    text-decoration: none;
}

.analysis-warning strong {
    font-size: 10px;
}

.analyst-report-links {
    gap: 12px;
}

.analyst-report-links a {
    min-height: 102px;
    padding: 18px;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    background: #fff;
    box-shadow: var(--tc-shadow-sm);
}

.analyst-report-links a:hover {
    border-color: var(--tc-primary);
    background: #fbfeff;
}

/* Client and finance surfaces */

.client-360-header {
    align-items: center;
}

.client-identity {
    display: flex;
    align-items: center;
    gap: 18px;
}

.client-avatar {
    flex: 0 0 auto;
    width: 68px;
    height: 68px;
    display: inline-grid;
    place-items: center;
    border: 1px solid rgba(11, 152, 199, 0.25);
    border-radius: 50%;
    color: var(--tc-text);
    background: #eaf6fa;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.client-contact-line {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin: 8px 0 0;
    color: var(--tc-muted);
    font-size: 12px;
}

.client-360-tabs {
    position: sticky;
    z-index: 10;
    top: calc(var(--tc-commandbar-height) - 1px);
    display: flex;
    gap: 28px;
    margin: 0 0 18px;
    padding: 0 12px;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--tc-shadow-sm);
    overflow-x: auto;
}

.client-360-tabs a {
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    border-bottom: 3px solid transparent;
    color: var(--tc-muted);
    font-size: 12px;
    font-weight: 620;
    white-space: nowrap;
    text-decoration: none;
}

.client-360-tabs a:hover,
.client-360-tabs a.active {
    border-bottom-color: var(--tc-primary);
    color: var(--tc-primary);
    text-decoration: none;
}

#client-overview,
#policy-billing,
#client-compliance,
#renewal,
#service,
#activity {
    scroll-margin-top: calc(var(--tc-commandbar-height) + 92px);
}

.client-360-key-panels {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 16px;
    margin: 16px 0;
}

.client-compliance-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--tc-border);
}

.client-compliance-summary > div {
    min-height: 116px;
    display: grid;
    align-content: center;
    gap: 7px;
    padding: 18px;
    background: #fff;
}

.client-compliance-summary span,
.client-compliance-summary small {
    color: var(--tc-muted);
    font-size: 10px;
}

.client-compliance-summary strong {
    color: var(--tc-text);
    font-size: 18px;
    font-weight: 680;
}

.client-progress {
    width: 100%;
    height: 8px;
    border-radius: 99px;
    background: #e8eef2;
    overflow: hidden;
}

.client-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--tc-primary);
}

.client-access-note {
    min-height: 116px;
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 18px;
}

.client-access-note strong {
    color: var(--tc-text);
    font-size: 13px;
}

.client-access-note span {
    color: var(--tc-muted);
    font-size: 11px;
}

.client-action-list {
    display: grid;
}

.client-action-list a {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--tc-border);
    color: var(--tc-text);
    text-decoration: none;
}

.client-action-list a:last-child {
    border-bottom: 0;
}

.client-action-list a:hover {
    color: var(--tc-text);
    background: #f8fcfd;
}

.client-action-list span {
    font-size: 12px;
    font-weight: 620;
}

.client-action-list strong {
    color: var(--tc-primary);
    font-size: 10px;
    font-weight: 680;
    text-align: right;
}

.account-summary,
.client-profile-grid {
    gap: 12px;
}

.account-summary div,
.client-profile-grid > div {
    min-height: 102px;
    align-content: center;
    padding: 17px;
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    background: #fff;
    box-shadow: var(--tc-shadow-sm);
}

.account-summary strong,
.client-profile-grid strong {
    color: var(--tc-text);
    font-size: 18px;
    font-weight: 680;
}

.account-panel {
    margin-top: 16px;
}

.account-work-grid {
    gap: 16px;
}

.finance-allocation-grid {
    border-color: var(--tc-border);
    background: var(--tc-border);
}

/* Login surfaces are activated by the redesigned auth markup. */

.login-page.timecare-auth {
    width: 100%;
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 45%) minmax(0, 55%);
    align-items: stretch;
    justify-content: stretch;
    overflow: hidden;
    background: var(--tc-canvas);
}

.timecare-auth .auth-brand-panel {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: clamp(48px, 7vw, 100px);
    color: #fff;
    background: var(--tc-ink-deep);
    overflow: hidden;
}

.timecare-auth .auth-brand-panel::before,
.timecare-auth .auth-brand-panel::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.timecare-auth .auth-brand-panel::before {
    right: -110px;
    bottom: 8%;
    width: 340px;
    height: 340px;
    border: 1px solid rgba(119, 165, 191, 0.5);
    border-radius: 50%;
}

.timecare-auth .auth-brand-panel::after {
    right: 16%;
    bottom: 28%;
    width: 210px;
    height: 210px;
    border: solid rgba(119, 165, 191, 0.5);
    border-width: 1px 0 0 1px;
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    max-width: 390px;
}

.auth-brand-content img {
    display: block;
    width: min(250px, 75%);
    height: auto;
    margin-bottom: 26px;
}

.auth-brand-content p {
    margin: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(18px, 1.8vw, 25px);
    font-weight: 450;
    line-height: 1.4;
}

.timecare-auth .login-panel {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: clamp(28px, 5vw, 70px);
    background: var(--tc-canvas);
}

.timecare-auth .login-card {
    width: min(100%, 490px);
    padding: clamp(30px, 4vw, 48px);
    border: 1px solid var(--tc-border);
    border-radius: var(--tc-radius);
    background: #fff;
    box-shadow: var(--tc-shadow-sm);
}

.timecare-auth .login-heading {
    margin-bottom: 30px;
    text-align: left;
}

.timecare-auth .login-heading h1,
.timecare-auth .login-heading h2 {
    margin: 0;
    color: var(--tc-text);
    font-size: clamp(34px, 3vw, 46px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.timecare-auth .login-form {
    gap: 20px;
}

.timecare-auth .login-form button[type="submit"] {
    width: 100%;
    height: 50px;
    margin-top: 4px;
}

.timecare-auth .form-options {
    color: var(--tc-muted);
    font-size: 13px;
}

.timecare-auth .form-options .check-row {
    padding: 0;
    background: transparent;
}

.timecare-auth .secondary-form {
    margin-top: 12px;
    text-align: center;
}

.timecare-auth .secondary-form .link-button {
    min-height: 38px;
    border: 0;
    padding: 0 12px;
    color: var(--tc-primary);
    background: transparent;
    box-shadow: none;
}

.timecare-auth .secondary-form .link-button:hover {
    border: 0;
    color: var(--tc-primary-hover);
    background: #eaf5f8;
    box-shadow: none;
    transform: none;
}

.auth-mobile-brand {
    display: none;
}

/* User-controlled compact navigation rail */

@media (min-width: 721px) {
    body.sidebar-collapsed {
        --tc-sidebar-width: 88px;
    }

    body.sidebar-collapsed .dashboard-sidebar,
    body.sidebar-collapsed .workspace-sidebar {
        padding: 18px 8px;
        overflow: visible;
    }

    body.sidebar-collapsed .sidebar-brand {
        justify-items: center;
        padding: 2px 0 14px;
    }

    body.sidebar-collapsed .sidebar-brand > a {
        width: 54px;
        height: 54px;
        overflow: hidden;
    }

    body.sidebar-collapsed .sidebar-brand img {
        width: 54px;
        max-width: none;
        height: auto;
        object-fit: contain;
        object-position: center top;
    }

    body.sidebar-collapsed .sidebar-brand-logo {
        display: none !important;
    }

    body.sidebar-collapsed .sidebar-brand-mark {
        display: block !important;
    }

    body.sidebar-collapsed .sidebar-brand p,
    body.sidebar-collapsed .sidebar-link-copy,
    body.sidebar-collapsed .sidebar-group > summary span,
    body.sidebar-collapsed .account-copy,
    body.sidebar-collapsed .sidebar-account > a {
        display: none;
    }

    body.sidebar-collapsed .sidebar-nav {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    body.sidebar-collapsed .sidebar-nav > a,
    body.sidebar-collapsed .sidebar-group > summary {
        width: 56px;
        height: 56px;
        min-height: 56px;
        justify-content: center;
        margin-inline: auto;
        padding: 0;
    }

    body.sidebar-collapsed .sidebar-group-chevron {
        display: none;
    }

    body.sidebar-collapsed .sidebar-subnav {
        position: absolute;
        z-index: 80;
        top: 0;
        left: 68px;
        width: 250px;
        max-height: min(480px, 70vh);
        display: grid;
        gap: 3px;
        margin: 0;
        padding: 10px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: var(--tc-radius);
        background: var(--tc-ink-deep);
        box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
        overflow-y: auto;
    }

    body.sidebar-collapsed .sidebar-subnav a {
        width: 100%;
        min-height: 48px;
        display: grid;
        align-content: center;
        justify-content: stretch;
        margin: 0;
        padding: 8px 10px;
    }

    body.sidebar-collapsed .sidebar-subnav a span {
        display: block;
    }

    body.sidebar-collapsed .sidebar-account {
        grid-template-columns: 1fr;
        justify-items: center;
        padding: 14px 0 0;
    }

    body.sidebar-collapsed .account-avatar {
        width: 48px;
        height: 48px;
    }

    body.sidebar-collapsed .sidebar-close {
        top: 62px;
        right: -17px;
        border: 1px solid rgba(255, 255, 255, 0.14);
        background: var(--tc-ink-deep);
        box-shadow: 0 8px 20px rgba(5, 20, 34, 0.24);
    }

    body.sidebar-collapsed .sidebar-close .nav-icon {
        transform: rotate(0);
    }

    body.sidebar-collapsed .workspace-commandbar {
        padding-inline: clamp(18px, 2vw, 30px);
    }

    body.sidebar-collapsed.workspace-page .app-shell,
    body.sidebar-collapsed .dashboard-content {
        padding-inline: clamp(22px, 2.5vw, 36px);
    }
}

/* Compact laptop and tablet content */

@media (max-width: 1360px) and (min-width: 721px) {
    .workspace-commandbar {
        padding-inline: 24px;
    }

    .workspace-page .app-shell,
    .dashboard-content {
        padding-inline: 28px;
    }

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

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

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

    .register-toolbar-main {
        grid-template-columns: minmax(220px, 1fr) 160px 180px;
    }

    .workflow-progress {
        grid-template-columns: repeat(5, minmax(118px, 1fr));
        overflow-x: auto;
    }

    .client-360-key-panels {
        grid-template-columns: 1fr;
    }

    .insights-analysis-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .register-toolbar-main {
        grid-template-columns: minmax(0, 1fr) 160px;
    }

    .register-toolbar-main .register-select:last-child {
        grid-column: 1 / -1;
    }

    .table-wrap {
        overflow: visible;
    }

    .data-table,
    .data-table thead,
    .data-table tbody,
    .data-table tr,
    .data-table th,
    .data-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .data-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .data-table tbody {
        display: grid;
        gap: 12px;
        padding: 12px;
    }

    .data-table tr {
        border: 1px solid var(--tc-border);
        border-radius: var(--tc-radius);
        background: #fff;
        box-shadow: var(--tc-shadow-sm);
        overflow: hidden;
    }

    .data-table tbody tr:hover {
        box-shadow: inset 3px 0 0 var(--tc-primary);
    }

    .data-table td {
        display: grid;
        grid-template-columns: minmax(105px, 34%) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        padding: 11px 13px;
        border-bottom: 1px solid var(--tc-border);
    }

    .data-table td::before {
        content: attr(data-label);
        color: #647489;
        font-size: 10px;
        font-weight: 680;
        letter-spacing: 0.045em;
        text-transform: uppercase;
    }

    .data-table td[colspan] {
        display: block;
        text-align: center;
    }

    .data-table td[colspan]::before {
        content: none;
    }
}

/* Mobile navigation and content */

@media (max-width: 720px) {
    :root {
        --tc-sidebar-width: 0px;
        --tc-commandbar-height: 64px;
    }

    body.workspace-page,
    .dashboard-layout {
        display: block;
        width: 100%;
    }

    .dashboard-sidebar,
    .workspace-sidebar {
        position: fixed;
        z-index: 100;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(82vw, 330px);
        height: 100dvh;
        max-height: none;
        padding: 20px 14px 16px;
        transform: translateX(-102%);
        transition: transform 220ms ease;
    }

    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .navigation-open .dashboard-sidebar,
    .navigation-open .workspace-sidebar {
        transform: translateX(0);
    }

    .navigation-open {
        overflow: hidden;
    }

    .sidebar-close {
        display: inline-grid;
    }

    .sidebar-backdrop {
        position: fixed;
        z-index: 90;
        inset: 0;
        width: 100%;
        height: 100%;
        border: 0;
        padding: 0;
        background: rgba(6, 23, 38, 0.58);
        opacity: 0;
        visibility: hidden;
        transition: opacity 220ms ease, visibility 220ms ease;
    }

    .navigation-open .sidebar-backdrop {
        display: block;
        opacity: 1;
        visibility: visible;
    }

    .workspace-commandbar {
        left: 0;
        height: 64px;
        padding: 0 14px;
    }

    .workspace-menu-toggle {
        display: grid;
    }

    .commandbar-logo {
        width: 44px;
        height: 44px;
        display: block;
        overflow: hidden;
    }

    .commandbar-logo img {
        width: 44px;
        max-width: none;
        height: 44px;
        object-fit: contain;
        object-position: center;
    }

    .workspace-search {
        height: 42px;
        padding: 0 11px;
    }

    .workspace-search input {
        font-size: 13px;
    }

    .workspace-search kbd,
    .workspace-search-status,
    .notification-popover,
    .command-account-copy,
    .command-account-chevron {
        display: none;
    }

    .account-popover > summary {
        min-height: 40px;
    }

    .command-avatar {
        width: 38px;
        height: 38px;
    }

    .workspace-page .app-shell,
    .workspace-page.create-user-page .app-shell,
    .workspace-page.create-lead-page .app-shell,
    .dashboard-content {
        width: 100%;
        min-height: 100vh;
        padding: calc(var(--tc-commandbar-height) + 25px) 16px 40px;
    }

    .app-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 16px;
        margin-bottom: 22px;
    }

    .app-header h1 {
        font-size: 31px;
    }

    .app-actions {
        width: 100%;
    }

    .register-toolbar-main {
        grid-template-columns: 1fr;
    }

    .register-toolbar-main .register-select:last-child {
        grid-column: auto;
    }

    .app-actions a {
        flex: 1;
    }

    .dashboard-hero {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .profile-grid,
    .overview-metric-grid,
    .form-grid,
    .role-options,
    .product-interest-options,
    .account-summary,
    .client-profile-grid,
    .account-inline-form,
    .payment-summary,
    .finance-filter-form,
    .finance-remittance-form,
    .finance-allocation-grid,
    .compliance-filter-form,
    .compliance-profile-form,
    .compliance-upload-form,
    .compliance-review-form,
    .kyc-checklist,
    .analyst-filter-form,
    .analyst-metric-grid,
    .analyst-report-links,
    .analyst-detail-summary {
        grid-template-columns: 1fr;
    }

    .dashboard-date {
        display: none;
    }

    .attention-item {
        grid-template-columns: 10px minmax(0, 1fr) 16px;
    }

    .attention-item small {
        grid-column: 2;
        text-align: left;
    }

    .attention-arrow {
        grid-column: 3;
        grid-row: 1 / span 2;
    }

    .premium-position {
        grid-template-columns: 1fr;
    }

    .recent-activity-item {
        grid-template-columns: 10px minmax(0, 1fr);
    }

    .recent-activity-item small,
    .recent-activity-item time {
        grid-column: 2;
        text-align: left;
    }

    .admin-form,
    .workflow-form {
        gap: 20px;
        padding: 18px 16px;
    }

    .workspace-page.create-lead-page .admin-form,
    .workspace-page.create-user-page .admin-form {
        gap: 20px;
        padding: 18px 16px;
    }

    .workspace-page.create-lead-page .form-grid,
    .workspace-page.create-user-page .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .workspace-page.create-lead-page input[type="text"],
    .workspace-page.create-lead-page input[type="email"],
    .workspace-page.create-lead-page input[type="date"],
    .workspace-page.create-lead-page select,
    .workspace-page.create-lead-page textarea,
    .workspace-page.create-user-page input[type="text"],
    .workspace-page.create-user-page input[type="email"],
    .workspace-page.create-user-page select {
        height: 48px;
        min-height: 48px;
        padding: 0 13px;
        font-size: 16px;
    }

    .workspace-page.create-lead-page textarea {
        min-height: 112px;
        padding-top: 12px;
    }

    .workspace-page.create-lead-page .field-group,
    .workspace-page.create-user-page .field-group {
        gap: 7px;
    }

    .workspace-page.create-lead-page .field-group label,
    .workspace-page.create-user-page .field-group label {
        font-size: 12px;
    }

    .workspace-page.create-lead-page .admin-form > button[type="submit"],
    .workspace-page.create-user-page .admin-form > button[type="submit"] {
        position: sticky;
        z-index: 5;
        bottom: 12px;
        width: 100%;
        min-height: 50px;
        justify-self: stretch;
        box-shadow: 0 10px 30px rgba(11, 31, 51, 0.18);
    }

    .create-lead-page .app-actions {
        display: none;
    }

    .create-lead-page .form-submit-row {
        position: sticky;
        z-index: 5;
        bottom: 10px;
        display: grid;
        grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
        gap: 8px;
        padding: 8px;
        border: 1px solid var(--tc-border);
        border-radius: var(--tc-radius);
        background: rgba(255, 255, 255, 0.97);
        box-shadow: 0 12px 32px rgba(11, 31, 51, 0.16);
    }

    .create-lead-page .form-submit-row > a,
    .create-lead-page .form-submit-row > button[type="submit"] {
        position: static;
        width: 100%;
        min-width: 0;
        min-height: 48px;
        box-shadow: none;
    }

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    input[type="datetime-local"],
    input[type="file"],
    select,
    textarea {
        min-height: 48px;
        font-size: 16px;
    }

    .role-options.product-interest-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .check-row {
        min-height: 48px;
    }

    .table-wrap {
        overflow: visible;
    }

    .data-table,
    .data-table thead,
    .data-table tbody,
    .data-table tr,
    .data-table th,
    .data-table td {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .data-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .data-table tbody {
        display: grid;
        gap: 12px;
        padding: 12px;
    }

    .data-table tr {
        border: 1px solid var(--tc-border);
        border-radius: var(--tc-radius);
        background: #fff;
        box-shadow: var(--tc-shadow-sm);
        overflow: hidden;
    }

    .data-table tbody tr:hover {
        box-shadow: inset 3px 0 0 var(--tc-primary);
    }

    .data-table td {
        display: grid;
        grid-template-columns: minmax(105px, 34%) minmax(0, 1fr);
        gap: 12px;
        align-items: start;
        padding: 11px 13px;
        border-bottom: 1px solid var(--tc-border);
    }

    .data-table td::before {
        content: attr(data-label);
        color: #647489;
        font-size: 10px;
        font-weight: 680;
        letter-spacing: 0.045em;
        text-transform: uppercase;
    }

    .data-table td[colspan] {
        display: block;
        text-align: center;
    }

    .data-table td[colspan]::before {
        content: none;
    }

    .table-actions {
        flex-wrap: wrap;
    }

    .workflow-step-heading {
        align-items: center;
        padding: 14px;
    }

    .workflow-step-heading h2 {
        font-size: 17px;
    }

    .workflow-progress {
        grid-template-columns: repeat(5, minmax(150px, 1fr));
        overflow-x: auto;
        scroll-snap-type: x proximity;
    }

    .workflow-progress-item {
        min-height: 70px;
        scroll-snap-align: start;
    }

    .workflow-step-state {
        margin-left: auto;
    }

    .workflow-step-toggle {
        flex: 0 0 38px;
    }

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

    .client-identity {
        align-items: flex-start;
    }

    .client-avatar {
        width: 54px;
        height: 54px;
        font-size: 19px;
    }

    .client-contact-line {
        display: grid;
        gap: 2px;
    }

    .client-contact-line > span {
        display: none;
    }

    .client-360-tabs {
        top: var(--tc-commandbar-height);
        gap: 22px;
        margin-inline: -16px;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

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

    .premium-analysis-values {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 520px) {
    .workspace-search {
        flex: 1;
        min-width: 0;
    }

    .commandbar-logo {
        display: none;
    }

    .commandbar-start.search-unavailable .commandbar-logo {
        display: block;
    }

    .role-options.product-interest-options {
        grid-template-columns: 1fr;
    }

    .data-table td {
        grid-template-columns: 92px minmax(0, 1fr);
    }

    .timecare-auth .login-card {
        padding: 24px 18px;
    }
}

/* Responsive authentication */

@media (max-width: 820px) {
    .login-page.timecare-auth {
        display: block;
        min-height: 100dvh;
        overflow: auto;
        background: #fff;
    }

    .timecare-auth .auth-brand-panel {
        display: none;
    }

    .timecare-auth .login-panel {
        min-height: 100dvh;
        display: grid;
        align-content: center;
        padding: 24px;
    }

.auth-mobile-brand {
        width: 150px;
        display: block;
        margin: 0 0 30px;
    }

    .timecare-auth .login-card {
        border: 0;
        padding: 0;
        box-shadow: none;
    }

    .timecare-auth .login-heading h1,
    .timecare-auth .login-heading h2 {
        font-size: 34px;
    }
}

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