:root {
  color-scheme: light;
  font: 16px/1.55 Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f7f4;
  color: #192f27;
  --ink: #192f27;
  --muted: #51665c;
  --line: #dce6de;
  --white: #fff;
  --accent: #165844;
  --accent-dark: #0f4232;
  --tint: #e7f2e9;
  --danger: #8b3233;
  --warning: #80521c;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
[hidden] { display: none !important; }
.symbols { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.05em; height: 1.05em; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.3; }
h1 { font-size: clamp(1.65rem, 2.8vw, 2.2rem); letter-spacing: -.035em; }
h2 { font-size: 1.14rem; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid #298265; outline-offset: 3px; }
.skip { position: absolute; top: .5rem; left: .5rem; z-index: 10; transform: translateY(-200%); color: var(--accent); background: var(--white); padding: .5rem 1rem; border-radius: 8px; }
.skip:focus { transform: none; }

.masthead {
  min-height: 74px; padding: 12px clamp(18px, 3vw, 45px); display: flex; align-items: center; justify-content: space-between;
  gap: 16px; color: var(--ink); background: var(--white); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; line-height: 1.16; white-space: nowrap; }
.brand img { display: block; flex: none; width: 38px; height: 38px; }
.brand span { display: grid; gap: 4px; }
.brand b { font-size: 1.08rem; }
.brand small, .operator > span { color: var(--muted); font-size: .81rem; }
.operator { display: flex; align-items: center; justify-content: flex-end; gap: 14px; min-width: 0; }
.operator > span { overflow-wrap: anywhere; }

.workspace { min-height: calc(100vh - 74px); }
.workspace.signed-in { display: grid; grid-template-columns: 224px minmax(0, 1fr); }
.navigation { border-right: 1px solid var(--line); background: #f9fbf8; padding: 23px 13px; display: grid; align-content: start; gap: 6px; }
.nav-item { min-height: 46px; display: flex; gap: 10px; align-items: center; padding: 9px 14px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); text-align: left; font-size: .92rem; font-weight: 650; }
.nav-item[aria-current="page"] { color: var(--accent-dark); border-color: #d9e8dc; background: var(--tint); }
.nav-item:hover:not([aria-current="page"]) { background: #edf3ed; }
.signed-in main { min-width: 0; width: min(100%, 1270px); margin-inline: auto; padding: clamp(20px, 4vw, 48px); }
main:focus:not(:focus-visible) { outline: none; }

.auth { display: grid; place-items: start center; padding: clamp(26px, 8vh, 84px) 18px 56px; }
.auth-card { width: min(100%, 440px); padding: clamp(23px, 5vw, 38px); background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: var(--radius); box-shadow: 0 24px 65px -38px #294a3b80; }
.auth-card h1 { margin-bottom: 9px; font-size: 1.62rem; }
.auth-card form { display: grid; gap: 17px; margin-top: 24px; }
.auth-card form .button { margin-top: 6px; }
.auth-card img { display: block; margin-inline: auto; width: min(200px, 100%); height: auto; border: 1px solid var(--line); border-radius: 8px; }
.loading { padding: 30px 22px; color: var(--muted); text-align: center; }

.page-header { margin-bottom: 24px; }
.page-header p, .support { color: var(--muted); font-size: .9rem; }
.page-header p { margin-top: 7px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; }
.card-head { padding: 20px 22px; }
.card-head > p { margin-top: 5px; }
.card-body { padding: 0 22px 22px; }
.stack { display: grid; align-content: start; gap: 18px; }
.split { display: grid; align-items: start; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 18px; }
.filters { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; padding: 18px 22px; }
.filters label:first-child { flex: 1 1 230px; }
.filters label + label { flex: 0 1 148px; }

label { display: grid; gap: 6px; font-size: .87rem; font-weight: 650; }
input, select { width: 100%; min-width: 0; min-height: 43px; padding: 9px 11px; border-radius: 8px; border: 1px solid #cad9cf; background: var(--white); }
input[readonly] { background: #f6f8f6; color: var(--muted); }
input::placeholder { color: #64776d; opacity: 1; }
.hint { color: var(--muted); font-size: .8rem; font-weight: 400; }

.button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 8px 14px; border-radius: 8px; border: 1px solid #cfddd2; background: var(--white); color: var(--accent-dark); font-size: .89rem; font-weight: 650; }
.button:hover:not(:disabled), .icon-button:hover:not(:disabled) { background: #f0f6f0; border-color: #a9c4b1; }
.button.primary { color: var(--white); background: var(--accent); border-color: var(--accent); }
.button.primary:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); }
.button.danger { color: var(--danger); border-color: #e8c9c7; }
.button.danger:hover:not(:disabled) { background: #fdf4f3; border-color: #d6a4a1; }
.button.compact { min-height: 35px; padding: 5px 10px; font-size: .79rem; white-space: nowrap; }
.icon-button { width: 42px; padding: 7px; font-size: 1.1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }

.table-shell { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; text-align: left; font-size: .89rem; }
.table th { color: var(--muted); font-size: .81rem; font-weight: 650; background: #f5f8f4; }
.table th, .table td { padding: 12px 14px; border-block-start: 1px solid var(--line); vertical-align: top; }
.table th:first-child, .table td:first-child { padding-left: 22px; }
.table th:last-child, .table td:last-child { padding-right: 22px; }
.table td { overflow-wrap: anywhere; }
.table .actions { flex-wrap: nowrap; }
.table .account-id { margin-top: 4px; font-size: .73rem; color: var(--muted); }
.table .team { display: block; }
.table .team + .team { margin-top: 4px; }
.pagination { border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; padding: 13px 22px; color: var(--muted); font-size: .84rem; }
.empty { padding: 28px 22px; color: var(--muted); border-top: 1px solid var(--line); }
.badge { display: inline-block; white-space: nowrap; background: #edf2ee; color: var(--muted); border-radius: 5px; font-size: .79rem; font-weight: 650; padding: 2px 7px; }
.badge.good { background: #e4f4e8; color: #225d41; }
.badge.bad { background: #fbece9; color: var(--danger); }
.badge.wait { background: #fcf3df; color: var(--warning); }
.config { padding: 15px; border: 1px solid var(--line); background: #f7faf7; border-radius: 10px; }
.config dl { display: grid; grid-template-columns: minmax(5em, max-content) minmax(0, 1fr); gap: 7px 14px; margin: 0; font-size: .89rem; }
.config dt { color: var(--muted); }
.config dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.config .note { margin-top: 10px; }

.error { background: #fdf0ee; color: var(--danger); border: 1px solid #f0d4cf; padding: 9px 11px; border-radius: 8px; font-size: .87rem; overflow-wrap: anywhere; }
.notice { position: fixed; z-index: 4; bottom: 22px; right: 22px; max-width: min(360px, 100% - 44px); padding: 12px 16px; border-radius: 9px; background: var(--accent-dark); color: var(--white); box-shadow: 0 10px 26px #10291b34; font-size: .9rem; }
.notice.bad { background: #7e3232; }
dialog { width: min(440px, 100% - 32px); max-height: calc(100% - 32px); padding: 24px; border: 1px solid var(--line); color: var(--ink); border-radius: var(--radius); box-shadow: 0 12px 55px #0e282447; }
dialog::backdrop { background: #142c225f; }
dialog form { display: grid; gap: 14px; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-actions { justify-content: end; }

@media (max-width: 860px) {
  .workspace.signed-in { grid-template-columns: 172px minmax(0, 1fr); }
  .signed-in main { padding: 23px; }
  .table .actions { flex-wrap: wrap; }
}
@media (max-width: 670px) {
  .masthead { min-height: 65px; }
  .workspace { min-height: calc(100vh - 65px); }
  .workspace.signed-in { display: block; }
  .navigation { grid-template-columns: repeat(3, minmax(0, 1fr)); border-right: 0; border-bottom: 1px solid var(--line); padding: 8px 10px; gap: 3px; }
  .nav-item { justify-content: center; padding: 7px 4px; gap: 5px; min-height: 42px; font-size: .82rem; }
  .signed-in main { padding: 20px 14px 32px; }
  .operator > span { display: none; }
  .filters, .pagination, .card-head { padding-inline: 14px; }
  .card-body { padding-inline: 14px; }
  .filters label:first-child { flex-basis: 100%; }
  .filters label + label { flex: 1; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table tr { border-top: 1px solid var(--line); padding: 9px 13px; }
  .table td, .table td:first-child, .table td:last-child { display: grid; grid-template-columns: minmax(58px, 21%) minmax(0, 1fr); gap: 8px; border: 0; padding: 5px 0; }
  .table td::before { content: attr(data-label); font-size: .78rem; font-weight: 650; color: var(--muted); }
  .table .actions { gap: 6px; }
}
