:root {
  color-scheme: light;
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  --bg: #f4f0e9;
  --surface: #fffdf9;
  --surface-2: #f8f5ef;
  --ink: #182426;
  --ink-soft: #405052;
  --muted: #7b8582;
  --line: #d9d3ca;
  --line-strong: #bfc8c3;
  --navy: #152b2e;
  --teal: #138b7c;
  --teal-dark: #09665e;
  --teal-wash: #d9eee8;
  --coral: #ed6848;
  --coral-dark: #ca4d32;
  --coral-wash: #fff0e9;
  --blue: #587aa7;
  --red: #b95149;
  --red-wash: #fff0ed;
  --shadow: 0 24px 60px rgba(35, 49, 45, .13);
  --shadow-soft: 0 10px 26px rgba(35, 49, 45, .08);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { min-height: 100vh; margin: 0; background: var(--bg); color: var(--ink); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
button, a, input, textarea, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(237, 104, 72, .45); outline-offset: 3px; }
.is-hidden { display: none !important; }

.topbar { position: relative; z-index: 2; background: var(--navy); color: #f7fbf8; }
.topbar::after { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: var(--coral); content: ""; }
.topbar-inner { max-width: 1320px; min-height: 78px; padding: 0 34px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 13px; min-width: 0; }
.brand-mark { width: 38px; height: 38px; padding: 8px; display: flex; align-items: flex-end; gap: 3px; border: 1px solid rgba(255,255,255,.22); border-radius: 11px; background: var(--coral); box-shadow: 4px 4px 0 rgba(255,255,255,.1); }
.brand-mark span { display: block; flex: 1; background: #fff6e8; border-radius: 2px; }
.brand-mark span:nth-child(1) { height: 43%; }
.brand-mark span:nth-child(2) { height: 100%; background: #153c3b; }
.brand-mark span:nth-child(3) { height: 70%; }
.brand-copy { display: flex; min-width: 0; flex-direction: column; gap: 1px; }
.brand-copy > span { overflow: hidden; font-size: 17px; font-weight: 800; letter-spacing: .01em; text-overflow: ellipsis; white-space: nowrap; }
.brand-copy small { color: #9bb5ae; font-size: 9px; font-weight: 700; letter-spacing: .13em; }
.topbar-meta { display: inline-flex; align-items: center; gap: 10px; color: #c6d6d1; font-size: 12px; white-space: nowrap; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: #71d0b7; box-shadow: 0 0 0 4px rgba(113,208,183,.16); }
.online-dot.offline { background: #efb56d; box-shadow: 0 0 0 4px rgba(239,181,109,.17); }
.topbar-divider { width: 1px; height: 18px; margin: 0 4px; background: rgba(255,255,255,.22); }
.topbar-meta a, .topbar-meta button { border: 0; background: transparent; color: #dceae5; text-decoration: none; font-size: 12px; }
.topbar-meta a:hover, .topbar-meta button:hover { color: #fff; text-decoration: underline; }
.account-bar { display: inline-flex; align-items: center; gap: 11px; padding: 6px 8px 6px 10px; border: 1px solid rgba(220,234,229,.2); border-radius: 999px; background: rgba(255,255,255,.07); }
#account-name { color: #fff; font-weight: 750; }
#quota-summary { color: #8be0ca; font-variant-numeric: tabular-nums; }
#admin-link { padding: 4px 8px; border-radius: 5px; background: rgba(237,104,72,.18); color: #ffd4c6; }

.shell { max-width: 1320px; margin: 0 auto; padding: 0 34px 72px; }
.mode-tabs { display: flex; gap: 8px; min-height: 94px; align-items: stretch; padding: 17px 0 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.mode-tabs::-webkit-scrollbar { display: none; }
.mode-tab { position: relative; display: inline-flex; min-width: 176px; align-items: center; gap: 12px; padding: 11px 16px 14px; border: 1px solid transparent; border-radius: 12px 12px 0 0; background: transparent; color: var(--muted); text-align: left; transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease; }
.mode-tab::after { position: absolute; right: 15px; bottom: -1px; left: 15px; height: 3px; border-radius: 4px 4px 0 0; background: transparent; content: ""; }
.mode-tab:hover { background: rgba(255,253,249,.72); color: var(--ink); }
.mode-tab[aria-selected="true"] { border-color: var(--line); border-bottom-color: var(--surface); background: var(--surface); color: var(--ink); box-shadow: 0 -6px 24px rgba(35,49,45,.05); transform: translateY(1px); }
.mode-tab[aria-selected="true"]::after { background: var(--coral); }
.tab-icon { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border: 1px solid currentColor; border-radius: 10px; color: var(--teal); font-size: 17px; line-height: 1; }
.mode-tab[aria-selected="true"] .tab-icon { border-color: var(--coral); color: var(--coral); background: var(--coral-wash); }
.indextts-workspace { padding-top: 27px; }
.indextts-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.indextts-head h1 { margin: 0; font-size: 23px; line-height: 1.2; }
.indextts-head a { color: var(--teal-dark); font-size: 12px; font-weight: 750; text-decoration: underline; }
.indextts-workspace iframe { display: block; width: 100%; height: min(800px, calc(100vh - 205px)); min-height: 520px; border: 1px solid var(--line); background: #fff; }
.tab-copy { display: flex; min-width: 0; flex-direction: column; gap: 2px; }
.tab-copy strong { font-size: 13px; font-weight: 800; white-space: nowrap; }
.tab-copy small { color: var(--muted); font-size: 10px; font-weight: 650; white-space: nowrap; }

.workspace { display: grid; grid-template-columns: minmax(0, .92fr) minmax(420px, 1.08fr); gap: clamp(40px, 6vw, 92px); padding-top: 45px; align-items: start; }
.editor, .output-column { min-width: 0; }
.editor { position: relative; }
.editor::before { position: absolute; top: 5px; right: 0; width: 72px; height: 72px; border: 1px solid rgba(237,104,72,.32); border-radius: 50%; content: ""; }
.editor::after { position: absolute; top: 37px; right: 31px; width: 10px; height: 10px; border-radius: 50%; background: var(--coral); content: ""; }
.output-column { position: sticky; top: 22px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 30px; }
.section-label { display: flex; align-items: center; gap: 9px; margin: 0 0 8px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.section-kicker { color: var(--coral); font-size: 10px; font-variant-numeric: tabular-nums; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(34px, 4vw, 52px); line-height: 1.05; font-weight: 850; letter-spacing: -.045em; }
h2 { margin-bottom: 7px; font-size: 25px; line-height: 1.15; font-weight: 850; letter-spacing: -.025em; }
.section-description { max-width: 430px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.secure-mark { position: relative; z-index: 1; display: grid; width: 40px; height: 40px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--teal); font-size: 18px; }

.field { margin-bottom: 25px; min-width: 0; }
.field > label, .settings legend { display: block; margin-bottom: 9px; color: var(--ink-soft); font-weight: 750; }
.field-primary > label { color: var(--ink); font-size: 15px; }
.required { color: var(--coral); }
textarea, select, input[type="number"], input[type="text"], input[type="password"], input:not([type]) { width: 100%; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); transition: border-color .15s ease, box-shadow .15s ease, background .15s ease, transform .15s ease; }
textarea { min-height: 132px; padding: 16px 17px; resize: vertical; line-height: 1.7; }
.field-primary textarea { min-height: 198px; }
textarea::placeholder { color: #a0aaa5; }
textarea:focus, select:focus, input[type="number"]:focus, input[type="text"]:focus, input[type="password"]:focus, input:not([type]):focus { border-color: var(--coral); outline: 0; background: #fff; box-shadow: 0 0 0 4px rgba(237,104,72,.12); transform: translateY(-1px); }
select, input[type="number"], input[type="text"], input[type="password"], input:not([type]) { height: 47px; padding: 0 13px; }
input[type="number"]:disabled { background: #edeae4; color: #9aa39f; }
input[readonly] { background: #edeae4; color: var(--ink-soft); cursor: default; }
.field-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.field-optional { color: var(--muted); font-size: 11px; font-weight: 650; }
.preset-field { margin-top: -7px; }
.preset-field select { background: var(--surface-2); }
.pony-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.pony-heading label { font-weight: 800; }
.pony-heading label span { margin-left: 8px; color: var(--muted); font-size: 11px; font-weight: 600; }
.pony-heading button, .pony-item-line button, .pony-item-detail button { padding: 6px 9px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--teal-dark); font-size: 11px; font-weight: 750; cursor: pointer; }
.pony-heading button:hover, .pony-item-line button:hover, .pony-item-detail button:hover { border-color: var(--teal); }
.pony-guide { margin-bottom: 14px; padding: 13px 15px; border-left: 3px solid var(--teal); background: var(--teal-wash); color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.pony-guide p { margin: 0 0 9px; }
.pony-guide p:last-child { margin-bottom: 0; }
.pony-guide code { overflow-wrap: anywhere; color: var(--ink); }
.pony-selected { margin-bottom: 13px; border-top: 1px solid var(--line); }
.pony-empty { margin: 0; padding: 12px 0; color: var(--muted); font-size: 12px; }
.pony-selection { display: grid; grid-template-columns: 25px minmax(0, 1fr) 68px auto; align-items: center; gap: 8px; min-height: 51px; border-bottom: 1px solid var(--line); }
.pony-selection strong { min-width: 0; overflow-wrap: anywhere; font-size: 12px; }
.pony-order { color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.pony-selection input[type="number"] { height: 32px; padding: 0 5px; text-align: center; font-size: 12px; }
.pony-reorder { display: flex; gap: 2px; }
.pony-reorder button { width: 26px; height: 29px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: var(--ink-soft); font-size: 17px; cursor: pointer; }
.pony-reorder button:hover:not(:disabled) { background: var(--surface-2); color: var(--coral-dark); }
.pony-reorder button:disabled { opacity: .3; cursor: default; }
.pony-warning { margin: 0 0 12px; padding: 9px 11px; border-left: 3px solid var(--coral); background: var(--coral-wash); color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
#pony-search { width: 100%; height: 40px; margin-bottom: 7px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--ink); }
.pony-catalog { max-height: 420px; overflow-y: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pony-category { border-bottom: 1px solid var(--line); }
.pony-category:last-child { border-bottom: 0; }
.pony-category > summary { padding: 11px 2px; color: var(--ink); font-size: 12px; font-weight: 800; cursor: pointer; }
.pony-item { padding: 10px 5px 11px; border-top: 1px solid var(--line); }
.pony-item-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.pony-item-line > div { min-width: 0; }
.pony-item-line strong, .pony-item-line small { display: block; overflow-wrap: anywhere; }
.pony-item-line strong { font-size: 12px; }
.pony-item-line small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.pony-item-line button { flex: none; }
.pony-item-detail { margin-top: 7px; color: var(--ink-soft); font-size: 11px; }
.pony-item-detail summary { width: fit-content; color: var(--teal-dark); cursor: pointer; }
.pony-item-detail p { margin: 8px 0 0; line-height: 1.5; overflow-wrap: anywhere; }
.pony-item-detail button, .pony-item-detail a, .pony-item-detail > small { display: inline-block; margin: 10px 12px 0 0; }
.pony-item-detail a { color: var(--teal-dark); }

.upload-zone { padding: 0 18px; border: 1px dashed #a7b9b2; border-radius: 12px; background: var(--surface); transition: border-color .15s, background .15s, transform .15s; }
.upload-zone:hover { border-color: var(--teal); background: #fff; }
.upload-zone.drag-over { border-color: var(--coral); background: var(--coral-wash); transform: translateY(-2px); }
.upload-zone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.upload-main { display: flex; width: 100%; min-height: 108px; align-items: center; gap: 14px; padding: 13px 0; border: 0; background: transparent; text-align: left; color: inherit; }
.upload-symbol { display: grid; flex: 0 0 42px; width: 42px; height: 42px; place-items: center; border: 1px solid #b9ded5; border-radius: 12px; background: var(--teal-wash); color: var(--teal-dark); font-size: 24px; font-weight: 350; line-height: 1; }
.upload-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 4px; }
.upload-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.upload-copy span { color: var(--muted); font-size: 11px; }
.upload-action { flex: none; padding: 9px 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); color: var(--ink-soft); font-size: 12px; font-weight: 750; }
.upload-main:hover .upload-action { border-color: var(--coral); color: var(--coral-dark); }
.audio-preview { display: block; width: 100%; height: 44px; margin: 0 0 15px; }
.image-preview { display: block; max-width: 100%; max-height: 250px; object-fit: contain; margin: 0 0 16px; border: 1px solid var(--line); border-radius: 8px; background: #edf0ec; }

.settings { margin: 11px 0 26px; padding: 21px 0 0; border: 0; border-top: 1px solid var(--line); }
.settings legend { float: left; width: 100%; margin: 0 0 16px; padding: 0; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 16px; clear: both; }
.size-preset-field { grid-column: span 2; }
.compact-field { margin-bottom: 8px; }
.field select + .compact-field { margin: 13px 0 0; }
.compact-field label { margin-bottom: 7px; color: var(--muted); font-size: 12px; }
.check-row { display: inline-flex; min-height: 35px; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 12px; cursor: pointer; }
.check-row input { width: 16px; height: 16px; margin: 0; accent-color: var(--coral); }
.form-error { margin-bottom: 18px; padding: 12px 14px; border: 1px solid #f0c1b9; border-radius: 9px; background: var(--red-wash); color: #8f3d36; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; padding-top: 6px; }
.primary-button, .download-button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 9px; padding: 0 23px; border: 1px solid var(--coral); border-radius: 9px; background: var(--coral); color: #fffaf4; font-weight: 800; text-decoration: none; box-shadow: 0 8px 18px rgba(202,77,50,.19); transition: background .15s, transform .15s, box-shadow .15s; }
.primary-button:hover:not(:disabled), .download-button:hover { background: var(--coral-dark); border-color: var(--coral-dark); box-shadow: 0 11px 22px rgba(202,77,50,.25); transform: translateY(-2px); }
.primary-button:disabled { opacity: .72; }
.quiet-button { display: inline-flex; min-height: 47px; align-items: center; gap: 7px; padding: 0 13px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 750; }
.quiet-button:hover { color: var(--ink); background: #e8e3db; }
.button-icon { font-size: 17px; line-height: 1; }

.result-section { padding: 28px; border: 1px solid #cbd4ce; border-radius: 18px; background: var(--navy); color: #f5fbf8; box-shadow: var(--shadow); }
.result-section .section-label { color: #9ab6ae; }
.result-section .section-kicker { color: #f2b89e; }
.result-section h2 { color: #fff; }
.result-section .section-description { color: #a9c0ba; }
.result-head { align-items: flex-start; margin-bottom: 21px; }
.status-badge { flex: none; max-width: 150px; overflow: hidden; padding: 6px 10px; border: 1px solid rgba(220,240,234,.25); border-radius: 999px; background: rgba(255,255,255,.08); color: #bfd1cb; font-size: 11px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.status-badge.working { border-color: rgba(137,169,218,.55); background: rgba(88,122,167,.25); color: #c3d6f2; }
.status-badge.complete { border-color: rgba(127,211,187,.55); background: rgba(19,139,124,.24); color: #a7eed9; }
.status-badge.failed { border-color: rgba(240,154,143,.6); background: rgba(185,81,73,.25); color: #ffc4bc; }
.status-badge.warning { border-color: rgba(235,209,153,.6); background: rgba(232,184,65,.2); color: #ffe3a0; }
.result-stage { display: flex; min-height: 405px; align-items: center; justify-content: center; overflow: hidden; border: 1px solid rgba(212,232,224,.16); border-radius: 12px; background: #243b3d; }
.empty-state, .working-state, .error-state { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 28px; color: #a9c0ba; text-align: center; }
.empty-glyph { position: relative; width: 68px; height: 68px; border: 1px solid rgba(185,222,213,.42); border-radius: 18px; background: rgba(255,255,255,.08); }
.empty-glyph::before, .empty-glyph::after { position: absolute; content: ""; border-radius: 2px; background: #9ee0d0; }
.empty-glyph::before { width: 24px; height: 3px; top: 27px; left: 21px; transform: rotate(-45deg); }
.empty-glyph::after { width: 14px; height: 3px; top: 37px; left: 30px; transform: rotate(45deg); }
.working-ring { width: 38px; height: 38px; border: 3px solid rgba(215,230,230,.2); border-top-color: #7edbc4; border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .working-ring { animation-duration: 2.5s; } }
.working-state strong, .error-state strong { color: #fff; font-size: 15px; }
.working-state span, .error-state span { max-width: 340px; overflow-wrap: anywhere; font-size: 12px; }
.error-state strong { color: #ffc4bc; }
.result-image { display: block; width: 100%; max-height: 610px; object-fit: contain; background: #243b3d; }
.result-audio { width: min(100% - 40px, 440px); }
.result-details { display: flex; flex-wrap: wrap; gap: 7px 16px; padding-top: 14px; color: #91aaa3; font-size: 11px; overflow-wrap: anywhere; }
.result-actions { display: flex; gap: 10px; padding-top: 17px; }
.download-button { min-height: 44px; padding: 0 17px; font-size: 12px; }

.auth-page { display: flex; min-height: 100vh; flex-direction: column; background: var(--bg); }
.auth-page .topbar-inner { width: 100%; }
.auth-main { position: relative; display: grid; flex: 1; grid-template-columns: minmax(260px, 360px) minmax(340px, 420px); justify-content: center; align-items: center; gap: clamp(55px, 8vw, 135px); padding: 65px 24px 12vh; }
.auth-main::before { position: absolute; top: 16%; left: 12%; width: 150px; height: 150px; border: 1px solid rgba(19,139,124,.23); border-radius: 50%; content: ""; }
.auth-main::after { position: absolute; right: 13%; bottom: 14%; width: 12px; height: 12px; border-radius: 50%; background: var(--coral); content: ""; }
.auth-intro { position: relative; z-index: 1; max-width: 340px; }
.auth-intro .section-label { color: var(--teal-dark); font-size: 10px; letter-spacing: .12em; }
.auth-intro h1 { margin: 17px 0 17px; font-size: clamp(37px, 4.4vw, 57px); line-height: 1.02; }
.auth-intro h1 em { color: var(--coral); font-style: normal; }
.auth-intro > p:not(.section-label) { max-width: 290px; color: var(--muted); font-size: 13px; line-height: 1.8; }
.auth-intro-meta { display: flex; align-items: center; gap: 9px; margin-top: 31px; color: var(--muted); font-size: 10px; letter-spacing: .12em; }
.auth-intro-meta span { width: 26px; height: 1px; background: var(--coral); }
.auth-panel { position: relative; isolation: isolate; width: min(100%, 420px); padding: 39px 41px 42px; border: 1px solid var(--line); border-radius: 18px; background: transparent; }
.auth-panel::before { position: relative; z-index: 1; display: block; width: 44px; height: 4px; margin-bottom: 24px; border-radius: 10px; background: var(--coral); content: ""; }
.auth-panel::after { position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--surface); box-shadow: var(--shadow); content: ""; }
.auth-panel h1 { margin-bottom: 32px; font-size: 34px; }
.auth-panel .field { margin-bottom: 19px; }
.auth-panel .primary-button { width: 100%; margin-top: 6px; }
.auth-panel .section-label { color: var(--coral-dark); }
.auth-panel > * { position: relative; z-index: 1; }
.auth-main > .auth-panel { grid-column: 2; }

.admin-shell { max-width: 1320px; margin: 0 auto; padding: 54px 34px 90px; }
.admin-title, .admin-list-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; }
.admin-title { margin-bottom: 45px; }
.admin-title h1 { margin: 0; font-size: 42px; }
.admin-day { color: var(--muted); font-size: 12px; white-space: nowrap; }
.admin-create { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 42px; padding: 28px 0 34px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.admin-create h2, .admin-users h2 { margin: 0 0 5px; font-size: 21px; }
.create-grid { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(150px, 1fr) minmax(170px, 1.25fr) 115px auto; align-items: end; gap: 13px; }
.create-grid .field { margin: 0; }
.create-grid .field label { margin-bottom: 7px; font-size: 12px; }
.create-grid .primary-button { height: 47px; min-height: 47px; white-space: nowrap; }
.admin-users { padding-top: 38px; }
.admin-list-head { margin-bottom: 16px; }
.admin-list-head > span { padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 12px; }
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-soft); }
.admin-users table { width: 100%; border-collapse: collapse; text-align: left; white-space: nowrap; }
.admin-users th, .admin-users td { padding: 16px 16px; border-bottom: 1px solid #ece7df; }
.admin-users thead th { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .05em; }
.admin-users tbody th, .admin-users tbody td { font-size: 13px; }
.admin-users tbody tr:last-child th, .admin-users tbody tr:last-child td { border-bottom: 0; }
.admin-users tbody tr { transition: background .15s ease; }
.admin-users tbody tr:hover { background: #fff8f2; }
.admin-users tbody th { font-weight: 800; }
.tier-cell { font-weight: 750; }
.tier-cell::before { display: inline-block; width: 6px; height: 6px; margin: 0 7px 2px 0; border-radius: 50%; background: var(--teal); content: ""; }
.tier-full::before { background: var(--coral); }
.admin-users input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--teal); cursor: pointer; }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.table-action { padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.table-action:hover { border-color: var(--coral); color: var(--coral-dark); background: var(--coral-wash); }
.empty-table { padding: 34px !important; color: var(--muted); text-align: center; }
.admin-message { margin: 18px 0 0; color: var(--teal-dark); font-size: 13px; }
.admin-message.error { color: var(--red); }
.admin-dialog { width: min(420px, calc(100vw - 32px)); padding: 28px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.admin-dialog::backdrop { background: rgba(21,43,46,.58); }
.admin-dialog h2 { margin: 0 0 7px; font-size: 21px; }
.admin-dialog .field { margin: 25px 0; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; }

@media (max-width: 1080px) {
  .admin-create { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 940px) {
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-top: 37px; }
  .output-column { position: static; }
  .result-stage { min-height: 330px; }
  .auth-main { grid-template-columns: minmax(340px, 420px); gap: 0; }
  .auth-main::before, .auth-main::after { display: none; }
  .auth-intro { display: none; }
  .auth-main > .auth-panel { grid-column: 1; }
}
@media (max-width: 620px) {
  .pony-selection { grid-template-columns: 20px minmax(0, 1fr) 60px auto; gap: 5px; }
  .pony-reorder button { width: 23px; }
  .indextts-workspace iframe { min-height: 620px; }
  .topbar-inner { min-height: 70px; padding: 0 17px; }
  .brand-copy > span { font-size: 15px; }
  .topbar-meta { gap: 7px; font-size: 11px; }
  .topbar-meta .topbar-note:last-child, .topbar-divider { display: none; }
  .shell { padding: 0 17px 50px; }
  .mode-tabs { margin: 0 -17px; padding: 12px 10px 0; min-height: 81px; gap: 5px; }
  .mode-tab { min-width: 145px; padding: 10px 11px 12px; }
  .tab-icon { flex-basis: 28px; width: 28px; height: 28px; font-size: 15px; }
  .tab-copy strong { font-size: 12px; }
  .tab-copy small { font-size: 9px; }
  .workspace { gap: 38px; padding-top: 31px; }
  .editor::before, .editor::after { display: none; }
  .section-head { margin-bottom: 24px; }
  h1 { font-size: 34px; }
  .section-description { font-size: 11px; }
  .field { margin-bottom: 21px; }
  .field-primary textarea { min-height: 155px; }
  .upload-zone { padding: 0 13px; }
  .upload-main { gap: 10px; min-height: 92px; }
  .upload-symbol { flex-basis: 35px; width: 35px; height: 35px; font-size: 21px; }
  .upload-action { padding: 8px 9px; font-size: 11px; }
  .result-section { padding: 20px; border-radius: 15px; }
  .result-stage { min-height: 245px; }
  .result-head { margin-bottom: 17px; }
  .primary-button { flex: 1; }
  .account-bar { gap: 8px; }
  .account-bar .topbar-divider, #account-name { display: none; }
  #quota-summary { display: none; }
  .auth-main { padding: 43px 17px 10vh; }
  .auth-panel { padding: 31px 24px 34px; }
  .auth-panel h1 { font-size: 31px; }
  .admin-shell { padding: 33px 17px 64px; }
  .admin-title { align-items: flex-start; margin-bottom: 30px; }
  .admin-title h1 { font-size: 34px; }
  .create-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .create-grid .field:nth-child(3), .create-grid .field:nth-child(4), .create-grid .primary-button { grid-column: span 2; }
  .admin-users th, .admin-users td { padding: 14px 12px; }
}
