:root {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        'Microsoft YaHei',
        sans-serif;
    color: #24374a;
    background: #f3f6f9;
    font-synthesis: none;
    --navy: #12253a;
    --teal: #087f81;
    --line: #dce4ec;
    --muted: #68798b;
    --red: #b63737;
    --amber: #96651a;
    --radius: 10px;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
}
button,
input,
select,
textarea {
    font: inherit;
}
button,
a,
input,
select,
textarea {
    outline-offset: 3px;
}
button:focus-visible,
a:focus-visible {
    outline: 3px solid #36b6b8;
}
button {
    cursor: pointer;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 8px 15px;
    color: #24374a;
    background: #fff;
    font-weight: 600;
}
button:hover {
    background: #edf4f7;
}
button:disabled {
    opacity: 0.55;
    cursor: wait;
}
.primary {
    background: var(--teal);
    border-color: var(--teal);
    color: white;
}
.primary:hover {
    background: #06696b;
}
.danger {
    color: var(--red);
    border-color: #e6bdbd;
}
.quiet {
    background: transparent;
    border-color: transparent;
}
.small {
    min-height: 34px;
    padding: 5px 10px;
    font-size: 12px;
}
a {
    color: var(--teal);
    text-decoration: none;
}
input,
select,
textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid #cbd6e1;
    border-radius: 7px;
    background: #fff;
    color: #24374a;
    padding: 10px 12px;
    min-height: 42px;
}
textarea {
    resize: vertical;
    min-height: 130px;
    font-family: ui-monospace, monospace;
    font-size: 12px;
}
input[type='checkbox'] {
    width: 18px;
    min-height: 18px;
    margin: 0;
}
label {
    display: grid;
    gap: 7px;
    font-size: 13px;
    font-weight: 600;
}
form {
    display: grid;
    gap: 17px;
}
.muted,
.hint {
    color: var(--muted);
    font-size: 13px;
}
.hint {
    margin: 7px 0;
}
.initial-loading {
    padding: 80px;
    text-align: center;
}
h1,
h2,
h3,
p {
    margin-top: 0;
}
h1 {
    font-size: 26px;
    line-height: 1.3;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}
h2 {
    font-size: 19px;
    margin-bottom: 16px;
}
h3 {
    font-size: 15px;
    margin-bottom: 10px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 23px;
    font-weight: 750;
    letter-spacing: -0.8px;
}
.brand-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    background: #0b9292;
    color: white;
    border-radius: 10px;
    font-size: 19px;
}
.auth-layout {
    max-width: 1040px;
    min-height: 100vh;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 80px;
    padding: 48px 32px;
}
.auth-story .brand {
    margin-bottom: 42px;
}
.auth-story h1 {
    font-size: 39px;
    line-height: 1.35;
    max-width: 420px;
}
.auth-story p {
    font-size: 16px;
    color: var(--muted);
    max-width: 400px;
}
.flow-line {
    margin-top: 30px;
    border-left: 2px solid #93cbcb;
    padding-left: 18px;
    color: #355467;
    line-height: 2.2;
}
.auth-card {
    padding: 32px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 10px 40px #12253a08;
}
.auth-tabs {
    display: flex;
    gap: 4px;
    padding-bottom: 22px;
}
.auth-tabs button {
    flex: 1;
    border: none;
    color: var(--muted);
    background: #f3f6f9;
}
.auth-tabs button.active {
    color: var(--teal);
    background: #e3f3f1;
}
.auth-footnote {
    font-size: 12px;
    color: var(--muted);
    margin-top: 20px;
    margin-bottom: 0;
}
.shell {
    display: grid;
    grid-template-columns: 226px minmax(0, 1fr);
    min-height: 100vh;
}
.sidebar {
    background: var(--navy);
    color: #c2d0dc;
    padding: 27px 18px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}
.sidebar .brand {
    color: #fff;
    padding-left: 8px;
    font-size: 22px;
}
.nav-label {
    font-size: 10px;
    letter-spacing: 2px;
    color: #7d95ad;
    margin: 0 14px 12px;
}
.nav {
    display: grid;
    gap: 6px;
}
.nav button {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    border: none;
    background: transparent;
    color: #b8cada;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
}
.nav button:hover {
    background: #ffffff0b;
}
.nav button.active {
    background: #087f812c;
    color: #7ce0d2;
    box-shadow: inset 3px 0 #49c9be;
}
.nav-index {
    font-size: 10px;
    width: 16px;
    opacity: 0.65;
    font-variant-numeric: tabular-nums;
}
.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid #ffffff16;
    padding: 20px 8px 0;
    font-size: 12px;
    color: #829bb1;
}
.workspace {
    min-width: 0;
}
.topbar {
    height: 75px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 34px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    gap: 12px;
}
.breadcrumb {
    color: var(--muted);
    font-size: 12px;
}
.user-area {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.user-email {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}
.role {
    background: #edf4f7;
    color: #42627c;
    border-radius: 4px;
    padding: 3px 7px;
    font-size: 10px;
    white-space: nowrap;
}
main {
    padding: 32px 34px;
    max-width: 1510px;
    margin: 0 auto;
}
.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 26px;
}
.page-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}
.actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 22px;
    min-width: 0;
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}
.panel-header h2 {
    font-size: 16px;
    margin: 0;
}
.notice {
    border: 1px solid #c4e3df;
    background: #eef9f6;
    color: #3e726a;
    padding: 13px 16px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 22px;
}
.notice.warning {
    border-color: #ead8ad;
    background: #fff9eb;
    color: #8b6629;
}
.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 21px;
}
.stat-label {
    font-size: 12px;
    color: var(--muted);
}
.stat-value {
    font-size: 31px;
    font-weight: 700;
    margin: 8px 0 0;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}
.stat-caption {
    font-size: 11px;
    color: #7f90a0;
    margin-top: 8px;
}
.table-wrap {
    overflow-x: auto;
    max-width: 100%;
}
table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
    font-size: 13px;
}
th {
    color: var(--muted);
    font-size: 11px;
    text-align: left;
    letter-spacing: 0.3px;
    padding: 12px;
    background: #f7f9fb;
    border-bottom: 1px solid var(--line);
}
td {
    padding: 14px 12px;
    border-bottom: 1px solid #edf0f4;
    vertical-align: middle;
}
tr:last-child td {
    border-bottom: none;
}
.cell-main {
    font-weight: 600;
    color: #294258;
}
.cell-secondary {
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}
.mono {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 12px;
}
.code {
    max-width: 310px;
    overflow: hidden;
    text-overflow: ellipsis;
}
.status {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 20px;
    background: #edf2f6;
    color: #5d7285;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.status.succeeded,
.status.verified,
.status.active,
.status.ready {
    background: #e8f6f0;
    color: #287957;
}
.status.running,
.status.queued {
    background: #e8f1fc;
    color: #3e6fa5;
}
.status.needs_review,
.status.unverified {
    background: #fff1d5;
    color: #94671d;
}
.status.failed,
.status.disabled,
.status.revoked {
    background: #fcecec;
    color: #b65353;
}
.empty {
    padding: 38px 14px;
    text-align: center;
    color: var(--muted);
}
.empty strong {
    display: block;
    font-size: 15px;
    color: #426079;
    margin-bottom: 6px;
}
.inline-form {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}
.inline-form label {
    flex: 1;
    min-width: 140px;
}
.inline-form button {
    flex: none;
}
.two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.steps {
    display: grid;
    gap: 18px;
    counter-reset: step;
}
.step {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.step-number {
    width: 28px;
    height: 28px;
    flex: none;
    border-radius: 50%;
    background: #e7f5f2;
    color: var(--teal);
    display: grid;
    place-items: center;
    font-size: 12px;
    font-weight: 700;
}
.step h3 {
    margin: 1px 0 3px;
}
.step p {
    font-size: 12px;
    color: var(--muted);
    margin: 0;
}
.selection-list {
    display: grid;
    gap: 9px;
    max-height: 240px;
    overflow: auto;
    border: 1px solid var(--line);
    padding: 12px;
    border-radius: 8px;
}
.selection-list label {
    display: flex;
    gap: 9px;
    align-items: center;
    overflow-wrap: anywhere;
    font-weight: 400;
}
.logs {
    background: #102236;
    border-radius: 8px;
    padding: 16px;
    color: #c1d4df;
    font-family: ui-monospace, monospace;
    font-size: 12px;
    max-height: 320px;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.log-error {
    color: #f6aaa1;
}
.progress {
    height: 5px;
    background: #e8eef3;
    border-radius: 4px;
    overflow: hidden;
    margin: 10px 0;
}
.progress > div {
    height: 100%;
    background: var(--teal);
}
dialog {
    border: 1px solid var(--line);
    border-radius: 14px;
    max-width: min(640px, calc(100vw - 28px));
    width: 600px;
    padding: 26px;
    box-shadow: 0 24px 80px #12253a40;
    max-height: 90vh;
    overflow: auto;
}
dialog::backdrop {
    background: #12253a77;
}
.dialog-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.dialog-head h2 {
    margin: 0;
}
.dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 22px;
}
.dialog-error {
    color: var(--red);
    font-size: 13px;
    white-space: pre-wrap;
}
.notifications {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9999;
    display: grid;
    gap: 8px;
    max-width: min(420px, calc(100vw - 32px));
}
.toast {
    padding: 12px 18px;
    background: #17394b;
    color: white;
    border-radius: 9px;
    box-shadow: 0 5px 25px #132a3b26;
    font-size: 13px;
}
.toast.error {
    background: #8e3535;
}
.loading {
    color: var(--muted);
    padding: 30px 0;
}
.password-note {
    font-size: 12px;
    color: var(--muted);
}
.footer-note {
    font-size: 11px;
    color: #8998a8;
    text-align: center;
    margin-top: 24px;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}
@media (max-width: 1050px) {
    .shell {
        grid-template-columns: 195px minmax(0, 1fr);
    }
    main {
        padding: 25px;
    }
    .topbar {
        padding: 0 25px;
    }
    .two-column {
        grid-template-columns: 1fr;
    }
    .auth-layout {
        gap: 35px;
    }
    .auth-story h1 {
        font-size: 31px;
    }
}
@media (max-width: 720px) {
    .shell {
        display: block;
    }
    .sidebar {
        padding: 14px;
        gap: 12px;
    }
    .sidebar .brand {
        font-size: 18px;
    }
    .brand-mark {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    .nav-label,
    .sidebar-footer {
        display: none;
    }
    .nav {
        display: flex;
        overflow-x: auto;
        gap: 4px;
        padding-bottom: 2px;
    }
    .nav button {
        white-space: nowrap;
        flex: none;
        padding: 9px 12px;
        font-size: 12px;
    }
    .nav-index {
        display: none;
    }
    .topbar {
        height: 60px;
        padding: 0 16px;
    }
    .user-email {
        max-width: 150px;
    }
    .breadcrumb {
        display: none;
    }
    .user-area {
        width: 100%;
        justify-content: flex-end;
    }
    main {
        padding: 22px 16px;
    }
    .page-head {
        flex-direction: column;
        gap: 14px;
    }
    .page-head h1 {
        font-size: 23px;
    }
    .stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .stat {
        padding: 16px;
    }
    .stat-value {
        font-size: 26px;
    }
    .panel {
        padding: 17px;
    }
    .auth-layout {
        display: block;
        padding: 32px 20px;
    }
    .auth-story h1,
    .auth-story > p,
    .flow-line {
        display: none;
    }
    .auth-story .brand {
        margin-bottom: 28px;
    }
    .auth-card {
        padding: 24px;
    }
    .inline-form {
        display: grid;
        grid-template-columns: 1fr;
    }
    .inline-form label {
        min-width: 0;
    }
    .notifications {
        right: 16px;
        bottom: 16px;
    }
    .role {
        display: none;
    }
    .two-column {
        gap: 0;
    }
    td,
    th {
        padding: 11px 9px;
    }
    dialog {
        padding: 20px;
    }
    .dialog-footer {
        flex-wrap: wrap;
    }
    .panel-header {
        align-items: flex-start;
    }
    .code {
        max-width: 200px;
    }
}
.step > button {
    flex-shrink: 0;
    white-space: nowrap;
}
.step > div:not(.step-number) {
    flex: 1;
    min-width: 0;
}
@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
    }
}
