/* ============================================================
   Digireal - Admin Page Styles
   ============================================================ */
.admin-body { background: var(--light-gray); }

.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-ghost {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
}
.btn-ghost:hover { background: rgba(255,255,255,0.28); }

/* ---------- Login Gate ---------- */
.login-gate {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 80% 20%, rgba(0,184,212,0.18), transparent 45%),
    radial-gradient(circle at 15% 85%, rgba(0,102,255,0.16), transparent 45%),
    #f7fbff;
  z-index: 2000;
}
.login-box {
  background: #fff;
  width: 100%;
  max-width: 420px;
  padding: 44px 38px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.login-logo { height: 52px; width: auto; margin: 0 auto 18px; }
.login-box h1 { font-size: 1.5rem; color: var(--dark-gray); margin-bottom: 8px; }
.login-box > p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 24px; }
.login-field { display: flex; flex-direction: column; gap: 12px; }
.login-field input {
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.98rem;
  background: var(--light-gray);
}
.login-field input:focus {
  outline: none; border-color: var(--electric); background: #fff;
  box-shadow: 0 0 0 3px rgba(0,102,255,0.12);
}
.login-field .btn { justify-content: center; }
.login-error { color: #d32f2f; font-size: 0.88rem; min-height: 20px; margin-top: 12px; }
.login-hint { color: var(--text-muted); font-size: 0.78rem; margin-top: 18px; line-height: 1.5; }

/* ---------- Admin Header ---------- */
.admin-header {
  background: var(--gradient);
  position: sticky; top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}
.admin-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-logo { display: flex; align-items: center; gap: 10px; color: #fff; }
.admin-logo img { height: 34px; filter: brightness(0) invert(1); }
.admin-logo span { font-family: var(--font-en); font-weight: 800; font-size: 1.25rem; }
.admin-logo small { font-weight: 500; font-size: 0.7rem; opacity: 0.85; vertical-align: super; }
.admin-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-header .btn-outline { color: #fff; border-color: rgba(255,255,255,0.6); }
.admin-header .btn-outline:hover { background: #fff; color: var(--royal); }

/* ---------- Main ---------- */
.admin-main { max-width: 1280px; margin: 0 auto; padding: 36px 24px 60px; }
.admin-title { font-size: 1.6rem; font-weight: 800; color: var(--dark-gray); margin-bottom: 26px; }

/* ---------- Stat Cards ---------- */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}
.stat-card {
  position: relative;
  background: #fff;
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--border);
  overflow: hidden;
}
.stat-card.accent-new { border-left-color: var(--cyan); }
.stat-card.accent-progress { border-left-color: var(--electric); }
.stat-card.accent-done { border-left-color: #0a8f4f; }
.stat-label { display: block; font-size: 0.86rem; color: var(--text-muted); margin-bottom: 6px; }
.stat-value { font-family: var(--font-en); font-size: 2rem; font-weight: 800; color: var(--dark-gray); }
.stat-ico {
  position: absolute;
  right: 18px; top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: rgba(0,82,204,0.08);
}

/* ---------- Toolbar ---------- */
.admin-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.search-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
  max-width: 420px;
}
.search-wrap i {
  position: absolute; left: 16px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}
.search-wrap input {
  width: 100%;
  padding: 12px 16px 12px 44px;
  border: 1.5px solid var(--border);
  border-radius: 50px;
  background: #fff;
  font-size: 0.95rem;
}
.search-wrap input:focus {
  outline: none; border-color: var(--electric);
  box-shadow: 0 0 0 3px rgba(0,102,255,0.1);
}
.filter-wrap { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
  padding: 9px 18px;
  border: 1.5px solid var(--border);
  background: #fff;
  border-radius: 50px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { border-color: var(--electric); color: var(--electric); }
.filter-btn.active { background: var(--gradient); color: #fff; border-color: transparent; }

/* ---------- Table ---------- */
.table-wrap {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table thead th {
  text-align: left;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 16px 18px;
  background: var(--light-gray);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.admin-table tbody td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--light-gray-2);
  font-size: 0.92rem;
  color: var(--text);
  vertical-align: middle;
}
.admin-table tbody tr { transition: background 0.15s; cursor: pointer; }
.admin-table tbody tr:hover { background: #f3f8ff; }
.admin-table tbody tr:last-child td { border-bottom: none; }
.cell-name { font-weight: 600; color: var(--dark-gray); }
.cell-date { white-space: nowrap; color: var(--text-muted); font-size: 0.86rem; }
.cell-phone a { color: var(--electric); }

/* Status badge */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-신규 { background: rgba(0,184,212,0.14); color: #0090a8; }
.status-확인 { background: rgba(0,102,255,0.12); color: var(--electric); }
.status-완료 { background: rgba(10,143,79,0.12); color: #0a8f4f; }

/* Row actions */
.row-actions { display: flex; gap: 6px; }
.icon-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.2s;
}
.icon-btn.view { background: rgba(0,102,255,0.1); color: var(--electric); }
.icon-btn.view:hover { background: var(--electric); color: #fff; }
.icon-btn.del { background: rgba(211,47,47,0.1); color: #d32f2f; }
.icon-btn.del:hover { background: #d32f2f; color: #fff; }

/* Empty / Loading */
.empty-state, .loading-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; color: var(--border); margin-bottom: 12px; display: block; }
.loading-state { font-size: 0.95rem; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15, 30, 55, 0.55);
  display: grid; place-items: center;
  padding: 20px;
  z-index: 1500;
  backdrop-filter: blur(3px);
}
.modal-box {
  position: relative;
  background: #fff;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 36px 34px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  border: none; background: var(--light-gray);
  border-radius: 50%;
  cursor: pointer; font-size: 1rem; color: var(--text-muted);
  transition: all 0.2s;
}
.modal-close:hover { background: #ffe3e3; color: #d32f2f; }
.modal-box h2 { font-size: 1.35rem; color: var(--dark-gray); margin-bottom: 22px; }
.detail-list { display: grid; gap: 14px; margin-bottom: 26px; }
.detail-list .detail-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--light-gray-2);
}
.detail-list dt { font-weight: 600; color: var(--text-muted); font-size: 0.88rem; }
.detail-list dd { color: var(--dark-gray); font-size: 0.95rem; word-break: break-word; }
.detail-list dd a { color: var(--electric); }
.modal-actions {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.modal-actions label { font-weight: 600; font-size: 0.9rem; color: var(--dark-gray); }
.modal-actions select {
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  background: var(--light-gray);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
  .table-wrap { overflow-x: auto; }
  .admin-table { min-width: 760px; }
}
@media (max-width: 520px) {
  .admin-header-actions .btn span,
  .admin-header-actions .btn { font-size: 0.78rem; padding: 7px 11px; }
  .stat-cards { grid-template-columns: 1fr 1fr; gap: 12px; }
  .detail-list .detail-row { grid-template-columns: 1fr; gap: 4px; }
}
