/* ---- reset ---------------------------------------------------------------
   Without border-box, `width:100%` + padding overflows its container: on a 420px
   viewport the auth card ran off the right edge, and the input rendered wider than
   the button beneath it. One line, both symptoms. */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Palette */
:root {
  --bg: #080d18;
  --bg-elev: #0f1626;
  --bg-card: #131b2d;
  --line: rgba(148, 178, 255, 0.10);
  --line-strong: rgba(148, 178, 255, 0.18);
  --ink: #eef3fb;
  --ink-dim: #9fb0c9;
  --ink-faint: #6b7c96;
  --accent: #22d3ee;
  --accent-2: #2dd4bf;
  --accent-ink: #04222a;
  --danger: #fb7185;
  --ok: #34d399;
  --warn: #fbbf24;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px -24px rgba(0, 0, 0, 0.85);
}

/* Type */
* {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html {
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.3;
  font-weight: 600;
}

.page-sub {
  margin: 6px 0 22px;
  color: var(--ink-dim);
  font-size: 15px;
}

.page-title {
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.auth-title {
  font-size: 18px;
  line-height: 1.3;
  margin-bottom: 4px;
}

/* Layout */
body {
  background-color: var(--bg);
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  flex-grow: 1;
}

/* Topbar */
.topbar {
  background-color: var(--bg-elev);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.topbar-inner {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.brand {
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.brand-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.brand-word {
  font-size: 18px;
  letter-spacing: -0.02em;
}

.nav {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  color: var(--ink);
  font-size: 14px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  transition: background-color 150ms ease;
}

.nav-link:hover {
  background-color: var(--bg-card);
}

.nav-logout {
  margin-left: 8px;
}

/* Auth */
.auth {
  width: 100%;
  min-height: calc(100vh - 260px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.auth::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, var(--accent), transparent 40%);
  opacity: 0.4;
  z-index: -1;
}

.auth-card {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow);
  position: relative;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: var(--radius) var(--radius) 0 0;
}

.auth-title {
  margin-top: 0;
  margin-bottom: 8px;
}

.auth-sub {
  color: var(--ink-dim);
  margin-bottom: 24px;
  font-size: 14px;
  line-height: 1.45;
}

/* Form */
.field {
  margin-bottom: 20px;
}

.label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--ink);
}

.input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  background-color: var(--bg-elev);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-size: 15px;
  transition: border-color 150ms ease;
}

.input:focus-visible {
  /* transparent, not `none`, so focus stays visible in Windows High Contrast Mode */
  outline: 2px solid transparent;
  outline-offset: 2px;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}

.input::placeholder {
  color: var(--ink-faint);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  transition: background-color 150ms ease;
  cursor: pointer;
  text-decoration: none;
  min-width: 44px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  border: none;
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.btn-ghost {
  background-color: transparent;
  border: none;
  color: var(--ink);
  padding: 8px 12px;
  font-size: 14px;
}

.btn-danger {
  background-color: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
}

/* Cards */
.cards {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: all 150ms ease;
  text-decoration: none;
  display: block;
  color: var(--ink);
}

.card-link:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.card-icon {
  font-size: 24px;
  margin-bottom: 12px;
  display: block;
}

.card-title {
  font-size: 16px;
  margin-bottom: 8px;
}

.card-desc {
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 12px;
}

.card-cue {
  font-size: 13px;
  color: var(--ink-faint);
}

/* Lists */
.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.list-row:last-child {
  border-bottom: none;
}

.list-main {
  flex-grow: 1;
}

.list-title {
  font-size: 15px;
  margin-bottom: 4px;
}

.list-meta {
  font-size: 13px;
  color: var(--ink-dim);
}

.list-actions {
  display: flex;
  gap: 8px;
}

/* Status Pills */
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pill-submitted {
  background-color: var(--warn);
  color: var(--accent-ink);
}

.pill-approved {
  background-color: var(--ok);
  color: var(--accent-ink);
}

.pill-rejected {
  background-color: var(--danger);
  color: var(--accent-ink);
}

.pill-paid {
  background-color: var(--accent);
  color: var(--accent-ink);
}

/* Messages */
.banner {
  padding: 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.45;
}

.banner-success {
  background-color: rgba(52, 211, 153, 0.15);
  border: 1px solid var(--ok);
  color: var(--ok);
}

.banner-danger {
  background-color: rgba(251, 113, 133, 0.15);
  border: 1px solid var(--danger);
  color: var(--danger);
}

.banner-info {
  background-color: rgba(34, 211, 238, 0.15);
  border: 1px solid var(--accent);
  color: var(--accent);
}

.error {
  color: var(--danger);
  font-size: 14px;
  margin-top: 8px;
}

.hint {
  color: var(--ink-dim);
  font-size: 13px;
  margin-top: 8px;
}

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-faint);
  font-size: 14px;
}

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

/* Footer */
.foot {
  margin-top: auto;
  padding: 20px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

/* Responsive */
@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 980px) {
  .cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

[hidden] {
  display: none !important;
}
