.admin-main { max-width: 1120px; padding-top: 24px; }
.admin-toolbar { margin-bottom: 20px; }
.admin-toolbar h1 { font-size: 26px; }
.admin-main label, .admin-main input, .admin-main select { font-size: 16px; }
#admin-workspace label, #admin-login-form label, #teacher-first-login-form label { font-size: 15px; }
.admin-main button { min-height: 44px; font-size: 15px; }
.admin-back:hover { background: #173343; }
.admin-main .primary-action:hover { transform: none; box-shadow: none; }
.admin-main button:not(:disabled):active, .admin-back:active, .class-actions a:active, .teacher-classroom-board button:not(:disabled):active, .admin-operation-dialog button:not(:disabled):active { filter: brightness(.88); transform: none; box-shadow: inset 0 2px 4px #0003; transition: none; }
.admin-card { box-shadow: none; border-color: #354f63; background: #0e2231; }
.admin-card h2 { font-size: 22px; }
.admin-card > p, .credential-heading p { line-height: 1.6; color: #bed0dc; }
#credential-card, #teacher-create-class-card { scroll-margin-top: max(112px, calc(var(--portal-header-height, 90px) + 16px)); }
.teacher-workflow { background: linear-gradient(130deg, #163c4a, #102637); border-color: #5594a3; }
.teacher-shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.teacher-shortcuts button { display: grid; grid-template-columns: 36px 1fr; gap: 6px 12px; text-align: left; padding: 16px; border: 1px solid #497082; border-radius: 12px; background: #102b3c; color: #edf8fc; cursor: pointer; }
.teacher-shortcuts button:hover { border-color: #91d6e0; background: #1a3c4e; }
.teacher-shortcuts span { grid-row: 1 / 3; color: #95dce5; font-size: 22px; font-variant-numeric: tabular-nums; }
.teacher-shortcuts strong { font-size: 17px; }
.teacher-shortcuts small { color: #b7cedc; font-size: 14px; }
.class-duration-options { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 18px 0; color: #c0d5e0; }
.class-duration-options > span { margin-right: 8px; font-size: 15px; }
.class-duration-options button { padding: 9px 16px; border: 1px solid #507489; border-radius: 8px; background: #153345; color: #d5ebf4; cursor: pointer; }
.class-duration-options button[aria-pressed="true"] { border-color: #9ee5ed; background: #9ee5ed; color: #092532; }
.class-create-preview { margin: 14px 0 0; padding: 12px 14px; border-left: 3px solid #86d1df; background: #132f40; }
.create-class-grid { grid-template-columns: minmax(180px, 2fr) minmax(100px, .8fr) minmax(210px, 1.4fr); }
.create-class-grid > button { grid-column: 1 / -1; justify-self: start; }
.credential-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.credential-actions button { gap: 0; padding-inline: 14px; box-shadow: none; }
#credential-card .credential-heading { align-items: flex-start; flex-direction: column; }
#credential-card .credential-heading > div { width: 100%; }
#credential-card .credential-actions { justify-content: flex-start; }
#credential-card { border: 1px solid #6ba9b6; background: #112d3d; }
#credential-title { overflow-wrap: anywhere; }
#credential-summary, #credential-status { font-size: 15px; line-height: 1.6; }
.credential-item { min-width: 0; background: #0a1d2a; }
.credential-item code { font-size: 24px; letter-spacing: .06em; }
.credential-copy-one { display: block; width: 100%; margin-top: 14px; border: 1px solid #4b7b8d; border-radius: 8px; background: #143646; color: #c9f0f6; cursor: pointer; }
.credential-item .credential-print-name, .credential-item .credential-print-entry, .credential-item .credential-print-help { display: none; }
.class-list-controls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(180px, .5fr); align-items: end; gap: 16px; margin: 20px 0 10px; }
.class-search-field > label { display: block; margin-bottom: 8px; color: #c2d7e3; }
.class-search-input { display: flex; gap: 8px; }
.class-search-input input { min-width: 0; flex: 1; min-height: 44px; padding: 10px 12px; border: 1px solid #4b6f85; border-radius: 8px; color: #e3f4fc; background: #0a1d2b; }
.class-search-input button { flex-shrink: 0; padding-inline: 14px; }
.class-search-summary { color: #bdd4df; font-size: 14px; line-height: 1.5; }
.class-list-controls .class-filter-label { display: grid; gap: 8px; margin: 0; }
.class-filter-label { display: flex; gap: 12px; align-items: center; margin-block: 18px 12px; color: #c2d7e3; }
.class-filter-label select { min-height: 44px; border: 1px solid #4b6f85; border-radius: 8px; padding: 8px 32px 8px 12px; color: #e3f4fc; background: #0a1d2b; }
.class-batch-disclosure { margin-bottom: 16px; padding: 10px 14px; border: 1px solid #344f63; border-radius: 8px; background: #0b1c29; }
.class-batch-disclosure > summary, .teacher-profile > summary { min-height: 44px; padding: 10px 0; cursor: pointer; font-size: 16px; color: #c6e2ed; }
.class-item { gap: 16px; padding: 18px; border: 1px solid #35576b; border-radius: 12px; background: #112a3a; }
.class-summary { min-width: 0; }
.class-select { flex-shrink: 0; justify-content: center; min-width: 44px; min-height: 44px; border-radius: 8px; cursor: pointer; }
.class-select input { margin: 0; }
.class-select:has(input:not(:disabled)):hover, .class-select:has(input:checked) { background: #214b60; }
.class-select:has(input:disabled) { cursor: default; }
.class-summary h3 { overflow-wrap: anywhere; font-size: 19px; }
.class-summary p { color: #bfd1dc; line-height: 1.7; }
.class-actions { flex-wrap: wrap; gap: 8px; }
.class-item { grid-template-columns: minmax(0, 1fr); }
.class-actions { justify-content: flex-start; }
.class-actions button, .class-actions a { min-height: 44px; padding: 10px 12px; font-size: 14px; border-radius: 8px; }
.class-actions a { display: inline-flex; align-items: center; border: 1px solid #5e9cac; color: #b9edf5; text-decoration: none; background: #133546; }
.class-actions .danger-action { border-color: #71564e; color: #efc7b6; background: #302725; }
.teacher-profile { margin-top: 32px; background: #0a1c29; }
.teacher-profile .admin-card { border: 0; border-top: 1px solid #355064; border-radius: 0; margin: 0; padding: 20px 0; background: transparent; }
button:disabled { cursor: not-allowed; opacity: .5; }
.admin-main button[type="submit"]:disabled { background: #293440; color: #a8b1ba; border: 1px dashed #68737e; box-shadow: none; opacity: 1; }
button:focus-visible, summary:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #8edeea; outline-offset: 3px; }
.teacher-classroom-board { box-sizing: border-box; width: 100%; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; padding: clamp(20px, 3vw, 48px); border: 0; color: #ecf7fa; background: #071b28; overflow-y: auto; overscroll-behavior: contain; }
.teacher-classroom-board::backdrop { background: #071b28; }
.teacher-classroom-board[open] { display: flex; flex-direction: column; gap: 22px; }
.teacher-classroom-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.teacher-classroom-label { font-size: 17px; font-weight: 700; color: #8dd4df; letter-spacing: .08em; }
.teacher-classroom-board button { min-height: 44px; padding: 10px 18px; border: 1px solid #5e95a7; border-radius: 9px; color: #d8f4f8; background: #143647; font: inherit; cursor: pointer; }
.teacher-classroom-main { width: min(100%, 1100px); margin: auto; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 28px 36px; align-items: center; }
.teacher-classroom-name { grid-column: 1 / -1; margin: 0; font-size: clamp(30px, 4.4vw, 64px); line-height: 1.25; overflow-wrap: anywhere; }
.teacher-classroom-entry { grid-column: 1 / -1; padding: 20px 24px; border: 1px solid #406d81; border-radius: 14px; background: #102c3c; min-width: 0; }
.teacher-classroom-main h3 { margin: 0 0 10px; font-size: 17px; font-weight: 500; color: #b4d0dd; }
.teacher-classroom-url { margin: 0; font-size: clamp(19px, 2.3vw, 32px); line-height: 1.5; color: #b0edf5; overflow-wrap: anywhere; }
.teacher-classroom-steps { margin: 0; padding: 0; display: grid; gap: 18px; list-style: none; counter-reset: classroom-step; }
.teacher-classroom-steps li { display: flex; gap: 14px; align-items: center; font-size: clamp(18px, 2vw, 27px); line-height: 1.5; counter-increment: classroom-step; }
.teacher-classroom-steps li::before { content: counter(classroom-step); display: grid; place-items: center; flex: 0 0 40px; height: 40px; border: 1px solid #4e8d9e; border-radius: 50%; color: #95e4ef; font-size: 20px; }
.teacher-classroom-time { text-align: center; padding: 28px 16px; border: 1px solid #406d81; border-radius: 14px; background: #102c3c; min-width: 0; }
.teacher-classroom-countdown { display: block; font-size: clamp(44px, 6vw, 80px); font-variant-numeric: tabular-nums; line-height: 1.2; color: #b0edf5; }
.teacher-classroom-status { grid-column: 1 / -1; margin: 0; color: #c4dae3; font-size: 18px; line-height: 1.5; }
.teacher-classroom-board[data-state="expired"] .teacher-classroom-countdown, .teacher-classroom-board[data-state="expired"] .teacher-classroom-status { color: #ffd09e; }
.teacher-classroom-board > footer { display: flex; justify-content: flex-end; }
@media (max-width: 820px) {
  .teacher-shortcuts, .create-class-grid, .class-list-controls { grid-template-columns: minmax(0, 1fr); }
  .admin-card { padding: 18px; }
  .credential-actions { width: 100%; }
  .credential-actions button { flex: 1 1 140px; }
  .class-item { padding: 14px; }
  .admin-toolbar { flex-wrap: wrap; }
  .admin-main { padding-top: 20px; }
  .teacher-password-grid { grid-template-columns: minmax(0, 1fr); }
  .teacher-classroom-main { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .teacher-classroom-entry { padding: 16px; }
  .teacher-classroom-time { padding: 20px 16px; }
  .teacher-classroom-board > footer button { width: 100%; }
}
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  .teacher-profile, .teacher-workflow, .class-batch-disclosure, #credential-status { display: none !important; }
  #credential-title, #credential-summary, .credential-item, .credential-item code, .credential-item span { color: #000 !important; }
  .credential-item { background: #fff !important; border: 1px solid #999 !important; box-shadow: none; break-inside: avoid; }
  .credential-copy-one, .teacher-classroom-board { display: none !important; }
  .credential-item .credential-print-name, .credential-item .credential-print-entry, .credential-item .credential-print-help { display: block; color: #000; line-height: 1.5; overflow-wrap: anywhere; }
  .credential-print-name { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
  .credential-print-entry { font-size: 11px; margin-top: 10px; }
  .credential-print-help { font-size: 12px; margin-top: 6px; white-space: pre-line; }
  #credential-card { background: #fff; border: 0; }
}
