/* 관리자 공통 틀: 왼쪽 메뉴 + 본문. 학습관리 화면(admin_portal.css)과 같은 색 체계를 쓴다. */
:root {
  --shell-width: 236px;
  --shell-blue: #2f6fed;
  --shell-blue-soft: #edf3ff;
  --shell-ink: #16181d;
  --shell-muted: #6e7480;
  --shell-line: #e1e6ef;
  --shell-surface: #fff;
}

body.has-admin-shell { padding-left: var(--shell-width); }

.admin-shell {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 60;
  width: var(--shell-width); display: flex; flex-direction: column;
  background: var(--shell-surface); border-right: 1px solid var(--shell-line);
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: var(--shell-ink);
}
.admin-shell__brand {
  display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px;
  color: var(--shell-ink); text-decoration: none;
}
.admin-shell__logo { width: 32px; height: 32px; border-radius: 9px; object-fit: cover; }
.admin-shell__brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.admin-shell__brand-text b { font-size: 14px; }
.admin-shell__brand-text small { color: var(--shell-muted); font-size: 11.5px; }

.admin-shell__nav { flex: 1; overflow-y: auto; padding: 4px 10px 14px; }
.admin-shell__group {
  margin: 16px 10px 6px; color: var(--shell-muted); font-size: 11px; font-weight: 700; letter-spacing: .06em;
}
.admin-shell__group:first-child { margin-top: 4px; }
.admin-shell__link {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  color: #3a3f4a; text-decoration: none; font-size: 14px; line-height: 1.3;
}
.admin-shell__link:hover { background: #f4f6fa; color: var(--shell-ink); }
.admin-shell__link.is-active { background: var(--shell-blue-soft); color: var(--shell-blue); font-weight: 700; }
.admin-shell__link::before {
  content: attr(data-icon); width: 18px; flex: none; text-align: center; font-size: 13px; opacity: .85;
}
.admin-shell__badge {
  margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: #ff5a5f; color: #fff;
  font-size: 11px; font-weight: 700; text-align: center;
}

.admin-shell__account {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--shell-line);
}
.admin-shell__avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--shell-blue); color: #fff; font-weight: 700; font-size: 13px;
}
.admin-shell__who { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.admin-shell__who b { font-size: 13px; }
.admin-shell__who small { color: var(--shell-muted); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell__logout {
  border: 1px solid var(--shell-line); background: #fff; color: var(--shell-muted); border-radius: 8px;
  padding: 5px 9px; font-size: 12px; cursor: pointer; font-family: inherit;
}
.admin-shell__logout:hover { color: var(--shell-ink); border-color: #c9d1de; }

/* 좁은 화면: 왼쪽 메뉴 대신 위쪽 가로 스크롤 메뉴 */
.admin-shell-mobile { display: none; }
@media (max-width: 960px) {
  body.has-admin-shell { padding-left: 0; }
  .admin-shell { display: none; }
  .admin-shell-mobile {
    display: block; position: sticky; top: 0; z-index: 60; margin: 0 0 14px;
    background: var(--shell-surface); border-bottom: 1px solid var(--shell-line);
  }
  .admin-shell-mobile__bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 6px; }
  .admin-shell__brand--compact { padding: 0; font-size: 14px; font-weight: 700; }
  .admin-shell-mobile form { margin: 0; }
  .admin-shell-tabs {
    display: flex; gap: 4px; overflow-x: auto; padding: 4px 10px 10px; scrollbar-width: none;
  }
  .admin-shell-tabs::-webkit-scrollbar { display: none; }
  .admin-shell-tabs a {
    flex: none; padding: 6px 12px; border-radius: 999px; color: #3a3f4a; text-decoration: none;
    font-size: 13px; background: #f4f6fa;
  }
  .admin-shell-tabs a.is-active { background: var(--shell-blue); color: #fff; font-weight: 700; }
}

/* 모든 관리자 화면 위에 뜨는 티처블 쿠폰 등록 경고 */
.admin-alert {
  display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 10px 14px; margin: 0 0 12px;
  border-radius: 8px; background: #fdeaea; color: #b3261e; font-size: 14px; font-weight: 600;
}
.admin-alert a { color: #b3261e; text-decoration: underline; }
