@import url("/static/account.css");

.admin-main { max-width: 1180px; margin: 20px auto 64px; padding: 0 24px; }
.admin-intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 10px; }
.admin-intro h1 { font-size: 26px; letter-spacing: -.6px; margin: 0; }
.admin-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.admin-tabs button { border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); padding: 7px 2px 10px; font-size: 16px; font-weight: 500; }
.admin-tabs button[aria-selected="true"] { border-bottom-color: var(--green); color: var(--ink); font-weight: 700; }
.panel-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.panel-heading h2 { margin: 0; font-size: 21px; line-height: 1.5; }
.panel-heading h3 { margin: 0; font-size: 18px; }
.panel-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.date-filter { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.date-filter .field { font-size: 13px; min-width: 170px; }
.date-filter .button { min-height: 46px; }
.date-filter .text-button { padding: 12px 6px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 22px 0; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 22px; }
.stat-card > span { color: var(--muted); display: block; font-size: 14px; }
.stat-card > strong { display: block; font-size: 36px; line-height: 1.5; font-weight: 600; }
.stat-card > small { display: block; font-size: 12px; color: var(--muted); }
.stat-card.success > strong { color: var(--green); }
.stat-card.failure > strong { color: var(--danger); }
.admin-panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 23px; min-width: 0; }
.stats-panel { margin-bottom: 20px; }
.table-scroll { overflow-x: auto; max-width: 100%; }
.mobile-table-hint { display: none; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; font-weight: 500; color: var(--muted); background: #f7f9f5; font-size: 12px; white-space: nowrap; }
.data-table th, .data-table td { padding: 13px 14px; border-bottom: 1px solid #edf0ea; vertical-align: top; }
.data-table td:not(:nth-child(2)), .data-table th:not(:nth-child(2)) { white-space: nowrap; }
.data-table th:nth-child(n+3), .data-table td:nth-child(n+3) { text-align: right; }
.data-table td:nth-child(2) { min-width: 185px; overflow-wrap: anywhere; }
.data-table td small { display: block; color: var(--muted); font-size: 11px; }
.data-table .success-text { color: var(--green); font-weight: 600; }
.data-table .failure-text { color: var(--danger); font-weight: 600; }
.table-note { margin-top: 16px; }
.empty-state { color: var(--muted); text-align: center; padding: 30px 12px; margin: 0; font-size: 14px; }
.error-list { display: grid; gap: 10px; }
.error-item { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding: 15px 17px; background: #fff8f7; border: 1px solid #f0dedc; border-radius: 10px; }
.error-item strong { font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }
.error-item p { font-size: 12px; color: var(--muted); margin: 4px 0 0; overflow-wrap: anywhere; }
.error-count { color: var(--danger); font-weight: 700; white-space: nowrap; font-size: 13px; }
.recent-errors { margin-top: 16px; font-size: 13px; }
.recent-errors summary { cursor: pointer; color: var(--green); padding: 10px 0; }
.recent-error { padding: 12px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.recent-error p { margin: 4px 0; color: var(--muted); }
.recent-error code { font-size: 11px; color: var(--ink); }
.check-field input, .select-all input, .voice-check { accent-color: var(--green); width: 17px; height: 17px; flex-shrink: 0; }
.file-field input { border-style: dashed; padding: 13px 10px; font-size: 13px; background: #fafcf8; }
.file-field input::file-selector-button { border: 1px solid var(--line); border-radius: 5px; color: var(--ink); background: #fff; margin-right: 9px; padding: 7px 9px; cursor: pointer; }
.audio-preview { padding: 10px; background: var(--pale); border-radius: 9px; min-width: 0; }
.audio-preview audio { width: 100%; height: 36px; display: block; }
.audio-preview p { margin-top: 8px; }
.check-field { display: flex; gap: 9px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check-field input { margin: 4px 0 0; }
.check-field small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 3px; }
#voice-upload-meter { width: 100%; height: 9px; accent-color: var(--green); }
#voice-upload-label { display: block; margin-top: 3px; }
#admin-denied { max-width: 520px; margin: 60px auto; }
#admin-denied h1 { font-size: 25px; }
#admin-denied .text-button { display: block; margin-top: 15px; }
dialog { color: var(--ink); border: 1px solid var(--line); border-radius: 16px; width: min(460px, calc(100% - 32px)); max-height: calc(100% - 48px); padding: 26px; box-shadow: 0 18px 80px #153d2b30; }
dialog::backdrop { background: #10291c66; }
dialog h2 { font-size: 22px; margin: 0 0 10px; }
dialog p { margin: 10px 0; }
dialog ul { padding-left: 20px; max-height: 180px; overflow-y: auto; font-size: 14px; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; margin-top: 23px; }
.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; }
@media (max-width: 960px) {
  .stat-card { padding: 16px; }
}
@media (max-width: 600px) {
  .admin-main { margin: 14px auto 40px; padding: 0 16px; }
  .admin-intro { gap: 12px; }
  .admin-intro h1 { font-size: 23px; }
  .admin-intro > .button { font-size: 12px; padding: 8px 10px; max-width: 112px; flex-shrink: 0; }
  .admin-tabs { gap: 22px; margin-bottom: 14px; }
  .admin-tabs button { font-size: 14px; }
  .panel-heading h2 { font-size: 19px; }
  .panel-heading h3 { font-size: 16px; }
  .date-filter { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .date-filter .field { min-width: 0; }
  .date-filter input { font-size: 13px; padding: 9px 7px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 14px 17px; }
  .stat-card > span { font-size: 13px; }
  .stat-card > strong { font-size: 31px; }
  .admin-panel { padding: 18px 15px; }
  .stats-panel .panel-heading { flex-direction: column; gap: 5px; }
  .mobile-table-hint { display: block; margin: -5px 0 12px; font-size: 12px; }
  .data-table th, .data-table td { padding: 11px; }
  .error-item { padding: 12px; gap: 12px; }
}
