/* /bgwebsite/assets/css/app.css */
:root {
  --brand-primary: #003366;
  --brand-secondary: #2d3395;
  --text: #0f172a;
  --muted: #475569;
  --bg: #f6f9ff;
  --panel: #ffffff;
  --border: rgba(15, 23, 42, 0.12);
  --shadow: 0 10px 25px rgba(2, 6, 23, 0.08);
  --radius: 16px;
  --radius-sm: 12px;
  --focus: rgba(45, 51, 149, 0.25);
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  color: var(--text);
  background: var(--bg);
}

.app-bg {
  min-height: 100%;
  background:
    radial-gradient(
      900px 500px at 20% 0%,
      rgba(0, 51, 102, 0.18),
      transparent 60%
    ),
    radial-gradient(
      800px 450px at 90% 10%,
      rgba(45, 51, 149, 0.18),
      transparent 60%
    ),
    linear-gradient(180deg, #ffffff, #f6f9ff 55%, #f2f6ff);
}

.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(160%) blur(10px);
  background: rgba(255, 255, 255, 0.75);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}
.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(
    135deg,
    var(--brand-primary),
    var(--brand-secondary)
  );
  box-shadow: 0 8px 18px rgba(0, 51, 102, 0.22);
}
.brand__name {
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand__sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.nav {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1;
  justify-content: center;
}
.nav__link {
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 12px;
  transition:
    background 0.15s ease,
    transform 0.12s ease,
    color 0.15s ease;
}
.nav__link:hover {
  background: rgba(0, 51, 102, 0.08);
  transform: translateY(-1px);
}
.nav__link--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.nav__link--disabled:hover {
  background: transparent;
  transform: none;
}

.page {
  padding: 26px 0 46px;
}

.hero {
  margin-top: 10px;
  padding: 22px;
  border-radius: calc(var(--radius) + 6px);
  background:
    linear-gradient(135deg, rgba(0, 51, 102, 0.1), rgba(45, 51, 149, 0.08)),
    var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.hero__title {
  margin: 0;
  font-size: 34px;
  letter-spacing: -0.03em;
}
.hero__subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 78ch;
  line-height: 1.55;
}

.hero__cards {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
@media (max-width: 900px) {
  .hero__cards {
    grid-template-columns: 1fr;
  }
}

.card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}
.card__title {
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.kv {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.kv__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.9),
    rgba(245, 248, 255, 0.8)
  );
}
.kv__row span:first-child {
  color: var(--muted);
  font-weight: 600;
}
.kv__row span:last-child {
  font-weight: 600;
}

.list {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
}
.list li {
  margin: 8px 0;
  color: var(--muted);
  line-height: 1.5;
}
.list li::marker {
  color: var(--brand-secondary);
}

.hero__actions {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition:
    transform 0.12s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
  outline: none;
}
.btn:focus {
  box-shadow: 0 0 0 4px var(--focus);
}
.btn:hover {
  transform: translateY(-1px);
}
.btn--primary {
  color: #fff;
  background: linear-gradient(
    135deg,
    var(--brand-primary),
    var(--brand-secondary)
  );
  box-shadow: 0 10px 20px rgba(45, 51, 149, 0.18);
}
.btn--secondary {
  color: var(--brand-secondary);
  background: rgba(45, 51, 149, 0.08);
  border-color: rgba(45, 51, 149, 0.25);
}
.btn--ghost {
  color: var(--brand-primary);
  background: rgba(0, 51, 102, 0.06);
  border-color: rgba(0, 51, 102, 0.18);
}

.link {
  color: var(--brand-secondary);
  font-weight: 700;
  text-decoration: none;
}
.link:hover {
  text-decoration: underline;
}

.pill {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
}
.pill--ok {
  background: rgba(16, 185, 129, 0.12);
  color: #065f46;
}
.pill--bad {
  background: rgba(239, 68, 68, 0.12);
  color: #7f1d1d;
}

.footer {
  margin-top: 36px;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: saturate(160%) blur(10px);
}
.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  gap: 10px;
  flex-wrap: wrap;
}
.footer__left,
.footer__right {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}
.dot {
  margin: 0 8px;
  opacity: 0.6;
}
.muted {
  color: var(--muted);
  line-height: 1.6;
}
/* ADD THIS TO /bgwebsite/assets/css/app.css (append to bottom) */

/* Auth */
.auth-wrap {
  display: flex;
  justify-content: center;
  padding: 34px 0 20px;
}
.auth-card {
  width: min(460px, 100%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 6px);
  padding: 18px;
  box-shadow: var(--shadow);
}
.auth-title {
  margin: 4px 0 0;
  font-size: 26px;
  letter-spacing: -0.03em;
}
.auth-subtitle {
  margin: 8px 0 14px;
  color: var(--muted);
  line-height: 1.55;
}
.form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field__label {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}
.input {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #fff;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  transition:
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}
.input:focus {
  border-color: rgba(45, 51, 149, 0.35);
  box-shadow: 0 0 0 4px var(--focus);
}
.btn--block {
  width: 100%;
}

.alert {
  border-radius: 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  padding: 10px 12px;
  font-weight: 700;
  font-size: 13px;
}
.alert--error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
  color: #7f1d1d;
}

.muted {
  color: var(--muted);
  line-height: 1.6;
}

.auth-foot {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

/* Simple grid + table styles used by permissions page */
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 900px) {
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 520px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
.mini {
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95),
    rgba(245, 248, 255, 0.85)
  );
}
.mini__title {
  font-weight: 800;
}
.mini__sub {
  color: var(--muted);
  font-weight: 700;
  font-size: 12px;
  margin-top: 2px;
}

.table-wrap {
  overflow: auto;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.9);
}
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table th,
.table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 14px;
}
.table thead th {
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(0, 51, 102, 0.05);
}
.table tr:last-child td {
  border-bottom: none;
}
.table code {
  background: rgba(45, 51, 149, 0.08);
  border: 1px solid rgba(45, 51, 149, 0.18);
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 800;
}
/* ADD THIS TO /bgwebsite/assets/css/app.css (append near the bottom) */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  color: var(--brand-primary);
  background: rgba(0, 51, 102, 0.06);
  border: 1px solid rgba(0, 51, 102, 0.18);
}
