:root {
    --ink: #11110f;
    --ink-soft: #1b1b18;
    --paper: #f3f1e9;
    --paper-soft: #e8e5dc;
    --surface: #fbfaf6;
    --line: rgba(17, 17, 15, 0.14);
    --line-dark: rgba(255, 255, 255, 0.16);
    --muted: #74736d;
    --accent: #d6ff3f;
    --accent-dark: #a8cc25;
    --error: #a3352b;
    --success: #3f692e;
    --warning: #9a6813;
    --font-body: "Manrope", sans-serif;
    --font-display: "Space Grotesk", sans-serif;
    --radius: 0.35rem;
    --shadow: 0 1.5rem 4rem rgba(17, 17, 15, 0.08);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 20rem;
    color-scheme: light;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) var(--ink);
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font: 400 1rem/1.55 var(--font-body);
    -webkit-font-smoothing: antialiased;
}

*::-webkit-scrollbar {
    width: 0.65rem;
    height: 0.65rem;
}

*::-webkit-scrollbar-track {
    background: var(--ink);
}

*::-webkit-scrollbar-thumb {
    background: var(--accent);
    border: 2px solid var(--ink);
    border-radius: var(--radius);
    box-shadow: 0 0 0.75rem rgba(214, 255, 63, 0.45);
}

*::-webkit-scrollbar-thumb:hover {
    background: #e0ff70;
    box-shadow: 0 0 1rem rgba(214, 255, 63, 0.7);
}

*::-webkit-scrollbar-corner {
    background: var(--ink);
}

body.is-nav-open,
body.has-modal {
    overflow: hidden;
}

button,
input,
select,
textarea {
    color: inherit;
    font: inherit;
}

button,
select {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

svg {
    display: block;
    width: 1.25rem;
    height: 1.25rem;
}

h1,
h2,
h3,
p,
figure {
    margin-top: 0;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 500;
    letter-spacing: -0.04em;
    line-height: 1;
}

:focus-visible {
    outline: 2px solid var(--accent-dark);
    outline-offset: 3px;
}

::selection {
    color: var(--ink);
    background: var(--accent);
}

.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;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 1rem;
    left: 1rem;
    padding: 0.7rem 1rem;
    background: var(--accent);
    transform: translateY(-180%);
    transition: transform 0.2s;
}

.skip-link:focus {
    transform: translateY(0);
}

.panel-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 17.5rem minmax(0, 1fr);
}

.panel-sidebar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: flex;
    height: 100vh;
    min-height: 35rem;
    flex-direction: column;
    padding: 2rem 1.4rem 1.4rem;
    color: var(--paper);
    background: var(--ink);
    border-right: 1px solid var(--line-dark);
}

.panel-brand {
    display: inline-flex;
    width: max-content;
    align-items: center;
    gap: 0.65rem;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.05em;
}

.panel-brand svg {
    width: 2rem;
    height: 2rem;
    fill: none;
    stroke: var(--accent);
    stroke-linecap: round;
    stroke-width: 2.3;
}

.panel-nav {
    margin-top: clamp(3rem, 8vh, 5.5rem);
}

.panel-nav > p,
.panel-kicker {
    margin-bottom: 0.75rem;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1.3;
    text-transform: uppercase;
}

.panel-sidebar .panel-nav > p {
    padding-inline: 0.85rem;
    color: rgba(243, 241, 233, 0.46);
}

.panel-nav ul {
    display: grid;
    gap: 0.3rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.panel-nav a {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.75rem 0.85rem;
    color: rgba(243, 241, 233, 0.68);
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s, background-color 0.2s;
}

.panel-nav a:hover {
    color: var(--paper);
    background: rgba(255, 255, 255, 0.06);
}

.panel-nav a[aria-current="page"] {
    color: var(--ink);
    background: var(--accent);
}

.panel-nav a[aria-current="page"] svg {
    stroke-width: 2.1;
}

.panel-sidebar-footer {
    display: grid;
    gap: 0.6rem;
    padding-top: 1.2rem;
    margin-top: auto;
    border-top: 1px solid var(--line-dark);
}

.panel-user,
.panel-logout {
    border: 0;
    text-align: left;
}

.panel-user {
    display: grid;
    align-items: center;
    padding: 0;
    color: var(--paper);
    background: transparent;
    gap: 0.75rem;
    grid-template-columns: 2.5rem minmax(0, 1fr);
}

.panel-user strong,
.panel-user small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.panel-user strong {
    font-size: 0.83rem;
}

.panel-user small {
    color: rgba(243, 241, 233, 0.55);
    font-size: 0.7rem;
}

.panel-avatar {
    display: grid;
    width: 2.5rem;
    height: 2.5rem;
    place-items: center;
    color: var(--ink);
    background: var(--accent);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
}

.panel-logout {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.65rem 0;
    color: rgba(243, 241, 233, 0.58);
    background: transparent;
    font-size: 0.78rem;
}

.panel-logout:hover {
    color: var(--paper);
}

.panel-workspace {
    display: flex;
    min-width: 0;
    min-height: 100vh;
    flex-direction: column;
}

.panel-topbar {
    display: flex;
    min-height: 5rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem clamp(1.25rem, 4vw, 3.5rem);
    background: rgba(243, 241, 233, 0.93);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(1rem);
}

.panel-topbar > div {
    margin-right: auto;
}

.panel-topbar p {
    margin-bottom: 0;
    font-size: 0.75rem;
}

.panel-topbar .panel-kicker {
    display: none;
}

.icon-button {
    display: inline-grid;
    width: 2.75rem;
    height: 2.75rem;
    padding: 0;
    place-items: center;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 50%;
}

.icon-button:hover {
    background: var(--paper-soft);
}

.panel-menu-toggle {
    display: none;
    margin-right: 1rem;
}

.panel-topbar .icon-button {
    position: relative;
}

.notification-dot {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    width: 0.38rem;
    height: 0.38rem;
    background: var(--accent-dark);
    border-radius: 50%;
}

.panel-main {
    width: min(100%, 100rem);
    flex: 1;
    padding: clamp(2rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 3.5rem);
    margin-inline: auto;
}

.panel-footer {
    display: flex;
    justify-content: space-between;
    padding: 1.2rem clamp(1.25rem, 4vw, 3.5rem);
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 0.72rem;
}

.panel-footer p {
    margin: 0;
}

.panel-footer a {
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}

.page-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

.page-heading h1 {
    margin-bottom: 0.75rem;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
}

.page-heading h1 span {
    color: var(--muted);
}

.page-heading > div > p:last-child {
    max-width: 38rem;
    margin-bottom: 0;
    color: var(--muted);
}

.page-actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.6rem;
}

.form-help {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.6;
}

.panel-button {
    display: inline-flex;
    min-height: 2.9rem;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 0.7rem 1rem;
    border: 1px solid var(--ink);
    border-radius: var(--radius);
    font-size: 0.78rem;
    font-weight: 700;
    transition: transform 0.2s var(--ease), background-color 0.2s;
}

.panel-button:hover {
    transform: translateY(-2px);
}

.panel-button-primary {
    background: var(--accent);
}

.panel-button-primary:hover {
    background: #e0ff70;
}

.panel-button-secondary {
    color: var(--paper);
    background: var(--ink);
}

.panel-button-ghost {
    background: transparent;
    border-color: var(--line);
}

.panel-button-full {
    width: 100%;
}

.panel-text-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.76rem;
    font-weight: 700;
}

.panel-text-link:hover {
    text-decoration: underline;
    text-underline-offset: 0.3rem;
}

.metric-grid {
    display: grid;
    gap: 1px;
    margin-bottom: 1.25rem;
    background: var(--line);
    border: 1px solid var(--line);
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-grid-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-card {
    min-width: 0;
    min-height: 9.5rem;
    padding: 1.3rem;
    background: var(--surface);
}

.metric-card > p {
    margin-bottom: 1.3rem;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.metric-card strong {
    display: block;
    margin-bottom: 0.45rem;
    font-family: var(--font-display);
    font-size: clamp(1.7rem, 3.2vw, 2.7rem);
    font-weight: 500;
    letter-spacing: -0.05em;
    line-height: 1;
}

.metric-card small {
    color: var(--muted);
    font-size: 0.68rem;
}

.metric-card small.is-positive {
    color: var(--success);
}

.metric-card small.is-negative {
    color: var(--error);
}

.panel-grid {
    display: grid;
    gap: 1.25rem;
}

.panel-grid-main {
    margin-bottom: 1.25rem;
    grid-template-columns: minmax(0, 1.85fr) minmax(17rem, 0.75fr);
}

.panel-card {
    min-width: 0;
    padding: clamp(1.2rem, 3vw, 2rem);
    margin-bottom: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--line);
}

.panel-grid > .panel-card {
    margin-bottom: 0;
}

.card-heading {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.card-heading .panel-kicker {
    margin-bottom: 0.55rem;
}

.card-heading h2 {
    margin-bottom: 0;
    font-size: clamp(1.3rem, 2.4vw, 1.8rem);
}

.card-heading-tools {
    align-items: end;
}

.compact-field {
    display: grid;
    gap: 0.35rem;
    color: var(--muted);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.compact-field select {
    min-width: 8rem;
    min-height: 2.5rem;
    padding: 0.45rem 2rem 0.45rem 0.7rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 0;
    font-size: 0.75rem;
    text-transform: none;
}

.trend-chart {
    position: relative;
    min-height: 17rem;
    margin-bottom: 0;
}

.trend-chart-large {
    min-height: 22rem;
}

.trend-chart svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.trend-chart figcaption {
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.65rem;
}

.chart-grid {
    stroke: var(--line);
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.chart-area {
    fill: rgba(214, 255, 63, 0.23);
}

.chart-line-primary,
.chart-line-secondary {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
    vector-effect: non-scaling-stroke;
}

.chart-line-primary {
    stroke: var(--accent-dark);
}

.chart-line-secondary {
    stroke: var(--ink);
    stroke-width: 2;
}

.chart-label {
    fill: var(--muted);
    font: 9px var(--font-body);
}

.chart-legend {
    display: flex;
    gap: 1rem;
    padding: 0;
    margin: 0;
    color: var(--muted);
    font-size: 0.68rem;
    list-style: none;
}

.chart-legend li {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.chart-legend i {
    width: 0.65rem;
    height: 0.2rem;
}

.legend-accent {
    background: var(--accent-dark);
}

.legend-dark {
    background: var(--ink);
}

.activity-list,
.task-list {
    display: grid;
    gap: 0;
    padding: 0;
    margin: 0;
    list-style: none;
}

.activity-list li,
.task-list li {
    display: grid;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
    gap: 0.25rem;
}

.activity-list li:last-child,
.task-list li:last-child {
    border: 0;
}

.activity-list strong,
.task-list strong {
    font-size: 0.78rem;
}

.activity-list small,
.task-list small {
    color: var(--muted);
    font-size: 0.67rem;
}

.task-list li {
    padding-left: 1.8rem;
}

.task-list li::before {
    width: 0.65rem;
    height: 0.65rem;
    margin: 0.2rem 0 0 -1.8rem;
    background: var(--accent);
    border: 1px solid var(--ink);
    border-radius: 50%;
    content: "";
    grid-row: 1 / span 2;
}

.filter-bar {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.25rem;
    background: var(--paper-soft);
    border: 1px solid var(--line);
}

.table-filters {
    display: flex;
    align-items: end;
    gap: 0.55rem;
}

.search-field {
    display: flex;
    min-width: min(18rem, 100%);
    height: 2.5rem;
    align-items: center;
    gap: 0.6rem;
    padding: 0 0.7rem;
    background: var(--paper);
    border: 1px solid var(--line);
}

.search-field svg {
    width: 1rem;
    color: var(--muted);
}

.search-field input {
    width: 100%;
    min-width: 0;
    padding: 0;
    background: transparent;
    border: 0;
    outline: 0;
    font-size: 0.75rem;
}

.table-wrap {
    width: 100%;
    min-height: 8rem;
    overflow-x: auto;
}

.panel-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.panel-table th,
.panel-table td {
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.panel-table th {
    color: var(--muted);
    font-size: 0.63rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.panel-table td {
    font-size: 0.75rem;
}

.panel-table td:first-child,
.panel-table th:first-child {
    padding-left: 0;
}

.panel-table td:last-child,
.panel-table th:last-child {
    padding-right: 0;
}

.panel-table tbody tr:hover {
    background: rgba(232, 229, 220, 0.55);
}

.table-primary {
    display: block;
    font-weight: 700;
}

.table-secondary {
    display: block;
    color: var(--muted);
    font-size: 0.65rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.5rem;
    background: var(--paper-soft);
    border-radius: 2rem;
    font-size: 0.62rem;
    font-weight: 700;
}

.status-badge::before {
    width: 0.4rem;
    height: 0.4rem;
    background: currentColor;
    border-radius: 50%;
    content: "";
}

.status-paid,
.status-active {
    color: var(--success);
}

.status-overdue {
    color: var(--error);
}

.status-pending,
.status-paused {
    color: var(--warning);
}

.table-action {
    padding: 0.25rem 0.45rem;
    background: transparent;
    border: 1px solid var(--line);
    font-size: 0.65rem;
    font-weight: 700;
}

.table-actions {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.table-action:hover {
    background: var(--accent);
    border-color: var(--ink);
}

.table-state {
    display: grid;
    min-height: 9rem;
    place-items: center;
    align-content: center;
    color: var(--muted);
    text-align: center;
}

.table-state p {
    margin: 0.75rem 0 0;
    font-size: 0.75rem;
}

.table-state strong {
    color: var(--ink);
}

.loader {
    width: 1.35rem;
    height: 1.35rem;
    border: 2px solid var(--line);
    border-top-color: var(--ink);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.pagination {
    display: flex;
    justify-content: flex-end;
    gap: 0.35rem;
    padding-top: 1rem;
}

.pagination button {
    min-width: 2rem;
    height: 2rem;
    background: transparent;
    border: 1px solid var(--line);
    font-size: 0.68rem;
}

.pagination button[aria-current="page"] {
    background: var(--ink);
    color: var(--paper);
}

.progress-list {
    display: grid;
    gap: 1.25rem;
}

.progress-item header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.45rem;
    font-size: 0.7rem;
}

.progress-track {
    height: 0.35rem;
    overflow: hidden;
    background: var(--paper-soft);
}

.progress-track span {
    display: block;
    height: 100%;
    background: var(--accent-dark);
}

.profile-grid {
    display: grid;
    align-items: start;
    gap: 1.25rem;
    grid-template-columns: minmax(15rem, 0.65fr) minmax(0, 1.7fr);
}

.profile-summary {
    text-align: center;
    grid-row: span 2;
}

.profile-avatar {
    display: grid;
    width: 6rem;
    height: 6rem;
    place-items: center;
    margin: 0 auto 1.2rem;
    background: var(--accent);
    border-radius: 50%;
    font-family: var(--font-display);
    font-size: 1.5rem;
}

.profile-summary h2 {
    margin-bottom: 0.4rem;
}

.profile-summary > p {
    color: var(--muted);
    font-size: 0.78rem;
}

.profile-summary dl {
    margin: 2rem 0 0;
}

.profile-summary dl div {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-top: 1px solid var(--line);
    font-size: 0.72rem;
}

.profile-summary dt {
    color: var(--muted);
}

.profile-summary dd {
    margin: 0;
    font-weight: 700;
}

.form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-field {
    display: grid;
    gap: 0.4rem;
}

.form-field-wide {
    grid-column: 1 / -1;
}

.form-field label,
.label-row {
    font-size: 0.7rem;
    font-weight: 700;
}

.label-row {
    display: flex;
    justify-content: space-between;
}

.label-row a {
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    min-height: 3rem;
    padding: 0.7rem 0.8rem;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 0;
    outline: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field textarea {
    resize: vertical;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 2px var(--accent);
}

.form-field [aria-invalid="true"] {
    border-color: var(--error);
}

.field-error {
    min-height: 1em;
    color: var(--error);
    font-size: 0.62rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.password-field {
    position: relative;
    display: block;
}

.password-field input {
    padding-right: 5.5rem;
}

.password-field button {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    padding: 0;
    color: var(--muted);
    background: transparent;
    border: 0;
    font-size: 0.65rem;
    font-weight: 700;
    transform: translateY(-50%);
}

.check-field {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.68rem;
}

.check-field input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent-dark);
}

.form-status {
    min-height: 1.2rem;
    margin: 0;
    color: var(--error);
    font-size: 0.68rem;
    text-align: center;
}

.panel-modal {
    width: min(42rem, calc(100% - 2rem));
    max-height: calc(100vh - 2rem);
    padding: 0;
    background: var(--surface);
    border: 0;
    box-shadow: var(--shadow);
}

.panel-modal::backdrop {
    background: rgba(17, 17, 15, 0.72);
    backdrop-filter: blur(0.25rem);
}

.modal-surface {
    padding: clamp(1.2rem, 4vw, 2rem);
}

.modal-surface > header,
.modal-surface > footer {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
}

.modal-surface > header {
    margin-bottom: 1.75rem;
}

.modal-surface > header h2 {
    margin: 0;
    font-size: 2rem;
}

.modal-surface > footer {
    justify-content: flex-end;
    padding-top: 1.5rem;
}

.toast-region {
    position: fixed;
    z-index: 100;
    right: 1rem;
    bottom: 1rem;
    display: grid;
    width: min(23rem, calc(100% - 2rem));
    gap: 0.6rem;
}

.toast {
    display: grid;
    align-items: start;
    padding: 0.9rem 1rem;
    color: var(--paper);
    background: var(--ink);
    border-left: 0.3rem solid var(--accent);
    box-shadow: var(--shadow);
    grid-template-columns: 1fr auto;
    animation: toast-in 0.3s var(--ease);
}

.toast.is-error {
    border-color: #ff776b;
}

.toast p {
    margin: 0;
    font-size: 0.75rem;
}

.toast button {
    padding: 0 0 0 1rem;
    color: inherit;
    background: transparent;
    border: 0;
}

.skeleton {
    display: block;
    color: transparent;
    background: linear-gradient(90deg, var(--paper-soft) 20%, #f7f5ee 50%, var(--paper-soft) 80%);
    background-size: 220% 100%;
    border-radius: 0.15rem;
    animation: shimmer 1.4s infinite linear;
}

.skeleton-value {
    width: 65%;
    height: 2.4rem;
}

.skeleton-line {
    width: 45%;
    height: 0.65rem;
}

.skeleton-row {
    width: 100%;
    height: 3.2rem;
}

.chart-skeleton {
    width: 100%;
    height: 17rem;
}

.sidebar-backdrop {
    display: none;
}

.panel-auth-body {
    min-height: 100vh;
    color: var(--paper);
    background: var(--ink);
}

.auth-header,
.auth-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem clamp(1.25rem, 5vw, 4rem);
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(243, 241, 233, 0.65);
    font-size: 0.7rem;
}

.auth-back svg {
    transform: rotate(180deg);
}

.auth-main {
    position: relative;
    display: grid;
    width: min(100% - 2.5rem, 78rem);
    min-height: calc(100vh - 10rem);
    align-items: center;
    gap: clamp(3rem, 8vw, 9rem);
    padding-block: 3rem;
    margin-inline: auto;
    grid-template-columns: minmax(0, 1.2fr) minmax(20rem, 0.8fr);
}

.auth-main::before {
    position: absolute;
    z-index: -1;
    top: 3%;
    left: 23%;
    width: clamp(16rem, 40vw, 34rem);
    height: clamp(16rem, 40vw, 34rem);
    border: 1px solid rgba(214, 255, 63, 0.22);
    border-radius: 50%;
    content: "";
    box-shadow: 0 0 8rem rgba(214, 255, 63, 0.06);
}

.auth-intro h1 {
    margin-bottom: 1.5rem;
    font-size: clamp(3.5rem, 9vw, 8rem);
}

.auth-intro h1 span {
    color: var(--accent);
}

.auth-intro > p:last-child {
    max-width: 31rem;
    color: rgba(243, 241, 233, 0.62);
}

.auth-card {
    padding: clamp(1.5rem, 4vw, 2.8rem);
    color: var(--ink);
    background: var(--paper);
    box-shadow: 0 2rem 6rem rgba(0, 0, 0, 0.28);
}

.auth-card > header {
    margin-bottom: 2rem;
}

.auth-card h2 {
    margin: 0;
    font-size: 2.4rem;
}

.auth-card form {
    display: grid;
    gap: 1rem;
}

.auth-help {
    padding-top: 1.2rem;
    margin-top: 1.2rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.68rem;
    text-align: center;
}

.auth-help p {
    margin: 0;
}

.auth-help a {
    color: var(--ink);
    font-weight: 700;
    text-decoration: underline;
}

.auth-footer {
    color: rgba(243, 241, 233, 0.45);
    font-size: 0.62rem;
}

.auth-footer p {
    margin: 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes shimmer {
    to { background-position: -220% 0; }
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(1rem); }
}

@media (max-width: 68rem) {
    .panel-shell {
        display: block;
    }

    .panel-sidebar {
        position: fixed;
        left: 0;
        width: min(19rem, 86vw);
        transform: translateX(-105%);
        transition: transform 0.35s var(--ease);
    }

    .is-nav-open .panel-sidebar {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        position: fixed;
        z-index: 20;
        inset: 0;
        width: 100%;
        height: 100%;
        padding: 0;
        background: rgba(17, 17, 15, 0.62);
        border: 0;
    }

    .is-nav-open .sidebar-backdrop {
        display: block;
    }

    .panel-topbar {
        position: sticky;
        z-index: 10;
        top: 0;
    }

    .panel-topbar .panel-kicker,
    .panel-menu-toggle {
        display: inline-grid;
    }

    .panel-topbar .panel-kicker {
        margin: 0;
    }

    .panel-topbar > div > p:last-child {
        display: none;
    }

    .panel-grid-main {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 48rem) {
    .page-heading,
    .card-heading-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .page-heading .panel-button {
        width: 100%;
    }

    .page-actions {
        width: 100%;
    }

    .metric-grid,
    .metric-grid-three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .table-filters {
        display: grid;
        width: 100%;
        grid-template-columns: 1fr 1fr;
    }

    .search-field {
        max-width: none;
        grid-column: 1 / -1;
    }

    .filter-bar {
        justify-content: stretch;
    }

    .filter-bar .compact-field {
        flex: 1;
    }

    .filter-bar select {
        width: 100%;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-summary {
        grid-row: auto;
    }

    .auth-main {
        align-content: center;
        grid-template-columns: 1fr;
    }

    .auth-intro {
        padding-top: 2rem;
    }

    .auth-intro h1 {
        font-size: clamp(3.2rem, 16vw, 5.5rem);
    }

    .auth-intro > p:last-child {
        display: none;
    }

    .auth-main::before {
        left: 20%;
    }
}

@media (max-width: 34rem) {
    .panel-main {
        padding-inline: 1rem;
    }

    .panel-topbar,
    .panel-footer {
        padding-inline: 1rem;
    }

    .panel-footer p {
        display: none;
    }

    .metric-grid,
    .metric-grid-three {
        grid-template-columns: 1fr;
    }

    .metric-card {
        min-height: 8rem;
    }

    .form-grid,
    .table-filters {
        grid-template-columns: 1fr;
    }

    .search-field,
    .form-field-wide {
        grid-column: auto;
    }

    .card-heading {
        flex-direction: column;
    }

    .chart-legend {
        flex-wrap: wrap;
    }

    .auth-header {
        padding-bottom: 0;
    }

    .auth-header .auth-back {
        font-size: 0;
    }

    .auth-main {
        width: min(100% - 2rem, 30rem);
        padding-top: 1rem;
        gap: 2rem;
    }

    .auth-footer {
        justify-content: center;
    }

    .auth-footer p:last-child {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
