/* Extra styles for the /admin panel (imported after style.css). */

.admin-body { background: var(--bg); min-height: 100vh; }

/* ------------------------------------------------------------ Login */
.login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: min(400px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-brand { text-align: center; }

.login-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 1px;
  text-align: center;
  text-transform: uppercase;
}

.login-card .btn { margin-top: 6px; }

.login-back {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 6px;
}

.login-back:hover { color: var(--red-bright); }

/* -------------------------------------------------------------- Dash */
.dash-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(9, 9, 11, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.dash-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 16px 0;
}

.dash-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  letter-spacing: 1.5px;
}

.dash-title em { color: var(--red-bright); font-style: normal; }

.dash-tabs { display: flex; gap: 8px; }

.dash-tab {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.dash-tab:hover { color: var(--ink); }

.dash-tab.active {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

.dash-body { padding: 40px 0 90px; }

.tab-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.tab-head h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* -------------------------------------------------------------- Forms */
.field { display: flex; flex-direction: column; gap: 6px; }

.field span {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field select,
.field textarea {
  background: var(--panel-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  padding: 10px 14px;
  border-radius: 10px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s ease;
}

.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--red); }

.field textarea { resize: vertical; }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.entity-form {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 4px;
}

.form-error {
  color: var(--red-bright);
  font-size: 0.9rem;
}

.form-ok {
  color: #4ade80;
  font-size: 0.9rem;
}

/* ------------------------------------------------------------- Tables */
.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow-x: auto;
}

.entity-table { width: 100%; border-collapse: collapse; min-width: 620px; }

.entity-table th {
  text-align: left;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.entity-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.entity-table tr:last-child td { border-bottom: none; }

.entity-table tr:hover td { background: var(--panel-2); }

.row-actions { display: flex; gap: 8px; justify-content: flex-end; }

.link-mini {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  transition: color 0.15s ease, border-color 0.15s ease;
}

.link-mini:hover { color: var(--red-bright); border-color: var(--red-dim); }

.danger { color: var(--red-bright); }

.danger:hover { border-color: var(--red); }

@media (max-width: 760px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}