:root {
  --bg: #05060a;
  --panel: #0b0f17;
  --panel-soft: #101827;
  --text: #f9fafb;
  --muted: #9ca3af;
  --border: #1f2937;
  --accent: #f25c1c; /* Abemon orange */
  --accent-soft: #fb7a3c;
  --accent-soft-alt: #ffedd5;
  --link: #f97316;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background: radial-gradient(circle at top left, #111827 0, var(--bg) 40%, #020617 100%);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.shell {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.shell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent) 0, #111827 55%, #020617 100%);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.55);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  height: 32px;
  width: auto;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 18px;
  font-weight: 600;
}

.brand-subtitle {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.brand-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(15, 23, 42, 0.9);
  color: rgba(248, 250, 252, 0.88);
}

.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
}

.shell-main {
  margin-top: 24px;
}

.panel {
  background: radial-gradient(circle at top left, rgba(248, 113, 113, 0.08) 0, rgba(15, 23, 42, 0.96) 40%, rgba(15, 23, 42, 1) 100%);
  border-radius: 16px;
  padding: 22px 20px 24px;
  border: 1px solid rgba(15, 23, 42, 0.9);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.panel-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}

@media (min-width: 640px) {
  .panel-header {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }
}

h1 {
  margin: 0;
  font-size: 22px;
}

h2 {
  margin-top: 24px;
  font-size: 18px;
}

.filters {
  display: grid;
  grid-template-columns: 1.6fr 0.6fr 0.6fr 0.6fr 0.4fr;
  gap: 8px;
  margin: 16px 0 18px;
}

input,
button {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  font-size: 13px;
}

input::placeholder {
  color: rgba(148, 163, 184, 0.9);
}

button {
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent) 0, var(--accent-soft) 100%);
  border-color: rgba(248, 113, 22, 0.6);
  color: #111827;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(248, 113, 22, 0.45);
}

button:hover {
  filter: brightness(1.05);
}

.table-wrapper {
  border-radius: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--panel);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid #1e293b;
  text-align: left;
}

thead tr {
  background: rgba(15, 23, 42, 0.98);
}

tbody tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.9);
}

tbody tr:nth-child(odd) {
  background: rgba(15, 23, 42, 0.98);
}

tbody tr:hover {
  background: rgba(30, 64, 175, 0.35);
}

tr:last-child td {
  border-bottom: 0;
}

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

@media (max-width: 720px) {
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.label {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

pre {
  background: #020617;
  border: 1px solid var(--border);
  padding: 12px;
  border-radius: 12px;
  overflow: auto;
  font-size: 12px;
}

.back-link {
  margin-bottom: 8px;
}

.back-link a {
  font-size: 13px;
  color: var(--muted);
}

.back-link a:hover {
  color: var(--accent-soft);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 22, 0.7);
  background: linear-gradient(135deg, var(--accent) 0, var(--accent-soft) 100%);
  color: #111827;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 16px 40px rgba(248, 113, 22, 0.6);
  text-decoration: none;
}

.btn-primary:hover {
  filter: brightness(1.05);
  text-decoration: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(15, 23, 42, 0.9);
  color: var(--muted);
}

/* -------------------------
   Auth (login) — mobile-first
-------------------------- */

body.auth-page {
  background: var(--accent);
  min-height: 100vh;
  color: #0b0f17;
}

body.auth-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.22) 0, transparent 48%),
    radial-gradient(circle at 85% 80%, rgba(17, 24, 39, 0.25) 0, transparent 55%);
  pointer-events: none;
}

.auth-shell {
  position: relative;
  width: 100%;
  padding: 28px 16px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.auth-header {
  background: var(--accent);
  padding: 18px 18px 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-logo {
  height: 36px;
  width: auto;
  display: block;
}

.auth-body {
  padding: 20px 18px 18px;
}

.auth-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  color: #0b0f17;
}

.auth-subtitle {
  margin: 6px 0 0;
  font-size: 13px;
  color: #4b5563;
}

.auth-error {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 13px;
}

.auth-form {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.auth-field {
  display: grid;
  gap: 6px;
}

.auth-label {
  font-size: 12px;
  font-weight: 600;
  color: #111827;
}

.auth-input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #0b0f17;
  font-size: 14px;
  outline: none;
}

.auth-input::placeholder {
  color: #9ca3af;
}

.auth-input:focus {
  border-color: rgba(242, 92, 28, 0.85);
  box-shadow: 0 0 0 4px rgba(242, 92, 28, 0.18);
}

.auth-submit {
  margin-top: 6px;
  width: 100%;
  border-radius: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #0b0f17;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
}

.auth-submit:hover {
  filter: brightness(1.04);
}

@media (min-width: 520px) {
  .auth-body {
    padding: 22px 22px 20px;
  }
}
