/*
 * 관리자페이지 (화면기획서 슬라이드 51~53)
 *  ADMIN-001 관리자 인증(팝업) / ADMIN-002 사용자 로그(전체화면) / ADMIN-003 로그아웃(팝업)
 *
 * ADMIN-002 표 좌표는 목업 프레임(680x512) 기준 px 를 % 로 옮겼다.
 */

/* ── ADMIN-002 사용자 로그 전체화면 ── */
.admin {
  font-family: var(--font-game);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  /* 다른 전체화면과 같은 어두운 배경. 예전 밝은 하늘색 배경이 남아 있었다. */
  background: linear-gradient(180deg, var(--gs-navy-900) 0%, var(--gs-navy-950) 100%);
}
/* admin */
.admin__frame {
  container-type: inline-size;
  position: relative;
  width: min(96vw, calc(96vh * 680 / 512));
  aspect-ratio: 680 / 512;
  border: 1px solid var(--gs-line);
  border-radius: 14px;
  background: #faf7f5cc;
  box-shadow: 0 10px 28px rgba(42,35,32,.07);
  overflow: hidden;
}
.admin__frame > * { position: absolute; }

/* 사용자 로그 x=22 y=24 w=180 h=32 */
.admin__title {
  left: 3.24%; top: 4.69%; width: 26%; height: 6.25%;
  display: flex; align-items: center;
  font-size: 3.24cqw; color: var(--gs-text);
}
/* 관리자 로그아웃 x=549 y=24 w=103 h=28 */
.admin__logout {
  left: 80.74%; top: 4.69%; width: 15.15%; height: 5.47%;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid #ff7a01; border-radius: 999px;
  background: #faf7f5cc;
  color: #c00026; font-family: inherit; font-weight: bold; font-size: 1.76cqw;
  cursor: pointer;
}
.admin__logout:active { transform: translateY(2px); box-shadow: none; }

/* 구분선 y=60 */
.admin__rule {
  left: 3.24%; top: 11.72%; width: 91.18%; height: 0;
  border-top: 2px solid #1f2429;
}

/* 검색 영역 라벨 y=79 / 입력 y=99 */
.admin__search { left: 3.24%; top: 15.43%; width: 91.18%; height: 8%; }
.admin__search-label {
  position: absolute; top: -2%; font-size: 1.76cqw; color: var(--gs-muted);
}
.admin__lbl-name { left: 0; }
.admin__lbl-date { left: 38.5%; }
.admin__field {
  position: absolute; top: 34%;
  border: 1px solid var(--gs-line); border-radius: 7px;
  background: #faf7f5cc; padding: 0 10px;
  font-family: inherit; font-weight: bold; font-size: 1.91cqw; color: var(--gs-text);
  height: 66%;
}
.admin__name { left: 0; width: 36%; }
.admin__date-from { left: 38.5%; width: 19%; }
.admin__tilde {
  position: absolute; left: 58%; top: 34%; height: 66%;
  display: flex; align-items: center; font-size: 2.06cqw;
}
.admin__date-to { left: 61%; width: 19%; }
.admin__search-btn {
  position: absolute; left: 83%; top: 34%; width: 17%; height: 66%;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gs-line); border-radius: 7px;
  background: linear-gradient(135deg,#e9002d,#ff7a01);
  color: #ffffff; font-family: inherit; font-weight: bold; font-size: 1.91cqw;
  text-shadow: none; cursor: pointer;
  box-shadow: none;
}
.admin__search-btn:active { transform: translateY(2px); box-shadow: none; }

/* 표 영역 헤더 y=155, 행 높이 24 */
.admin__table {
  left: 3.24%; top: 30.27%; width: 91.18%; height: 52%;
  display: flex; flex-direction: column;
}
.admin__row {
  display: grid;
  /* 도달 스테이지 열은 발주처 요청(2026-08-28)으로, 부서명 열은 0918 요청으로 뺐다. */
  grid-template-columns: 28% 26% 23% 23%;
  align-items: center;
  font-size: 1.76cqw; letter-spacing: -.02em;
  padding: 4px 0;
  border-bottom: 1px solid #1f24290b;
}
.admin__row--head {
  font-weight: bold; color: #1f2429;
  background: #f0ebe7;
  border-radius: 8px 8px 0 0;
  border-bottom: 0;
}
.admin__row--data { color: #6f757c; }
/* 줄무늬는 어두운 표 위에 얹는 옅은 흰색이어야 한다.
   예전 밝은 회색(#ffffff)이 남아 있어 짝수 줄 글자가 보이지 않았다. */
.admin__row--data:nth-child(even) { background: #1f242907; }
.admin__cell { padding: 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin__empty {
  padding: 24px; text-align: center; color: var(--gs-muted); font-size: 1.91cqw;
}

/* 페이지네이션 y=454 */
.admin__pager {
  left: 0; right: 0; top: 88%;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.admin__page {
  min-width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gs-line); border-radius: 6px;
  background: #faf7f5cc; color: var(--gs-text);
  font-family: inherit; font-weight: bold; font-size: 1.91cqw; cursor: pointer;
}
.admin__page--on { background: linear-gradient(135deg,#e9002d,#ff7a01); color: #ffffff; border-color: #c00026; }
.admin__page:disabled { opacity: .4; cursor: default; }

/* ── 탭 · 엑셀 내려받기 · 접속 기록 · 문항 통계 (발주처 0918) ──
   제목 자리(사용자 로그)를 탭 셋으로 바꿨다. 나머지 좌표는 그대로다. */
.admin__tabs {
  left: 3.24%; top: 4.69%; width: 60%; height: 6.25%;
  display: flex; align-items: center; gap: 1.2cqw;
}
.admin__tab {
  height: 100%; padding: 0 1.8cqw;
  display: flex; align-items: center;
  border: 0; border-bottom: 3px solid transparent; background: transparent;
  color: var(--gs-muted); font-family: inherit; font-weight: bold; font-size: 2.65cqw;
  cursor: pointer;
}
.admin__tab--on { color: var(--gs-text); border-bottom-color: #e9002d; }
.admin__csv {
  left: 62%; top: 4.69%; width: 17%; height: 5.47%;
  display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--gs-line); border-radius: 999px;
  background: #faf7f5cc; color: var(--gs-text);
  font-family: inherit; font-weight: bold; font-size: 1.76cqw; cursor: pointer;
}
.admin__csv:active { transform: translateY(2px); }
/* 접속 기록: 닉네임·아이디·접속 시각 */
.admin__row--login { grid-template-columns: 34% 30% 36%; }
/* 문항 통계: 코드·제목·열람·제출·포기·정답률·평균 시간·펼침 */
.admin__row--stat { grid-template-columns: 9% 33% 10% 10% 10% 11% 12% 5%; }
.admin__table--scroll { overflow-y: auto; }
/* 검색칸이 없는 탭(문항 통계)은 표를 구분선 바로 아래로 올린다 */
.admin__table--top { top: 15.43%; height: 74%; }
.admin__stat-toggle {
  border: 0; background: transparent; color: var(--gs-muted); cursor: pointer;
  font-family: inherit; font-size: 1.76cqw;
}
/* 펼친 줄: 보기별 선택 수를 막대로 */
.admin__picks { padding: 6px 10px 10px; background: #1f242905; border-bottom: 1px solid #1f24290b; }
.admin__picks-group { font-size: 1.62cqw; color: var(--gs-text); font-weight: bold; margin: 4px 0 2px; }
.admin__pick { display: grid; grid-template-columns: 50% 38% 12%; align-items: center; gap: 6px;
  font-size: 1.62cqw; color: #6f757c; padding: 2px 0; }
.admin__pick-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin__pick-bar { height: 1.2cqw; border-radius: 999px; background: #ece7e2; overflow: hidden; }
.admin__pick-fill { height: 100%; background: linear-gradient(135deg,#e9002d,#ff7a01); }
.admin__pick-num { text-align: right; }
.admin__pick--right .admin__pick-fill { background: linear-gradient(135deg,#1f9d55,#4ec27f); }
