:root {
    --ink: #18211d;
    --ink-soft: #526059;
    --paper: #f3f6f4;
    --panel: #ffffff;
    --line: #dce3df;
    --line-strong: #c5d0ca;
    --green: #1f6d4c;
    --green-soft: #e5f2eb;
    --orange: #b85d22;
    --orange-soft: #fff0e4;
    --red: #a63b35;
    --red-soft: #fbe9e7;
    --blue: #315e7b;
    --shadow: 0 16px 38px rgba(28, 46, 37, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--paper);
    color: var(--ink);
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(24, 33, 29, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
        var(--paper);
}

button,
input {
    font: inherit;
}

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

a {
    color: inherit;
}

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

.app-sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 100vh;
    padding: 22px 16px 18px;
    display: flex;
    flex-direction: column;
    background: #18211d;
    color: white;
}

.sidebar-brand {
    min-height: 44px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: inherit;
    text-decoration: none;
}

.sidebar-brand__mark {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    display: grid;
    place-items: center;
    background: #f4f6f4;
    color: var(--ink);
    font-size: 17px;
    font-weight: 850;
}

.sidebar-brand strong,
.sidebar-brand small {
    display: block;
}

.sidebar-brand strong {
    font-size: 14px;
    line-height: 1.2;
}

.sidebar-brand small {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.48);
    font-size: 10px;
    letter-spacing: 0.04em;
}

.sidebar-nav {
    margin-top: 34px;
}

.sidebar-nav__label {
    display: block;
    padding: 0 10px 9px;
    color: rgba(255, 255, 255, 0.36);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.sidebar-link {
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.64);
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}

.sidebar-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-link.is-active {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.09);
    color: white;
}

.sidebar-link__mark {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    color: #a8d7be;
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 9px;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-status {
    padding: 0 8px 16px;
}

.sidebar-status span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
}

.sidebar-status i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #45b781;
    box-shadow: 0 0 0 4px rgba(69, 183, 129, 0.11);
}

.sidebar-status small {
    display: block;
    margin: 7px 0 0 14px;
    color: rgba(255, 255, 255, 0.32);
    font-size: 9px;
}

.sidebar-storage {
    margin: 0 8px 14px;
    padding: 11px 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.035);
}

.sidebar-storage__heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.sidebar-storage__heading span {
    color: rgba(255, 255, 255, 0.42);
    font-size: 9px;
    font-weight: 750;
}

.sidebar-storage__heading strong {
    color: rgba(255, 255, 255, 0.78);
    font-size: 10px;
    font-variant-numeric: tabular-nums;
}

.sidebar-storage__meter {
    height: 3px;
    margin-top: 9px;
    overflow: hidden;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.09);
}

.sidebar-storage__meter span {
    width: 0;
    height: 100%;
    display: block;
    border-radius: inherit;
    background: #67b991;
}

.sidebar-storage small {
    margin-top: 7px;
    display: block;
    color: rgba(255, 255, 255, 0.3);
    font-size: 8px;
    font-variant-numeric: tabular-nums;
}

.sidebar-user {
    min-width: 0;
    padding: 10px 8px 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.sidebar-user__avatar {
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    border-radius: 5px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.1);
    color: #b6dcc8;
    font-size: 11px;
    font-weight: 800;
}

.sidebar-user > div {
    min-width: 0;
    flex: 1;
}

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

.sidebar-user strong {
    color: white;
    font-size: 11px;
}

.sidebar-user small {
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.38);
    font-size: 9px;
}

.sidebar-user form {
    margin: 0;
}

.sidebar-user .logout-button {
    color: rgba(255, 255, 255, 0.52);
}

.sidebar-user .logout-button:hover {
    color: white;
}

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

.topbar {
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
}

.topbar--workspace .topbar__inner {
    min-height: 64px;
}

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

.workspace-heading > div {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.workspace-heading > div span {
    color: #85928b;
}

.workspace-heading > div span::after {
    content: "/";
    margin-left: 8px;
    color: #c1cbc5;
}

.workspace-heading strong {
    color: var(--ink);
}

.sidebar-toggle {
    display: none;
    width: 34px;
    height: 34px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: white;
    cursor: pointer;
}

.sidebar-toggle span {
    width: 100%;
    height: 1px;
    margin: 3px 0;
    display: block;
    background: var(--ink);
}

.sidebar-backdrop {
    display: none;
}

.topbar__inner {
    width: min(1440px, calc(100% - 40px));
    min-height: 72px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.brand__mark {
    width: 36px;
    height: 36px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    background: var(--ink);
    color: white;
    font-size: 18px;
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
}

.brand strong {
    font-size: 15px;
    line-height: 1.2;
}

.brand small {
    margin-top: 3px;
    color: var(--ink-soft);
    font-size: 11px;
}

.topbar__meta {
    display: flex;
    align-items: center;
    gap: 22px;
    color: var(--ink-soft);
    font-size: 12px;
}

.server-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.server-indicator i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #35a06d;
    box-shadow: 0 0 0 4px rgba(53, 160, 109, 0.12);
}

.clock {
    min-width: 110px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 18px;
    border-left: 1px solid var(--line);
}

.user-menu__avatar {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    display: grid;
    place-items: center;
    background: var(--green-soft);
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
}

.user-menu__name {
    max-width: 100px;
    overflow: hidden;
    color: var(--ink);
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu form {
    margin: 0;
}

.logout-button {
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    font-size: 11px;
    cursor: pointer;
}

.logout-button:hover {
    color: var(--red);
    text-decoration: underline;
}

.page-shell {
    width: min(1440px, calc(100% - 40px));
    margin: 0 auto;
    padding: 42px 0 56px;
}

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

.eyebrow {
    margin: 0 0 8px;
    color: var(--green);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
}

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

h1 {
    margin-bottom: 8px;
    font-size: clamp(28px, 3vw, 40px);
    letter-spacing: -0.025em;
}

.heading-copy {
    margin-bottom: 0;
    color: var(--ink-soft);
    font-size: 14px;
}

.button {
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

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

.button--primary {
    background: var(--ink);
    color: white;
}

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

.button--secondary {
    border-color: var(--line-strong);
    background: white;
    color: var(--ink);
}

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

.button--danger {
    border-color: #d8aaa5;
    background: var(--red-soft);
    color: #852e29;
}

.button--danger:hover {
    border-color: var(--red);
}

.notice {
    margin-bottom: 20px;
    padding: 13px 16px;
    border: 1px solid;
    border-radius: 6px;
    font-size: 13px;
}

.notice--success {
    border-color: #b9ddca;
    background: var(--green-soft);
    color: #17543b;
}

.notice--danger {
    border-color: #e9c0bc;
    background: var(--red-soft);
    color: #7d2a25;
}

.auth-banner {
    margin-bottom: 24px;
    padding: 24px;
    border: 1px solid #b8d9c7;
    border-left: 4px solid var(--green);
    border-radius: 7px;
    background: #f8fcf9;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
}

.auth-banner__content {
    min-width: 0;
    flex: 1;
}

.auth-banner__label {
    display: inline-block;
    margin-bottom: 7px;
    color: var(--green);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.auth-banner h2 {
    margin-bottom: 6px;
    font-size: 20px;
}

.auth-banner p {
    margin-bottom: 16px;
    color: var(--ink-soft);
    font-size: 13px;
}

.auth-link-row {
    display: flex;
    gap: 8px;
}

.auth-link-input {
    width: 100%;
    min-width: 0;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    background: white;
    color: var(--ink-soft);
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 12px;
}

.code-line {
    margin-top: 10px;
    color: var(--ink-soft);
    font-size: 12px;
}

.code-line strong {
    margin-left: 6px;
    color: var(--ink);
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    letter-spacing: 0.04em;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.metric {
    min-height: 142px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel);
    display: flex;
    flex-direction: column;
}

.metric span {
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
}

.metric strong {
    margin: 14px 0 auto;
    font-size: 36px;
    font-weight: 750;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.metric small {
    color: #718078;
    font-size: 11px;
}

.metric--ink {
    border-color: var(--ink);
    background: var(--ink);
    color: white;
}

.metric--ink span,
.metric--ink small {
    color: rgba(255, 255, 255, 0.64);
}

.metric--accent {
    border-color: #e7c9b1;
    background: var(--orange-soft);
}

.metric--accent span,
.metric--accent small {
    color: #7a4b2b;
}

.metric--canvas {
    border-color: #cbdde7;
    background: #eef5f8;
}

.metric--canvas span,
.metric--canvas small {
    color: #46677a;
}

.table-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.table-panel__header {
    min-height: 82px;
    padding: 18px 22px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.table-panel__header h2 {
    margin-bottom: 5px;
    font-size: 17px;
}

.table-panel__header p {
    margin-bottom: 0;
    color: var(--ink-soft);
    font-size: 12px;
}

.record-count {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    color: var(--ink-soft);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.account-table__head,
.account-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.45fr) minmax(120px, 0.8fr) minmax(130px, 0.85fr) minmax(120px, 0.75fr) minmax(130px, 0.8fr) minmax(220px, 1.15fr);
    gap: 18px;
    align-items: center;
}

.account-table__head {
    min-height: 42px;
    padding: 0 22px;
    border-bottom: 1px solid var(--line);
    background: #f8faf9;
    color: #718078;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.account-row {
    min-height: 92px;
    padding: 15px 22px;
    border-bottom: 1px solid var(--line);
}

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

.account-row:hover {
    background: #fbfcfb;
}

.account-identity {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.account-avatar {
    flex: 0 0 37px;
    width: 37px;
    height: 37px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    display: grid;
    place-items: center;
    background: #eef3f0;
    color: var(--green);
    font-size: 15px;
    font-weight: 800;
}

.account-identity strong,
.account-identity span,
.account-identity small {
    display: block;
}

.account-identity strong {
    max-width: 100%;
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-identity span {
    margin-top: 5px;
    color: #7a8780;
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 10px;
}

.cli-type-label {
    margin-top: 5px;
    color: var(--green);
    font-size: 9px;
    font-weight: 750;
}

.account-team {
    margin-top: 3px;
    color: #68766e;
    font-size: 9px;
}

.muted-label {
    margin-top: 4px;
    color: var(--red);
    font-size: 10px;
}

.account-cell {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    color: var(--ink-soft);
    font-size: 12px;
}

.account-credit {
    align-items: flex-start;
    flex-direction: column;
}

.account-credit > strong {
    color: var(--ink);
    font-size: 17px;
    font-variant-numeric: tabular-nums;
}

.badge {
    width: fit-content;
    max-width: 100%;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 750;
    line-height: 1.2;
}

.badge i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.badge--success {
    border-color: #bfddca;
    background: var(--green-soft);
    color: #205d43;
}

.badge--pending {
    border-color: #c6d7df;
    background: #eaf2f6;
    color: var(--blue);
}

.badge--warning {
    border-color: #efcfb8;
    background: var(--orange-soft);
    color: #875024;
}

.badge--danger {
    border-color: #ebc2be;
    background: var(--red-soft);
    color: var(--red);
}

.badge--neutral {
    border-color: var(--line);
    background: #f3f5f4;
    color: #627069;
}

.inline-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--green);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.inline-link:hover {
    text-decoration: underline;
}

.subvalue,
.error-copy {
    width: 100%;
    color: #7a8780;
    font-size: 10px;
}

.error-copy {
    color: var(--red);
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 5px 10px;
}

.account-actions form {
    margin: 0;
}

.account-details {
    grid-column: 1 / -1;
    padding-top: 13px;
    border-top: 1px dashed var(--line);
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 12px;
}

.account-details div {
    min-width: 0;
}

.account-details span,
.account-details strong {
    display: block;
}

.account-details span {
    margin-bottom: 5px;
    color: #88958e;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.04em;
}

.account-details strong {
    overflow: hidden;
    color: #536159;
    font-size: 10px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.priority-control > span {
    margin-bottom: 4px;
    color: #88958e;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0.04em;
}

.priority-control > div {
    display: flex;
    align-items: center;
    gap: 5px;
}

.priority-control input {
    width: 58px;
    height: 25px;
    padding: 0 6px;
    border: 1px solid var(--line-strong);
    border-radius: 3px;
    background: white;
    color: var(--ink);
    font-size: 10px;
}

.priority-control button {
    padding: 3px 0;
    border: 0;
    background: transparent;
    color: var(--green);
    font-size: 9px;
    font-weight: 750;
    cursor: pointer;
}

.text-button {
    padding: 2px 0;
    border: 0;
    background: transparent;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
}

.text-button:hover {
    color: var(--green);
    text-decoration: underline;
}

.text-button--danger:hover {
    color: var(--red);
}

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

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

.empty-state__mark {
    margin-bottom: 18px;
    color: #b6c2bb;
    font-size: 54px;
    font-weight: 300;
    letter-spacing: -0.06em;
}

.empty-state h2 {
    margin-bottom: 8px;
    font-size: 20px;
}

.empty-state p {
    max-width: 440px;
    margin-bottom: 22px;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.7;
}

.pagination-wrap {
    padding: 14px 20px;
    border-top: 1px solid var(--line);
}

.pagination-wrap nav,
.pagination-wrap > div {
    width: 100%;
}

.pagination-wrap nav > div:first-child {
    display: none;
}

.pagination-wrap nav > div:last-child,
.pagination-wrap > div {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.pagination-wrap a,
.pagination-wrap span {
    min-width: 32px;
    min-height: 32px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: white;
    color: var(--ink-soft);
    font-size: 11px;
    text-decoration: none;
}

.pagination-wrap span[aria-current="page"] {
    border-color: var(--ink);
    background: var(--ink);
    color: white;
}

.modal {
    width: min(520px, calc(100% - 28px));
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ink);
}

.modal::backdrop {
    background: rgba(16, 26, 21, 0.5);
    backdrop-filter: blur(3px);
}

.modal__panel {
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: white;
    box-shadow: 0 24px 70px rgba(15, 30, 22, 0.2);
}

.modal--task {
    width: min(980px, calc(100% - 28px));
    max-width: none;
}

.modal__panel--task {
    max-height: 90vh;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal__panel--task .modal__header {
    flex: 0 0 auto;
    padding: 24px 24px 0;
}

.media-preview {
    width: min(1040px, calc(100% - 28px));
    max-width: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: white;
}

.media-preview::backdrop {
    background: rgba(9, 15, 12, 0.82);
    backdrop-filter: blur(5px);
}

.media-preview__panel {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 7px;
    background: #111815;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.45);
}

.media-preview__header,
.media-preview__footer {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.media-preview__header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.media-preview__header .eyebrow {
    color: rgba(255, 255, 255, 0.46);
}

.media-preview__header h2 {
    margin: 3px 0 0;
    color: white;
    font-size: 18px;
}

.media-preview__header .icon-button {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: white;
}

.media-preview__stage {
    min-height: 260px;
    padding: 18px;
    display: grid;
    place-items: center;
    background:
        linear-gradient(45deg, rgba(255, 255, 255, 0.025) 25%, transparent 25%) 0 0 / 24px 24px,
        #0a0f0c;
}

.media-preview__stage video,
.media-preview__stage img {
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 250px);
    border-radius: 4px;
    object-fit: contain;
}

.media-preview__stage [hidden] {
    display: none;
}

.media-preview__footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.media-preview__footer > span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 10px;
}

.task-form--modal {
    min-height: 0;
    margin-top: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.task-form__body {
    min-height: 0;
    padding: 20px 24px 24px;
    overflow-y: auto;
    display: grid;
    gap: 16px;
}

.form-actions--sticky {
    position: static;
    z-index: 5;
    flex: 0 0 auto;
    margin: 0;
    padding: 16px 24px;
    border-top: 1px solid var(--line);
    background: rgba(250, 252, 251, 0.97);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.form-actions__hint {
    color: #7f8c85;
    font-size: 10px;
}

.form-actions__buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-actions__buttons .button {
    min-width: 104px;
}

.form-actions__buttons .button--primary {
    min-width: 132px;
}

.modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.modal__header h2 {
    margin-bottom: 0;
    font-size: 22px;
}

.modal__copy {
    margin: 17px 0 22px;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.7;
}

.cli-choice {
    margin: 0 0 20px;
    padding: 0;
    border: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.cli-choice legend {
    width: 100%;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 700;
}

.cli-choice label {
    cursor: pointer;
}

.cli-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cli-choice label > span {
    min-height: 66px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 5px;
    background: #fafcfb;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cli-choice input:checked + span {
    border-color: var(--green);
    background: var(--green-soft);
    box-shadow: 0 0 0 2px rgba(31, 109, 76, 0.08);
}

.cli-choice strong,
.cli-choice small {
    display: block;
}

.cli-choice strong {
    font-size: 11px;
}

.cli-choice small {
    margin-top: 5px;
    color: var(--ink-soft);
    font-size: 9px;
    line-height: 1.45;
}

.icon-button {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 5px;
    display: grid;
    place-items: center;
    background: white;
    color: var(--ink-soft);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.field {
    display: grid;
    gap: 8px;
}

.field span {
    font-size: 12px;
    font-weight: 700;
}

.field input {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    background: #fbfcfb;
    color: var(--ink);
    outline: none;
}

.field input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(31, 109, 76, 0.1);
}

.modal__actions {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.login-page {
    min-height: calc(100vh - 155px);
    padding: 48px 0 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
    align-items: center;
    gap: clamp(50px, 9vw, 150px);
}

.login-intro {
    max-width: 620px;
}

.login-intro h1 {
    margin-bottom: 22px;
    font-size: clamp(42px, 5vw, 72px);
    line-height: 1.08;
    letter-spacing: -0.045em;
}

.login-intro > p:not(.eyebrow) {
    max-width: 430px;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.8;
}

.login-status {
    margin-top: 40px;
    padding-top: 18px;
    border-top: 1px solid var(--line-strong);
    display: flex;
    flex-wrap: wrap;
    gap: 20px 34px;
    color: #6e7c74;
    font-size: 11px;
}

.login-status span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.login-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #35a06d;
    box-shadow: 0 0 0 4px rgba(53, 160, 109, 0.12);
}

.login-panel {
    padding: 30px;
    border: 1px solid var(--line);
    border-top: 3px solid var(--ink);
    border-radius: 7px;
    background: white;
    box-shadow: 0 24px 70px rgba(26, 48, 36, 0.1);
}

.login-panel__header {
    margin-bottom: 28px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.login-panel__header h2 {
    margin-bottom: 0;
    font-size: 26px;
}

.login-panel__index {
    flex: 0 0 auto;
    color: #a3afa8;
    font-size: 13px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.login-form {
    display: grid;
    gap: 18px;
}

.login-form .field input {
    height: 46px;
}

.check-field {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ink-soft);
    font-size: 12px;
    cursor: pointer;
}

.check-field input {
    width: 15px;
    height: 15px;
    accent-color: var(--green);
}

.login-submit {
    width: 100%;
    min-height: 46px;
}

.form-alert {
    margin-bottom: 18px;
    padding: 11px 12px;
    border: 1px solid #e9c0bc;
    border-radius: 5px;
    background: var(--red-soft);
    color: #7d2a25;
    font-size: 12px;
    line-height: 1.6;
}

.login-footnote {
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: #8b9790;
    font-size: 10px;
    text-align: center;
}

.task-heading {
    align-items: center;
}

.heading-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.task-form {
    display: grid;
    gap: 16px;
}

.form-section {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: white;
}

.form-section__header {
    margin-bottom: 22px;
    display: flex;
    align-items: flex-start;
    gap: 13px;
}

.form-section__index {
    margin-top: 2px;
    color: #a5b0aa;
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 10px;
}

.form-section__header h2 {
    margin-bottom: 4px;
    font-size: 17px;
}

.form-section__header p {
    margin-bottom: 0;
    color: var(--ink-soft);
    font-size: 11px;
}

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

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

.field select,
.field textarea {
    width: 100%;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    background: #fbfcfb;
    color: var(--ink);
    outline: none;
}

.field select {
    height: 44px;
}

.field textarea {
    min-height: 116px;
    padding-top: 11px;
    padding-bottom: 11px;
    line-height: 1.65;
    resize: vertical;
}

.field-hint {
    color: #7d8a83;
    font-size: 9px;
    line-height: 1.5;
}

.field select:focus,
.field textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(31, 109, 76, 0.1);
}

.asset-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.asset-field {
    min-width: 0;
    min-height: 150px;
    padding: 16px;
    border: 1px dashed var(--line-strong);
    border-radius: 6px;
    background: #fafcfb;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: border-color 150ms ease, background 150ms ease;
}

.asset-field:hover {
    border-color: var(--green);
    background: #f7fbf8;
}

.asset-field--wide {
    max-width: none;
}

.asset-field__type {
    margin-bottom: 9px;
    color: var(--green);
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.asset-field strong {
    font-size: 13px;
}

.asset-field small {
    margin: 6px 0 15px;
    color: #7d8a83;
    font-size: 10px;
    line-height: 1.6;
}

.asset-field input[type="file"] {
    width: 100%;
    margin-top: auto;
    color: var(--ink-soft);
    font-size: 10px;
}

.asset-field input[type="file"]::file-selector-button {
    height: 30px;
    margin-right: 8px;
    padding: 0 10px;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    background: white;
    color: var(--ink);
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}

.file-selection {
    margin-top: 8px;
    color: var(--green);
    font-size: 10px;
}

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

.form-actions {
    padding: 8px 0 20px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.form-actions form {
    margin: 0;
}

.task-list-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: white;
    box-shadow: var(--shadow);
}

.task-list-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.task-list-header h2 {
    margin-bottom: 4px;
    font-size: 17px;
}

.task-list-header p {
    margin-bottom: 0;
    color: var(--ink-soft);
    font-size: 11px;
}

.table-panel__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-panel__actions .button {
    min-height: 36px;
}

.task-filters {
    display: flex;
    align-items: center;
    gap: 7px;
}

.task-filters input,
.task-filters select {
    height: 36px;
    padding: 0 9px;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    background: #fbfcfb;
    color: var(--ink);
    font-size: 11px;
}

.task-filters input {
    width: 190px;
}

.task-filters .button {
    min-height: 36px;
    font-size: 11px;
}

.task-records {
    display: grid;
}

.task-record {
    border-bottom: 1px solid var(--line);
}

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

.task-record__layout {
    padding: 16px 20px;
    display: grid;
    grid-template-columns: 176px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
}

.task-record__cover {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background:
        linear-gradient(135deg, rgba(50, 82, 64, 0.12), rgba(50, 82, 64, 0.03)),
        #f2f5f3;
    color: var(--ink);
}

.task-record__cover:not(:disabled) {
    cursor: zoom-in;
}

.task-record__cover:not(:disabled):hover {
    border-color: var(--green);
}

.task-record__cover video,
.task-record__cover img {
    width: 100%;
    height: 100%;
    display: block;
    background: #111815;
    object-fit: contain;
}

.task-cover__state {
    height: 100%;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
}

.task-cover__mark {
    width: 28px;
    height: 28px;
    margin-bottom: 2px;
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    display: grid;
    place-items: center;
    background: white;
    color: var(--green);
    font-size: 10px;
    font-weight: 850;
}

.task-cover__state strong {
    font-size: 11px;
}

.task-cover__state small {
    color: var(--ink-soft);
    font-size: 8px;
}

.task-cover__play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(9, 16, 12, 0.72);
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.24);
}

.task-cover__play::after {
    position: absolute;
    top: 50%;
    left: 52%;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 9px solid white;
    content: "";
    transform: translate(-50%, -50%);
}

.task-cover__expand {
    position: absolute;
    right: 7px;
    bottom: 7px;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: grid;
    place-items: center;
    background: rgba(9, 16, 12, 0.68);
    color: white;
    font-size: 12px;
}

.task-cover__expand::after {
    content: "↗";
}

.task-record__content {
    min-width: 0;
}

.task-record__main {
    padding: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.task-record__identity {
    min-width: 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.task-record__title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.task-record__title a {
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.task-record__title a:hover {
    text-decoration: underline;
}

.task-id {
    padding: 2px 5px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: #f5f7f6;
    color: #66746c;
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 9px;
    font-weight: 750;
    letter-spacing: 0;
}

.task-id--large {
    position: relative;
    top: -5px;
    border: 0;
    background: transparent;
    color: #89958f;
    font-size: 15px;
    font-weight: 600;
}

.task-record__identity p {
    max-width: 720px;
    margin: 6px 0 0;
    color: var(--ink-soft);
    font-size: 11px;
    line-height: 1.6;
}

.task-record__uid {
    margin-top: 7px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.task-record__uid span {
    color: #89958f;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.task-record__uid code {
    max-width: 100%;
    overflow: hidden;
    color: #66746c;
    font-size: 9px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-record__meta {
    padding: 13px 0 0;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 12px;
}

.task-record__meta span,
.task-record__meta strong {
    display: block;
}

.task-record__meta span {
    margin-bottom: 4px;
    color: #89958f;
    font-size: 9px;
    font-weight: 750;
}

.task-record__meta strong {
    overflow: hidden;
    color: #55625b;
    font-size: 10px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-record__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.task-record__actions a {
    text-decoration: none;
}

.task-record__actions form {
    margin: 0;
}

.task-record__timeline {
    margin-top: 12px;
    padding-top: 11px;
    border-top: 1px dashed var(--line);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.task-record__timeline span,
.task-record__timeline strong {
    display: block;
}

.task-record__timeline span {
    margin-bottom: 4px;
    color: #89958f;
    font-size: 9px;
    font-weight: 750;
}

.task-record__timeline strong {
    color: #55625b;
    font-size: 10px;
    font-weight: 650;
}

.task-detail-hero {
    margin-bottom: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--green);
    border-radius: 7px;
    background: white;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.task-detail-hero h2 {
    margin: 12px 0 5px;
    font-size: 21px;
}

.task-detail-hero p {
    margin-bottom: 0;
    color: var(--ink-soft);
    font-size: 11px;
}

.task-detail-hero code {
    padding: 7px 9px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: #f7f9f8;
    color: var(--ink-soft);
    font-size: 10px;
}

.task-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.8fr);
    gap: 16px;
    margin-bottom: 16px;
}

.detail-panel {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: white;
}

.detail-panel h2 {
    margin-bottom: 15px;
    font-size: 15px;
}

.prompt-content {
    color: #435048;
    font-size: 13px;
    line-height: 1.8;
    white-space: pre-wrap;
}

.detail-list {
    margin: 0;
    display: grid;
    gap: 10px;
}

.detail-list div {
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.detail-list div:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.detail-list dt {
    color: #87938c;
    font-size: 10px;
}

.detail-list dd {
    margin: 0;
    color: var(--ink);
    font-size: 11px;
    font-weight: 700;
    text-align: right;
}

.task-assets {
    margin-bottom: 16px;
}

.task-results {
    margin-bottom: 16px;
}

.result-heading {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.result-heading h2 {
    margin-bottom: 3px;
}

.result-heading p {
    margin: 0;
    color: var(--ink-soft);
    font-size: 10px;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
}

.result-item {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8faf9;
}

.result-item video,
.result-item img {
    width: 100%;
    max-height: 420px;
    display: block;
    background: #111;
    object-fit: contain;
}

.result-audio {
    min-height: 100px;
    padding: 22px 14px;
    display: grid;
    place-items: center;
    background: #111;
}

.result-audio audio {
    width: 100%;
}

.result-item > div {
    padding: 11px 12px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px 10px;
}

.result-item span {
    min-width: 0;
    flex: 1 1 100%;
    overflow: hidden;
    font-size: 11px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.result-item small {
    color: var(--ink-soft);
    font-size: 9px;
}

.result-item a {
    margin-left: auto;
    color: var(--green);
    font-size: 10px;
    font-weight: 750;
    text-decoration: none;
}

.result-item a:hover {
    text-decoration: underline;
}

.resource-list {
    margin-top: 14px;
    display: grid;
    gap: 7px;
}

.resource-item {
    min-width: 0;
    padding: 9px 11px;
    border: 1px solid var(--line);
    border-radius: 5px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto auto;
    align-items: center;
    gap: 10px;
    background: #f8faf9;
}

.resource-item code {
    overflow: hidden;
    color: var(--ink);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.resource-item > span:not(.badge),
.resource-item small {
    color: var(--ink-soft);
    font-size: 9px;
}

.resource-download {
    color: var(--green);
    font-size: 10px;
    font-weight: 750;
    text-decoration: none;
}

.resource-download:hover {
    text-decoration: underline;
}

.task-attempts {
    margin-bottom: 16px;
}

.attempt-list {
    display: grid;
    gap: 8px;
}

.attempt-item {
    padding: 11px 12px;
    border: 1px solid var(--line);
    border-radius: 5px;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.attempt-number {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: grid;
    place-items: center;
    background: #f0f4f1;
    color: var(--green);
    font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
    font-size: 9px;
    font-weight: 800;
}

.attempt-item strong,
.attempt-item small {
    display: block;
}

.attempt-item strong {
    font-size: 11px;
}

.attempt-item small {
    margin-top: 3px;
    color: var(--ink-soft);
    font-size: 9px;
}

.attempt-item p {
    grid-column: 2 / -1;
    margin: 0;
    color: var(--red);
    font-size: 10px;
    line-height: 1.5;
}

.asset-list + .asset-list {
    margin-top: 18px;
}

.asset-list h3 {
    margin-bottom: 8px;
    color: var(--ink-soft);
    font-size: 11px;
}

.reference-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 12px;
}

.reference-media-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #f8faf9;
}

.reference-image-link {
    aspect-ratio: 1;
    display: block;
    overflow: hidden;
    background: #111815;
}

.reference-image-link img,
.reference-media-card video {
    width: 100%;
    height: 100%;
    display: block;
    background: #111815;
    object-fit: contain;
}

.reference-media-card video {
    aspect-ratio: 16 / 9;
}

.reference-audio {
    min-height: 82px;
    padding: 20px 12px;
    display: grid;
    place-items: center;
    background: #f0f4f1;
}

.reference-audio audio {
    width: 100%;
}

.reference-media-meta {
    min-width: 0;
    padding: 9px 10px;
    display: grid;
    gap: 3px;
}

.reference-media-meta span {
    overflow: hidden;
    color: var(--ink);
    font-size: 10px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.reference-media-meta small {
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-item {
    min-width: 0;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.asset-item span {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asset-item small {
    flex: 0 0 auto;
    color: var(--ink-soft);
    font-size: 9px;
}

.muted-empty {
    margin-bottom: 0;
    color: var(--ink-soft);
    font-size: 11px;
}

@media (max-width: 1100px) {
    .metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .account-table__head {
        display: none;
    }

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

    .account-identity {
        grid-column: 1 / -1;
    }

    .account-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
        padding-top: 10px;
        border-top: 1px dashed var(--line);
    }

    .account-details {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

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

    .login-page {
        grid-template-columns: minmax(0, 1fr) minmax(350px, 430px);
        gap: 40px;
    }
}

@media (max-width: 900px) {
    .app-layout {
        display: block;
    }

    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 240px;
        transform: translateX(-100%);
        transition: transform 180ms ease;
    }

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

    .sidebar-toggle {
        display: block;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        z-index: 25;
        border: 0;
        background: rgba(18, 29, 23, 0.5);
        opacity: 0;
        pointer-events: none;
        transition: opacity 180ms ease;
    }

    .app-layout.sidebar-open + .sidebar-backdrop {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    body.sidebar-open {
        overflow: hidden;
    }
}

@media (max-width: 720px) {
    .topbar__inner,
    .page-shell {
        width: min(100% - 24px, 1440px);
    }

    .topbar__inner {
        min-height: 64px;
    }

    .server-indicator {
        display: none;
    }

    .topbar__meta {
        gap: 12px;
    }

    .clock,
    .user-menu__name {
        display: none;
    }

    .user-menu {
        padding-left: 12px;
    }

    .page-shell {
        padding-top: 26px;
    }

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

    .page-heading .button {
        width: 100%;
    }

    .auth-banner {
        align-items: stretch;
        flex-direction: column;
    }

    .auth-link-row {
        flex-direction: column;
    }

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

    .metric {
        min-height: 124px;
        padding: 16px;
    }

    .metric strong {
        font-size: 30px;
    }

    .account-row {
        grid-template-columns: 1fr 1fr;
        padding: 18px;
    }

    .account-identity {
        grid-column: 1 / -1;
    }

    .account-cell::before {
        content: attr(data-label);
        width: 100%;
        color: #89958f;
        font-size: 9px;
        font-weight: 800;
        letter-spacing: 0.06em;
    }

    .account-actions {
        justify-content: flex-start;
    }

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

    .login-page {
        min-height: calc(100vh - 100px);
        padding-top: 24px;
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .login-intro h1 {
        font-size: clamp(34px, 10vw, 48px);
    }

    .login-intro > p:not(.eyebrow) {
        margin-bottom: 0;
    }

    .login-status {
        display: none;
    }

    .login-panel {
        padding: 24px 20px;
    }

    .modal--task {
        width: calc(100% - 16px);
    }

    .modal__panel--task {
        max-height: 94vh;
        padding: 0;
    }

    .modal__panel--task .modal__header {
        padding: 18px 16px 0;
    }

    .task-form__body {
        padding: 16px;
    }

    .form-actions--sticky {
        margin: 0;
        padding: 13px 16px;
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .form-actions__buttons {
        display: grid;
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    }

    .form-actions__buttons .button {
        width: 100%;
        min-width: 0;
    }

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

    .heading-actions {
        width: 100%;
    }

    .heading-actions .button {
        flex: 1;
    }

    .form-section {
        padding: 18px 15px;
    }

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

    .task-list-header {
        align-items: stretch;
        flex-direction: column;
    }

    .table-panel__header,
    .table-panel__actions {
        align-items: stretch;
        flex-direction: column;
    }

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

    .task-filters input {
        width: 100%;
        grid-column: 1 / -1;
    }

    .task-record__layout {
        padding: 15px;
        grid-template-columns: 1fr;
    }

    .task-record__cover {
        max-width: 320px;
    }

    .task-record__main {
        padding: 0;
    }

    .task-record__meta {
        padding: 12px 0 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .task-record__actions {
        justify-content: flex-start;
    }

    .task-record__timeline {
        grid-template-columns: 1fr;
    }

    .task-detail-hero {
        flex-direction: column;
    }

    .task-detail-hero code {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .task-detail-grid {
        grid-template-columns: 1fr;
    }

    .result-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .resource-item {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .resource-item code {
        grid-column: 1 / -1;
    }

    .resource-download {
        justify-self: end;
    }
}

@media (max-width: 460px) {
    .metrics {
        grid-template-columns: 1fr;
    }

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

    .account-identity,
    .account-actions {
        grid-column: 1;
    }

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

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

    .cli-choice {
        grid-template-columns: 1fr;
    }

    .task-record__meta {
        grid-template-columns: 1fr;
    }

    .asset-item {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .resource-item {
        grid-template-columns: 1fr;
    }

    .resource-item code {
        grid-column: auto;
    }

    .resource-download {
        justify-self: start;
    }

    .media-preview {
        width: calc(100% - 16px);
    }

    .media-preview__header,
    .media-preview__footer {
        padding: 13px;
    }

    .media-preview__stage {
        min-height: 180px;
        padding: 8px;
    }

    .clock {
        min-width: auto;
    }
}
