
:root {
  --bg: #0f172a;
  --bg-card: #111827;
  --border: rgba(255,255,255,0.06);
  --muted: rgba(255,255,255,0.55);
  --accent: #38bdf8;
  --danger: #ef4444;
  --radius: 14px;
  --gap: 1rem;
  --max: 1200px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top, #0f172a, #020617);
  color: #fff;
  min-height: 100vh;
}
.auth-body {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.auth-card {
  background: rgba(12, 16, 36, 0.95);
  padding: 2rem;
  border-radius: 1rem;
  width: min(400px, 100%);
  box-shadow: 0 12px 30px rgba(0,0,0,0.3);
  text-align: center;
}
.auth-card h1 { margin-bottom: .5rem; }
.muted { color: var(--muted); }
.alert {
  padding: .75rem 1rem;
  border-radius: .75rem;
  margin-bottom: 1rem;
  text-align: left;
  font-size: .875rem;
}
.alert-error { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.4); }
.alert-success { background: rgba(34,197,94,.12); border: 1px solid rgba(34,197,94,.4); }
.auth-form {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  text-align: left;
}
.auth-form input, .auth-form textarea, .auth-form select {
  background: rgba(15,23,42,0.5);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: .6rem;
  padding: .5rem .6rem;
  color: #fff;
  width: 100%;
}
.btn-primary {
  background: linear-gradient(135deg, #38bdf8, #0ea5e9);
  border: none;
  color: #020617;
  font-weight: 600;
  border-radius: .6rem;
  padding: .6rem 1rem;
  cursor: pointer;
}
.btn-primary:hover { filter: brightness(0.95); }
.btn-sm {
  padding: .3rem .6rem;
  font-size: .75rem;
}
.switch-auth { margin-top: 1rem; }
.switch-auth a { color: var(--accent); text-decoration: none; }
.topbar {
  background: rgba(15,23,42,0.7);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: .8rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(12px);
  gap: 1rem;
}
.topbar-left {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.logo-circle {
  width: 42px;
  height: 42px;
  border-radius: 1rem;
  background: radial-gradient(circle at top, #38bdf8, #075985);
  display: grid;
  place-items: center;
  font-size: 1.4rem;
}
.topbar-right {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: .5rem;
  color: #fff;
  padding: .4rem .7rem;
  text-decoration: none;
}
.container {
  max-width: var(--max);
  margin: 1.5rem auto;
  padding: 0 1rem 3rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
  gap: 1rem;
}
.card {
  background: rgba(15,23,42,0.5);
  border: 1px solid rgba(255,255,255,0.03);
  border-radius: 1rem;
  padding: 1rem 1.2rem;
  backdrop-filter: blur(6px);
}
.form-grid {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.table-wrapper {
  width: 100%;
  overflow-x: auto;
}
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  font-size: .9rem;
  min-width: 600px;
}
.table th, .table td {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  padding: .6rem .4rem;
  white-space: nowrap;
}
.table th {
  text-align: left;
  color: var(--muted);
  font-weight: 500;
}
.table tr:hover { background: rgba(255,255,255,0.02); }
.btn-danger {
  background: rgba(239,68,68,0.2);
  border: 1px solid rgba(239,68,68,0.5);
  color: #fff;
  border-radius: .4rem;
  padding: .2rem .6rem;
  cursor: pointer;
}
.inline-form {
  display: flex;
  gap: .3rem;
  align-items: center;
}
.input-small {
  width: 90px;
  background: rgba(15,23,42,0.5);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: .4rem;
  padding: .2rem .4rem;
  color: #fff;
}
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}
@media (max-width: 600px) {
  .topbar { flex-direction: column; align-items: flex-start; }
  .inline-form { flex-wrap: wrap; }
  .table { min-width: 520px; }
  .auth-card { padding: 1.4rem 1rem; }
}
