@font-face {
    font-family: "Bricolage Grotesque";
    src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

:root {
    --ink-950: #222e43;
    --ink-850: #2e3849;
    --ink-700: #495b68;
    --ink-500: #6b819a;
    --ink-300: #aab4c0;
    --mist-100: #e6e9ed;
    --mist-50: #f6f5f3;
    --paper: #ffffff;
    --teal: #6b819a;
    --teal-dark: #495b68;
    --teal-soft: #e8edf2;
    --coral: #b16f70;
    --coral-soft: #f5e7e6;
    --gold: #b89b68;
    --gold-soft: #f5efe2;
    --blue: #7f93aa;
    --violet: #8a8095;
    --shadow: 0 16px 40px rgba(34, 46, 67, 0.08);
    --shadow-small: 0 5px 18px rgba(34, 46, 67, 0.07);
    --radius: 16px;
    --radius-small: 10px;
    --display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
    --body: "Inter", "Segoe UI", Arial, sans-serif;
    --utility: "Inter", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

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

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink-950);
    background: var(--mist-50);
    font-family: var(--body);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

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

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

button {
    color: inherit;
}

:focus-visible {
    outline: 3px solid rgba(107, 129, 154, 0.35);
    outline-offset: 3px;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 244px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 100vh;
    padding: 28px 20px 20px;
    display: flex;
    flex-direction: column;
    color: #e6e9ed;
    background:
        radial-gradient(circle at 20% 95%, rgba(107, 129, 154, 0.28), transparent 34%),
        var(--ink-950);
}

.brand,
.guest-brand {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
}

.brand {
    padding: 0 9px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.brand-logo {
    width: 118px;
    height: auto;
    display: block;
}

.brand small,
.guest-brand small {
    display: block;
    color: #aab4c0;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.main-nav {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 5px;
    padding-top: 22px;
}

.nav-label {
    margin: 14px 12px 5px;
    color: #8190a4;
    font-family: var(--utility);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.main-nav a {
    min-height: 44px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 10px;
    color: #b9c2cd;
    font-weight: 600;
    transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.main-nav a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(2px);
}

.main-nav a[aria-current="page"] {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: inset 3px 0 #ffffff;
}

.nav-glyph {
    width: 23px;
    color: #c7d0da;
    font-size: 20px;
    text-align: center;
}

.sidebar-foot {
    padding: 15px 11px 3px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #8998aa;
    font-size: 12px;
}

.status-dot,
.pulse-live {
    width: 8px;
    height: 8px;
    display: inline-block;
    border-radius: 50%;
    background: #9eafbf;
    box-shadow: 0 0 0 4px rgba(158, 175, 191, 0.12);
}

.app-main {
    min-width: 0;
}

.topbar {
    min-height: 84px;
    padding: 14px clamp(22px, 4vw, 54px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--mist-100);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
}

.page-heading h1 {
    margin: 2px 0 0;
    font-family: var(--display);
    font-size: clamp(25px, 3vw, 34px);
    font-weight: 720;
    letter-spacing: -0.035em;
    line-height: 1;
}

.eyebrow,
.metric-label {
    display: block;
    color: var(--teal);
    font-family: var(--utility);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.user-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--paper);
    background: var(--teal);
    font-family: var(--display);
    font-size: 17px;
    font-weight: 700;
}

.user-copy strong,
.user-copy small {
    display: block;
    line-height: 1.25;
}

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

.user-copy small {
    color: var(--ink-500);
    font-size: 11px;
}

.text-button {
    margin-left: 5px;
    padding: 6px;
    border: 0;
    color: var(--ink-500);
    background: none;
    font-size: 12px;
    cursor: pointer;
}

.text-button:hover,
.text-link:hover {
    color: var(--teal);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.page-content {
    width: min(100%, 1600px);
    margin: 0 auto;
    padding: 28px clamp(22px, 4vw, 54px) 56px;
}

.alert {
    margin-bottom: 18px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-small);
    font-size: 14px;
}

.alert ul {
    margin: 0;
    padding-left: 20px;
}

.alert button {
    border: 0;
    background: transparent;
    font-size: 21px;
    cursor: pointer;
}

.alert-success {
    color: #13583c;
    border-color: #a9d8c1;
    background: #e5f5ed;
}

.alert-warning {
    color: #715314;
    border-color: #e9d28c;
    background: var(--gold-soft);
}

.alert-error {
    color: #8d322a;
    border-color: #f1b5ae;
    background: var(--coral-soft);
}

.control-strip {
    padding: 17px 18px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    border: 1px solid var(--mist-100);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-small);
}

.control-strip > div > strong {
    display: block;
    margin-top: 5px;
    font-family: var(--display);
    font-size: 19px;
    letter-spacing: -0.02em;
}

.filter-form {
    display: flex;
    align-items: end;
    gap: 9px;
}

.filter-form label > span {
    display: block;
    margin: 0 0 4px 2px;
    color: var(--ink-500);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cbd9d6;
    border-radius: 9px;
    color: var(--ink-950);
    background: #fff;
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

input,
select {
    padding: 0 11px;
}

textarea {
    padding: 11px;
    resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #9db4b1;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--teal);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(107, 129, 154, 0.13);
}

.filter-form input {
    width: 135px;
}

.filter-form select {
    width: 150px;
}

.button {
    min-height: 42px;
    padding: 0 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 9px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

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

.button-primary {
    color: #fff;
    border-color: var(--teal);
    background: var(--teal);
    box-shadow: 0 6px 14px rgba(107, 129, 154, 0.18);
}

.button-primary:hover {
    background: var(--teal-dark);
}

.button-secondary {
    color: var(--ink-850);
    border-color: #cbd9d6;
    background: #fff;
}

.button-secondary:hover {
    border-color: var(--teal);
    color: var(--teal);
}

.button-small {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
}

.button-block {
    width: 100%;
}

.button-group {
    display: flex;
    gap: 8px;
}

.pulse-strip {
    margin: 14px 0 20px;
    padding: 10px 13px;
    display: grid;
    grid-template-columns: auto minmax(130px, 1fr) auto;
    align-items: center;
    gap: 15px;
    border-radius: 11px;
    color: #d8e5e3;
    background: var(--ink-950);
}

.pulse-copy {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pulse-track {
    height: 9px;
    display: flex;
    gap: 3px;
    overflow: hidden;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.08);
}

.pulse-segment {
    min-width: 7px;
    flex: 1;
    border-radius: 5px;
}

.pulse-empty {
    padding-left: 8px;
    color: #8998aa;
    font-size: 9px;
    line-height: 9px;
}

.sync-caption {
    color: #85a19f;
    font-family: var(--utility);
    font-size: 10px;
}

.tone-0,
.tone-bg-0 {
    background: #6b819a;
}

.tone-1,
.tone-bg-1 {
    background: #8798aa;
}

.tone-2,
.tone-bg-2 {
    background: #b9a37c;
}

.tone-3,
.tone-bg-3 {
    background: #495b68;
}

.tone-4,
.tone-bg-4 {
    background: #8a8095;
}

.tone-5,
.tone-bg-5 {
    background: #9aa7b5;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(145px, 1fr));
    gap: 12px;
}

.metric-grid-compact {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    margin-bottom: 18px;
}

.metric-card {
    min-width: 0;
    min-height: 126px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--mist-100);
    border-radius: 14px;
    background: var(--paper);
    box-shadow: var(--shadow-small);
}

.metric-card strong {
    display: block;
    margin: 9px 0 4px;
    overflow: hidden;
    font-family: var(--display);
    font-size: clamp(23px, 2.3vw, 31px);
    letter-spacing: -0.04em;
    line-height: 1;
    text-overflow: ellipsis;
}

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

.metric-card-primary {
    border-color: var(--ink-950);
    color: #fff;
    background: var(--ink-950);
}

.metric-card-primary .metric-label {
    color: #9eddd5;
}

.metric-card-primary small {
    color: #9bb3b2;
}

.dashboard-grid,
.settings-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.8fr);
    gap: 18px;
}

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

.panel {
    border: 1px solid var(--mist-100);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-small);
}

.panel-header {
    padding: 19px 20px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #edf2f0;
}

.panel-header h2,
.form-section-heading h2 {
    margin: 3px 0 0;
    font-family: var(--display);
    font-size: 20px;
    letter-spacing: -0.025em;
}

.chart-legend {
    display: flex;
    gap: 14px;
    color: var(--ink-500);
    font-size: 10px;
}

.chart-legend span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.chart-legend i {
    width: 16px;
    height: 3px;
    border-radius: 2px;
}

.legend-spend {
    background: var(--teal);
}

.legend-value {
    background: var(--gold);
}

.chart-wrap {
    height: 320px;
    padding: 14px 14px 8px;
}

.chart-wrap canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.accessible-data {
    margin: 0 20px 16px;
    color: var(--ink-500);
    font-size: 12px;
}

.accessible-data summary {
    cursor: pointer;
}

.accessible-data table {
    width: 100%;
    margin-top: 10px;
    border-collapse: collapse;
}

.accessible-data th,
.accessible-data td {
    padding: 6px;
    border-bottom: 1px solid var(--mist-100);
    text-align: left;
}

.ranking-list {
    padding: 7px 20px 13px;
}

.ranking-row {
    padding: 12px 0;
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #edf2f0;
}

.ranking-row:last-child {
    border-bottom: 0;
}

.ranking-row:hover .ranking-name strong {
    color: var(--teal);
}

.client-token {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #fff;
    font-family: var(--display);
    font-size: 17px;
    font-weight: 700;
}

.client-token-large {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 22px;
}

.ranking-name,
.ranking-value {
    min-width: 0;
}

.ranking-name strong,
.ranking-name small,
.ranking-value strong,
.ranking-value small {
    display: block;
}

.ranking-name strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-name small,
.ranking-value small {
    color: var(--ink-500);
    font-size: 10px;
}

.ranking-value {
    text-align: right;
}

.ranking-value strong {
    font-family: var(--display);
    font-size: 14px;
}

.table-panel {
    margin-top: 18px;
}

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

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

.data-table th {
    padding: 11px 18px;
    color: var(--ink-500);
    background: #f8faf9;
    font-family: var(--utility);
    font-size: 9px;
    letter-spacing: 0.07em;
    text-align: left;
    text-transform: uppercase;
}

.data-table td {
    padding: 13px 18px;
    border-bottom: 1px solid #edf2f0;
    color: var(--ink-700);
    font-size: 13px;
}

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

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

.data-table td strong {
    max-width: 310px;
    overflow: hidden;
    color: var(--ink-950);
    text-overflow: ellipsis;
}

.data-table td small {
    margin-top: 2px;
    color: var(--ink-500);
    font-size: 10px;
}

.numeric {
    text-align: right !important;
}

.muted {
    color: var(--ink-500);
    font-size: 12px;
}

.status-badge {
    padding: 4px 7px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    color: var(--ink-700);
    background: var(--mist-100);
    font-family: var(--utility);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.status-active,
.status-success {
    color: #126248;
    background: #dff3e9;
}

.status-paused,
.status-archived,
.status-never {
    color: #657776;
    background: #eaf0ee;
}

.status-error,
.status-disapproved {
    color: #9a382f;
    background: var(--coral-soft);
}

.status-syncing {
    color: #735211;
    background: var(--gold-soft);
}

.table-empty,
.inline-empty {
    color: var(--ink-500);
    text-align: center;
}

.inline-empty {
    min-height: 210px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.inline-empty.compact {
    min-height: 160px;
}

.inline-empty strong {
    color: var(--ink-850);
    font-family: var(--display);
    font-size: 18px;
}

.inline-empty span {
    margin-top: 4px;
    font-size: 12px;
}

.data-note,
.tech-caption {
    margin: 0;
    padding: 11px 18px;
    color: var(--ink-500);
    border-top: 1px solid #edf2f0;
    font-size: 10px;
}

.page-actions {
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.page-intro {
    max-width: 660px;
    margin: 0;
    color: var(--ink-500);
}

.client-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(260px, 1fr));
    gap: 16px;
}

.client-card {
    padding: 19px;
    border: 1px solid var(--mist-100);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-small);
    transition: transform 150ms ease, box-shadow 150ms ease;
}

.client-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.client-card.is-inactive {
    opacity: 0.65;
}

.client-card-top,
.client-card-foot,
.client-card-metrics {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.client-card-body {
    min-height: 85px;
    padding: 18px 0 12px;
}

.client-card-body h2 {
    margin: 0;
    font-family: var(--display);
    font-size: 22px;
    letter-spacing: -0.025em;
}

.client-card-body p,
.client-card-foot small {
    margin: 3px 0 0;
    color: var(--ink-500);
    font-size: 11px;
}

.client-card-metrics {
    padding: 13px 0;
    border-top: 1px solid var(--mist-100);
    border-bottom: 1px solid var(--mist-100);
}

.client-card-metrics span {
    display: flex;
    flex-direction: column;
}

.client-card-metrics span:last-child {
    text-align: right;
}

.client-card-metrics small {
    color: var(--ink-500);
    font-size: 10px;
}

.client-card-metrics strong {
    font-family: var(--display);
    font-size: 18px;
}

.client-card-foot {
    padding-top: 13px;
}

.text-link {
    color: var(--teal);
    font-size: 12px;
    font-weight: 700;
}

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

.client-identity p,
.client-identity small {
    display: block;
    margin: 0;
}

.client-identity p {
    font-weight: 700;
}

.client-identity small {
    color: var(--ink-500);
}

.form-panel {
    max-width: 900px;
    padding: 25px;
}

.form-section-heading {
    margin-bottom: 18px;
}

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

.field {
    display: block;
}

.field > span:first-child,
.field > label:first-child {
    display: block;
    margin: 0 0 5px 2px;
    color: var(--ink-700);
    font-size: 12px;
    font-weight: 700;
}

.field small {
    display: block;
    margin: 5px 2px 0;
    color: var(--ink-500);
    font-size: 10px;
}

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

.form-divider {
    height: 1px;
    margin: 25px 0;
    background: var(--mist-100);
}

.form-actions {
    margin-top: 23px;
    padding-top: 18px;
    display: flex;
    justify-content: flex-end;
    border-top: 1px solid var(--mist-100);
}

.switch-field {
    margin-top: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.switch-field input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.switch-field > span:nth-child(2) {
    position: relative;
    width: 42px;
    height: 23px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #cbd9d6;
    transition: background 150ms ease;
}

.switch-field > span:nth-child(2)::after {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
    content: "";
    transition: transform 150ms ease;
}

.switch-field input:checked + span {
    background: var(--teal);
}

.switch-field input:checked + span::after {
    transform: translateX(19px);
}

.switch-field input:focus-visible + span {
    outline: 3px solid rgba(107, 129, 154, 0.25);
    outline-offset: 3px;
}

.switch-field strong,
.switch-field small {
    display: block;
}

.switch-field strong {
    font-size: 12px;
}

.switch-field small {
    color: var(--ink-500);
    font-size: 10px;
}

.prefixed-input {
    display: flex !important;
    margin: 0 !important;
    border: 1px solid #cbd9d6;
    border-radius: 9px;
    overflow: hidden;
}

.prefixed-input:focus-within {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(107, 129, 154, 0.13);
}

.prefixed-input i {
    padding: 10px 0 0 11px;
    color: var(--ink-500);
    background: #f6f9f8;
    font-family: var(--utility);
    font-size: 12px;
    font-style: normal;
}

.prefixed-input input {
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
}

.account-list {
    padding: 0 20px 8px;
}

.account-row {
    min-height: 82px;
    padding: 13px 0;
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.7fr) auto;
    align-items: center;
    gap: 18px;
    border-bottom: 1px solid var(--mist-100);
}

.account-row:last-child {
    border-bottom: 0;
}

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

.account-main strong,
.account-main small,
.account-sync small {
    display: block;
}

.account-main small,
.account-sync small {
    margin-top: 3px;
    color: var(--ink-500);
    font-family: var(--utility);
    font-size: 9px;
}

.meta-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #1877f2;
    font-family: var(--display);
    font-weight: 800;
}

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

.sync-error {
    color: #a44137;
    font-size: 10px;
}

.check-list {
    padding: 7px 20px;
}

.check-row {
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--mist-100);
}

.check-row:last-child {
    border-bottom: 0;
}

.check-row > span:first-child {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-weight: 800;
}

.check-row strong,
.check-row small {
    display: block;
}

.check-row strong {
    font-size: 12px;
}

.check-row small {
    color: var(--ink-500);
    font-size: 10px;
}

.check-ok {
    color: #126248;
    background: #dff3e9;
}

.check-error {
    color: #9a382f;
    background: var(--coral-soft);
}

.count-grid {
    padding: 25px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.count-grid span {
    min-height: 100px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 12px;
    background: var(--mist-50);
}

.count-grid strong {
    font-family: var(--display);
    font-size: 30px;
}

.count-grid small {
    color: var(--ink-500);
}

.instruction-panel {
    margin-top: 18px;
}

.instruction-list {
    margin: 0;
    padding: 8px 22px 20px;
    list-style: none;
}

.instruction-list li {
    padding: 14px 0;
    display: flex;
    gap: 13px;
    border-bottom: 1px solid var(--mist-100);
}

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

.instruction-list li > span {
    width: 29px;
    height: 29px;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 9px;
    color: var(--teal);
    background: var(--teal-soft);
    font-family: var(--utility);
    font-weight: 700;
}

.instruction-list strong,
.instruction-list p {
    display: block;
    margin: 0;
}

.instruction-list p {
    margin-top: 3px;
    color: var(--ink-500);
    font-size: 12px;
}

.empty-state {
    min-height: 360px;
    padding: 50px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.empty-state h2 {
    margin: 9px 0 3px;
    font-family: var(--display);
    font-size: 25px;
}

.empty-state p {
    max-width: 430px;
    margin: 0 0 18px;
    color: var(--ink-500);
}

.empty-code {
    color: var(--teal);
    font-family: var(--utility);
    font-size: 12px;
    letter-spacing: 0.1em;
}

.code-note {
    max-width: 680px;
    margin: 15px auto;
    padding: 12px;
    overflow-wrap: anywhere;
    border-radius: 8px;
    color: #71433f;
    background: var(--coral-soft);
    font-family: var(--utility);
    font-size: 11px;
}

.guest-body {
    background: var(--paper);
}

.guest-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 0.9fr) minmax(460px, 1.1fr);
}

.guest-brand-panel {
    position: relative;
    min-height: 100vh;
    padding: clamp(28px, 5vw, 70px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 15% 80%, rgba(107, 129, 154, 0.45), transparent 32%),
        var(--ink-950);
}

.guest-brand-panel::after {
    position: absolute;
    right: -130px;
    bottom: -190px;
    width: 440px;
    height: 440px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    box-shadow:
        0 0 0 60px rgba(255, 255, 255, 0.025),
        0 0 0 120px rgba(255, 255, 255, 0.015);
    content: "";
}

.brand-logo-guest {
    width: 150px;
}

.guest-brand {
    position: relative;
    z-index: 2;
}

.guest-promise {
    position: relative;
    z-index: 2;
    max-width: 570px;
}

.guest-promise .eyebrow {
    color: #c4ced8;
}

.guest-promise h1 {
    margin: 10px 0 16px;
    font-family: var(--display);
    font-size: clamp(42px, 6vw, 75px);
    font-weight: 720;
    letter-spacing: -0.055em;
    line-height: 0.93;
}

.guest-promise p {
    max-width: 430px;
    margin: 0;
    color: #b7c0ca;
    font-size: 15px;
}

.guest-footnote {
    position: relative;
    z-index: 2;
    color: #8f9cad;
    font-family: var(--utility);
    font-size: 10px;
}

.signal-art {
    position: absolute;
    top: 24%;
    right: 0;
    left: 0;
    height: 90px;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.18;
    transform: rotate(-5deg) scale(1.1);
}

.signal-art span {
    height: 5px;
    flex: 1;
    background: #c4ced9;
}

.signal-art span:nth-child(2) {
    height: 38px;
}

.signal-art span:nth-child(3) {
    height: 78px;
}

.signal-art span:nth-child(4) {
    height: 29px;
}

.guest-form-panel {
    padding: 35px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(rgba(230, 233, 237, 0.32) 1px, transparent 1px),
        linear-gradient(90deg, rgba(230, 233, 237, 0.32) 1px, transparent 1px),
        #fff;
    background-size: 32px 32px;
}

.guest-form-wrap {
    width: min(100%, 420px);
}

.auth-heading {
    margin-bottom: 25px;
}

.auth-heading h2 {
    margin: 7px 0 6px;
    font-family: var(--display);
    font-size: 35px;
    letter-spacing: -0.04em;
}

.auth-heading p {
    margin: 0;
    color: var(--ink-500);
}

.stack-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.password-field {
    position: relative;
    display: block !important;
    margin: 0 !important;
}

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

.password-field button {
    position: absolute;
    top: 6px;
    right: 6px;
    min-height: 30px;
    padding: 0 8px;
    border: 0;
    border-radius: 6px;
    color: var(--teal);
    background: var(--teal-soft);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.form-footnote {
    display: block;
    margin-top: 16px;
    color: var(--ink-500);
    font-size: 10px;
    text-align: center;
}

.mobile-nav-button,
.nav-scrim {
    display: none;
}

@media (max-width: 1250px) {
    .metric-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }

    .control-strip {
        align-items: start;
        flex-direction: column;
    }

    .filter-form {
        width: 100%;
    }

    .filter-form label {
        flex: 1;
    }

    .filter-form input,
    .filter-form select {
        width: 100%;
    }

    .client-grid {
        grid-template-columns: repeat(2, minmax(260px, 1fr));
    }
}

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

    .sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-105%);
        width: 244px;
        transition: transform 180ms ease;
    }

    .app-shell.nav-open .sidebar {
        transform: translateX(0);
    }

    .nav-scrim {
        position: fixed;
        inset: 0;
        z-index: 20;
        border: 0;
        background: rgba(9, 25, 27, 0.48);
    }

    .app-shell.nav-open .nav-scrim {
        display: block;
    }

    .mobile-nav-button {
        width: 40px;
        height: 40px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        border: 1px solid var(--mist-100);
        border-radius: 9px;
        background: #fff;
    }

    .mobile-nav-button span {
        width: 17px;
        height: 2px;
        background: var(--ink-850);
    }

    .topbar {
        justify-content: flex-start;
    }

    .user-area {
        margin-left: auto;
    }

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

    .guest-shell {
        grid-template-columns: 1fr;
    }

    .guest-brand-panel {
        min-height: 320px;
        padding: 30px;
    }

    .guest-promise h1 {
        font-size: 46px;
    }

    .guest-footnote,
    .signal-art {
        display: none;
    }

    .guest-form-panel {
        min-height: calc(100vh - 320px);
    }
}

@media (max-width: 720px) {
    .topbar {
        min-height: 72px;
        padding: 12px 16px;
    }

    .page-heading .eyebrow,
    .user-copy,
    .text-button {
        display: none;
    }

    .page-heading h1 {
        font-size: 24px;
    }

    .page-content {
        padding: 18px 14px 40px;
    }

    .filter-form {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-form .button {
        grid-column: span 2;
    }

    .pulse-strip {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .sync-caption {
        text-align: right;
    }

    .metric-grid,
    .metric-grid-compact {
        grid-template-columns: repeat(2, minmax(135px, 1fr));
    }

    .metric-card {
        min-height: 116px;
        padding: 15px;
    }

    .metric-card strong {
        font-size: 25px;
    }

    .client-grid,
    .settings-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .field-span-2 {
        grid-column: auto;
    }

    .page-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .page-actions .button,
    .button-group .button {
        flex: 1;
    }

    .chart-panel .panel-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .chart-wrap {
        height: 260px;
        padding: 8px;
    }

    .account-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .account-actions .button,
    .account-actions form,
    .account-actions form .button {
        flex: 1;
    }

    .guest-brand-panel {
        min-height: 250px;
    }

    .guest-promise h1 {
        margin-bottom: 8px;
        font-size: 37px;
    }

    .guest-promise p {
        display: none;
    }

    .guest-form-panel {
        min-height: calc(100vh - 250px);
        padding: 28px 20px 40px;
    }
}

@media (max-width: 430px) {
    .metric-grid,
    .metric-grid-compact {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .metric-card {
        min-height: 106px;
        padding: 13px;
    }

    .metric-card strong {
        font-size: 21px;
    }

    .metric-card small {
        font-size: 9px;
    }

    .control-strip {
        padding: 14px;
    }

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

    .filter-form .button {
        grid-column: auto;
    }
}

@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;
    }
}
