.admin-page-shell {
  min-height: 100vh;
  background:
    radial-gradient(1200px 720px at -6% -18%, rgba(160, 176, 224, 0.22), transparent 62%),
    radial-gradient(980px 640px at 108% 0%, rgba(170, 162, 240, 0.16), transparent 58%),
    linear-gradient(180deg, #eef2fb 0%, #edf1fb 52%, #ebeff9 100%);
  padding: clamp(14px, 1.8vw, 24px);
}

.admin-root {
  width: min(1540px, 100%);
  margin: 0 auto;
}

.admin-loading {
  min-height: 320px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  border: 1px solid #d4ddef;
  background: rgba(255, 255, 255, 0.76);
  color: #2a406f;
  font-weight: 800;
}

.adm-login-wrap {
  min-height: calc(100vh - 90px);
  display: grid;
  place-items: center;
  padding: 20px 8px;
}

.adm-login-card {
  width: min(560px, 100%);
  border-radius: 26px;
  border: 1px solid #d4deef;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(244, 248, 255, 0.9) 100%);
  box-shadow: 0 26px 48px rgba(37, 61, 101, 0.14);
  padding: clamp(20px, 2.8vw, 34px);
  display: grid;
  gap: 14px;
}

.adm-login-card .eyebrow {
  width: fit-content;
  margin: 0;
  border: 1px solid #d4deef;
  border-radius: 999px;
  background: #f3f7ff;
  color: #415b91;
  padding: 0.18rem 0.64rem;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.adm-login-card h1 {
  margin: 0;
  font-size: clamp(1.36rem, 2.2vw, 1.88rem);
  color: #253c6d;
  letter-spacing: -0.02em;
  font-weight: 900;
}

.adm-login-card p {
  margin: 0;
  color: #4e6187;
  font-weight: 600;
}

.adm-login-form {
  display: grid;
  gap: 10px;
}

.adm-login-form label {
  display: grid;
  gap: 5px;
  font-size: 0.83rem;
  font-weight: 800;
  color: #334b7d;
}

.adm-login-form input {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid #ccd9ee;
  background: rgba(255, 255, 255, 0.9);
  padding: 0.54rem 0.74rem;
  font-size: 0.9rem;
  color: #253d70;
}

.adm-login-form input:focus-visible {
  outline: 2px solid #7a89ea;
  outline-offset: 1px;
}

.adm-root-shell {
  display: grid;
  gap: 12px;
}

.adm-topbar,
.adm-tabs,
.adm-panel,
.adm-subpanel,
.adm-detail-panel,
.adm-qna-thread,
.adm-qna-list {
  border-radius: 20px;
  border: 1px solid #d2dcee;
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.adm-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  box-shadow: 0 10px 28px rgba(39, 64, 110, 0.1);
}

.adm-topbar-title {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.adm-topbar-title h1 {
  margin: 0;
  font-size: clamp(1.22rem, 1.9vw, 1.72rem);
  color: #253d71;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.adm-tabs {
  display: flex;
  align-items: center;
  gap: 9px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 9px;
}

.adm-tab {
  border: 1px solid #c9d7ec;
  border-radius: 999px;
  background: #f7f9ff;
  color: #355184;
  min-height: 36px;
  padding: 0.35rem 0.96rem;
  font-size: 0.81rem;
  font-weight: 800;
  white-space: nowrap;
}

.adm-tab:hover {
  background: #eef3ff;
}

.adm-tab.is-active {
  border-color: #9eaee8;
  background: linear-gradient(180deg, #dfe8ff 0%, #d2ddfb 100%);
  color: #243e73;
}

.adm-content {
  display: grid;
  gap: 12px;
}

.adm-panel,
.adm-subpanel,
.adm-detail-panel,
.adm-qna-thread,
.adm-qna-list {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.adm-panel-head,
.adm-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #dbe3f2;
  padding-bottom: 10px;
}

.adm-panel-head h2,
.adm-detail-head h3,
.adm-subpanel h3,
.adm-qna-thread h3,
.adm-qna-list h3 {
  margin: 0;
  color: #233c6d;
  letter-spacing: -0.02em;
  font-size: clamp(1.1rem, 1.55vw, 1.5rem);
  font-weight: 900;
}

.adm-subpanel h3 {
  font-size: 1.06rem;
}

.adm-inline-controls,
.adm-row-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.adm-inline-controls {
  justify-content: flex-end;
}

.adm-inline-controls-wide {
  width: 100%;
  justify-content: flex-start;
}

.adm-inline-controls input[type="search"],
.adm-inline-controls input[type="text"],
.adm-inline-controls input[type="file"],
.adm-inline-controls select,
.adm-form-grid input,
.adm-form-grid select,
.adm-form-grid textarea,
.adm-textarea,
.adm-qna-reply-form textarea {
  border: 1px solid #ccd9ee;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  color: #274277;
  min-height: 35px;
  padding: 0.42rem 0.66rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.adm-inline-controls input[type="search"],
.adm-inline-controls input[type="text"] {
  min-width: min(280px, 100%);
}

.adm-inline-controls input[type="file"] {
  max-width: min(280px, 100%);
  padding: 0.34rem 0.46rem;
}

.adm-inline-controls input:focus-visible,
.adm-inline-controls select:focus-visible,
.adm-form-grid input:focus-visible,
.adm-form-grid select:focus-visible,
.adm-form-grid textarea:focus-visible,
.adm-textarea:focus-visible,
.adm-qna-reply-form textarea:focus-visible {
  outline: 2px solid #7a89ea;
  outline-offset: 1px;
}

.adm-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #385285;
  font-weight: 700;
}

.adm-check input {
  width: 15px;
  height: 15px;
}

.adm-btn {
  border: 1px solid #c9d8ec;
  border-radius: 999px;
  background: #f5f8ff;
  color: #315083;
  min-height: 35px;
  padding: 0.36rem 0.78rem;
  font-size: 0.76rem;
  font-weight: 800;
  white-space: nowrap;
}

.adm-btn:hover:not(:disabled) {
  background: #ecf2ff;
  border-color: #b8c9e7;
}

.adm-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.adm-btn.is-primary {
  border-color: #879de7;
  background: linear-gradient(180deg, #89a0ea 0%, #7a90de 100%);
  color: #fff;
}

.adm-btn.is-danger {
  border-color: #e2c3cd;
  background: #fff4f6;
  color: #994960;
}

.adm-message {
  border-radius: 13px;
  border: 1px solid #cad9ee;
  background: #f3f8ff;
  color: #355587;
  padding: 10px 12px;
  font-size: 0.82rem;
  font-weight: 700;
}

.adm-message.is-success {
  border-color: #bddfc8;
  background: #eefcf2;
  color: #2e6a46;
}

.adm-message.is-error {
  border-color: #ecc6ce;
  background: #fff5f7;
  color: #92485f;
}

.adm-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid #cdd9ec;
  background: #f4f8ff;
  color: #385487;
  min-height: 24px;
  padding: 0.14rem 0.58rem;
  font-size: 0.71rem;
  font-weight: 800;
}

.adm-badge.is-success {
  border-color: #bddfc8;
  background: #eefcf2;
  color: #2f6845;
}

.adm-badge.is-danger {
  border-color: #e7c8d1;
  background: #fff4f7;
  color: #95495f;
}

.adm-badge.is-accent {
  border-color: #b6c4ec;
  background: #e9efff;
  color: #2f4d87;
}

.adm-table-wrap,
.adm-mini-table-wrap {
  width: 100%;
  overflow: auto;
  border-radius: 14px;
  border: 1px solid #d8e1f1;
  background: rgba(255, 255, 255, 0.9);
}

.adm-table,
.adm-mini-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 940px;
}

.adm-table th,
.adm-table td,
.adm-mini-table th,
.adm-mini-table td {
  border-bottom: 1px solid #e5ebf6;
  padding: 8px 8px;
  text-align: left;
  vertical-align: top;
  font-size: 0.78rem;
  color: #304f84;
}

.adm-table th,
.adm-mini-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f8ff;
  color: #37568a;
  font-weight: 800;
}

.adm-table tbody tr:hover,
.adm-mini-table tbody tr:hover {
  background: #f4f8ff;
}

.adm-table tbody tr.is-active,
.adm-mini-table tbody tr.is-active {
  background: #eaf1ff;
}

.adm-table td p,
.adm-mini-table td p {
  margin: 2px 0 0;
  color: #5d6e93;
  font-size: 0.72rem;
}

.adm-empty {
  text-align: center;
  color: #5d6d92;
  padding: 24px 10px;
  font-weight: 700;
}

.adm-help {
  margin: 0;
  color: #5a6d95;
  font-size: 0.78rem;
  font-weight: 600;
}

.adm-help-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
}

.adm-help-list li {
  list-style: none;
  color: #54658c;
  font-size: 0.78rem;
  font-weight: 600;
}

.adm-pagination {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #425f91;
  font-weight: 800;
}

.adm-overview-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding-top: 4px;
}

.adm-overview-card {
  border: 1px solid #cfdcf0;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(253, 254, 255, 0.94) 0%, rgba(241, 246, 255, 0.88) 100%);
  padding: 14px;
  display: grid;
  gap: 8px;
  min-height: 156px;
}

.adm-overview-card-code {
  margin: 0;
  width: fit-content;
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
  border: 1px solid #c8d5eb;
  background: #edf3ff;
  color: #5670a2;
  font-size: 0.73rem;
  font-weight: 800;
}

.adm-overview-card h3 {
  margin: 0;
  color: #2b4477;
  font-size: 1.04rem;
  font-weight: 900;
}

.adm-overview-card-value {
  margin: 0;
  font-size: clamp(1.44rem, 2.3vw, 2.05rem);
  line-height: 1.08;
  color: #233d70;
  font-weight: 900;
}

.adm-overview-card-desc {
  margin: 0;
  color: #5a6b90;
  font-size: 0.86rem;
  font-weight: 700;
}

.adm-detail-panel {
  gap: 10px;
}

.adm-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.adm-detail-card {
  border: 1px solid #d7e1f2;
  border-radius: 14px;
  background: rgba(250, 253, 255, 0.9);
  padding: 10px;
  display: grid;
  gap: 7px;
}

.adm-detail-card h4,
.adm-lecture-preview h4,
.adm-lecture-preview h5 {
  margin: 0;
  color: #2f4b80;
  font-weight: 900;
}

.adm-detail-card ul {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.adm-detail-card li {
  list-style: none;
  border: 1px solid #e2e9f5;
  border-radius: 10px;
  background: #fff;
  padding: 7px;
  display: grid;
  gap: 2px;
}

.adm-detail-card li strong {
  font-size: 0.76rem;
  color: #294477;
}

.adm-detail-card li span {
  font-size: 0.72rem;
  color: #5d6f96;
}

.adm-review-groups {
  display: grid;
  gap: 10px;
}

.adm-review-group {
  border: 1px solid #d8e1f2;
  border-radius: 14px;
  background: rgba(250, 253, 255, 0.88);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.adm-review-group header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.adm-review-group header h3 {
  margin: 0;
  color: #2b4478;
  font-size: 0.9rem;
  font-weight: 900;
}

.adm-review-group header p {
  margin: 0;
  color: #5f6f95;
  font-size: 0.74rem;
  font-weight: 700;
}

.adm-qna-layout {
  display: grid;
  grid-template-columns: minmax(360px, 45%) minmax(0, 1fr);
  gap: 12px;
}

.adm-qna-content {
  border: 1px solid #dbe3f3;
  border-radius: 12px;
  background: rgba(248, 252, 255, 0.92);
  padding: 10px;
  white-space: pre-wrap;
  color: #2f4c81;
  font-size: 0.79rem;
}

.adm-qna-reply-form {
  display: grid;
  gap: 8px;
}

.adm-qna-reply-form textarea {
  width: 100%;
  resize: vertical;
}

.adm-file-input-label {
  display: grid;
  gap: 6px;
  color: #365185;
  font-size: 0.79rem;
  font-weight: 800;
}

.adm-selected-files,
.adm-attachment-list {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.adm-selected-files li,
.adm-attachment-list li {
  list-style: none;
  border: 1px solid #dbe4f3;
  border-radius: 10px;
  background: #f8fbff;
  padding: 7px 9px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.adm-attachment-list li a {
  color: #355f9a;
  font-weight: 800;
  text-decoration: none;
}

.adm-attachment-list li span,
.adm-selected-files li span {
  color: #5a6b8f;
  font-size: 0.74rem;
  font-weight: 700;
}

.adm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.adm-form-grid label {
  display: grid;
  gap: 4px;
  color: #39558a;
  font-size: 0.77rem;
  font-weight: 800;
}

.adm-form-grid .span-2 {
  grid-column: span 2;
}

.adm-textarea {
  width: 100%;
  resize: vertical;
}

.adm-lecture-layout {
  display: grid;
  grid-template-columns: minmax(460px, 1.1fr) minmax(320px, 0.9fr);
  gap: 12px;
}

.adm-lecture-preview {
  border: 1px solid #d8e2f3;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(250, 253, 255, 0.92) 0%, rgba(243, 248, 255, 0.9) 100%);
  padding: 12px;
  display: grid;
  gap: 10px;
}

.adm-lecture-preview.is-main {
  min-height: 420px;
}

.adm-preview-grid {
  display: grid;
  gap: 10px;
}

.adm-preview-grid article {
  border: 1px solid #dfe7f4;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  padding: 10px;
  display: grid;
  gap: 6px;
}

.adm-preview-grid img,
.adm-preview-grid video,
.adm-preview-grid iframe {
  width: 100%;
  max-height: 230px;
  border: 1px solid #dce6f4;
  border-radius: 8px;
  object-fit: cover;
  background: #f4f8ff;
}

.adm-preview-grid iframe {
  min-height: 230px;
}

.adm-preview-grid a {
  color: #385f98;
  font-weight: 800;
  font-size: 0.77rem;
}

@media (max-width: 1300px) {
  .adm-overview-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .adm-lecture-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1040px) {
  .admin-page-shell {
    padding: 10px;
  }

  .adm-topbar {
    grid-template-columns: 1fr;
  }

  .adm-inline-controls {
    justify-content: flex-start;
  }

  .adm-panel-head,
  .adm-detail-head {
    grid-template-columns: 1fr;
  }

  .adm-qna-layout,
  .adm-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .adm-overview-card-grid {
    grid-template-columns: 1fr;
  }

  .adm-topbar,
  .adm-tabs,
  .adm-panel,
  .adm-subpanel,
  .adm-detail-panel,
  .adm-qna-thread,
  .adm-qna-list {
    border-radius: 14px;
  }

  .adm-inline-controls input[type="search"],
  .adm-inline-controls input[type="text"],
  .adm-inline-controls input[type="file"] {
    min-width: 170px;
  }
}
