/* Admin panel & login styles */

.login-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 80px 24px 40px;
  position: relative;
  z-index: 2;
}
a.login-back, .login-back {
  position: absolute;
  top: 24px; left: 24px;
  padding: 10px 18px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap !important;
  word-break: keep-all;
  backdrop-filter: blur(10px);
  transition: all .2s;
}
.login-back:hover {
  color: var(--gold);
  border-color: var(--line-strong);
}
.login-card {
  width: 100%;
  max-width: 460px;
  padding: 48px 44px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  backdrop-filter: blur(20px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: "";
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.18), transparent 70%);
  top: -100px; right: -100px;
  pointer-events: none;
}
@media (max-width: 540px) { .login-card { padding: 36px 26px; } }

.login-mark {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  display: grid; place-items: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 30px;
  color: #0a1628;
  margin: 0 auto 22px;
  box-shadow: 0 14px 40px -10px rgba(212, 175, 55, 0.5);
  position: relative;
}
.login-eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 14px;
  position: relative;
}
.login-title {
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.015em;
  color: var(--ink-0);
  margin: 0 0 8px;
  position: relative;
}
.login-title em {
  font-style: italic;
  font-weight: 400;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold), var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-sub {
  font-size: 14px;
  color: var(--ink-3);
  margin: 0 0 32px;
  position: relative;
}
.login-form {
  text-align: left;
  position: relative;
}
.login-error {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.3);
  color: var(--danger);
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 13px;
  margin-bottom: 16px;
  text-align: center;
}
.login-hint {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
  padding: 12px;
  background: var(--bg-1);
  border: 1px dashed var(--line);
  border-radius: var(--r-md);
}
.login-hint strong { color: var(--gold); }

/* === ADMIN PANEL === */
.admin-shell {
  min-height: 100vh;
  position: relative;
  z-index: 2;
}
.admin-top {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 22, 40, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-brand-name { white-space: nowrap; }
.admin-top-actions { flex-wrap: wrap; }
@media (max-width: 640px) {
  .admin-top { padding: 14px 18px; }
  .admin-user { display: none; }
}
.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.admin-brand .nav-mark { width: 36px; height: 36px; font-size: 18px; }
.admin-brand-text {
  display: flex;
  flex-direction: column;
}
.admin-brand-name {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-0);
  line-height: 1.2;
}
.admin-brand-tag {
  font-size: 10px;
  color: var(--gold);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
}
.admin-top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.admin-user {
  font-size: 13px;
  color: var(--ink-2);
  padding-right: 12px;
  border-right: 1px solid var(--line);
}
.admin-user strong { color: var(--gold); margin-left: 6px; }
.admin-btn {
  padding: 9px 16px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 100px;
  color: var(--ink-1);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--sans);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all .2s;
}
.admin-btn:hover {
  background: var(--glass-strong);
  border-color: var(--line-strong);
}
.admin-btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #0a1628;
  font-weight: 600;
}
.admin-btn-primary:hover {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
}
.admin-btn-danger {
  color: var(--danger);
  border-color: rgba(255, 107, 107, 0.3);
}
.admin-btn-danger:hover {
  background: rgba(255, 107, 107, 0.1);
  border-color: var(--danger);
}

.admin-body {
  max-width: 1400px;
  margin: 0 auto;
  padding: 36px 28px 60px;
}

.admin-h1 {
  font-family: var(--serif);
  font-size: 42px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-0);
  margin: 0 0 8px;
}
.admin-h1 em {
  font-style: italic;
  color: var(--gold);
}
.admin-sub {
  color: var(--ink-2);
  font-size: 15px;
  margin: 0 0 32px;
}

/* stat cards */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
@media (max-width: 900px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 540px) { .stat-grid { grid-template-columns: 1fr; } }

.stat-card {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px 22px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.stat-card::before {
  content: "";
  position: absolute;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.15), transparent 70%);
  top: -40px; right: -40px;
  pointer-events: none;
}
.stat-card-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.stat-card-num {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 500;
  color: var(--ink-0);
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat-card-num.gold { color: var(--gold); }
.stat-card-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-3);
}

/* toolbar */
.tool-bar {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr auto;
  gap: 12px;
  margin-bottom: 20px;
  padding: 14px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  backdrop-filter: blur(10px);
  align-items: center;
}
@media (max-width: 900px) { .tool-bar { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .tool-bar { grid-template-columns: 1fr; } }

.search-wrap {
  position: relative;
}
.search-wrap input {
  width: 100%;
  padding: 12px 16px 12px 42px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink-0);
  font-family: var(--sans);
  font-size: 14px;
  outline: none;
  transition: all .2s;
}
.search-wrap input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.12);
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
  pointer-events: none;
}
.tool-select {
  padding: 12px 14px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  color: var(--ink-0);
  font-family: var(--sans);
  font-size: 14px;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23d4af37' stroke-width='2'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.tool-select option { background: var(--bg-1); }

/* table */
.table-wrap {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  backdrop-filter: blur(10px);
}
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.table thead th {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
  transition: color .2s;
}
.table thead th:hover { color: var(--gold); }
.table thead th .sort-arr {
  margin-left: 6px;
  color: var(--gold);
  font-size: 10px;
}
.table tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background .15s;
  cursor: pointer;
}
.table tbody tr:hover { background: var(--glass-strong); }
.table tbody tr:last-child { border-bottom: none; }
.table tbody td {
  padding: 14px 18px;
  color: var(--ink-1);
  vertical-align: middle;
}
.table tbody td.id-cell {
  font-family: var(--serif);
  color: var(--gold);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.table tbody td.name-cell {
  font-weight: 600;
  color: var(--ink-0);
}
.table tbody td.muted {
  color: var(--ink-3);
  font-size: 12px;
}

.com-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--line-strong);
  border-radius: 100px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--gold);
  white-space: nowrap;
}
.com-pill.alt {
  background: var(--bg-3);
  color: var(--ink-2);
  border-color: var(--line);
}
.com-pill .pref-num {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--gold);
  color: #0a1628;
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
}
.com-pill.alt .pref-num {
  background: var(--ink-3);
  color: var(--bg-0);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  text-transform: capitalize;
}
.status-pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
}
.status-pending { background: rgba(212, 175, 55, 0.1); color: var(--gold); border: 1px solid var(--line-strong); }
.status-pending::before { background: var(--gold); }
.status-approved { background: rgba(74, 222, 128, 0.1); color: var(--success); border: 1px solid rgba(74, 222, 128, 0.3); }
.status-approved::before { background: var(--success); }
.status-rejected { background: rgba(255, 107, 107, 0.1); color: var(--danger); border: 1px solid rgba(255, 107, 107, 0.3); }
.status-rejected::before { background: var(--danger); }

.empty-state {
  padding: 80px 30px;
  text-align: center;
  color: var(--ink-3);
}
.empty-state-mark {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--glass-strong);
  border: 1px solid var(--line);
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  color: var(--gold);
}
.empty-state h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--ink-1);
  margin: 0 0 8px;
}
.empty-state p {
  font-size: 14px;
  margin: 0 auto;
  max-width: 380px;
  line-height: 1.6;
}

/* modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5, 10, 20, 0.85);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.7);
  animation: scaleIn .25s cubic-bezier(.34,1.56,.64,1);
}
@keyframes scaleIn { from { transform: scale(0.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal-head {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  position: sticky;
  top: 0;
  background: var(--bg-1);
  z-index: 1;
}
.modal-head-title {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--ink-0);
  margin: 6px 0 12px;
  letter-spacing: -0.01em;
}
.modal-head-id {
  font-size: 12px;
  color: var(--gold);
  letter-spacing: 0.15em;
  font-weight: 600;
}
.modal-close {
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 50%;
  width: 36px; height: 36px;
  color: var(--ink-1);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all .2s;
  flex-shrink: 0;
}
.modal-close:hover {
  background: var(--glass-strong);
  border-color: var(--line-strong);
  color: var(--gold);
}
.modal-body { padding: 24px 32px; }
.modal-footer {
  padding: 20px 32px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
@media (max-width: 540px) { .detail-grid { grid-template-columns: 1fr; } }

.detail-row {
  border-bottom: 1px dashed var(--line);
  padding-bottom: 14px;
}
.detail-row:last-child { border-bottom: none; }
.detail-key {
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-3);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.detail-val {
  font-size: 15px;
  color: var(--ink-0);
  font-weight: 500;
  word-break: break-word;
}
.detail-val a { color: var(--gold); text-decoration: none; }
.detail-val a:hover { text-decoration: underline; }
.detail-row.full {
  grid-column: 1 / -1;
}
.detail-row.full .detail-val {
  font-weight: 400;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--ink-1);
  background: var(--bg-2);
  padding: 14px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  margin-top: 4px;
}
