@import url('https://fonts.googleapis.com/css2?family=Lexend+Deca:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap');
:root {
  color-scheme: light;
  --tii-font: "Lexend Deca", "Noto Sans", Arial, "Microsoft YaHei", sans-serif;
  --bg: #f5f5f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(29, 29, 31, .12);
  --panel: rgba(255, 255, 255, .82);
  --brand: #0a7cff;
  --brand-strong: #0064cf;
  --accent: #34c759;
  --ok: #248a3d;
  --warn: #ff9f0a;
  --danger: #ff453a;
  --shadow: 0 22px 60px rgba(0, 0, 0, .08);
}
*,
*::before,
*::after { box-sizing: border-box; }
html {
  width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0;
  width: 100%;
  overflow-x: hidden;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% -10%, rgba(10, 124, 255, .10), transparent 32%),
    radial-gradient(circle at 88% 0%, rgba(52, 199, 89, .09), transparent 26%),
    linear-gradient(180deg, #fbfbfd 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: var(--tii-font);
}
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 4px; font-size: 30px; letter-spacing: 0; }
h2 { margin-bottom: 0; font-size: 20px; letter-spacing: 0; }
a { color: inherit; text-decoration: none; }
button, input { max-width: 100%; font: inherit; }
button { cursor: pointer; }
.eyebrow {
  margin-bottom: 7px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.muted, .hint { color: var(--muted); }
.hint { margin-top: 14px; font-size: 13px; line-height: 1.6; }

.login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 48px 18px 40px;
  background: #efefef;
}
.auth-shell {
  width: min(560px, 100%);
  margin: 0 auto;
  min-width: 0;
}
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin-bottom: 32px;
  color: #073b46;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}
.brand-logo {
  display: block;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.brand-logo-login {
  height: 74px;
}
.brand-logo-header {
  height: 78px;
}
.auth-logo strong {
  min-width: 0;
  font-size: clamp(38px, 6vw, 54px);
  font-weight: 900;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.login-mark {
  display: inline-grid;
  place-items: center;
  width: 55px;
  height: 67px;
  border: 6px solid #1499ff;
  border-left-width: 8px;
  border-radius: 10px 10px 10px 28px;
  color: #1499ff;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
}
.brand-mark {
  width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, #0a7cff, #54c7ec);
  color: #fff;
  font-weight: 900;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 10px 24px rgba(0,113,227,.22);
}
.brand-mark.small {
  width: 42px;
  height: 42px;
  font-size: 13px;
}
.login-panel {
  background: #fff;
  color: #1c1c1c;
  padding: 44px 46px 48px;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,.10);
}
.login-panel h1 {
  margin-bottom: 30px;
  color: #1c1c1c;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.01em;
}
.login-form {
  display: grid;
  gap: 20px;
}
.login-form label {
  color: #1c1c1c;
  font-size: 14px;
  font-weight: 700;
}
.login-form input {
  width: 100%;
  height: 54px;
  margin-top: 9px;
  border: 1px solid #6f6f6f;
  border-radius: 5px;
  padding: 12px 14px;
  background: #fff;
  color: #1c1c1c;
  font-size: 16px;
  font-weight: 400;
}
.login-form input::placeholder {
  color: #8b8b8b;
  font-size: 16px;
}
.password-field {
  position: relative;
  display: block;
}
.password-field input {
  padding-right: 48px;
}
.password-toggle {
  position: absolute;
  right: 6px;
  top: 9px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 54px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #4a4a4a;
  box-shadow: none;
  cursor: pointer;
}
.password-toggle:hover { color: #12464f; }
.login-form button[type="submit"] {
  justify-self: stretch;
  width: 100%;
  margin-top: 6px;
  border: 0;
  border-radius: 6px;
  padding: 16px 20px;
  background: #12464f;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: none;
}
.login-mode-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 6px;
}
.login-form .login-mode-actions button[type="submit"] {
  display: flex;
  min-height: 78px;
  margin-top: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  text-align: left;
}
.login-form .login-mode-actions button strong,
.login-form .login-mode-actions button small {
  display: block;
}
.login-form .login-mode-actions button small {
  margin-top: 5px;
  color: rgba(255, 255, 255, .78);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
}
.login-form .login-mode-actions .semi-automatic-login {
  background: #197eaa;
}
.login-form .login-mode-actions .semi-automatic-login:hover {
  background: #126a90;
}
.login-workflow-note {
  margin: 10px 0 0;
  color: #53636a;
  font-size: 13px;
  line-height: 1.6;
}
.login-links {
  margin-top: 26px;
  color: #1c1c1c;
  font-size: 15px;
  line-height: 1.5;
}
.login-links p { margin-bottom: 14px; }
.login-links p:last-child { margin-bottom: 0; }
.login-links a {
  color: #0a72c4;
  text-decoration: none;
}
.login-links a:hover { text-decoration: underline; }
.auth-footnote {
  margin-top: 28px;
  color: #3f3f3f;
  font-size: 13px;
  text-align: center;
}

.workspace {
  min-height: 100vh;
  background: var(--bg);
}
.classic-workspace {
  background: #fff;
  color: #111;
  font-family: var(--tii-font);
}
.classic-header {
  position: relative;
  min-height: 116px;
  padding: 0 28px;
  border-bottom: 3px solid #1379a5;
  background: #fff;
}
.classic-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-width: 0;
  min-height: 118px;
  padding: 18px 0 22px;
}
.classic-utility {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px;
  border: 1px solid rgba(19,121,165,.18);
  border-radius: 999px;
  background: rgba(239,248,252,.86);
  color: #245f7b;
  font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}
.classic-utility span,
.classic-utility a,
.classic-utility .readiness-chip {
  white-space: nowrap;
}
.classic-utility .readiness-chip {
  min-height: 32px;
  padding: 0 11px;
  border-color: rgba(19,121,165,.16);
  background: rgba(255,255,255,.58);
  color: #1379a5;
}
.classic-utility .readiness-chip.ready {
  border-color: rgba(0,128,80,.18);
  background: rgba(235,250,242,.78);
  color: #07804f;
}
.utility-user,
.utility-quota {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #073b46;
  font-weight: 800;
}
.utility-quota strong {
  margin-left: 5px;
  color: #1379a5;
}
.utility-quota.warning strong {
  color: #9a5a00;
}
.utility-quota.full strong {
  color: #b42318;
}
.utility-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: #1379a5;
  font-weight: 900;
}
.utility-link:hover {
  background: #fff;
}
.classic-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  color: #073b46;
  font-weight: 900;
}
.classic-brand .brand-mark.small {
  width: 43px;
  height: 56px;
  border-radius: 8px 8px 8px 22px;
  font-size: 15px;
}
.classic-brand strong {
  min-width: 0;
  font-size: 42px;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}
.classic-tabs {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 28px;
}
.admin-mode-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  margin-right: 10px;
  border: 1px solid #b9c9d1;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  padding: 0 15px;
  background: #edf3f6;
  color: #245f7b;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.admin-mode-switch:hover {
  background: #1379a5;
  color: #fff;
}
.classic-tab {
  min-width: 88px;
  padding: 8px 14px 7px;
  border: 1px solid #b9c9d1;
  border-bottom: 0;
  background: #f1f4f6;
  color: #245f7b;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}
.classic-tab.active {
  background: #1379a5;
  color: #fff;
}
.classic-page {
  min-height: calc(100vh - 119px);
  padding: 30px 0 14px;
  background: linear-gradient(180deg, #eff8fc 0, #fff 175px);
}
.site-announcement,
.admin-announcement-panel,
.admin-qr-panel {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 18px;
}
.site-announcement {
  border: 1px solid #f0b7b2;
  border-radius: 6px;
  padding: 12px 16px;
  background: #fff4f2;
  color: #c63e34;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.admin-announcement-panel {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 1fr;
  gap: 18px;
  align-items: start;
  border: 1px solid #ccd9df;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(28, 77, 96, .06);
}
.admin-announcement-panel strong,
.admin-announcement-panel small { display: block; }
.admin-announcement-panel small { margin-top: 5px; color: #657981; line-height: 1.45; }
.announcement-form { display: grid; gap: 9px; }
.announcement-form textarea {
  width: 100%;
  resize: vertical;
  border: 1px solid #aebfc7;
  border-radius: 6px;
  padding: 10px 12px;
  color: #26383f;
  font: inherit;
  line-height: 1.5;
}
.announcement-actions { display: flex; gap: 8px; align-items: center; }
.announcement-actions button {
  border: 1px solid #1379a5;
  border-radius: 5px;
  padding: 7px 14px;
  background: #1379a5;
  color: #fff;
}
.announcement-actions button + button { background: #fff; color: #1379a5; }
#announcementResult { color: #52717e; font-size: 12px; }
.admin-qr-panel {
  display: grid;
  grid-template-columns: minmax(150px, 220px) 120px minmax(260px, 1fr);
  gap: 18px;
  align-items: center;
  border: 1px solid #ccd9df;
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(28, 77, 96, .06);
}
.admin-qr-copy strong,
.admin-qr-copy small { display: block; }
.admin-qr-copy small { margin-top: 5px; color: #657981; line-height: 1.45; }
#adminQrPreview {
  display: block;
  width: 108px;
  height: 150px;
  border: 1px solid #d8e2e7;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}
.admin-qr-form {
  display: grid;
  grid-template-columns: max-content max-content;
  gap: 9px 10px;
  align-items: center;
  justify-content: start;
}
.admin-qr-picker {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid #1379a5;
  border-radius: 5px;
  padding: 7px 14px;
  color: #1379a5;
  background: #fff;
  cursor: pointer;
}
.admin-qr-picker input { display: none; }
#adminQrSubmit {
  min-height: 36px;
  border: 1px solid #1379a5;
  border-radius: 5px;
  padding: 7px 14px;
  background: #1379a5;
  color: #fff;
}
#adminQrSubmit:disabled { opacity: .6; cursor: wait; }
.admin-qr-form > small,
#adminQrResult { grid-column: 1 / -1; color: #657981; font-size: 12px; }
#adminQrResult { color: #52717e; }
.classic-view {
  display: none;
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}
.classic-view.active { display: block; }
.classic-breadcrumb {
  margin: 0 0 42px;
  color: #376983;
  font-size: 12px;
}
.report-main-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}
.report-main-head h1 {
  margin-bottom: 8px;
  color: #202020;
  font-size: 30px;
  font-weight: 400;
}
.report-main-head p {
  color: #333;
  font-size: 13px;
}
.new-submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  border-radius: 4px;
  padding: 10px 18px;
  background: #229ce5;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 2px 5px rgba(0,0,0,.18);
  white-space: nowrap;
}
.ai-service-launcher {
  position: fixed;
  right: 0;
  bottom: 18%;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 8px 0 0 8px;
  padding: 11px 16px 11px 12px;
  background: linear-gradient(135deg, #ff932e, #ff5c28);
  color: #fff;
  box-shadow: 0 8px 24px rgba(220, 78, 27, .28);
}
.ai-service-launcher:hover {
  background: linear-gradient(135deg, #ff8621, #ee461b);
  transform: translateX(-2px);
}
.ai-service-launcher-icon {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 8px;
  font-size: 17px;
  font-weight: 900;
}
.ai-service-launcher span:last-child,
.ai-service-launcher strong,
.ai-service-launcher small {
  display: block;
  text-align: left;
}
.ai-service-launcher strong {
  font-size: 13px;
}
.ai-service-launcher small {
  margin-top: 2px;
  color: rgba(255,255,255,.85);
  font-size: 10px;
}
body.modal-open {
  overflow: hidden;
}
.ai-service-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 35, 47, .48);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.ai-service-modal[hidden] {
  display: none;
}
.ai-service-dialog {
  position: relative;
  width: min(540px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 18px;
  padding: 28px 34px 30px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(19, 42, 57, .3);
}
.ai-service-close {
  position: absolute;
  top: 13px;
  right: 16px;
  border: 0;
  padding: 3px 7px;
  background: transparent;
  color: #9aa7ae;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}
.ai-service-close:hover {
  color: #e65a25;
}
.ai-service-dialog-head {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 30px;
}
.ai-service-dialog-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 15px;
  background: linear-gradient(135deg, #ff9b39, #ff642b);
  color: #fff;
  font-size: 27px;
  box-shadow: 0 9px 22px rgba(255, 103, 38, .24);
}
.ai-service-dialog-head h2 {
  margin: 0 0 6px;
  color: #20282d;
  font-size: 24px;
}
.ai-service-dialog-head p {
  margin: 0;
  color: #8a969d;
  font-size: 13px;
}
.ai-service-benefits {
  display: grid;
  gap: 15px;
  margin: 28px 0;
  padding: 0;
  list-style: none;
}
.ai-service-benefits li {
  position: relative;
  padding-left: 30px;
  color: #4f5a61;
  font-size: 14px;
  line-height: 1.6;
}
.ai-service-benefits li::before {
  content: "✓";
  position: absolute;
  left: 2px;
  top: -2px;
  color: #48b67c;
  font-size: 20px;
  font-weight: 800;
}
.ai-service-qr-area {
  display: grid;
  justify-items: center;
  gap: 11px;
  border-top: 1px solid #edf0f2;
  padding-top: 23px;
  text-align: center;
}
.ai-service-qr-area > strong {
  color: #30393f;
  font-size: 15px;
}
.ai-service-qr-area > img {
  display: block;
  width: min(280px, 72vw);
  height: auto;
  max-height: min(415px, 62vh);
  border: 8px solid #fff;
  object-fit: contain;
}
.ai-service-qr-area > small {
  color: #a4adb2;
  font-size: 11px;
}
.ai-service-qr-placeholder {
  display: grid;
  place-items: center;
  width: min(250px, 72vw);
  min-height: 210px;
  border: 2px dashed #d8e0e5;
  padding: 24px;
  background: #f8fafb;
  color: #7f8d95;
}
.ai-service-qr-placeholder[hidden] {
  display: none;
}
.ai-service-qr-placeholder span {
  color: #aab6bc;
  font-size: 54px;
}
.ai-service-qr-placeholder strong,
.ai-service-qr-placeholder small {
  display: block;
}
.ai-service-qr-placeholder small {
  margin-top: 5px;
  font-size: 11px;
}
.classic-submit-card,
.classic-report-card {
  border: 1px solid #d4d4d4;
  background: #fff;
  box-shadow: none;
}
.classic-card-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 24px;
  border-bottom: 1px solid #a9a9a9;
  background: #f5f5f5;
  color: #333;
  font-size: 13px;
}
.classic-card-head a {
  color: #0087cf;
}
.step-indicator {
  color: #666;
}
.classic-card-body {
  display: grid;
  gap: 16px;
  padding: 22px 30px 30px;
}
.classic-card-body label {
  width: min(330px, 100%);
  color: #222;
  font-size: 13px;
  font-weight: 700;
}
.classic-card-body input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  width: 100%;
  height: 32px;
  margin-top: 7px;
  border: 1px solid #aeb8bf;
  border-radius: 2px;
  padding: 5px 7px;
  background: #fff;
}
.ai-notice {
  width: min(960px, 100%);
  border-left: 3px solid #c9e4f5;
  padding: 12px 14px;
  background: #eef7fd;
  color: #1875a7;
  font-size: 12px;
}
.file-pick-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px;
  font-size: 13px;
}
.file-upload-block {
  display: grid;
  gap: 10px;
  width: min(960px, 100%);
}
.file-button {
  width: auto !important;
  display: inline-flex;
  border: 1px solid #b7b7b7;
  border-radius: 3px;
  padding: 8px 12px;
  background: linear-gradient(#fff, #ececec);
  cursor: pointer;
}
.file-button input {
  display: none;
}
.selected-files-panel {
  width: min(720px, 100%);
  border: 1px solid #aebdca;
  border-left: 4px solid #168dcc;
  padding: 12px 14px;
  background: #f7fbfe;
}
.selected-files-panel[hidden] {
  display: none;
}
.selected-files-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}
.selected-files-head strong {
  color: #163f56;
  font-size: 13px;
}
.clear-selected-files,
.remove-selected-file {
  border: 0;
  padding: 3px 5px;
  background: transparent;
  color: #067fbf;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
}
.selected-files-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.selected-file-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #d4e1e9;
  padding: 8px 10px;
  background: #fff;
}
.selected-file-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 28px;
  background: #e7f4fb;
  color: #0b79b1;
  font-size: 9px;
  font-weight: 900;
}
.selected-file-info {
  min-width: 0;
}
.selected-file-info strong,
.selected-file-info small {
  display: block;
}
.selected-file-info strong {
  overflow: hidden;
  color: #1f2d35;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.selected-file-info small {
  margin-top: 2px;
  color: #657681;
  font-size: 11px;
}
.selected-files-panel > p {
  margin: 9px 0 0;
  color: #5f6d75;
  font-size: 11px;
}
.classic-filter-wrap {
  padding: 0 30px 30px;
}
.classic-filter-wrap .filter-card {
  width: min(520px, 100%);
  border-radius: 5px;
  background: #f8fafc;
}
.classic-filter-wrap .filter-card summary {
  padding: 12px 14px;
}
.classic-card-foot {
  min-height: 118px;
  padding: 28px 24px 18px;
  border-top: 1px solid #a9a9a9;
  background: #f4f4f4;
  font-size: 12px;
}
.classic-card-foot p {
  margin-bottom: 22px;
  color: #334;
}
.classic-card-foot button[type="submit"] {
  border-radius: 3px;
  padding: 8px 17px;
  box-shadow: none;
}
.classic-cancel {
  margin-left: 8px;
  border: 1px solid #b7b7b7;
  border-radius: 3px;
  padding: 8px 14px;
  background: linear-gradient(#fff, #ececec);
  color: #333;
}
.classic-card-foot .message {
  display: inline-block;
  margin-left: 12px;
  margin-top: 0;
}
.compact-stats {
  margin-bottom: 14px;
}
.report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
}
.classic-report-card {
  padding: 0;
}
.classic-report-table {
  min-width: 760px;
}
.classic-report-table th {
  background: #fff;
  color: #222;
  font-size: 13px;
  text-transform: none;
  letter-spacing: 0;
}
.classic-report-table td {
  font-size: 13px;
}
.classic-report-table .empty-cell {
  height: 84px;
  border: 1px dashed #d5d5d5;
  color: #666;
  background: #fff;
}
.classic-detail-card {
  display: none;
  margin-top: 18px;
  border: 1px solid #d4d4d4;
  background: #fff;
  padding: 18px;
}
.classic-detail-card.has-task {
  display: block;
}
.inline-detail-row > td {
  padding: 0 !important;
  border-top: 0;
  background: #f7fbfe;
}
.inline-detail-row > td::before {
  display: none !important;
}
.inline-detail-host {
  border-left: 4px solid #168dcc;
  border-bottom: 1px solid #c7d9e5;
  padding: 20px 24px;
  background: #f7fbfe;
}
.inline-detail-host .detail-content {
  width: 100%;
}
.classic-footer {
  width: min(1100px, calc(100% - 40px));
  margin: 120px auto 0;
  border-radius: 8px;
  padding: 12px;
  background: #f2f2f2;
  color: #667;
  text-align: center;
  font-size: 11px;
}
.product {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
}
.main-area {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px clamp(18px, 3vw, 42px);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--line);
}
.topbar-main {
  display: flex;
  align-items: center;
  gap: 26px;
  min-width: 340px;
}
.crumb {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
}
.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}
.secondary-action {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(255,255,255,.62);
  color: var(--ink);
  font-weight: 800;
  white-space: nowrap;
}
.secondary-action:hover { background: #fff; }
.readiness-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(10,124,255,.18);
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(10,124,255,.08);
  color: var(--brand);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}
.readiness-chip.ready {
  border-color: rgba(52,199,89,.22);
  background: rgba(52,199,89,.12);
  color: var(--ok);
}
.user-box {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}
.user-box span { font-weight: 800; }
.user-box small {
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.62);
}
.user-box a {
  color: var(--brand);
  font-weight: 700;
}
.page {
  width: min(100%, 1680px);
  margin: 0 auto;
  padding: 24px clamp(18px, 3vw, 42px) 36px;
  display: grid;
  gap: 20px;
}
.assignment-hero,
.inbox-panel,
.detail-panel,
.explainer {
  scroll-margin-top: 112px;
}
.assignment-hero {
  display: block;
  padding: 28px 30px;
  background: var(--panel);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}
.assignment-hero p:not(.eyebrow) {
  max-width: 920px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.6;
}
.assignment-hero h2 {
  margin-bottom: 8px;
  font-size: 26px;
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.hero-meta span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(255,255,255,.62);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.primary-action,
button[type="submit"] {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(0, 113, 227, .22);
}
.primary-action:hover,
button[type="submit"]:hover { background: var(--brand-strong); }
button:disabled { background: #9ba5a8; cursor: not-allowed; }
.icon-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,255,255,.82);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.stat-card {
  background: var(--panel);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
}
.stat-card span {
  display: block;
  margin-bottom: 4px;
  font-size: 30px;
  font-weight: 900;
}
.stat-card small { color: var(--muted); }
.system-panel[hidden] { display: none; }
.account-panel[hidden] { display: none; }
.temp-user-panel[hidden] { display: none; }
.client-account-panel[hidden] { display: none; }
.integration-panel[hidden] { display: none; }
.audit-panel[hidden] { display: none; }
.temp-user-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 220px)) minmax(180px, 1fr);
  gap: 12px;
  align-items: end;
}
.temp-user-form label {
  color: #222;
  font-size: 13px;
  font-weight: 800;
}
.temp-user-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  width: 100%;
  height: 34px;
  margin-top: 7px;
  border-radius: 4px;
  padding: 7px 9px;
}
.temp-user-form button {
  border: 0;
  border-radius: 4px;
  padding: 10px 16px;
  background: #229ce5;
  color: #fff;
  font-weight: 900;
}
.temp-user-result {
  margin-top: 14px;
  border: 1px solid #bcd8e8;
  border-radius: 6px;
  padding: 12px;
  background: #eef7fd;
  color: #123;
  font-size: 13px;
  line-height: 1.7;
}
.temp-result-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}
.temp-result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.temp-copy-button {
  border: 1px solid #9fc3da;
  border-radius: 4px;
  padding: 6px 10px;
  background: #fff;
  color: #11658d;
  font-weight: 800;
  cursor: pointer;
}
.temp-copy-button:hover {
  background: #e4f2fb;
}
.temp-account-list {
  display: grid;
  gap: 9px;
}
.temp-account-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #d4e7f2;
  padding: 10px;
  background: #fff;
}
.temp-account-lines {
  display: grid;
  gap: 4px;
}
.temp-user-result code {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #fff;
  color: #111;
}
.client-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}
.client-stat-card {
  border: 1px solid #cfe0ea;
  padding: 12px;
  background: #f8fbfd;
}
.client-stat-card span {
  display: block;
  margin-bottom: 4px;
  font-size: 24px;
  font-weight: 900;
}
.client-stat-card small {
  color: #5d6b73;
  font-size: 12px;
}
.client-search-console {
  margin-top: 16px;
  border: 1px solid #d7e3ea;
  padding: 12px;
  background: #fff;
}
.client-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.client-search-row label,
.client-actions-grid label {
  display: grid;
  gap: 5px;
  color: #3d4b52;
  font-size: 12px;
  font-weight: 800;
}
.client-search-row input,
.client-actions-grid input,
.client-actions-grid select {
  border: 1px solid #b8cbd5;
  padding: 8px;
  background: #fff;
}
.client-search-row button,
.client-actions-grid button,
.client-link-button {
  border: 1px solid #9fc3da;
  padding: 7px 10px;
  background: #f4fbff;
  color: #11658d;
  font-weight: 800;
}
.client-search-layout {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.client-search-results,
.client-task-list {
  display: grid;
  gap: 8px;
}
.client-search-result {
  border: 1px solid #d7e3ea;
  padding: 10px;
  background: #f8fbfd;
  text-align: left;
}
.client-search-result strong,
.client-search-result span {
  display: block;
}
.client-search-result span {
  margin-top: 4px;
  color: #61717a;
  font-size: 12px;
}
.client-detail-panel {
  border: 1px solid #d7e3ea;
  padding: 12px;
  min-height: 160px;
  background: #fbfdfe;
}
.client-detail-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.client-detail-head h3 {
  margin: 0 0 4px;
}
.client-detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(80px, 1fr));
  gap: 8px;
  margin: 12px 0;
}
.client-detail-stats span {
  border: 1px solid #d7e3ea;
  padding: 9px;
  background: #fff;
}
.client-detail-stats strong,
.client-detail-stats small {
  display: block;
}
.client-detail-stats strong {
  font-size: 20px;
}
.client-detail-stats small {
  color: #61717a;
}
.client-actions-grid {
  display: grid;
  grid-template-columns: minmax(140px, 220px) minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}
.client-task-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #d7e3ea;
  padding: 9px;
  background: #fff;
}
.client-task-item strong,
.client-task-item small {
  display: block;
}
.client-task-item small,
.client-ledger-list {
  color: #61717a;
  font-size: 12px;
}
.client-ledger-list {
  padding-left: 18px;
}
.client-link-button {
  margin-top: 6px;
  font-size: 12px;
}
.client-account-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.client-account-columns h3 {
  margin-bottom: 4px;
  font-size: 16px;
}
.client-account-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.client-account-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #d7e3ea;
  padding: 10px;
  background: #fff;
}
.client-account-item strong,
.client-account-item small {
  display: block;
}
.client-account-item small {
  margin-top: 3px;
  color: #61717a;
  font-size: 12px;
}
.client-account-quota {
  min-width: 84px;
  text-align: right;
}
.client-account-quota span {
  display: block;
  color: #0f7da8;
  font-size: 22px;
  font-weight: 900;
}
.client-reset-button {
  margin-top: 6px;
  border: 1px solid #caa8a3;
  border-radius: 4px;
  padding: 4px 8px;
  background: #fff7f5;
  color: #9f2f24;
  font-size: 12px;
  font-weight: 800;
}
.client-reset-button:hover {
  background: #ffe6e1;
}
.client-reset-button:disabled {
  opacity: .72;
  cursor: wait;
}
.integration-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: 18px;
  align-items: start;
}
.integration-grid strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}
.env-list {
  display: grid;
  gap: 8px;
}
.env-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.58);
  color: var(--muted);
  font-size: 13px;
}
.env-item strong {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.env-item span {
  color: var(--warn);
  font-weight: 800;
}
.env-item.ready span { color: var(--ok); }
.teacher-account-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #d9e7ef;
  background: #f8fbfd;
}
.teacher-form-head,
.teacher-account-result {
  grid-column: 1 / -1;
}
.teacher-form-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5eef3;
}
.teacher-form-head strong {
  color: #172f3a;
  font-size: 15px;
}
.teacher-form-head span {
  color: #627680;
  font-size: 12px;
  line-height: 1.5;
  text-align: right;
}
.teacher-account-form button {
  align-self: end;
}
.teacher-account-result {
  padding: 10px 12px;
  border: 1px solid #bcd8e8;
  background: #eef7fd;
  color: #123;
  font-size: 13px;
  font-weight: 800;
}
.teacher-account-result.error {
  border-color: #efd0cb;
  background: #fff7f5;
  color: #9f2f24;
}
.teacher-account-result.success {
  border-color: #b8dfc6;
  background: #f1fbf4;
  color: #16733b;
}
.account-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
}
.account-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.58);
}
.account-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}
.account-title strong,
.account-title small {
  overflow-wrap: anywhere;
}
.account-title small,
.account-meta {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}
.account-meta span {
  display: block;
  overflow-wrap: anywhere;
}
.account-alert {
  border: 1px solid #efd0cb;
  padding: 8px 10px;
  background: #fff7f5;
  color: #9f2f24;
  font-size: 12px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.capacity-bar {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(29,29,31,.08);
}
.capacity-bar span {
  display: block;
  height: 100%;
  width: var(--capacity, 0%);
  border-radius: inherit;
  background: var(--brand);
}
.capacity-text {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}
.account-daily-usage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-left: 4px solid #229ce5;
  background: #eef8fe;
}
.account-daily-usage strong {
  color: #126e9e;
  font-size: 15px;
}
.account-daily-usage span {
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}
.course-account-summary {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #c9dde8;
  background: #f7fbfd;
}
.course-account-summary strong {
  color: #174e68;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.course-account-summary span {
  color: var(--muted);
  font-size: 12px;
}
.course-config-form {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.course-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.course-config-form label {
  display: grid;
  gap: 4px;
  color: #4d6673;
  font-size: 11px;
  font-weight: 800;
}
.course-config-form input,
.course-config-form textarea {
  width: 100%;
  border: 1px solid #aebdc5;
  padding: 7px 8px;
  background: #fff;
  color: #222;
  font: inherit;
}
.course-config-form textarea {
  resize: vertical;
  line-height: 1.5;
}
.course-config-actions {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
}
.course-config-actions input {
  max-width: 90px;
}
.course-config-message {
  min-height: 16px;
  color: #126e9e;
  font-size: 12px;
}
@media (max-width: 700px) {
  .course-config-grid {
    grid-template-columns: 1fr;
  }
  .course-config-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 390px);
  gap: 20px;
  align-items: start;
}
.panel {
  background: var(--panel);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
}
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.section-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}
.live-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(0, 113, 227, .10);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}
.status-pill.completed { background: rgba(52, 199, 89, .16); color: var(--ok); }
.status-pill.pending { background: rgba(255, 159, 10, .16); color: #9a5a00; }
.table-shell {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
}
table {
  width: 100%;
  min-width: 680px;
  table-layout: fixed;
  border-collapse: collapse;
}
th, td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
th {
  background: rgba(242, 242, 244, .92);
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
tbody tr {
  cursor: pointer;
}
tbody tr:hover,
tbody tr.selected {
  background: rgba(10, 124, 255, .06);
}
tbody tr:last-child td { border-bottom: 0; }
.empty-cell {
  padding: 34px;
  color: var(--muted);
  text-align: center;
  cursor: default;
}
.title-cell strong { display: block; margin-bottom: 4px; }
.title-cell strong,
.file-cell strong {
  overflow-wrap: anywhere;
}
.title-cell small,
.file-cell small { color: var(--muted); }
.score-pair {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.score-metric {
  display: grid;
  gap: 4px;
}
.score-metric > small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
.score {
  display: inline-grid;
  place-items: center;
  min-width: 52px;
  height: 34px;
  padding: 0 8px;
  border-radius: 12px;
  background: rgba(10, 124, 255, .10);
  color: var(--brand);
  font-weight: 900;
}
.score.hot {
  background: rgba(255, 159, 10, .16);
  color: #9a5a00;
}
.score.ready {
  background: rgba(52, 199, 89, .16);
  color: var(--ok);
}
.download,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 8px 11px;
  font-size: 13px;
  font-weight: 800;
}
.download {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 20px rgba(0,113,227,.18);
}
.report-downloads {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.report-download {
  min-width: 76px;
}
.task-file-error {
  max-width: 360px;
  margin-top: 7px;
  border: 1px solid #efb4ae;
  background: #fff1ef;
  color: #a7281c;
  padding: 8px 10px;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.4;
}
.detail-error {
  grid-column: 1 / -1;
  max-width: none;
  margin: 0;
}
.classic-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.classic-row-delete {
  min-height: 34px;
  border: 1px solid #d94b3d;
  border-radius: 2px;
  padding: 7px 13px;
  background: #fff;
  color: #b72f24;
  font-weight: 800;
  cursor: pointer;
}
.classic-row-delete:hover {
  background: #fff1ef;
}
.classic-row-delete:disabled {
  cursor: wait;
  opacity: .65;
}
.ghost-button {
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255,255,255,.62);
  cursor: default;
}
.detail-panel {
  position: sticky;
  top: 18px;
}
.empty-detail,
.detail-content {
  display: grid;
  gap: 16px;
}
.detail-content h2 { line-height: 1.35; }
.detail-meta {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}
.detail-meta span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(29,29,31,.08);
}
.manual-report-box {
  display: grid;
  gap: 8px;
  border: 1px solid #bdd9ea;
  padding: 12px;
  background: #f3f9fd;
}
.manual-report-box p {
  margin-bottom: 0;
  color: #51616b;
  font-size: 13px;
  line-height: 1.55;
}
.manual-report-actions,
.manual-report-form {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
}
.manual-report-form button {
  border: 0;
  border-radius: 4px;
  padding: 10px 13px;
  background: #229ce5;
  color: #fff;
  font-weight: 900;
}
.manual-report-message {
  color: #0a6d38;
  font-size: 13px;
  font-weight: 800;
}
.timeline {
  display: grid;
  gap: 0;
}
.event {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  padding-bottom: 13px;
}
.event:not(:last-child) .line {
  background: linear-gradient(var(--brand), var(--brand)) center top / 2px 100% no-repeat;
}
.dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(10,124,255,.12);
}
.event strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}
.event small {
  color: var(--muted);
  line-height: 1.45;
}
.explainer {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 20px;
}
.explainer ol {
  margin: 0;
  padding-left: 20px;
  color: #465154;
  line-height: 1.8;
}

.drawer {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 20;
}
.drawer.open { display: block; }
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .28);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(480px, 100%);
  height: 100%;
  background: rgba(255,255,255,.92);
  padding: 30px;
  box-shadow: -24px 0 60px rgba(0,0,0,.12);
  overflow-y: auto;
}
.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.form-stack {
  display: grid;
  gap: 14px;
}
label {
  display: grid;
  gap: 7px;
  color: #334044;
  font-size: 14px;
  font-weight: 800;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  width: 100%;
  border: 1px solid #cdd6d8;
  border-radius: 14px;
  padding: 12px;
  background: rgba(255,255,255,.82);
  color: var(--ink);
}
input:not([type="checkbox"]):not([type="radio"]):focus {
  outline: 3px solid rgba(201, 66, 45, .14);
  border-color: var(--brand);
}
.filter-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.58);
  overflow: hidden;
}
.filter-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 900;
}
.filter-card summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.filter-body {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}
.filter-note {
  margin: 0;
  color: #b42318;
  font-size: 12px;
  line-height: 1.6;
}
.check-row,
.radio-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}
.check-row input,
.radio-row input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}
.filter-group {
  display: grid;
  gap: 9px;
  padding-top: 4px;
}
.filter-group strong {
  font-size: 13px;
}
.filter-group small {
  color: var(--muted);
  font-size: 12px;
}
.mini-input {
  width: 72px;
  border: 1px solid #cdd6d8;
  border-radius: 10px;
  padding: 7px 8px;
  background: rgba(255,255,255,.82);
}
.mini-input:disabled {
  opacity: .48;
  background: rgba(242,242,244,.82);
}
.alert,
.message.error {
  background: rgba(255, 69, 58, .10);
  color: #b42318;
  border: 1px solid rgba(255, 69, 58, .22);
  border-radius: 14px;
  padding: 10px 12px;
  margin: 14px 0;
}
.message.success {
  background: rgba(52, 199, 89, .14);
  color: var(--ok);
  border: 1px solid rgba(52, 199, 89, .22);
  border-radius: 14px;
  padding: 10px 12px;
  margin-top: 14px;
}
.login-screen .login-form input {
  height: 54px;
  margin-top: 9px;
  border: 1px solid #6f6f6f;
  border-radius: 5px;
  padding: 12px 14px;
  background: #fff;
  color: #1c1c1c;
  font-size: 16px;
}
.login-screen .login-form input:focus {
  outline: 2px solid #12464f;
  outline-offset: 1px;
  border-color: #12464f;
}
.login-screen .login-form .password-field input {
  padding-right: 48px;
}
.login-screen .login-form button[type="submit"] {
  justify-self: stretch;
  width: 100%;
  margin-top: 6px;
  border: 0;
  border-radius: 6px;
  padding: 16px 20px;
  background: #12464f;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: none;
}
.login-screen .login-form button[type="submit"]:hover {
  background: #0d363d;
}
.login-screen .login-form button.semi-automatic-login[type="submit"] {
  background: #197eaa;
}
.login-screen .login-form button.semi-automatic-login[type="submit"]:hover {
  background: #126a90;
}
@media (max-width: 620px) {
  .login-mode-actions { grid-template-columns: 1fr; }
}
.login-screen .login-form .password-toggle {
  width: 40px;
  height: 54px;
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #4a4a4a;
}
@media (max-width: 1040px) {
  .classic-header { padding: 0 18px; }
  .classic-brand-row {
    flex-wrap: wrap;
    align-content: center;
    row-gap: 12px;
    padding: 14px 0 10px;
  }
  .classic-utility {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
  }
  .topbar { flex-wrap: wrap; }
  .topbar-main { flex: 1 1 100%; }
  .top-actions { margin-left: 0; }
  .content-grid { grid-template-columns: 1fr; }
  .integration-grid { grid-template-columns: 1fr; }
  .detail-panel { position: static; }
  .classic-view {
    width: min(100% - 28px, 920px);
  }
  .classic-footer {
    width: calc(100% - 28px);
    margin-top: 70px;
  }
  .report-main-head {
    align-items: center;
  }
  .temp-user-form {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }
  .temp-user-form button {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
@media (max-width: 760px) {
  .ai-service-launcher {
    right: 0;
    bottom: 18px;
    padding: 10px 12px;
  }
  .ai-service-launcher small {
    display: none;
  }
  .ai-service-modal {
    align-items: start;
    padding: 12px;
    overflow-y: auto;
  }
  .ai-service-dialog {
    max-height: none;
    margin: 12px 0;
    border-radius: 14px;
    padding: 24px 20px 26px;
  }
  .ai-service-dialog-head {
    align-items: flex-start;
    gap: 12px;
  }
  .ai-service-dialog-icon {
    width: 52px;
    height: 52px;
  }
  .ai-service-dialog-head h2 {
    padding-right: 22px;
    font-size: 20px;
  }
  .ai-service-benefits {
    margin: 22px 0;
  }
  .login-screen {
    padding: 32px 0 32px;
  }
  .auth-shell {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
  }
  .auth-logo {
    gap: 9px;
    margin-bottom: 24px;
    justify-content: center;
  }
  .auth-logo strong {
    flex: 0 1 auto;
    max-width: calc(100vw - 86px);
    min-width: 0;
    font-size: clamp(24px, 7.2vw, 28px);
    overflow-wrap: anywhere;
    line-height: 1.08;
  }
  .brand-logo-login {
    width: min(278px, 100%);
    height: auto;
  }
  .login-mark {
    width: 42px;
    height: 52px;
    border-width: 5px;
    border-left-width: 7px;
    border-radius: 8px 8px 8px 22px;
  }
  .login-panel {
    width: 100%;
    max-width: 100%;
    padding: 28px 22px 32px;
  }
  .login-panel h1 {
    margin-bottom: 24px;
    font-size: 26px;
  }
  body.classic-workspace {
    overflow-x: hidden;
  }
  .classic-header {
    min-height: 0;
    padding: 0 16px;
  }
  .classic-brand-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    min-height: 0;
    padding: 14px 0 12px;
  }
  .classic-brand {
    justify-content: flex-start;
  }
  .classic-brand strong { font-size: clamp(25px, 8vw, 32px); }
  .classic-brand .brand-mark.small {
    width: 38px;
    height: 48px;
  }
  .brand-logo-header {
    width: min(187px, 100%);
    height: auto;
  }
  .classic-utility {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 100%;
    border-radius: 16px;
    padding: 7px;
    overflow: visible;
  }
  .classic-utility .readiness-chip {
    grid-column: 1 / -1;
    justify-content: center;
  }
  .utility-user,
  .utility-quota,
  .utility-link {
    justify-content: center;
    min-width: 0;
    padding: 0 9px;
    text-align: center;
  }
  .utility-link {
    grid-column: 1 / -1;
    border: 1px solid rgba(19,121,165,.14);
    background: rgba(255,255,255,.54);
  }
  .classic-tabs {
    height: auto;
    padding-bottom: 0;
    gap: 6px;
    width: 100%;
  }
  .classic-tab {
    flex: 1;
    min-width: 0;
    border-radius: 9px 9px 0 0;
    padding: 10px 8px 9px;
  }
  .classic-page {
    min-height: auto;
    padding: 18px 0 12px;
    background: linear-gradient(180deg, #eff8fc 0, #fff 132px);
  }
  .classic-view {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
  }
  .classic-breadcrumb {
    margin-bottom: 22px;
    font-size: 11px;
  }
  .report-main-head {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    margin-bottom: 18px;
  }
  .report-main-head h1 {
    font-size: 28px;
  }
  .report-main-head p {
    line-height: 1.7;
  }
  .new-submit-button {
    width: 100%;
    min-height: 44px;
  }
  .classic-report-card,
  .table-shell {
    border: 0;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }
  .classic-report-table,
  .classic-report-table tbody,
  .classic-report-table tr,
  .classic-report-table td {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }
  .classic-report-table {
    table-layout: auto;
    border-collapse: separate;
  }
  .classic-report-table thead,
  .classic-report-table colgroup {
    display: none;
  }
  .classic-report-table tbody {
    display: grid;
    gap: 12px;
  }
  .classic-report-table tr {
    border: 1px solid #d8e3ea;
    border-radius: 14px;
    padding: 14px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(19,121,165,.08);
  }
  .classic-report-table tr.selected,
  .classic-report-table tr:hover {
    background: #f6fbff;
  }
  .classic-report-table td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid #edf2f5;
    padding: 10px 2px;
    font-size: 13px;
  }
  .classic-report-table td:last-child {
    border-bottom: 0;
    padding-bottom: 2px;
  }
  .classic-report-table td::before {
    content: attr(data-label);
    color: #5f7480;
    font-size: 12px;
    font-weight: 800;
  }
  .classic-report-table .title-cell,
  .classic-report-table .file-cell {
    align-items: start;
  }
  .classic-report-table .title-cell strong,
  .classic-report-table .file-cell strong {
    line-height: 1.35;
  }
  .classic-report-table .empty-row {
    display: block;
    box-shadow: none;
  }
  .classic-report-table .empty-row td {
    display: block;
    padding: 26px 14px;
    border: 1px dashed #d5d5d5;
    text-align: center;
  }
  .classic-report-table .empty-row td::before {
    display: none;
  }
  .score {
    width: 52px;
  }
  .download,
  .ghost-button,
  .classic-row-action {
    min-height: 34px;
  }
  .classic-detail-card {
    margin-top: 14px;
    border-radius: 14px;
    padding: 16px;
  }
  .classic-submit-card {
    border-radius: 0;
  }
  .classic-card-head {
    flex-direction: column;
    padding: 16px 18px;
  }
  .classic-card-body {
    gap: 14px;
    padding: 20px 18px 22px;
  }
  .classic-card-body label {
    width: 100%;
  }
  .classic-card-body input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
    width: 100%;
    height: 38px;
  }
  .ai-notice {
    font-size: 12px;
    line-height: 1.55;
  }
  .file-pick-row {
    align-items: stretch;
    gap: 10px;
  }
  .file-button {
    justify-content: center;
  }
  .classic-filter-wrap {
    padding: 0 18px 22px;
  }
  .classic-filter-wrap .filter-card {
    width: 100%;
  }
  .filter-card summary {
    align-items: flex-start;
    gap: 8px;
  }
  .filter-body {
    padding: 12px;
  }
  .radio-row {
    grid-template-columns: auto 76px minmax(0, 1fr);
  }
  .classic-card-foot {
    min-height: 0;
    padding: 20px 18px;
  }
  .classic-card-foot p {
    line-height: 1.6;
  }
  .classic-card-foot button[type="submit"],
  .classic-cancel {
    width: calc(50% - 7px);
    min-height: 40px;
  }
  .classic-cancel {
    margin-left: 8px;
  }
  .classic-card-foot .message {
    display: block;
    margin: 12px 0 0;
  }
  .classic-footer {
    width: calc(100vw - 32px);
    max-width: calc(100vw - 32px);
    margin-top: 48px;
  }
  .panel {
    border-radius: 14px;
    padding: 18px;
  }
  .section-head {
    gap: 8px;
  }
  .account-grid,
  .integration-grid,
  .client-stat-grid,
  .client-search-row,
  .client-search-layout,
  .client-detail-stats,
  .client-actions-grid,
  .client-account-columns,
  .temp-user-form {
    grid-template-columns: 1fr;
  }
  .temp-user-form button {
    width: 100%;
    justify-self: stretch;
  }
  .temp-result-head,
  .temp-account-item,
  .client-account-item {
    grid-template-columns: 1fr;
  }
  .client-account-quota {
    text-align: left;
  }
  .temp-result-head {
    align-items: stretch;
  }
  .temp-result-actions,
  .temp-copy-button {
    width: 100%;
  }
  .manual-report-actions,
  .manual-report-form {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .manual-report-form .file-button,
  .manual-report-form button,
  .manual-report-actions .download {
    width: 100%;
  }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-hero { padding: 30px; }
  .hero-metrics { grid-template-columns: 1fr; }
  .topbar,
  .assignment-hero,
  .section-head {
    flex-direction: column;
    align-items: stretch;
  }
  .topbar-main {
    min-width: 0;
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
  .top-actions {
    width: 100%;
    justify-content: stretch;
  }
  .top-actions button { flex: 1; }
  .page,
  .topbar { padding-left: 16px; padding-right: 16px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .explainer { grid-template-columns: 1fr; }
}
@media (max-width: 430px) {
  .login-screen {
    padding-left: 0;
    padding-right: 0;
  }
  .auth-shell {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
  }
  .auth-logo strong {
    font-size: 24px;
  }
  .brand-logo-login {
    width: min(235px, 100%);
  }
  .login-panel h1 {
    font-size: 25px;
  }
  .classic-brand strong {
    font-size: 27px;
  }
  .brand-logo-header {
    width: min(160px, 100%);
  }
  .classic-utility {
    grid-template-columns: 1fr;
  }
  .utility-link,
  .classic-utility .readiness-chip {
    grid-column: auto;
  }
  .classic-report-table td {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .classic-report-table td::before {
    font-size: 11px;
  }
  .classic-card-foot button[type="submit"],
  .classic-cancel {
    width: 100%;
    margin-left: 0;
  }
  .classic-cancel {
    margin-top: 8px;
  }
  .radio-row {
    grid-template-columns: auto 70px 1fr;
  }
}
@media (max-width: 360px) {
  .login-screen {
    padding-left: 0;
    padding-right: 0;
  }
  .auth-shell {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }
  .auth-logo {
    gap: 7px;
  }
  .auth-logo strong {
    font-size: 21px;
  }
  .brand-logo-login {
    width: min(198px, 100%);
  }
  .login-panel {
    padding-left: 14px;
    padding-right: 14px;
  }
  .classic-header {
    padding-left: 10px;
    padding-right: 10px;
  }
  .classic-brand {
    gap: 8px;
  }
  .classic-brand strong {
    font-size: 23px;
  }
  .brand-logo-header {
    width: min(144px, 100%);
  }
  .classic-brand .brand-mark.small {
    width: 34px;
    height: 43px;
  }
  .classic-view,
  .classic-footer {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
  }
  .classic-card-body,
  .classic-filter-wrap,
  .classic-card-foot {
    padding-left: 12px;
    padding-right: 12px;
  }
  .radio-row {
    grid-template-columns: 1fr;
    align-items: start;
  }
  .radio-row .mini-input {
    width: 100%;
  }
}

/* Old-school customer-facing skin: flat, rectangular, and system-like. */
body {
  background: #fff;
  color: #1f1f1f;
  font-family: var(--tii-font);
}
.login-screen {
  background: #efefef;
}
.login-mark,
.brand-mark,
.classic-brand .brand-mark.small {
  border-radius: 0;
  background: #1f97d4;
  box-shadow: none;
}
.login-mark {
  border-color: #1f97d4;
  color: #1f97d4;
  background: #fff;
}
.auth-logo,
.classic-brand {
  color: #073b46;
}
.auth-logo strong,
.classic-brand strong {
  letter-spacing: 0;
}
.login-panel {
  background: #fff;
}
.login-form input,
.login-screen .login-form input,
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  border-radius: 0;
  box-shadow: none;
}
.login-form button[type="submit"],
.login-screen .login-form button[type="submit"],
button[type="submit"],
.classic-cancel,
.file-button,
.new-submit-button,
.download,
.ghost-button,
.classic-row-action,
.temp-user-form button,
.manual-report-form button {
  border-radius: 2px;
  box-shadow: none;
}
/* The login screen keeps its own rounded, high-contrast styling. */
.login-screen .login-form input,
.login-screen .login-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]) {
  border-radius: 5px;
}
.login-screen .login-form button[type="submit"] {
  border-radius: 6px;
  background: #12464f;
}
.login-screen .login-form .password-toggle {
  border-radius: 5px;
  background: transparent;
}
.classic-workspace {
  background: #fff;
}
.classic-header {
  border-bottom: 3px solid #0b789f;
  background: #fff;
}
.classic-utility {
  gap: 0;
  border: 1px solid #b8c8d1;
  border-radius: 0;
  padding: 0;
  background: #f3f7fa;
  color: #244f64;
  box-shadow: none;
}
.classic-utility span,
.classic-utility a,
.classic-utility .readiness-chip {
  min-height: 30px;
  border-left: 1px solid #c9d6dc;
  border-radius: 0;
  padding: 7px 10px;
  background: transparent;
}
.classic-utility span:first-child {
  border-left: 0;
}
.classic-utility .readiness-chip,
.classic-utility .readiness-chip.ready,
.utility-user,
.utility-quota,
.utility-link {
  border-radius: 0;
  background: transparent;
}
.classic-utility .readiness-chip.ready {
  color: #0a6d38;
}
.classic-utility .workflow-mode-chip.automatic {
  color: #0a6d38;
}
.classic-utility .workflow-mode-chip.semi-automatic {
  color: #126a90;
  font-weight: 600;
}
.utility-link:hover {
  background: #e8f2f7;
}
.workflow-mode-notice {
  display: flex;
  gap: 12px;
  align-items: center;
  margin: 14px 28px 0;
  border-left: 4px solid #2583aa;
  padding: 10px 13px;
  background: #eef8fc;
  color: #28586b;
  font-size: 13px;
}
.workflow-mode-notice.automatic {
  border-left-color: #2c8a5b;
  background: #f0f8f3;
  color: #276044;
}
.workflow-mode-notice strong {
  flex: 0 0 auto;
}
.classic-tab {
  border-radius: 0;
  background: #e9eef1;
}
.classic-tab.active {
  background: #1379a5;
}
.classic-page {
  background: linear-gradient(180deg, #eff8fc 0, #fff 165px);
}
.new-submit-button,
.download,
.temp-user-form button,
.manual-report-form button,
button[type="submit"] {
  background: #229ce5;
}
.new-submit-button:hover,
.download:hover,
.temp-user-form button:hover,
.manual-report-form button:hover,
button[type="submit"]:hover {
  background: #147fbd;
}
.classic-submit-card,
.classic-report-card,
.classic-detail-card,
.panel,
.filter-card,
.classic-filter-wrap .filter-card,
.account-card,
.env-item,
.manual-report-box,
.client-stat-card,
.client-account-item,
.temp-user-result,
.table-shell,
.stat-card,
.inbox-panel,
.detail-panel {
  border-radius: 0;
  box-shadow: none;
  background: #fff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.classic-card-head,
.classic-card-foot {
  background: #f3f3f3;
}
.classic-report-table th,
th {
  background: #f2f2f2;
  color: #222;
  text-transform: none;
  letter-spacing: 0;
}
tbody tr:hover,
tbody tr.selected {
  background: #eef5ff;
}
.status-pill,
.live-pill,
.score,
.download,
.ghost-button,
.capacity-bar,
.capacity-bar span,
.alert,
.message.error,
.message.success,
.mini-input,
.temp-user-result code {
  border-radius: 2px;
}
.score {
  background: #e8f6ec;
  color: #0a7f3f;
}
.score.hot {
  background: #fff1d9;
  color: #9a5a00;
}
.score.ready {
  background: #e8f6ec;
  color: #0a7f3f;
}
.status-pill {
  border: 1px solid #c7d8e2;
  background: #eef7fd;
  color: #235f7a;
}
.status-pill.completed {
  border-color: #badcc4;
  background: #e8f6ec;
  color: #0a7f3f;
}
.status-pill.pending {
  border-color: #eed0a2;
  background: #fff1d9;
  color: #9a5a00;
}
.filter-card summary {
  background: #f7f7f7;
}
.classic-footer {
  border-radius: 0;
}
.admin-view,
.manual-view {
  width: min(1240px, calc(100% - 40px));
}
.admin-main-head,
.manual-main-head {
  margin-bottom: 16px;
}
.admin-main-head p,
.manual-main-head p {
  max-width: 760px;
  margin: 0;
  color: #4e6672;
  font-size: 13px;
  line-height: 1.65;
}
.admin-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.admin-view .temp-user-panel { order: 10; }
.admin-view .client-account-panel { order: 20; }
.admin-view .integration-panel { order: 30; }
.admin-view .account-panel { order: 40; }
.admin-view .audit-panel { order: 50; }
.admin-view .admin-qr-panel {
  order: 60;
  grid-column: 1 / -1;
  width: 100%;
  margin: 0;
}
.admin-view .panel {
  border: 1px solid #d7e3ea;
  padding: 18px;
  background: #fff;
}
.manual-view .panel {
  border: 1px solid #d7e3ea;
  padding: 18px;
  background: #fff;
}
.manual-view .section-head {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5eef3;
}
.manual-view .section-head h2 { font-size: 18px; }
.admin-view .system-panel,
.admin-view .client-account-panel,
.admin-view .integration-panel,
.admin-view .audit-panel {
  grid-column: 1 / -1;
}
.admin-view .section-head {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5eef3;
}
.admin-view .section-head h2 {
  font-size: 18px;
}
.admin-view label {
  gap: 5px;
  color: #304650;
  font-size: 12px;
}
.admin-view input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.admin-view select {
  min-height: 38px;
  border-radius: 4px;
  padding: 8px 10px;
  background: #fff;
}
.admin-view button,
.admin-view button[type="submit"],
.admin-view .client-link-button,
.admin-view .temp-copy-button {
  min-height: 36px;
  border: 1px solid #9fc3da;
  border-radius: 4px;
  padding: 7px 12px;
  background: #f5fbff;
  color: #11658d;
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}
.manual-view button,
.manual-view .client-link-button {
  min-height: 36px;
  border: 1px solid #9fc3da;
  border-radius: 4px;
  padding: 7px 12px;
  background: #f5fbff;
  color: #11658d;
  font-size: 13px;
  font-weight: 800;
  box-shadow: none;
}
.admin-view button:hover,
.admin-view button[type="submit"]:hover,
.admin-view .client-link-button:hover,
.admin-view .temp-copy-button:hover {
  background: #e7f4fb;
}
.manual-view button:hover,
.manual-view .client-link-button:hover { background: #e7f4fb; }
.admin-view .client-reset-button,
.admin-view .client-reset-button:hover {
  border-color: #d7aca6;
  background: #fff7f5;
  color: #9f2f24;
}
.system-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: 14px;
  align-items: start;
}
.system-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.system-check,
.backup-console,
.password-form,
.backup-item {
  min-width: 0;
  border: 1px solid #d9e7ef;
  background: #fbfdfe;
}
.system-check {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
}
.system-check.warn {
  border-color: #efd0cb;
  background: #fffafa;
}
.system-check strong,
.backup-console strong,
.password-form strong,
.backup-item strong {
  display: block;
  color: #172f3a;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.system-check small,
.backup-item span {
  display: block;
  margin-top: 4px;
  color: #627680;
  font-size: 11px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.system-check > span {
  border: 1px solid #b8dfc6;
  padding: 3px 7px;
  background: #f1fbf4;
  color: #16733b;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}
.system-check.warn > span {
  border-color: #efd0cb;
  background: #fff7f5;
  color: #9f2f24;
}
.backup-console,
.password-form {
  display: grid;
  gap: 12px;
  padding: 14px;
}
.backup-console {
  margin-top: 14px;
}
.backup-console p,
.password-form p {
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
}
.backup-list {
  display: grid;
  gap: 8px;
}
.backup-item {
  padding: 10px;
}
.password-form label {
  display: grid;
  gap: 6px;
}
.client-stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}
.client-stat-group {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid #d9e7ef;
  padding: 14px;
  background: #fff;
}
.client-stat-group.is-daily,
.client-stat-group.is-history {
  grid-column: 1 / -1;
}
.client-stat-group-head {
  display: grid;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5eef3;
}
.client-stat-group-head strong {
  color: #172f3a;
  font-size: 16px;
}
.client-stat-group-head small {
  color: #627680;
  font-size: 12px;
  line-height: 1.55;
}
.client-stat-items {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  gap: 10px;
}
.client-stat-group.is-daily .client-stat-items {
  grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
}
.client-stat-card {
  min-width: 0;
  min-height: 78px;
  padding: 12px 14px;
  border-color: #d9e7ef;
  background: #fbfdfe;
}
.client-stat-card span {
  font-size: 22px;
  line-height: 1.1;
  word-break: break-word;
}
.client-stat-card small {
  display: block;
  line-height: 1.45;
}
.client-search-console {
  margin-top: 14px;
  padding: 14px;
  border-color: #d9e7ef;
  background: #f8fbfd;
}
.client-search-row {
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: end;
}
.client-search-row input {
  height: 40px;
}
.client-search-row button {
  height: 40px;
  min-width: 82px;
}
.client-search-layout {
  grid-template-columns: 1fr;
  gap: 14px;
}
.client-search-results {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  align-content: start;
}
.client-search-result {
  border-color: #d9e7ef;
  background: #fff;
}
.client-search-result:hover {
  border-color: #9fc3da;
  background: #f3f9fd;
}
.client-detail-panel {
  min-height: 230px;
  border-color: #d9e7ef;
  padding: 18px;
  background: #fff;
}
.client-detail-head {
  padding-bottom: 12px;
  border-bottom: 1px solid #e5eef3;
}
.client-detail-head h3 {
  font-size: 18px;
}
.client-detail-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 14px 0;
}
.client-detail-stats span {
  padding: 10px;
  border-color: #d9e7ef;
  background: #fbfdfe;
}
.client-detail-stats strong {
  font-size: 22px;
}
.client-actions-grid {
  grid-template-columns: minmax(220px, .9fr) minmax(430px, 1.5fr) minmax(220px, .9fr);
  gap: 12px;
  align-items: start;
  padding: 0;
  border: 0;
  background: transparent;
}
.client-control-card {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #d9e7ef;
  background: #f8fbfd;
  align-content: start;
}
.client-control-copy {
  display: grid;
  gap: 4px;
}
.client-control-copy strong {
  color: #172f3a;
  font-size: 15px;
}
.client-control-copy small {
  color: #627680;
  font-size: 12px;
  line-height: 1.5;
}
.client-inline-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}
.client-settings-form .client-inline-fields {
  grid-template-columns: minmax(120px, .75fr) minmax(190px, 1.25fr) auto;
}
.client-actions-grid button {
  align-self: end;
  white-space: nowrap;
}
.client-danger-card {
  background: #fffafa;
  border-color: #efd0cb;
}
.client-danger-card .client-reset-button {
  justify-self: stretch;
}
.audit-log-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
}
.audit-log-item {
  display: grid;
  grid-template-columns: minmax(190px, .65fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d9e7ef;
  background: #fbfdfe;
}
.audit-log-item strong,
.audit-log-item small,
.audit-log-item p {
  overflow-wrap: anywhere;
}
.audit-log-item strong {
  display: block;
  color: #172f3a;
  font-size: 13px;
}
.audit-log-item small {
  display: block;
  margin-top: 3px;
  color: #627680;
  font-size: 11px;
}
.audit-log-item p {
  margin: 0;
  color: #304650;
  font-size: 12px;
  line-height: 1.55;
}
.client-task-list,
.client-ledger-list {
  margin-top: 8px;
}
.client-task-item {
  border-color: #d9e7ef;
}
.client-account-columns {
  gap: 16px;
}
.client-account-columns > section {
  border: 1px solid #d9e7ef;
  padding: 14px;
  background: #fbfdfe;
}
@media (max-width: 1040px) {
  .client-stat-grid,
  .system-layout,
  .system-check-grid,
  .client-stat-items {
    grid-template-columns: 1fr;
  }
  .client-actions-grid {
    grid-template-columns: 1fr;
  }
  .client-settings-form .client-inline-fields {
    grid-template-columns: 1fr;
  }
  .client-actions-grid button {
    width: 100%;
  }
}
@media (max-width: 760px) {
  .admin-view,
  .manual-view {
    width: calc(100% - 24px);
  }
  .admin-stack,
  .system-layout,
  .system-check-grid,
  .client-stat-grid,
  .client-stat-items,
  .client-search-row,
  .client-search-layout,
  .client-detail-stats,
  .client-actions-grid,
  .client-inline-fields,
  .client-actions-grid .client-settings-form,
  .client-settings-form .client-inline-fields,
  .client-account-columns,
  .teacher-account-form {
    grid-template-columns: 1fr;
  }
  .teacher-form-head {
    display: grid;
  }
  .teacher-form-head span {
    text-align: left;
  }
  .admin-view .system-panel,
  .admin-view .client-account-panel,
  .admin-view .integration-panel,
  .admin-view .audit-panel {
    grid-column: auto;
  }
  .audit-log-item {
    grid-template-columns: 1fr;
  }
  .client-actions-grid .client-reset-button {
    width: 100%;
  }
  .classic-brand-row {
    padding: 18px 0 20px;
  }
  .classic-utility {
    gap: 0;
    border-radius: 0;
  }
  .classic-utility span,
  .classic-utility a,
  .classic-utility .readiness-chip {
    border-left: 0;
    border-top: 1px solid #c9d6dc;
  }
  .classic-utility span:first-child {
    border-top: 0;
  }
  .classic-tab {
    border-radius: 0;
  }
  .workflow-mode-notice {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
    margin: 12px 18px 0;
  }
  .classic-report-table tr,
  .classic-detail-card,
  .panel {
    border-radius: 0;
    box-shadow: none;
  }
  .classic-report-table tr {
    background: #fff;
  }
}

/* Professional customer-facing polish */
.classic-workspace {
  font-weight: 400;
}
.classic-workspace h1,
.classic-workspace h2,
.report-main-head h1,
.detail-content h2 {
  font-weight: 600;
}
.classic-brand-row {
  align-items: flex-start;
}
/* Slim, square utility strip with crisp dividers, in the classic web type
   stack rather than the rounded modern chip look. */
.classic-utility {
  align-self: flex-start;
  align-items: stretch;
  margin-top: -8px;
  gap: 0;
  overflow: hidden;
  padding: 0;
  border: 1px solid #1a1a1a;
  border-radius: 0;
  background: #2b2b2b;
  color: #fff;
  box-shadow: none;
  font-family: Arial, Helvetica, SimSun, "Songti SC", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
}
.classic-utility span,
.classic-utility a,
.classic-utility .readiness-chip {
  display: inline-flex;
  align-items: center;
  min-height: 0;
  height: 24px;
  padding: 0 11px;
  border: 0;
  border-left: 1px solid rgb(255 255 255 / 58%);
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
  white-space: nowrap;
}
.classic-utility span:first-child {
  border-left: 0;
}
.classic-utility .readiness-chip,
.classic-utility .readiness-chip.ready,
.utility-user,
.utility-quota,
.utility-link {
  border-radius: 0;
  background: transparent;
  color: #fff;
  font-weight: 400;
}
.classic-utility .readiness-chip.ready {
  color: #fff;
}
.utility-quota strong {
  margin-left: 3px;
  color: #fff;
  font-weight: 400;
}
.utility-link {
  text-decoration: none;
}
.utility-link:hover {
  background: #3f3f3f;
  text-decoration: underline;
}
.classic-tab {
  border-radius: 7px 7px 0 0;
  font-weight: 500;
}
.classic-tab.active {
  font-weight: 600;
}
.classic-submit-card,
.classic-report-card,
.classic-detail-card,
.panel,
.filter-card {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgb(25 55 70 / 8%);
}
.classic-card-body label,
.classic-report-table th {
  font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea,
.ai-notice,
.file-button,
.selected-files-panel,
.selected-file-item {
  border-radius: 6px;
}
button,
.button,
.classic-cancel,
.classic-card-foot button,
.classic-report-table .download-button,
.classic-report-table .detail-button,
.classic-report-table .delete-button {
  border-radius: 6px;
  font-weight: 600;
}

@media (max-width: 1040px) {
  .classic-brand-row {
    align-items: stretch;
  }
  .classic-utility {
    margin-top: 0;
    border-radius: 8px;
  }
}

@media (max-width: 760px) {
  .classic-utility {
    overflow: hidden;
    border-radius: 9px;
  }
  .classic-utility span,
  .classic-utility a,
  .classic-utility .readiness-chip {
    height: auto;
    min-height: 34px;
    border-left: 0;
    border-top: 1px solid rgb(255 255 255 / 24%);
  }
  .classic-utility span:first-child {
    border-top: 0;
  }
  .classic-tab {
    border-radius: 6px 6px 0 0;
  }
  .classic-report-table tr,
  .classic-detail-card,
  .panel {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgb(25 55 70 / 8%);
  }
}

/* ---------------------------------------------------------------
   报告列表：相似度 / Ai检测 用纯文字着色，报告列用纯文字下载链接。
   --------------------------------------------------------------- */
.classic-report-table .score {
  display: inline;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #0a7f3f;
  font-size: 14px;
  font-weight: 700;
}

.manual-delivery-intro {
  margin: 5px 0 0;
  color: #52646d;
  line-height: 1.65;
}
.manual-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}
.manual-sound-toggle {
  border: 1px solid #b9cbd3;
  border-radius: 5px;
  padding: 7px 11px;
  background: #f4f7f8;
  color: #586b73;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.manual-sound-toggle.enabled {
  border-color: #8bc9a8;
  background: #effaf3;
  color: #087443;
}
.manual-workflow-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 20px;
  border: 1px solid #d6e3e9;
  border-radius: 12px;
  padding: 16px;
  background: #f7fbfd;
}
.manual-workflow-steps article { display: flex; gap: 11px; align-items: center; }
.manual-workflow-steps article > span {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border-radius: 50%;
  background: #1379a5;
  color: #fff;
  font-weight: 700;
}
.manual-workflow-steps strong,
.manual-workflow-steps small { display: block; }
.manual-workflow-steps small { margin-top: 3px; color: #697981; }
.manual-workflow-steps i { color: #8aa5b1; font-size: 20px; font-style: normal; }
.manual-summary-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
.manual-summary-cards > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #d8e3e8;
  border-radius: 9px;
  padding: 11px 14px;
  background: #fff;
  color: #52646d;
}
.manual-summary-cards strong { color: #1379a5; font-size: 21px; }
.manual-delivery-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, .5fr);
  gap: 20px;
  margin-top: 20px;
}
.manual-queue-wrap,
.manual-report-drop {
  border: 1px solid #cbd7de;
  border-radius: 10px;
  background: #fff;
}
.manual-queue-head {
  display: flex;
  justify-content: space-between;
  padding: 13px 15px;
  border-bottom: 1px solid #dce4e8;
}
.manual-queue-head div strong,
.manual-queue-head div small { display: block; }
.manual-queue-head div small { margin-top: 3px; color: #718087; font-weight: 400; }
.manual-queue-list { max-height: 520px; overflow: auto; }
.manual-queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 15px;
  border-bottom: 1px solid #e4eaed;
}
.manual-queue-item:last-child { border-bottom: 0; }
.manual-queue-item code,
.manual-queue-item strong,
.manual-queue-item small { display: block; }
.manual-queue-main { min-width: 0; }
.manual-code-row { display: flex; gap: 8px; align-items: center; }
.manual-code-row > span {
  border-radius: 4px;
  padding: 2px 6px;
  background: #e8f4f9;
  color: #397084;
  font-size: 11px;
}
.manual-queue-item code { color: #087aa5; font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.manual-task-title { margin-top: 7px; color: #1e2f37; }
.manual-queue-item small { margin-top: 4px; color: #6a747b; }
.manual-queue-actions { min-width: 160px; text-align: right; }
.manual-report-status { display: flex; gap: 5px; flex-direction: column; align-items: flex-end; margin-bottom: 10px; }
.manual-report-status span { width: max-content; border-radius: 999px; padding: 4px 8px; font-size: 12px; }
.manual-report-status .is-pending { background: #fff3df; color: #a66000; }
.manual-report-status .is-done { background: #e8f6ee; color: #087443; }
.manual-no-ai-button {
  margin: 0 0 8px;
  border: 1px solid #d59a39;
  border-radius: 6px;
  padding: 6px 10px;
  background: #fff8e9;
  color: #8a5200;
  font-size: 12px;
  cursor: pointer;
}
.manual-no-ai-button:hover { background: #ffefc9; }
.manual-no-ai-button:disabled { cursor: wait; opacity: .65; }
.manual-delete-button {
  margin-left: 6px;
  border: 1px solid #d8655c;
  border-radius: 5px;
  padding: 7px 12px;
  background: #fff;
  color: #b8322a;
  cursor: pointer;
}
.manual-delete-button:hover { background: #fff0ef; }
.manual-delete-button:disabled { cursor: wait; opacity: .65; }
.manual-queue-empty { display: grid; min-height: 180px; place-content: center; gap: 6px; text-align: center; color: #74838a; }
.manual-queue-empty strong { color: #435760; }
.manual-report-drop {
  display: flex;
  min-height: 260px;
  padding: 30px 24px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-style: dashed;
  background: #f7fbfd;
  transition: border-color .15s ease, background .15s ease;
}
.manual-report-drop.is-dragging { border-color: #168ab8; background: #eaf7fc; }
.manual-report-drop .manual-drop-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin: 0 0 14px;
  place-items: center;
  border-radius: 50%;
  background: #e4f3f9;
  color: #1379a5;
  font-size: 27px;
  font-weight: 600;
}
.manual-report-drop > span:not(.manual-drop-icon) { margin-top: 7px; color: #6a747b; line-height: 1.5; }
.manual-report-drop button { margin: 18px 0 8px; border-radius: 7px; padding: 9px 18px; background: #1379a5; color: #fff; }
.manual-report-drop > small { color: #7a898f; line-height: 1.5; }
.manual-upload-result { width: 100%; margin-top: 16px; text-align: left; }
.manual-upload-result p { margin: 6px 0 0; overflow-wrap: anywhere; }
.manual-upload-result .success { color: #087a45; }
.manual-upload-result .error { color: #b8322a; }

@media (max-width: 900px) {
  .manual-delivery-layout { grid-template-columns: 1fr; }
  .manual-queue-item { align-items: flex-start; flex-direction: column; }
  .manual-queue-actions { width: 100%; text-align: left; }
  .manual-report-status { align-items: flex-start; }
  .manual-workflow-steps { grid-template-columns: 1fr; }
  .manual-workflow-steps i { display: none; }
  .manual-summary-cards { grid-template-columns: 1fr; }
}
.classic-report-table .score.hot {
  background: transparent;
  color: #d08300;
}
.classic-report-table .score.ready {
  background: transparent;
  color: #0a7f3f;
}
.classic-report-table .score.notice {
  background: transparent;
  color: #c0392b;
  font-weight: 700;
  white-space: nowrap;
}
.classic-report-table .report-download,
.classic-report-table .download {
  display: inline;
  min-width: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #0a72c4;
  font-size: 14px;
  font-weight: 400;
  box-shadow: none;
  text-decoration: none;
}
.classic-report-table .report-download:hover,
.classic-report-table .download:hover {
  text-decoration: underline;
}
.report-pending {
  color: var(--muted);
  font-size: 14px;
}
.report-unavailable {
  color: #c0392b;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.classic-report-table .title-cell strong {
  display: block;
  margin-bottom: 3px;
}
.classic-report-table .title-cell small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------
   报告页字号层级：Turnitin检测（大） > 表头（中） > 行内容（小）。
   状态与删除去掉方框，整行使用同一字体。
   --------------------------------------------------------------- */
.report-main-head h1 {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0;
}
.classic-report-table th {
  font-size: 14px;
  font-weight: 600;
  color: #222;
}
.classic-report-table td,
.classic-report-table td small,
.classic-report-table td span,
.classic-report-table td a,
.classic-report-table td button {
  font-family: inherit;
  font-size: 13px;
  line-height: 1.5;
}
.classic-report-table .title-cell strong {
  font-size: 13px;
  font-weight: 600;
}
.classic-report-table .title-cell small {
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
}
/* 状态：纯文字，无底色无边框 */
.classic-report-table .status-pill,
.classic-report-table .status-pill.completed,
.classic-report-table .status-pill.pending {
  display: inline;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 400;
}
.classic-report-table .status-pill { color: #235f7a; }
.classic-report-table .status-pill.completed { color: #0a7f3f; }
.classic-report-table .status-pill.pending { color: #9a5a00; }
/* 删除：纯文字，无边框 */
.classic-report-table .classic-row-delete {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #c0392b;
  font-size: 13px;
  font-weight: 400;
}
.classic-report-table .classic-row-delete:hover {
  background: transparent;
  text-decoration: underline;
}
.classic-report-table .score {
  font-size: 13px;
  font-weight: 600;
}

/* ---------------------------------------------------------------
   右上角信息条：桌面端保留细长直角的深色传统样式；
   手机/平板恢复改版前的浅色圆角分栏样式。
   --------------------------------------------------------------- */
@media (max-width: 1040px) {
  .classic-utility {
    align-self: flex-start;
    margin-top: 0;
    border: 1px solid #b8c8d1;
    border-radius: 16px;
    background: #f3f7fa;
    color: #244f64;
    box-shadow: none;
    font-family: var(--tii-font);
    font-size: 13px;
    line-height: normal;
  }
  .classic-utility span,
  .classic-utility a,
  .classic-utility .readiness-chip {
    height: auto;
    min-height: 34px;
    padding: 8px 12px;
    border-left: 1px solid #c9d6dc;
    color: #244f64;
    font-family: var(--tii-font);
    font-size: 13px;
    font-weight: 500;
    white-space: normal;
  }
  .classic-utility .readiness-chip,
  .classic-utility .readiness-chip.ready,
  .utility-user,
  .utility-quota,
  .utility-link {
    color: #244f64;
    font-weight: 500;
  }
  .classic-utility .readiness-chip.ready {
    color: #0a6d38;
  }
  .utility-quota strong {
    margin-left: 0;
    color: #1379a5;
    font-weight: 600;
  }
  .utility-link:hover {
    background: #e8f2f7;
  }
}
@media (max-width: 760px) {
  .admin-announcement-panel { grid-template-columns: 1fr; }
  .admin-qr-panel { grid-template-columns: 1fr; }
  #adminQrPreview { width: 120px; height: 168px; }
  .admin-qr-form { grid-template-columns: 1fr; width: 100%; }
  .admin-qr-form > small,
  #adminQrResult { grid-column: 1; }
  .classic-utility span,
  .classic-utility a,
  .classic-utility .readiness-chip {
    border-left: 0;
    border-top: 1px solid #c9d6dc;
  }
  .classic-utility span:first-child {
    border-top: 0;
  }
}
.admin-email-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  margin: 18px 0;
}
.admin-email-grid label { display: grid; gap: 6px; }
.admin-email-grid input:not([type="checkbox"]), .admin-email-grid select { width: 100%; box-sizing: border-box; }
.admin-email-grid input[type="checkbox"] { width: auto; }
.admin-email-grid small { color: #63788a; }
.admin-email-wide { grid-column: 1 / -1; }
@media (max-width: 640px) { .admin-email-grid { grid-template-columns: 1fr; } }
