/* Auth module UI — matches Sabeel navy/blue language */
:root {
  --auth-bg: #0b1f3a;
  --auth-bg-2: #12345c;
  --auth-card: #ffffff;
  --auth-text: #1a2433;
  --auth-muted: #5b6b7c;
  --auth-primary: #0b5ed7;
  --auth-primary-dark: #084298;
  --auth-danger: #b42318;
  --auth-ok: #067647;
  --auth-border: #d7e0ea;
  --auth-radius: 12px;
  --auth-font: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

* { box-sizing: border-box; }

body.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--auth-font);
  color: var(--auth-text);
  background:
    radial-gradient(circle at top right, rgba(11, 94, 215, 0.35), transparent 40%),
    linear-gradient(160deg, var(--auth-bg), var(--auth-bg-2) 55%, #0a1730);
}

.auth-wrap {
  width: min(100% - 2rem, 440px);
  margin: 0 auto;
  padding: 2.5rem 0 3rem;
}

.auth-wrap.auth-wide {
  width: min(100% - 2rem, 960px);
}

.auth-brand {
  text-align: center;
  margin-bottom: 1.25rem;
}

.auth-brand a {
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.auth-card {
  background: var(--auth-card);
  border-radius: var(--auth-radius);
  padding: 1.5rem 1.4rem 1.6rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.auth-card h1 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
}

.auth-card .subtitle {
  margin: 0 0 1.2rem;
  color: var(--auth-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.form-group {
  margin-bottom: 0.95rem;
}

.form-group label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.form-group input,
.form-group select {
  width: 100%;
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  color: inherit;
  background: #fff;
}

.form-group input:focus,
.form-group select:focus {
  outline: 2px solid rgba(11, 94, 215, 0.35);
  border-color: var(--auth-primary);
}

.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.85rem 0 1.1rem;
  font-size: 0.9rem;
}

.form-check input {
  width: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.btn-block { width: 100%; }

.btn-primary {
  background: var(--auth-primary);
  color: #fff;
}

.btn-primary:hover { background: var(--auth-primary-dark); }

.btn-secondary {
  background: #eef3f9;
  color: var(--auth-text);
  border-color: var(--auth-border);
}

.btn-danger {
  background: #fff;
  color: var(--auth-danger);
  border-color: #f3c1bd;
}

.btn-sm {
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
}

.auth-links {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.auth-links a {
  color: var(--auth-primary);
  text-decoration: none;
}

.auth-links a:hover { text-decoration: underline; }

.alert {
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  margin-bottom: 1rem;
  font-size: 0.92rem;
  line-height: 1.4;
}

.alert-error {
  background: #fef3f2;
  color: var(--auth-danger);
  border: 1px solid #fecdca;
}

.alert-success {
  background: #ecfdf3;
  color: var(--auth-ok);
  border: 1px solid #abefc6;
}

.alert-info {
  background: #eff8ff;
  color: #175cd3;
  border: 1px solid #b2ddff;
}

.help {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--auth-muted);
  line-height: 1.4;
}

/* Dashboard / admin */
.topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
  color: #fff;
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.topbar a {
  color: #d7e8ff;
  text-decoration: none;
  font-size: 0.9rem;
}

.topbar a:hover { color: #fff; }

.panel {
  background: #fff;
  border-radius: var(--auth-radius);
  padding: 1.25rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2);
  margin-bottom: 1rem;
}

.panel h2 {
  margin: 0 0 0.85rem;
  font-size: 1.1rem;
}

.table-wrap { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

table.data th,
table.data td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid #e8eef5;
  vertical-align: top;
}

table.data th {
  color: var(--auth-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-ok { background: #ecfdf3; color: var(--auth-ok); }
.badge-off { background: #fef3f2; color: var(--auth-danger); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

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