/* ── Variables ──────────────────────────────────────────────────────────────── */
:root {
  --bg:     #071022;
  --panel:  #0b142a;
  --text:   #e9edf7;
  --muted:  #aeb7cc;
  --pink:   #ff2aa1;
  --violet: #7c4dff;
  --shadow: 0 30px 90px rgba(0,0,0,.55);
  --stroke: rgba(255,255,255,.08);
  --r-card: 22px;
  --r-in:   10px;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
               "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}

/* ── Background ─────────────────────────────────────────────────────────────── */
.bg {
  position: fixed; inset: 0;
  background:
    radial-gradient(60% 80% at 70% 10%, rgba(124,77,255,.25), transparent 55%),
    radial-gradient(70% 90% at 35% 35%, rgba(255,42,161,.18), transparent 60%),
    linear-gradient(180deg, rgba(7,16,34,.6), rgba(7,16,34,.92)),
    url("/assets/alc_bg.jpg");
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  opacity: .10;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
}

/* ── Header ─────────────────────────────────────────────────────────────────── */
header {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 28px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand a { display: block; }
.brand img {
  height: 44px; width: auto; display: block;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,.55));
}

/* ── Pill ───────────────────────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(9,16,34,.45);
  backdrop-filter: blur(10px);
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
  font-size: 14px; color: var(--muted);
}
.dot {
  width: 9px; height: 9px; border-radius: 999px;
  background: linear-gradient(135deg, var(--pink), var(--violet));
  box-shadow: 0 0 0 4px rgba(255,42,161,.12);
}
.dot--green { background: linear-gradient(135deg,#00e5a0,#00b8ff); box-shadow: 0 0 0 4px rgba(0,229,160,.12); }
.dot--red   { background: linear-gradient(135deg,#ff2a2a,#ff6b2a); box-shadow: 0 0 0 4px rgba(255,42,42,.12); }

/* ── Navigation ─────────────────────────────────────────────────────────────── */
.nav-bar {
  position: relative; z-index: 2;
  max-width: 1000px; margin: 0 auto 8px;
  padding: 0 28px;
  display: flex; gap: 2px; flex-wrap: wrap;
}
.nav-link {
  padding: 8px 14px; border-radius: var(--r-in);
  font-size: 14px; font-weight: 500;
  color: var(--muted); text-decoration: none;
  transition: background .15s, color .15s;
}
.nav-link:hover  { background: rgba(255,255,255,.06); color: var(--text); }
.nav-link.active { background: rgba(255,42,161,.12);  color: var(--pink); }
.nav-link.admin  { color: rgba(124,77,255,.8); }
.nav-link.admin.active { background: rgba(124,77,255,.12); color: var(--violet); }

/* ── Flash ──────────────────────────────────────────────────────────────────── */
.flash { position: relative; z-index: 2; max-width: 1000px; margin: 0 auto 12px; padding: 0 28px; }
.flash-inner { padding: 12px 16px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.flash-success { background: rgba(0,229,160,.08); border: 1px solid rgba(0,229,160,.2); color: #00e5a0; }
.flash-error   { background: rgba(255,74,74,.08);  border: 1px solid rgba(255,74,74,.2);  color: #ff4a4a; }
.flash-warning { background: rgba(255,184,42,.08); border: 1px solid rgba(255,184,42,.2); color: #ffb82a; }

/* ── Main ───────────────────────────────────────────────────────────────────── */
main {
  position: relative; z-index: 2;
  max-width: 1000px; margin: 0 auto;
  padding: 16px 28px 60px;
}
main.centered {
  max-width: 520px;
  text-align: center;
  display: flex; flex-direction: column; gap: 34px; align-items: center;
  padding-top: 34px;
}

/* ── Typography ─────────────────────────────────────────────────────────────── */
.headline h1 { margin: 0 0 12px; font-size: clamp(30px,4vw,48px); letter-spacing: .2px; line-height: 1.05; }
.headline p  { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.55; }
.page-title  { margin: 0 0 24px; font-size: clamp(22px,3vw,30px); font-weight: 700; letter-spacing: .1px; }

.accent        { background: linear-gradient(90deg,var(--text),rgba(233,237,247,.6)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.accent-strong { background: linear-gradient(90deg,var(--pink),var(--violet));        -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── Card ───────────────────────────────────────────────────────────────────── */
.card {
  border-radius: var(--r-card);
  border: 1px solid var(--stroke);
  background: linear-gradient(180deg,rgba(11,20,42,.75),rgba(8,14,30,.72));
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  padding: 24px; width: 100%;
}
.card + .card { margin-top: 20px; }
.card-title {
  font-size: 15px; font-weight: 600; margin: 0 0 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer; border: none; border-radius: 12px;
  padding: 11px 18px; font-size: 14px; font-weight: 600; font-family: inherit;
  text-decoration: none; white-space: nowrap;
  transition: opacity .15s, transform .1s;
  color: #0b1020;
  background: linear-gradient(90deg,var(--pink),var(--violet));
  box-shadow: 0 8px 24px rgba(255,42,161,.18);
}
.btn:hover  { opacity: .9; }
.btn:active { transform: translateY(1px); }
.btn-sm     { padding: 7px 12px; font-size: 13px; border-radius: 9px; }
.btn-block  { display: flex; width: 100%; }

.btn-secondary {
  color: var(--muted); background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1); box-shadow: none;
}
.btn-secondary:hover { background: rgba(255,255,255,.1); color: var(--text); }

.btn-danger {
  color: #ffb0b0; background: rgba(255,74,74,.12);
  border: 1px solid rgba(255,74,74,.25); box-shadow: none;
}
.btn-danger:hover { background: rgba(255,74,74,.22); }

.btn-success {
  color: #071022;
  background: linear-gradient(90deg,#00e5a0,#00b8ff);
  box-shadow: 0 8px 24px rgba(0,229,160,.18);
}

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.form-grid   { display: grid; gap: 16px; }
.form-grid-2 { grid-template-columns: 1fr 1fr; }
.form-group  { display: flex; flex-direction: column; gap: 6px; }
.form-label  { font-size: 13px; color: var(--muted); font-weight: 500; }
.form-hint   { font-size: 12px; color: rgba(174,183,204,.55); }

.input, .select, .textarea {
  width: 100%;
  background: rgba(0,0,0,.3);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--r-in);
  color: var(--text); font-family: inherit; font-size: 15px;
  padding: 11px 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(255,42,161,.45);
  box-shadow: 0 0 0 3px rgba(255,42,161,.09);
}
.input::placeholder { color: rgba(174,183,204,.35); }
.textarea { resize: vertical; min-height: 90px; line-height: 1.55; }
.select option { background: var(--panel); }

.input-file { padding: 10px 14px; cursor: pointer; color: var(--muted); }
.input-file::file-selector-button {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px; color: var(--text); padding: 5px 12px;
  font-size: 13px; font-family: inherit; cursor: pointer; margin-right: 12px;
}

.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }

/* ── Badges ─────────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge-pending  { background: rgba(255,184,42,.12); color: #ffb82a; border: 1px solid rgba(255,184,42,.2); }
.badge-approved { background: rgba(0,229,160,.10);  color: #00e5a0; border: 1px solid rgba(0,229,160,.2); }
.badge-rejected { background: rgba(255,74,74,.10);  color: #ff4a4a; border: 1px solid rgba(255,74,74,.2);  }

/* ── Tables ─────────────────────────────────────────────────────────────────── */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; padding: 10px 14px;
  color: var(--muted); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--stroke);
}
.table td { padding: 13px 14px; border-bottom: 1px solid rgba(255,255,255,.04); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: rgba(255,255,255,.02); }
.table .actions { display: flex; gap: 6px; }

/* ── Empty state ────────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 48px 24px;
  color: var(--muted); font-size: 15px; line-height: 1.6;
}
.empty-state svg { margin: 0 auto 16px; display: block; opacity: .3; }

/* ── Amount ─────────────────────────────────────────────────────────────────── */
.amount { font-weight: 700; font-size: 15px; }
.amount small { font-size: 12px; font-weight: 400; color: var(--muted); }

/* ── Photo thumbnail ────────────────────────────────────────────────────────── */
.thumb {
  width: 52px; height: 52px; border-radius: 10px;
  object-fit: cover; border: 1px solid var(--stroke);
  display: block; cursor: pointer; transition: opacity .15s;
}
.thumb:hover { opacity: .8; }

/* ── Dashboard quick links ──────────────────────────────────────────────────── */
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.quick-link {
  display: flex; flex-direction: column; gap: 10px; padding: 20px;
  border-radius: 16px; border: 1px solid var(--stroke);
  background: rgba(0,0,0,.15); text-decoration: none;
  transition: border-color .15s, background .15s;
}
.quick-link:hover { border-color: rgba(255,42,161,.3); background: rgba(255,42,161,.04); }
.quick-link-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,rgba(255,42,161,.15),rgba(124,77,255,.15));
  color: var(--pink);
}
.quick-link-icon svg { width: 18px; height: 18px; }
.quick-link-title { font-size: 14px; font-weight: 600; color: var(--text); }
.quick-link-desc  { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* ── Misc ───────────────────────────────────────────────────────────────────── */
.divider { border: none; border-top: 1px solid var(--stroke); margin: 20px 0; }

.user-info {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border-radius: 14px; border: 1px solid rgba(0,229,160,.12);
  background: rgba(0,229,160,.05); margin-bottom: 16px;
}
.avatar {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 999px;
  background: linear-gradient(135deg,var(--pink),var(--violet));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: #fff; text-transform: uppercase;
}
.user-name  { font-weight: 600; font-size: 15px; }
.user-email { font-size: 12px; color: var(--muted); margin-top: 2px; }

.sso-provider {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border-radius: 14px; border: 1px solid rgba(255,255,255,.07);
  background: rgba(0,0,0,.22); margin-bottom: 16px;
}
.sso-icon {
  flex-shrink: 0; width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg,rgba(124,77,255,.25),rgba(255,42,161,.15));
  border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(174,183,204,.9);
}
.sso-icon svg { width: 20px; height: 20px; }
.sso-label { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.sso-name  { font-weight: 600; font-size: 15px; }

.error-box {
  margin-top: 16px; padding: 12px 14px; border-radius: 14px;
  border: 1px solid rgba(255,42,161,.25); background: rgba(255,42,161,.08);
  color: rgba(233,237,247,.92); font-size: 14px; line-height: 1.45;
}

/* ── Validation expense card ────────────────────────────────────────────────── */
.expense-review {
  border-radius: 16px; border: 1px solid var(--stroke);
  background: rgba(0,0,0,.18); overflow: hidden; margin-bottom: 14px;
}
.expense-review-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--stroke);
  flex-wrap: wrap; gap: 10px;
}
.expense-review-body { padding: 16px 20px; }
.expense-review-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 12px;
  margin-bottom: 16px;
}
.meta-item { display: flex; flex-direction: column; gap: 3px; }
.meta-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.meta-value { font-size: 14px; color: var(--text); }

.review-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.review-form .textarea { min-height: 60px; flex: 1; min-width: 180px; }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
footer {
  position: relative; z-index: 2;
  max-width: 1100px; margin: 0 auto;
  padding: 0 28px 26px;
  color: rgba(174,183,204,.85); font-size: 12px;
}

/* ── Responsive ─────────────────────────────────────────────────────────────── */
@media (max-width: 700px) {
  header     { padding: 16px; }
  .nav-bar   { padding: 0 16px; }
  main       { padding: 12px 16px 40px; }
  .pill      { display: none; }
  .form-grid-2  { grid-template-columns: 1fr; }
  .quick-links  { grid-template-columns: 1fr; }
  .expense-review-header { flex-direction: column; align-items: flex-start; }
}
