/* ADG HR Platform — Institutional Design System
   Display: Fraunces | UI: Sora
   Direction: deep ink, forest, brass — operational, not generic SaaS
*/

@import url("https://fonts.bunny.net/css?family=fraunces:500,600,700|sora:400,500,600,700");

:root {
  --ink: #0b1620;
  --ink-soft: #152433;
  --ink-muted: #3d5163;
  --forest: #1f4a3a;
  --forest-mid: #2d6a52;
  --forest-glow: #3f8f6e;
  --brass: #c9a227;
  --brass-soft: #e4c76b;
  --mist: #eef3f1;
  --mist-deep: #dce6e1;
  --paper: #f7faf8;
  --line: rgba(15, 35, 28, 0.12);
  --danger: #9b2c3c;
  --success: #1f6b45;
  --warning: #9a6b12;
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-ui: "Sora", "Segoe UI Variable", "Avenir Next", "Segoe UI", sans-serif;
  --shadow-soft: 0 10px 40px rgba(11, 22, 32, 0.12);
  --shadow-lift: 0 18px 50px rgba(11, 22, 32, 0.18);
  --radius: 10px;
  --radius-sm: 6px;
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(63, 143, 110, 0.12), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(201, 162, 39, 0.08), transparent 45%),
    linear-gradient(180deg, var(--mist) 0%, var(--paper) 40%, var(--mist-deep) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
  margin-top: 0;
  letter-spacing: -0.01em;
}

a {
  color: var(--forest-mid);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--ink); }

img { max-width: 100%; }

/* ---------- Demo banner ---------- */
.demo-banner {
  background: linear-gradient(90deg, #7a1f2e, var(--danger), #7a1f2e);
  color: #fff;
  text-align: center;
  padding: 0.45rem 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  position: relative;
  z-index: 50;
}

/* ---------- Header ---------- */
.site-header {
  background: rgba(11, 22, 32, 0.92);
  color: #fff;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(201, 162, 39, 0.25);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.site-brand .emblem {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background:
    linear-gradient(145deg, var(--forest-mid), var(--ink-soft));
  border: 1px solid rgba(201, 162, 39, 0.55);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--brass-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
  flex-shrink: 0;
}

.site-brand h1 {
  color: #fff;
  font-size: 1.15rem;
  margin: 0;
  white-space: nowrap;
}

.site-brand .subtitle {
  font-size: 0.7rem;
  color: rgba(228, 199, 107, 0.85);
  font-family: var(--font-ui);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.header-nav a {
  color: rgba(238, 243, 241, 0.78);
  text-decoration: none;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.header-nav a:hover,
.header-nav a.active {
  background: rgba(63, 143, 110, 0.22);
  color: #fff;
}

.nav-more {
  position: relative;
}
.nav-more summary {
  list-style: none;
  cursor: pointer;
  color: rgba(238, 243, 241, 0.78);
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
}
.nav-more summary::-webkit-details-marker { display: none; }
.nav-more[open] summary,
.nav-more summary:hover {
  background: rgba(63, 143, 110, 0.22);
  color: #fff;
}
.nav-more-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 200px;
  background: var(--ink-soft);
  border: 1px solid rgba(201, 162, 39, 0.25);
  border-radius: var(--radius);
  padding: 0.4rem;
  box-shadow: var(--shadow-lift);
  z-index: 60;
}
.nav-more-panel a {
  display: block;
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
}

.user-info {
  font-size: 0.75rem;
  color: rgba(238, 243, 241, 0.65);
  text-align: right;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  align-items: flex-end;
}
.user-info strong { color: #fff; font-weight: 600; }
.user-info .sign-out {
  color: var(--brass-soft);
  text-decoration: none;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.user-info .sign-out:hover { color: #fff; }

/* ---------- Main ---------- */
.main-content {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 3rem;
}

.main-content.main-flush {
  max-width: none;
  padding: 0;
}

/* ---------- Cards / panels ---------- */
.card {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
}

.card-header {
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
}
.card-header h2 { margin: 0; font-size: 1.35rem; }

/* ---------- Auth ---------- */
.auth-shell {
  min-height: calc(100vh - 8rem);
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.auth-panel {
  width: min(420px, 100%);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-lift);
  padding: 2rem 1.75rem;
  animation: rise 0.7s var(--ease) both;
}

.auth-panel .brand-mark {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
}
.auth-panel .brand-mark .emblem {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(145deg, var(--forest), var(--ink));
  border: 1px solid rgba(201, 162, 39, 0.5);
  display: grid;
  place-items: center;
  color: var(--brass-soft);
  font-family: var(--font-display);
  font-weight: 700;
}
.auth-panel h2 {
  margin: 0;
  font-size: 1.65rem;
}
.auth-panel .lede {
  color: var(--ink-muted);
  font-size: 0.875rem;
  margin: 0.25rem 0 0;
}

.auth-container {
  max-width: 420px;
  margin: 3rem auto;
}

.auth-container .card {
  border-top: 3px solid var(--forest);
}

.auth-logo { text-align: center; margin-bottom: 1.5rem; }
.auth-logo h2 { font-size: 1.5rem; margin-bottom: 0.25rem; }
.auth-logo p { color: var(--ink-muted); font-size: 0.875rem; margin: 0; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}
.form-control {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: 0.9375rem;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
  outline: none;
  border-color: var(--forest-glow);
  box-shadow: 0 0 0 3px rgba(63, 143, 110, 0.18);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.7rem 1.25rem;
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 600;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.15s var(--ease), background 0.15s, box-shadow 0.15s, color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, var(--forest-mid), var(--forest));
  color: #fff;
  box-shadow: 0 8px 20px rgba(31, 74, 58, 0.28);
}
.btn-primary:hover { color: #fff; filter: brightness(1.05); }

.btn-secondary {
  background: var(--ink-soft);
  color: #fff;
}
.btn-secondary:hover { background: var(--ink); color: #fff; }

.btn-outline {
  background: transparent;
  color: var(--forest);
  border: 1px solid rgba(31, 74, 58, 0.35);
}
.btn-outline:hover {
  background: rgba(31, 74, 58, 0.08);
  color: var(--ink);
}

.btn-brass {
  background: linear-gradient(135deg, var(--brass-soft), var(--brass));
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(201, 162, 39, 0.28);
}
.btn-brass:hover { color: var(--ink); filter: brightness(1.03); }

.btn-ghost {
  background: rgba(255,255,255,0.08);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.22);
}
.btn-ghost:hover { background: rgba(255,255,255,0.16); color: #fff; }

.btn-block { width: 100%; }
.btn-group { display: flex; gap: 0.65rem; flex-wrap: wrap; }

/* ---------- Alerts ---------- */
.messages { list-style: none; padding: 0; margin: 0 0 1rem; }
.alert {
  padding: 0.8rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  border-left: 3px solid;
}
.alert-error, .alert-danger {
  background: #fdf2f4;
  border-color: var(--danger);
  color: var(--danger);
}
.alert-success {
  background: #edf7f1;
  border-color: var(--success);
  color: var(--success);
}
.alert-warning {
  background: #fff8e8;
  border-color: var(--warning);
  color: #6b4b0c;
}
.alert-info {
  background: #eef4f8;
  border-color: var(--ink-muted);
  color: var(--ink-soft);
}

.demo-notice {
  background: rgba(31, 74, 58, 0.06);
  border: 1px dashed rgba(31, 74, 58, 0.35);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-bottom: 1.15rem;
}

/* ---------- Tables ---------- */
.table-responsive { overflow-x: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
table.data-table th {
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-align: left;
  padding: 0.7rem 0.8rem;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
table.data-table td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--line);
}
table.data-table tr:hover td { background: rgba(31, 74, 58, 0.04); }

.badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-info { background: #e4eef8; color: #1e3a5f; }
.badge-success { background: #dff3e8; color: #145c38; }
.badge-warning { background: #fff0cc; color: #7a5a0a; }
.badge-danger { background: #fde2e6; color: #8a2030; }

/* ---------- Legacy dashboard tiles ---------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.15rem;
}
.dashboard-tile {
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow-soft);
}
.dashboard-tile h3 { font-size: 1.05rem; margin-bottom: 0.45rem; }
.dashboard-tile p {
  font-size: 0.82rem;
  color: var(--ink-muted);
  margin: 0 0 1rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-end;
  margin-bottom: 1rem;
  padding: 1rem;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.filter-bar .form-group { margin-bottom: 0; flex: 1; min-width: 140px; }

.pagination {
  display: flex;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}
.pagination a, .pagination span {
  padding: 0.375rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--ink);
}
.pagination .current {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.site-footer {
  background: var(--ink);
  color: rgba(238, 243, 241, 0.55);
  text-align: center;
  padding: 1.1rem;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  margin-top: auto;
}

.text-muted { color: var(--ink-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* =========================================================
   LANDING PAGE
   ========================================================= */
.landing {
  color: #fff;
}

.landing-hero {
  position: relative;
  min-height: calc(100vh - 2.5rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(11,22,32,0.88) 18%, rgba(31,74,58,0.55) 58%, rgba(11,22,32,0.75) 100%),
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(201,162,39,0.18), transparent 55%),
    linear-gradient(160deg, #0b1620 0%, #143528 45%, #0b1620 100%);
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 85%);
  animation: gridDrift 28s linear infinite;
  pointer-events: none;
}

.landing-hero::after {
  content: "";
  position: absolute;
  width: 48vw;
  height: 48vw;
  right: -8%;
  top: 8%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63,143,110,0.28), transparent 68%);
  animation: glowPulse 8s ease-in-out infinite;
  pointer-events: none;
}

.landing-inner {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 5rem;
}

.landing-brand {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 9vw, 6.4rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  color: #fff;
  animation: rise 0.9s var(--ease) both;
}

.landing-brand span {
  display: block;
  color: var(--brass-soft);
  font-size: 0.28em;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-family: var(--font-ui);
  font-weight: 600;
  margin-bottom: 0.85rem;
}

.landing-headline {
  max-width: 34rem;
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  font-weight: 500;
  line-height: 1.35;
  margin: 0 0 0.85rem;
  color: rgba(247, 250, 248, 0.95);
  animation: rise 0.9s var(--ease) 0.12s both;
}

.landing-support {
  max-width: 32rem;
  margin: 0 0 1.85rem;
  color: rgba(238, 243, 241, 0.72);
  font-size: 1rem;
  animation: rise 0.9s var(--ease) 0.22s both;
}

.landing-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: rise 0.9s var(--ease) 0.32s both;
}

.landing-meta {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(238, 243, 241, 0.45);
  animation: rise 0.9s var(--ease) 0.42s both;
}

.landing-meta strong {
  display: block;
  color: rgba(228, 199, 107, 0.9);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

/* =========================================================
   OPERATIONS DASHBOARD
   ========================================================= */
.ops-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
  animation: rise 0.6s var(--ease) both;
}

.ops-hero h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  margin: 0 0 0.35rem;
}

.ops-hero p {
  margin: 0;
  color: var(--ink-muted);
  max-width: 36rem;
}

.ops-roles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.9rem;
  margin-bottom: 1.5rem;
  animation: rise 0.6s var(--ease) 0.08s both;
}

.metric {
  background: rgba(255,255,255,0.9);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}
.metric::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--forest-mid);
}
.metric.urgent::before { background: var(--danger); }
.metric.watch::before { background: var(--brass); }
.metric .label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  font-weight: 600;
}
.metric .value {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.1;
  margin-top: 0.25rem;
  color: var(--ink);
}

.module-lanes {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.15rem;
  margin-bottom: 1.5rem;
  animation: rise 0.6s var(--ease) 0.16s both;
}

.lane {
  border-radius: 16px;
  padding: 1.5rem;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

.lane-maark {
  background:
    linear-gradient(145deg, rgba(11,22,32,0.96), rgba(31,74,58,0.92));
  color: #fff;
}
.lane-cuthvr {
  background:
    linear-gradient(145deg, rgba(21,36,51,0.96), rgba(61,81,99,0.88));
  color: #fff;
}

.lane::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 180px;
  right: -40px;
  bottom: -50px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,39,0.22), transparent 70%);
  pointer-events: none;
}

.lane h2 {
  color: #fff;
  font-size: 1.7rem;
  margin: 0 0 0.4rem;
  position: relative;
  z-index: 1;
}
.lane .eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass-soft);
  font-weight: 600;
  margin-bottom: 0.55rem;
  position: relative;
  z-index: 1;
}
.lane p {
  margin: 0;
  color: rgba(238,243,241,0.75);
  max-width: 28rem;
  position: relative;
  z-index: 1;
}
.lane .lane-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.35rem;
  position: relative;
  z-index: 1;
}

.ops-secondary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  animation: rise 0.6s var(--ease) 0.24s both;
}

.ops-link {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 1.1rem;
  background: rgba(255,255,255,0.88);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.ops-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
  color: inherit;
  text-decoration: none;
}
.ops-link strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
}
.ops-link span {
  font-size: 0.78rem;
  color: var(--ink-muted);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gridDrift {
  from { transform: translateY(0); }
  to { transform: translateY(72px); }
}
@keyframes glowPulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.06); }
}

@media (max-width: 960px) {
  .metric-strip { grid-template-columns: repeat(2, 1fr); }
  .module-lanes { grid-template-columns: 1fr; }
  .ops-secondary { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; }
  .user-info { align-items: flex-start; text-align: left; }
  .ops-hero { flex-direction: column; align-items: flex-start; }
  .ops-secondary { grid-template-columns: 1fr; }
  .landing-inner { padding: 3rem 1.25rem 3.5rem; }
  .main-content { padding: 1.25rem 1rem 2.5rem; }
}
