:root {
  --navy: #032c7c;
  --deep: #010b1f;
  --blue: #133984;
  --lime: #aee37b;
  --sky: #3992ff;
  --white: #ffffff;
  --muted: #9aa6c7;
  --line: rgba(255, 255, 255, 0.12);
  --card: rgba(255, 255, 255, 0.05);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Montserrat', system-ui, sans-serif;
  color: var(--white);
  background:
    radial-gradient(120% 120% at 100% 0%, #133984 0%, transparent 55%),
    radial-gradient(120% 100% at 0% 100%, #032c7c 0%, transparent 60%),
    var(--deep);
}

a { color: inherit; }

/* Nav */
/* Floating "island" nav — detached, centered, rounded (dark-glass variant
   of the main site's nav) */
.p-nav {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  width: calc(100% - 32px); max-width: 1180px;
  padding: 0 22px; height: 64px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.10) inset, 0 10px 34px rgba(0, 0, 0, 0.38);
}
.p-brand { font-weight: 800; font-size: 1.15rem; text-decoration: none; letter-spacing: -0.01em; }
.p-brand span { color: var(--sky); }
.p-brand em { font-style: normal; color: var(--lime); font-weight: 700; }
.p-nav-links { display: flex; align-items: center; gap: 22px; }
.p-nav-links a { text-decoration: none; font-weight: 600; font-size: 0.95rem; color: rgba(255,255,255,0.8); }
.p-nav-links a:hover { color: var(--white); }
.p-logout { margin: 0; }
.p-logout button {
  font-family: inherit; font-weight: 700; font-size: 0.9rem; cursor: pointer;
  color: var(--deep); background: var(--lime); border: 0;
  padding: 9px 18px; border-radius: 9px;
}
.p-logout button:hover { filter: brightness(1.05); }

/* Layout — top padding clears the fixed floating nav */
.p-main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 108px 32px 44px; }
.p-foot { text-align: center; color: var(--muted); font-size: 0.8rem; padding: 24px; border-top: 1px solid var(--line); }

.eyebrow {
  font-family: 'League Spartan', sans-serif; text-transform: uppercase;
  letter-spacing: 0.24em; font-size: 0.8rem; color: var(--lime); margin: 0 0 14px;
}
h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 8px; }
.lede { color: var(--muted); font-size: 1rem; margin: 0 0 32px; }

/* Cards / lists */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 26px 30px;
}
.report-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.report-row {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 24px; text-decoration: none; transition: border-color .2s, background .2s;
}
.report-row:hover { border-color: rgba(174,227,123,0.4); background: rgba(255,255,255,0.08); }
.report-row .r-title { font-weight: 700; font-size: 1.05rem; }
.report-row .r-period { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.report-row .r-go { color: var(--lime); font-weight: 700; white-space: nowrap; }

.empty { color: var(--muted); background: var(--card); border: 1px dashed var(--line); border-radius: 14px; padding: 40px; text-align: center; }

/* Forms */
.form-grid { display: flex; flex-direction: column; gap: 16px; max-width: 420px; }
label { font-weight: 600; font-size: 0.9rem; display: block; margin-bottom: 6px; }
input, select {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--white);
  background: rgba(255,255,255,0.06); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px;
}
input:focus, select:focus { outline: none; border-color: var(--lime); }
input::placeholder { color: rgba(255,255,255,0.4); }
.btn {
  font-family: inherit; font-weight: 700; font-size: 1rem; cursor: pointer;
  color: var(--deep); background: var(--lime); border: 0; padding: 13px 22px; border-radius: 10px;
}
.btn:hover { filter: brightness(1.05); }
.btn-block { width: 100%; }

.alert { border-radius: 10px; padding: 12px 16px; font-size: 0.9rem; margin-bottom: 18px; }
.alert-error { background: rgba(255,80,80,0.14); border: 1px solid rgba(255,80,80,0.4); color: #ffd7d7; }
.alert-ok { background: rgba(174,227,123,0.14); border: 1px solid rgba(174,227,123,0.4); color: #e8f7d5; }

/* Logo */
.p-brand { display: inline-flex; align-items: center; gap: 9px; }
.p-logo { height: 30px; width: auto; display: block; }
.login-logo { height: 54px; width: auto; display: block; margin-bottom: 22px; }

/* Login */
.login-wrap { max-width: 400px; margin: 8vh auto 0; }

/* Admin */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.admin-col h2 { font-size: 1.2rem; margin: 0 0 16px; }
.section-gap { margin-top: 44px; }
textarea {
  width: 100%; min-height: 220px; font-family: ui-monospace, monospace; font-size: 0.82rem;
  color: var(--white); background: rgba(0,0,0,0.35); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px; resize: vertical;
}
.hint { color: var(--muted); font-size: 0.8rem; margin-top: 6px; }

@media (max-width: 820px) {
  .admin-grid { grid-template-columns: 1fr; }
  .p-main { padding: 100px 18px 28px; }
  h1 { font-size: 1.7rem; }
}

@media (max-width: 560px) {
  /* Island stays a single row — just tighten it, never wrap */
  .p-nav { top: 10px; width: calc(100% - 20px); height: 58px; padding: 0 14px; }
  .p-brand { font-size: 0.95rem; }
  .p-brand em { display: none; } /* drop "Portal" word to save space */
  .p-logo { height: 24px; }
  .p-nav-links { gap: 12px; font-size: 0.82rem; }
  .p-logout button { padding: 7px 12px; font-size: 0.8rem; }
  .p-main { padding: 84px 16px 24px; }
  h1 { font-size: 1.5rem; }
  .card { padding: 18px 16px; }
  .form-grid { max-width: none; }
  /* Stacked list rows read better on narrow screens */
  .report-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .report-row .r-go { align-self: flex-end; }
  table { font-size: 12.5px; }
  th, td { padding: 8px 9px; }
  .login-wrap { margin-top: 5vh; }
  .login-logo { height: 46px; }
}
