:root {
  --shell-surface: #ffffff;
  --shell-border: #dde1e7;
  --shell-muted: #667085;
  --shell-ink: #202630;
  --shell-active: #4f46e5;
  --shell-active-soft: #e8eeff;
}

.platform-app-shell {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-columns: minmax(0, 1fr);
}

.platform-app-shell--without-header {
  grid-template-rows: minmax(0, 1fr) auto;
}

.platform-app-shell > main {
  min-width: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.platform-shell-header {
  position: sticky;
  top: 0;
  z-index: 30;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  padding: 5px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  overflow: hidden;
  background: var(--shell-surface);
  border-bottom: 1px solid var(--shell-border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.platform-shell-header__main,
.platform-shell-actions,
.platform-shell-tabs-rail,
.platform-shell-tabs {
  display: flex;
  align-items: center;
  min-width: 0;
}

.platform-shell-header__main {
  /* basis 0: 탭  Intrinsic 폭이 헤더·페이지 가로를 키우지 않게 한다. */
  flex: 1 1 0%;
  gap: 10px;
  overflow: hidden;
}

.platform-shell-tabs-rail {
  flex: 1 1 0%;
  gap: 4px;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.platform-shell-tabs-nav {
  appearance: none;
  flex: 0 0 auto;
  display: none;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 24px;
  min-height: 24px;
  padding: 0 4px;
  border: 1px solid #c9d3e6;
  border-radius: 999px;
  background: #f7f9fe;
  color: #33405b;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.platform-shell-tabs-rail.is-scrollable .platform-shell-tabs-nav {
  display: inline-flex;
}

.platform-shell-tabs-nav:hover:not(:disabled) {
  background: #edf2ff;
}

.platform-shell-tabs-nav:disabled {
  opacity: 0.35;
  cursor: default;
}

.platform-shell-tabs {
  flex: 1 1 0%;
  flex-wrap: nowrap;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.platform-shell-tabs::-webkit-scrollbar {
  display: none;
}

.platform-shell-tabs-rail.is-scrollable .platform-shell-tabs {
  cursor: grab;
  touch-action: pan-y;
}

.platform-shell-tabs.is-tabs-panning {
  cursor: grabbing;
  user-select: none;
  -webkit-user-select: none;
}

.platform-shell-tabs.is-tabs-panning a,
.platform-shell-tabs.is-tabs-panning [data-platform-utility-drag-handle],
.platform-shell-tabs.is-tabs-panning select {
  pointer-events: none;
}

.platform-shell-tab,
.platform-shell-control {
  appearance: none;
  flex: 0 0 auto;
  min-height: 24px;
  padding: 3px 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #c9d3e6;
  border-radius: 999px;
  background: #f7f9fe;
  color: #33405b;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}

.platform-shell-tab {
  -webkit-user-drag: none;
  user-select: none;
}

.platform-shell-tab:hover,
.platform-shell-control:hover {
  background: #edf2ff;
}

.platform-shell-tab.is-active {
  background: var(--shell-active-soft);
  border-color: #8aa0df;
  color: #1f3269;
}

.platform-shell-utility-menu {
  position: relative;
  flex: 0 0 auto;
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) 25px;
  align-items: stretch;
  width: 5.2rem;
  min-width: 5.2rem;
  height: 24px;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid #c9d3e6;
  border-radius: 999px;
  background: #f7f9fe;
  color: #33405b;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  cursor: default;
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease;
}

.platform-shell-utility-menu__label {
  grid-row: 1;
  grid-column: 1;
  display: inline-flex;
  align-items: center;
  box-sizing: border-box;
  color: inherit;
  overflow: hidden;
  min-width: 0;
  max-width: 100%;
  padding: 0 4px 0 9px;
  cursor: grab;
  pointer-events: auto;
  text-overflow: ellipsis;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  white-space: nowrap;
}

.platform-shell-utility-menu__picker {
  grid-row: 1;
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-left: 1px solid #aab7d0;
  color: #52617c;
  font-size: 0.66rem;
  line-height: 1;
  pointer-events: none;
}

.platform-shell-utility-menu select {
  grid-row: 1;
  grid-column: 2;
  z-index: 1;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.platform-shell-utility-menu:hover,
.platform-shell-utility-menu:focus-within,
.platform-shell-utility-menu.is-active {
  border-color: #8aa0df;
  background: var(--shell-active-soft);
  color: #1f3269;
}

.platform-shell-actions {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  gap: 8px;
}

.platform-shell-actions form {
  margin: 0;
}

.platform-shell-language select {
  width: auto;
  min-width: 5rem;
  height: 24px;
  min-height: 24px;
  box-sizing: border-box;
  padding: 2px 6px;
  border-color: var(--shell-border);
  background: #ffffff;
  font-size: 0.82rem;
  line-height: 1.2;
}

.platform-shell-user {
  color: #3e4a64;
  font-size: 0.84rem;
  font-weight: 600;
}

.platform-shell-login-name {
  max-width: 10rem;
  overflow: hidden;
  color: #24324a;
  font-size: 0.84rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-meta {
  min-width: 34px;
  min-height: 24px;
  padding: 2px 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd3df;
  border-radius: 999px;
  background: #f3f5f8;
  color: #455064;
  font-size: 0.78rem;
  font-weight: 700;
}

.section-meta--active {
  min-height: 28px;
  padding: 3px 10px;
  border-color: #1b6b3a;
  background: #1f7a3f;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 2px rgb(31 122 63 / 18%);
}

.platform-page,
.table-maker-layout {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
  padding: 16px 0 32px;
}

.platform-page {
  display: grid;
  align-content: start;
  gap: 14px;
}

.platform-page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  min-width: 0;
  align-self: start;
}

.platform-page-heading > div {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.platform-page-heading h1,
.platform-page-heading p {
  margin: 0;
}

.platform-page-heading h1 {
  font-size: 1.35rem;
  line-height: 1.15;
}

.platform-page-heading p {
  color: var(--shell-muted);
  line-height: 1.2;
}

.platform-page-heading > a,
.platform-page-heading__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 12px;
  border: 1px solid var(--shell-border, #cbd5e1);
  border-radius: 6px;
  background: var(--shell-surface, #ffffff);
  color: var(--shell-text, #334155);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition:
    background-color 120ms ease,
    border-color 120ms ease,
    color 120ms ease,
    box-shadow 120ms ease;
}

.platform-page-heading > a:hover,
.platform-page-heading__back:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.platform-section {
  min-width: 0;
  padding: 15px 17px;
  background: var(--shell-surface);
  border: 1px solid var(--shell-border);
  border-radius: 6px;
}

.platform-section h1,
.platform-section h2 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.platform-shell-footer {
  width: 100%;
  min-height: 34px;
  padding: 6px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--shell-border);
  background: #eef1f4;
  color: var(--shell-muted);
  font-size: 0.78rem;
}

.platform-settings-page {
  min-height: calc(100vh - 74px);
}

.platform-settings-page > .platform-section:first-child {
  padding-bottom: 10px;
}

.platform-settings-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0;
}

.platform-settings-head h1 {
  margin: 0 0 0.35rem;
}

.platform-settings-head .hint {
  margin: 0;
}

.platform-settings-head__actions {
  display: grid;
  min-width: 10.5rem;
  gap: 0.45rem;
}

.platform-settings-head__actions > button {
  width: 100%;
  min-height: 34px;
  margin: 0;
}

.platform-settings-form {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
}

.personal-settings-language-form {
  margin-top: 0;
}

.platform-settings-form label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.platform-settings-form select {
  width: auto;
  padding: 0.3rem 0.45rem;
  font: inherit;
}

.personal-mobile-login-qr {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #c8d5eb;
  border-radius: 12px;
  background: linear-gradient(135deg, #f8fbff 0%, #f4f7fd 100%);
}

.personal-mobile-login-qr[hidden] {
  display: none;
}

.personal-mobile-login-qr__copy h2 {
  margin: 0 0 0.45rem;
  color: #233876;
  font-size: 1rem;
}

.personal-mobile-login-qr__copy p {
  margin: 0 0 0.55rem;
  color: #53627a;
  font-size: 0.86rem;
  line-height: 1.5;
}

.personal-mobile-login-qr__copy ul {
  margin: 0.55rem 0 0.75rem;
  padding-left: 1.15rem;
  color: #53627a;
  font-size: 0.82rem;
  line-height: 1.55;
}

.personal-mobile-login-qr__status {
  min-height: 1.35rem;
  color: #1f4e9a !important;
  font-weight: 700;
}

.personal-mobile-login-qr__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.personal-mobile-login-qr__actions > button {
  margin: 0;
}

.personal-mobile-login-qr__image {
  display: grid;
  width: 220px;
  min-height: 220px;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d6deea;
  border-radius: 12px;
  background: #fff;
}

.personal-mobile-login-qr__image img {
  display: block;
  max-width: 100%;
  height: auto;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.personal-mobile-login-qr-print-dialog {
  width: min(34rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  padding: 1rem;
  overflow: auto;
  border: 1px solid #b8c7df;
  border-radius: 14px;
  background: #fff;
  color: var(--shell-text);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.26);
}

.personal-mobile-login-qr-print-dialog::backdrop {
  background: rgba(15, 23, 42, 0.5);
}

.personal-mobile-login-qr-print-sheet {
  display: grid;
  justify-items: center;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid #d5ddea;
  border-radius: 10px;
  background: #fff;
  text-align: center;
}

.personal-mobile-login-qr-print-sheet header {
  display: grid;
  gap: 0.25rem;
}

.personal-mobile-login-qr-print-sheet h2,
.personal-mobile-login-qr-print-sheet p {
  margin: 0;
}

.personal-mobile-login-qr-print-sheet h2 {
  color: #233876;
  font-size: 1.25rem;
}

.personal-mobile-login-qr-print-sheet__identity {
  color: #25324a;
  font-size: 1rem;
  font-weight: 750;
}

.personal-mobile-login-qr-print-sheet__image {
  display: grid;
  width: min(300px, 100%);
  aspect-ratio: 1;
  place-items: center;
  overflow: hidden;
  border: 1px solid #d6deea;
  border-radius: 10px;
  background: #fff;
}

.personal-mobile-login-qr-print-sheet__image img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.personal-mobile-login-qr-print-sheet__expiry {
  color: #1f4e9a;
  font-weight: 700;
}

.personal-mobile-login-qr-print-sheet__notice {
  max-width: 30rem;
  color: #53627a;
  font-size: 0.84rem;
  line-height: 1.5;
}

.personal-mobile-login-qr-print-dialog__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.personal-mobile-login-qr-print-dialog__actions > button {
  margin: 0;
}

@media print {
  body.mobile-login-qr-printing * {
    visibility: hidden !important;
  }

  body.mobile-login-qr-printing .personal-mobile-login-qr-print-dialog,
  body.mobile-login-qr-printing .personal-mobile-login-qr-print-dialog * {
    visibility: visible !important;
  }

  body.mobile-login-qr-printing .personal-mobile-login-qr-print-dialog {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.mobile-login-qr-printing .personal-mobile-login-qr-print-sheet {
    width: 170mm;
    min-height: 235mm;
    margin: 0 auto;
    padding: 18mm 14mm;
    align-content: start;
    border: 0;
  }

  body.mobile-login-qr-printing .personal-mobile-login-qr-print-dialog__actions {
    display: none !important;
  }
}

@media (max-width: 720px) {
  .personal-mobile-login-qr {
    grid-template-columns: minmax(0, 1fr);
  }

  .personal-mobile-login-qr__image {
    order: -1;
    width: min(220px, 100%);
    min-height: 0;
    aspect-ratio: 1;
    justify-self: center;
  }
}

.personal-signature-section {
  margin-top: 0;
}

.personal-signature-section > h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.personal-signature-notice {
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid #d5dce6;
  border-radius: 6px;
  background: #f8fafc;
  display: grid;
  gap: 0.45rem;
}

.personal-signature-notice p {
  margin: 0;
  color: var(--shell-muted);
  font-size: 0.86rem;
  line-height: 1.45;
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
}

.personal-signature-notice p::before {
  content: "•";
  color: #94a3b8;
  flex: 0 0 auto;
}

.personal-signature-notice__strong {
  color: #334155 !important;
  font-weight: 600;
}

.personal-signature-notice--tryout {
  border-left: 3px solid #8a6d3b;
  background: #fff8e8;
}

.personal-signature-identity {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.75rem 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid #dbe3f0;
  border-radius: 9px;
  background: linear-gradient(135deg, #f8fbff 0%, #f3f6fc 100%);
  color: #334155;
  font-size: 0.88rem;
}

.personal-signature-identity__mark {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #c3d1ee;
  border-radius: 8px;
  background: #fff;
  color: #3d5391;
  box-shadow: 0 2px 7px rgb(61 83 145 / 10%);
}

.personal-signature-pad {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 1;
  margin: 0;
  overflow: hidden;
  border: 1px solid #bcc8da;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 3px #f8fafc;
}

.personal-signature-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 1rem;
  margin: 1rem 0 0.75rem;
}

.personal-signature-panel {
  display: grid;
  grid-template-rows: auto auto minmax(38px, auto);
  align-content: start;
  gap: 0.75rem;
  min-width: 0;
  padding: 0.9rem;
  border: 1px solid #d8e0ec;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%);
  box-shadow: 0 6px 18px rgb(30 58 95 / 7%);
}

.personal-signature-panel__head {
  display: flex;
  min-height: 22px;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.personal-signature-area-label {
  margin: 0;
  color: #34445f;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.personal-signature-pad canvas {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}

.personal-signature-placeholder {
  position: absolute;
  z-index: 2;
  inset: 0;
  display: grid;
  place-items: center;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  pointer-events: none;
  user-select: none;
}

.personal-signature-placeholder[hidden] {
  display: none;
}

.personal-signature-preview-wrap {
  display: grid;
  width: 100%;
  aspect-ratio: 3 / 1;
  overflow: hidden;
  place-items: center;
  margin: 0;
  border: 1px solid #bcc8da;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 3px #f8fafc;
}

.personal-signature-preview-wrap[hidden] {
  display: none;
}

.personal-signature-preview {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: 0;
  background: #fff;
}

.personal-signature-preview-empty {
  display: grid;
  width: 100%;
  aspect-ratio: 3 / 1;
  place-items: center;
  padding: 1rem;
  border: 1px dashed #c7d1df;
  border-radius: 10px;
  background: repeating-linear-gradient(-45deg, #fbfcfe, #fbfcfe 10px, #f7f9fc 10px, #f7f9fc 20px);
  color: #8491a6;
  font-size: 0.82rem;
  text-align: center;
}

.personal-signature-preview-empty[hidden] {
  display: none;
}

.personal-signature-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: stretch;
  align-self: end;
  margin: 0;
}

.personal-signature-actions > .personal-signature-action,
.personal-signature-actions > .personal-signature-delete-form {
  flex: 1 1 7.25rem;
  min-width: 0;
}

.personal-signature-actions .personal-signature-action {
  display: inline-flex;
  width: 100%;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.personal-signature-delete-form {
  display: flex;
  margin: 0;
}

.personal-signature-panel__status {
  display: flex;
  min-height: 38px;
  align-items: center;
  align-self: end;
  gap: 0.55rem;
  margin: 0;
  padding: 0.55rem 0.7rem;
  border: 1px solid #d9e1ec;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.78rem;
  line-height: 1.35;
}

.personal-signature-panel__status::before {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #94a3b8;
  content: "";
}

.personal-signature-panel__status.is-registered {
  border-color: #bbdfc9;
  background: #f2faf5;
  color: #24633d;
}

.personal-signature-panel__status.is-registered::before {
  background: #2f8a52;
}

.personal-signature-flash {
  color: #1d4ed8;
}

.personal-signature-result-toast {
  position: fixed;
  z-index: 80;
  bottom: 24px;
  left: 50%;
  width: min(640px, calc(100% - 32px));
  padding: 0.75rem 0.9rem;
  border: 1px solid #fecaca;
  border-radius: 11px;
  background: #fff1f2;
  color: #9f1239;
  box-shadow: 0 14px 38px rgb(15 23 42 / 24%);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.45;
  transform: translateX(-50%);
  animation: personal-signature-result-toast-in 160ms ease-out;
}

.personal-signature-result-toast p {
  margin: 0;
}

.personal-signature-result-toast.is-leaving {
  opacity: 0;
  transform: translate(-50%, 8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

@keyframes personal-signature-result-toast-in {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 820px) {
  .personal-signature-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 학교 설정 껍데기: 왼쪽 조작, 오른쪽 설명. 저장은 후속. */
.school-settings-shell {
  margin-top: 1.25rem;
}

.school-settings-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.85rem;
}

.school-settings-head > div {
  min-width: 0;
}

.school-settings-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.school-settings-head .hint {
  margin: 0;
}

.school-settings-head .school-settings-caution {
  margin-top: 0.45rem;
  color: #9f1d1d;
}

.school-settings-result {
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: 0.45rem;
}

.school-settings-result.is-ok {
  background: #e8f7ef;
  color: #08633a;
}

.school-settings-result.is-error {
  background: #fff0f0;
  color: #9f1d1d;
}

.school-settings-form {
  width: min(960px, 100%);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.school-settings-row {
  display: grid;
  grid-template-columns: minmax(16rem, 0.42fr) minmax(0, 1fr);
  gap: 0.85rem 1.25rem;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid #e7eaf0;
}

.school-settings-row__control {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-width: 0;
}

.school-settings-row__control--checks {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.85rem;
}

.school-settings-row__control--inline {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
}

.school-settings-row__control--inline input[type="number"] {
  width: 5.5rem;
  padding: 0.3rem 0.45rem;
  font: inherit;
}

.school-settings-unit {
  font-size: 0.86rem;
  color: var(--shell-muted);
}

.school-settings-row__control label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
}

.school-settings-row__control select {
  width: min(12rem, 100%);
  padding: 0.3rem 0.45rem;
  font: inherit;
}

.school-settings-row__help {
  margin: 0;
  color: var(--shell-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.school-settings-row__help--warning {
  color: #9a3412;
  font-weight: 600;
}

.school-settings-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.school-settings-fieldset > legend {
  padding: 0;
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.school-settings-targets-label {
  font-size: 0.82rem;
  color: var(--shell-muted);
  margin-left: 0.25rem;
}

.school-settings-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
}

.school-settings-actions .hint {
  margin: 0;
}

.safe-document-upload {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.safe-document-upload > input[hidden] {
  display: none !important;
}

.safe-document-upload > input[type="file"]:not([hidden]) {
  width: 100%;
  min-height: 36px;
  box-sizing: border-box;
  padding: 4px 6px;
  color: #1e293b;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font: inherit;
}

.safe-document-upload > input[type="file"]::file-selector-button {
  margin-right: 0.65rem;
  padding: 0.3rem 0.65rem;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  font: inherit;
  cursor: pointer;
}

.safe-document-upload__status {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.4;
}

.safe-document-upload__status[data-state="processing"] {
  color: #1d4ed8;
}

.safe-document-upload__status[data-state="ready"] {
  color: #087443;
}

.safe-document-upload__status[data-state="error"] {
  color: #9f1d1d;
  font-weight: 600;
}

.school-legal-resubmission-form {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) auto;
  align-items: start;
  gap: 0.55rem 0.75rem;
}

.school-legal-resubmission-form .safe-document-upload {
  min-width: 0;
}

.school-operator-view-request {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e7eaf0;
}

.school-operator-view-request__toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  min-width: 0;
}

.school-operator-view-request__toolbar h2 {
  margin: 0;
  font-size: 1rem;
  white-space: nowrap;
  flex: 0 0 auto;
}

.school-operator-view-request .hint {
  margin: 0;
}

.school-operator-view-request .school-settings-caution {
  color: #9a3412;
}

.school-operator-view-request__form,
.school-operator-view-request__active {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0;
  min-width: 0;
  flex: 1 1 auto;
}

.school-operator-view-request__form label {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
  margin: 0;
  min-width: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}

.school-operator-view-request__form label span,
.school-operator-view-request__active span,
.school-operator-view-request__active strong {
  white-space: nowrap;
}

.school-operator-view-request__form input[type="number"] {
  width: 5.5rem;
  padding: 0.35rem 0.45rem;
  font: inherit;
}

.school-operator-view-request__form button,
.school-operator-view-request__active button {
  white-space: nowrap;
  flex: 0 0 auto;
}

.school-operator-view-request__full-access {
  padding: 0.2rem 0.45rem;
  border: 1px solid #f59e0b;
  border-radius: 0.45rem;
  color: #92400e;
  background: #fffbeb;
}

.school-operator-view-request__active {
  justify-content: flex-start;
}

.school-operator-view-request__active output {
  display: inline-block;
  min-width: 5.5rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.school-operator-view-request__active form {
  display: inline-flex;
  margin: 0;
}

/* 공용 휴지통 다이얼로그 (시간표 기초자료·생성/수정·운영 설정) */
.timetable-trash-dialog {
  width: min(640px, calc(100vw - 32px));
  max-height: min(70vh, 560px);
  padding: 16px 18px;
  border: 1px solid #c5ceda;
  border-radius: 8px;
  background: #fff;
  color: #24324a;
}

.timetable-trash-dialog::backdrop {
  background: rgba(24, 36, 58, 0.35);
}

.timetable-trash-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 8px;
}

.timetable-trash-dialog__header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.timetable-trash-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.timetable-trash-list__item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d7dee8;
  border-radius: 6px;
  background: #f7f9fe;
}

.timetable-trash-list__rename {
  display: flex;
  flex: 1 1 280px;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.timetable-trash-list__rename input[type="text"] {
  flex: 1 1 160px;
  min-width: 120px;
}

.timetable-trash-empty {
  margin: 12px 0 0;
  color: #5b6b84;
}

@media (max-width: 720px) {
  .school-operator-view-request__toolbar,
  .school-operator-view-request__form,
  .school-operator-view-request__active,
  .school-operator-view-request__form label {
    flex-wrap: wrap;
  }

  .school-operator-view-request__active {
    justify-content: flex-start;
  }

  .school-settings-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }

  .school-legal-resubmission-form {
    grid-template-columns: 1fr;
  }
}

.platform-definition-list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: #e7eaf0;
  border: 1px solid #e7eaf0;
  border-radius: 6px;
  overflow: hidden;
}

.platform-definition-list dt {
  margin: 0;
  padding: 10px 12px;
  background: #f4f6f9;
  color: var(--shell-muted);
  font-size: 0.8rem;
  font-weight: 600;
  text-align: center;
}

.platform-definition-list dd {
  margin: 0;
  padding: 10px 12px;
  background: #fff;
  text-align: center;
}

@media (max-width: 820px) {
  .platform-shell-header {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .platform-shell-header__main {
    width: 100%;
  }

  .platform-shell-tabs-rail {
    width: 100%;
  }

  .platform-shell-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .platform-page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .platform-shell-user {
    display: none;
  }

  .platform-shell-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .platform-definition-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.platform-subscription-read-only {
  margin: 0;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid #f1c36d;
  background: #fff7df;
  color: #694b0c;
  font-weight: 700;
  text-align: center;
}

.owner-reauthentication-dialog {
  width: min(440px, calc(100vw - 32px));
  margin: auto;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #1e232b;
  box-shadow: 0 18px 48px rgb(15 23 42 / 24%);
}

.owner-reauthentication-dialog::backdrop {
  background: rgb(15 23 42 / 46%);
}

.owner-reauthentication-dialog [hidden] {
  display: none !important;
}

.owner-reauthentication-form {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 20px;
}

.owner-reauthentication-form header,
.owner-reauthentication-form header p {
  margin: 0;
}

.owner-reauthentication-form header {
  display: grid;
  gap: 5px;
}

.owner-reauthentication-form header h2 {
  margin: 0;
  font-size: 1.15rem;
}

.owner-reauthentication-form header p {
  color: #64748b;
}

.owner-reauthentication-form label {
  display: grid;
  gap: 6px;
  font-weight: 700;
}

.owner-reauthentication-form input {
  width: 100%;
  min-height: 40px;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  font: inherit;
}

.owner-reauthentication-form__error {
  margin: 0;
  padding: 9px 10px;
  border-left: 3px solid #c24141;
  background: #fff1f2;
  color: #991b1b;
}

.owner-reauthentication-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 480px) {
  .owner-reauthentication-form {
    padding: 16px;
  }
}
