:root {
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
    font-size: 14px;
    color: #252b36;
    background: #f5f4f9;
    --bg: #f5f4f9;
    --ink: #252b36;
    --brand: #6a4ed4;
    --brand-hover: #5c40c2;
    --soft: #f1edfb;
    --muted: #7b8395;
    --line: #e9eaf2;
    --green: #16865b;
    --red: #bb453c;
    --warm: #94651c;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    line-height: 1.65;
}
button,
input,
select,
textarea {
    font: inherit;
}
button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}
button,
a {
    touch-action: manipulation;
}
button {
    cursor: pointer;
}
button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
a {
    color: var(--brand);
    text-decoration: none;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
    outline: 3px solid #b3a2ef;
    outline-offset: 3px;
}
h1,
h2,
h3,
p {
    margin-top: 0;
}
h1 {
    font-size: 27px;
    letter-spacing: -0.8px;
    line-height: 1.45;
    margin-bottom: 9px;
    font-weight: 650;
}
h2 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 18px;
}
h2 small {
    display: inline;
    font-weight: 400;
    font-size: 12px;
    margin-left: 8px;
}
p {
    margin-bottom: 16px;
}
small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}
.ui-icon {
    display: block;
    flex-shrink: 0;
}
.muted,
.hint {
    color: var(--muted);
    line-height: 1.7;
}
.hint {
    font-size: 12px;
}
.text-error {
    color: var(--red);
}
.grow {
    flex: 1;
    min-width: 0;
}
.right {
    text-align: right;
}
.mono,
code,
pre {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}
.mono {
    font-size: 11px;
    color: #7b8395;
}
.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;
    top: -80px;
    left: 20px;
    z-index: 100;
    padding: 10px 16px;
    background: white;
    border-radius: 9px;
}
.skip-link:focus {
    top: 12px;
}
.app-shell {
    min-height: 100vh;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.top-navigation {
    position: relative;
    margin: 16px 20px 0;
    padding: 0 18px;
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 20px;
    background: white;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    z-index: 10;
}
.brand {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    gap: 1px;
}
.brand strong {
    color: var(--brand);
    font-size: 18px;
    letter-spacing: -0.6px;
    white-space: nowrap;
}
.brand span {
    color: var(--muted);
    font-size: 12px;
}
.primary-navigation {
    display: flex;
    align-items: stretch;
    gap: 4px;
    min-width: 0;
}
.primary-navigation a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-shrink: 0;
    white-space: nowrap;
    min-height: 64px;
    padding: 12px 8px 9px;
    border-bottom: 3px solid transparent;
    color: #4c566a;
    font-size: 15px;
    font-weight: 550;
}
.navigation-label {
    display: grid;
    align-items: center;
}
.navigation-label > * {
    grid-area: 1 / 1;
    margin: 0;
    letter-spacing: 0;
    line-height: 1.45;
}
.navigation-label-measure {
    visibility: hidden;
    pointer-events: none;
    user-select: none;
    font-size: 22px;
    font-weight: 650;
}
.navigation-label-text {
    font: inherit;
    line-height: 1.45;
}
.primary-navigation a.active .navigation-label-text {
    font-size: 22px;
    font-weight: 650;
}
.primary-navigation a:hover {
    background: #f6f4fb;
}
.primary-navigation a.active {
    color: var(--brand);
    border-bottom-color: var(--brand);
}
.navigation-account {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.account-name strong {
    display: block;
    font-size: 12px;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.account-name small {
    font-size: 11px;
}
.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #eee9fa;
    color: var(--brand);
    display: grid;
    place-items: center;
}
.workspace {
    padding: 0 20px 25px;
    min-width: 0;
    flex: 1;
}
.workspace:focus {
    outline: none;
}
.page-context {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 20px;
    min-height: 58px;
    padding: 10px 18px;
    margin-bottom: 14px;
    background: #faf9fd;
    border: 1px solid var(--line);
    border-radius: 0 0 10px 10px;
}
.page-context-copy {
    min-width: 0;
    flex: 1 1 280px;
}
.page-context-copy p {
    margin: 0;
    color: #707b90;
    font-size: 13px;
    line-height: 1.7;
}
.page-context-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
    margin-left: auto;
}
.org-switch label,
.context-caption {
    color: #626e7f;
    font-size: 13px;
}
.org-switch select {
    min-height: 36px;
    padding: 6px 9px;
    width: 180px;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}
.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 20px 2px;
}
.page-heading h1 {
    overflow-wrap: anywhere;
}
.page-heading p {
    color: var(--muted);
    font-size: 13px;
    margin: 7px 0 0;
}
.eyebrow {
    color: var(--brand);
    font-size: 12px;
    margin-bottom: 5px;
}
.workspace-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    padding: 0 22px 20px;
    font-size: 11px;
    color: #9097a6;
}
input,
select,
textarea {
    min-height: 40px;
    min-width: 0;
    max-width: 100%;
    padding: 9px 12px;
    border: 1px solid #e1e3ee;
    border-radius: 9px;
    background: white;
    color: var(--ink);
    outline: none;
}
input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px #6a4ed416;
}
.primary,
.secondary,
.link,
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
    border: 0;
    transition:
        background 0.15s,
        color 0.15s,
        border-color 0.15s;
}
.primary,
.secondary {
    min-height: 42px;
    padding: 0 19px;
    border-radius: 10px;
    font-weight: 550;
    font-size: 14px;
}
.primary {
    background: var(--brand);
    color: white;
    box-shadow: 0 4px 12px #6a4ed41a;
}
.primary:hover:not(:disabled) {
    background: var(--brand-hover);
}
.secondary {
    background: white;
    color: #596479;
    border: 1px solid #dcdfea;
}
.secondary:hover:not(:disabled) {
    border-color: #b3a2ef;
    color: var(--brand);
}
.link {
    background: none;
    color: var(--brand);
    padding: 4px 0;
    font-size: 13px;
}
.link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}
.icon-button {
    background: transparent;
    color: #60687a;
    width: 34px;
    height: 34px;
    border-radius: 8px;
}
.icon-button:hover {
    background: var(--soft);
    color: var(--brand);
}
.inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.inline select,
.inline input {
    max-width: 230px;
}
.inline input,
.inline select,
.inline .secondary,
.page-context .secondary {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 8px;
}
.form-grid {
    display: grid;
    gap: 16px;
}
.form-grid label {
    display: grid;
    gap: 8px;
    color: #687184;
    font-size: 13px;
}
.form-grid button {
    justify-self: start;
    margin-top: 4px;
}
.form-grid .hint {
    margin: 0;
}
.metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}
.metric {
    background: white;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px 22px;
    transition: border-color 0.15s;
}
.metric:hover {
    border-color: #cfc3ee;
}
.metric > span {
    color: #657085;
    font-size: 13px;
}
.metric strong {
    display: block;
    color: var(--brand);
    font-size: 30px;
    line-height: 1.5;
    font-weight: 650;
    font-variant-numeric: tabular-nums;
    margin: 4px 0;
}
.metric strong.text-error {
    color: var(--red);
}
.metric small {
    font-size: 12px;
}
.columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.card {
    min-width: 0;
    padding: 20px;
    margin-bottom: 14px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 8px 24px -18px #50426118;
}
.card > p:last-child {
    margin-bottom: 0;
}
.card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.card-heading h2 {
    margin: 0;
}
.card-heading a {
    font-size: 13px;
}
.node-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}
.node-row:last-child {
    border: 0;
}
.node-row b {
    font-size: 14px;
    font-weight: 550;
    overflow-wrap: anywhere;
}
.node-row small {
    margin-top: 3px;
}
.node-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--soft);
    color: var(--brand);
}
.badge,
.pill {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    padding: 2px 9px;
    border: 1px solid transparent;
    border-radius: 6px;
    background: #f1f2f6;
    color: #707b90;
    white-space: nowrap;
}
.good {
    background: #ecf7f1;
    color: #16865b;
}
.bad {
    background: #fff0ef;
    color: #a2342c;
}
.warm {
    background: #fff7e8;
    color: #94651c;
}
.pill {
    background: var(--soft);
    color: var(--brand);
}
.storage-number {
    font-size: 34px;
    color: var(--brand);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    margin: 10px 0 4px;
}
.storage-number small {
    display: inline;
    font-size: 13px;
}
.flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    background: #f8f6fc;
    border: 1px solid #eee8f9;
    border-radius: 9px;
    padding: 12px;
    margin-bottom: 10px;
    font-size: 12px;
    color: #786990;
}
.flow i {
    color: #b3a2c9;
    font-style: normal;
}
.summary-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
    gap: 14px;
    padding: 11px 0;
    font-size: 13px;
}
.summary-line:last-of-type {
    border: 0;
}
.summary-line > span:not(.badge) {
    color: #707b90;
}
.summary-line b {
    font-weight: 500;
}
.summary-line .break {
    overflow-wrap: anywhere;
    text-align: right;
    min-width: 0;
}
.table-wrap {
    max-width: 100%;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    scrollbar-width: thin;
    scrollbar-color: #c6b7e2 #f5f2fa;
}
table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    text-align: left;
    font-size: 13px;
    white-space: nowrap;
}
th {
    color: #657085;
    font-size: 12px;
    font-weight: 550;
    background: #fafaff;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
}
td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
}
th + th,
td + td {
    border-left: 1px solid #f0eff6;
}
tr:last-child td {
    border-bottom: 0;
}
tbody tr:hover td {
    background: #fcfaff;
}
td b {
    font-weight: 550;
}
td small {
    margin-top: 3px;
    font-size: 11px;
}
td details pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    max-width: 420px;
    max-height: 300px;
    overflow: auto;
    border-radius: 8px;
    padding: 12px;
    background: #f8f7fb;
}
td .secondary {
    min-height: 32px;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 7px;
}
.empty {
    text-align: center;
    padding: 48px 20px;
    color: #8c94a3;
    font-size: 13px;
    white-space: normal;
}
.empty a {
    display: block;
    margin-top: 12px;
}
.notice {
    padding: 14px 18px;
    margin-bottom: 14px;
    background: #f4f1fc;
    border: 1px solid #e5def6;
    border-radius: 10px;
    color: #715e95;
    font-size: 13px;
    overflow-wrap: anywhere;
}
.notice.success {
    background: #edf7f0;
    border-color: #d9ecdf;
    color: #367257;
}
.notice.error {
    background: #fff0ef;
    border-color: #f3d2cf;
    color: #a2342c;
}
.credential {
    background: #fffaed;
    color: #856820;
    border-color: #f0e4c2;
}
.credential code {
    display: inline-block;
    max-width: 100%;
    padding: 10px;
    background: white;
    margin: 0 12px 12px 0;
    color: var(--ink);
    border-radius: 7px;
    overflow-wrap: anywhere;
}
.credential p {
    margin: 8px 0 10px;
}
.credential .secondary {
    min-height: 36px;
    font-size: 13px;
}
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    font-size: 12px;
    color: var(--muted);
}
.pagination div {
    display: flex;
    gap: 8px;
}
.pagination div > * {
    display: inline-flex;
    align-items: center;
    padding: 4px 11px;
    min-height: 32px;
    border-radius: 7px;
    background: #f5f4f9;
}
.pagination div > a {
    color: var(--brand);
}
.pagination div > a:hover {
    background: var(--soft);
}
.pagination div > span {
    color: #a3a8b5;
}
.padded {
    padding-top: 18px;
}
summary {
    cursor: pointer;
    font-size: 13px;
    color: var(--brand);
}
summary:hover {
    color: var(--brand-hover);
}
.login-page {
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    place-items: center;
    padding: 110px 40px 60px;
}
.login-brand {
    position: absolute;
    left: 32px;
    top: 28px;
}
.login-brand strong {
    display: block;
    color: var(--brand);
    font-size: 24px;
}
.login-brand span {
    display: block;
    color: #8c94a3;
    font-size: 13px;
    margin-top: 5px;
}
.login-box {
    width: 420px;
    max-width: 100%;
    padding: 38px;
    background: white;
    border: 1px solid white;
    border-radius: 24px;
    box-shadow: 0 22px 65px -35px #4e3a822b;
}
.login-box > .ui-icon {
    color: var(--brand);
    margin-bottom: 24px;
}
.login-box h1 {
    font-size: 27px;
}
.login-box > p {
    color: #9299a7;
    font-size: 14px;
}
.login-box label {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 20px;
    color: #687184;
    font-size: 13px;
}
.login-box input {
    width: 100%;
}
.login-box .primary {
    width: 100%;
    margin-top: 25px;
}
.login-box .hint {
    margin: 22px 0 0;
    font-size: 11px;
    text-align: center;
}
.login-error {
    margin: 18px 0 0;
}
@media (max-width: 1600px) {
    .top-navigation {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0 12px;
        padding-top: 10px;
    }
    .primary-navigation {
        display: grid;
        grid-auto-columns: minmax(0, 1fr);
        grid-auto-flow: column;
        grid-column: 1 / -1;
        grid-row: 2;
    }
    .primary-navigation a {
        min-height: 54px;
        padding-inline: 6px;
    }
    .navigation-account {
        grid-column: 2;
        grid-row: 1;
    }
}
@media (max-width: 1250px) {
    .top-navigation {
        margin-inline: 15px;
    }
    .workspace {
        padding-inline: 15px;
    }
    .primary-navigation a {
        gap: 6px;
        font-size: 14px;
    }
    .navigation-label-measure,
    .primary-navigation a.active .navigation-label-text {
        font-size: 18px;
    }
    .metrics {
        gap: 12px;
    }
    .metric {
        padding: 16px;
    }
}
@media (max-width: 900px) {
    .primary-navigation {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        grid-auto-flow: row;
    }
    .columns {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }
    .metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .page-context-actions {
        margin-left: 0;
    }
}
@media (max-width: 650px) {
    .top-navigation {
        margin: 10px 10px 0;
        padding: 8px 12px 0;
    }
    .brand strong {
        font-size: 15px;
    }
    .brand span {
        font-size: 12px;
    }
    .primary-navigation {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px;
        margin-top: 6px;
    }
    .primary-navigation a {
        min-height: 46px;
        padding: 8px 4px 5px;
        font-size: 13px;
    }
    .primary-navigation .ui-icon {
        width: 17px;
        height: 17px;
    }
    .navigation-label-measure,
    .primary-navigation a.active .navigation-label-text {
        font-size: 16px;
    }
    .navigation-account {
        gap: 5px;
    }
    .navigation-account .avatar {
        display: none;
    }
    .account-name strong {
        max-width: 60px;
    }
    .workspace {
        padding-inline: 10px;
    }
    .page-context {
        padding: 10px 12px;
    }
    .page-context-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .org-switch select {
        flex: 1;
        width: auto;
    }
    .page-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .page-heading h1 {
        font-size: 24px;
    }
    .metric {
        padding: 14px;
    }
    .metric strong {
        font-size: 28px;
    }
    .card {
        padding: 16px 12px;
    }
    .card-heading .inline {
        width: 100%;
    }
    .card-heading .inline input {
        flex: 1;
    }
    .summary-line {
        flex-wrap: wrap;
    }
    .workspace-footer {
        padding-inline: 12px;
    }
    .login-page {
        padding: 110px 20px 36px;
    }
    .login-brand {
        left: 24px;
        top: 22px;
    }
    .login-box {
        padding: 30px 26px;
    }
}
@media (max-width: 380px) {
    .primary-navigation {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .brand strong {
        font-size: 14px;
    }
}
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
.channel-create {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 14px;
}
.channel-create > label {
    display: grid;
    gap: 7px;
    flex: 1 1 220px;
    color: #687184;
    font-size: 13px;
}
.channel-create > .file-limit {
    flex: 0 1 170px;
}
.member-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.member-form > label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #596479;
    font-size: 13px;
    white-space: nowrap;
}
.member-form input[type="checkbox"] {
    min-height: auto;
    width: 16px;
    height: 16px;
    padding: 0;
    margin: 0;
    accent-color: var(--brand);
    box-shadow: none;
}
.channel-settings {
    border-top: 1px solid var(--line);
    margin-top: 20px;
    padding-top: 16px;
}
.channel-settings .hint {
    margin: 16px 0 0;
}
@media (min-width: 1601px) and (max-width: 1850px) {
    .top-navigation {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0 12px;
        padding-top: 10px;
    }
    .primary-navigation {
        display: grid;
        grid-auto-columns: minmax(0, 1fr);
        grid-auto-flow: column;
        grid-column: 1 / -1;
        grid-row: 2;
    }
    .navigation-account {
        grid-column: 2;
        grid-row: 1;
    }
}
