/* ==========================================================================
   Jaber Quality Hub - Design System
   Navy / gold / teal / ice-blue institutional theme.
   Drop this file into any new project and build pages with these classes
   and tokens to match the same look. See README.md for usage notes.
   ========================================================================== */

:root {
  /* core palette */
  --navy: #0b2239;
  --navy-2: #102c45;
  --navy-3: #244d67;
  --gold: #e5bd61;
  --gold-hi: #fff2c7;
  --gold-mid: #f7d68c;
  --gold-lo: #b98a1e;
  --teal: #0f7480;
  --teal-dark: #07515e;
  --ice: #f2faff;
  --ice-2: #dcecf5;
  --ink: #183d4b;

  /* surface + text */
  --bg: #e9f3f9;
  --card: #ffffff;
  --text: #183d4b;
  --muted: #5b6b78;
  --line: #cfe0ea;

  /* semantic status colors (met / partial / not-met / n-a / not-started) */
  --status-success: #2e9e66;
  --status-warning: #f0b429;
  --status-danger: #d64545;
  --status-muted: #9fb4c3;
  --status-neutral: #d3dde5;

  /* shape + elevation */
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 1px 2px rgba(11, 34, 57, .10), 0 8px 22px rgba(11, 34, 57, .10);
  --shadow-hover: 0 12px 28px rgba(11, 34, 57, .4), 0 0 0 1px var(--gold);
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  font-family: "Avenir Next", Aptos, "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, #dcecf5 0%, #eef6fb 320px, #eef6fb 100%) fixed;
}
h1, h2 { color: var(--navy); margin: 0 0 10px; }
h2 { font-size: 1.15rem; display: flex; align-items: center; gap: 10px; }
a { color: var(--teal-dark); }
p { line-height: 1.5; }

/* ---------- top bar ---------- */
.topbar {
  position: relative;
  display: flex; align-items: center; gap: 16px;
  padding: 10px 20px;
  background: linear-gradient(180deg, var(--navy-2) 0%, var(--navy) 100%);
  box-shadow: 0 6px 18px rgba(11, 34, 57, .35);
  color: #f4faff;
}
.topbar::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi) 30%, var(--gold) 55%, var(--gold-lo));
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand-mark {
  width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  overflow: hidden; background: rgba(255,255,255,.08);
}
.brand-mark:has(img) { box-shadow: 0 0 0 2px var(--gold), 0 4px 12px rgba(0,0,0,.4); background: #d9f3fb; }
.brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.brand-text b { display: block; color: var(--gold-mid); font-size: 1.05rem; }
.brand-text span { display: block; font-size: .8rem; color: #f4faff; opacity: .85; }
.chip {
  display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 999px;
  background: rgba(229,189,97,.18); color: var(--gold-hi); border: 1px solid rgba(229,189,97,.45);
  font-size: .85rem; font-weight: 600;
}
.topbtn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px;
  background: transparent; border: 1px solid rgba(229,189,97,.6); color: var(--gold-hi);
  text-decoration: none; font-weight: 600; cursor: pointer;
}
.topbtn:hover { background: rgba(229,189,97,.16); }

/* ---------- breadcrumbs ---------- */
.crumbs {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: linear-gradient(180deg, #fff, var(--ice)); border: 1px solid var(--line);
  border-bottom: 3px solid var(--gold); border-radius: var(--radius);
  padding: 12px 18px; margin-bottom: 18px; font-size: .92rem;
}
.crumbs a { color: var(--teal-dark); font-weight: 600; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .sep { color: var(--muted); }
.crumbs .current {
  padding: 4px 12px; border-radius: 999px; font-weight: 700; color: var(--navy);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-mid));
}

/* ---------- hero band (gradient + gold edge, optionally over a photo) ----------
   To lay the gradient over a photo, set --hero-photo on :root, e.g.:
   :root { --hero-photo: url("../img/your-photo.jpg"); }
   Leave it unset and the gradient alone still looks intentional. */
:root { --hero-photo: none; }
.hero-band {
  position: relative; border-radius: var(--radius-lg); padding: 34px 30px; margin: 0 0 20px; overflow: hidden;
  background:
    linear-gradient(100deg, rgba(11,34,57,.94) 0%, rgba(11,34,57,.78) 55%, rgba(11,34,57,.35) 100%),
    var(--hero-photo) center 35% / cover no-repeat, var(--navy);
  box-shadow: var(--shadow); border-bottom: 4px solid var(--gold);
}
.hero-band .home-title { color: var(--ice); margin: 0; max-width: 760px; font-weight: 500; text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.home-title .ht1 { display: block; font-size: 1.7rem; font-weight: 600; letter-spacing: .2px; }
.home-title .ht2 { display: block; font-size: 1.2rem; font-weight: 400; margin-top: 4px; opacity: .92; }

/* a secondary, smaller version of the hero box used as a clickable "tab" next to the main one */
.module-box {
  position: relative; border-radius: var(--radius-lg); padding: 46px 30px; overflow: hidden; min-height: 190px;
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
  background:
    linear-gradient(100deg, rgba(11,34,57,.94) 0%, rgba(11,34,57,.78) 55%, rgba(11,34,57,.45) 100%),
    var(--hero-photo) center 35% / cover no-repeat, var(--navy);
  box-shadow: var(--shadow); border: 1px solid rgba(229,189,97,.45); border-bottom: 4px solid var(--gold);
  color: var(--ice); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease;
}
.module-box:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.module-box .mb-t { font-size: 1.6rem; font-weight: 700; text-shadow: 0 2px 10px rgba(0,0,0,.45); }
.module-box .mb-s { font-size: 1rem; color: #d5e6f0; }

/* ---------- cards / tiles ---------- */
.tile {
  display: block; border-radius: var(--radius); border: 1px solid var(--line); padding: 20px;
  background: linear-gradient(180deg, #fff, var(--ice)); box-shadow: var(--shadow);
  text-decoration: none; color: inherit; overflow: hidden;
}
.tile:hover { border-color: var(--gold); box-shadow: 0 10px 26px rgba(11,34,57,.18); }

/* the dark "hero" variant used for primary navigation tiles */
.tile.hero, .tile.std-tile {
  background: linear-gradient(160deg, var(--navy-3) 0%, var(--navy-2) 45%, var(--navy) 100%);
  border: 1px solid rgba(229,189,97,.45); color: #f4faff; min-height: 170px;
}
.tile.hero .t, .tile.std-tile .t { color: var(--gold-mid); font-size: 1.2rem; font-weight: 700; display: block; margin: 10px 0 6px; }
.tile.hero .s, .tile.std-tile .s { color: #d5e6f0; font-size: .92rem; }
.tile.std-tile .t { font-size: 1.05rem; }

.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid.big.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 760px) { .grid.big.three { grid-template-columns: 1fr; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; border-radius: 10px; padding: 10px 16px;
  background: linear-gradient(180deg, #fff, var(--ice-2)); border: 1px solid var(--line);
  color: var(--navy); font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn.primary {
  background: linear-gradient(180deg, var(--gold-hi), var(--gold-mid) 60%, var(--gold));
  border: 1px solid var(--gold-lo); color: var(--navy); font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.btn.primary:hover { filter: brightness(1.04); }
.btn.pg { font-size: 1rem; padding: 10px 18px; }
.btn.danger { background: linear-gradient(180deg, #fff, #fdecea); border-color: #f3c9c4; color: var(--status-danger); }

/* ---------- status pills ---------- */
.spill {
  display: inline-flex; align-items: center; padding: 8px 16px; border-radius: 999px;
  border: 2px solid var(--line); background: #fff; color: var(--muted);
  font-weight: 700; font-size: .8rem; letter-spacing: .03em; text-transform: uppercase; cursor: pointer;
}
.spill.s-met.on   { background: var(--status-success); border-color: var(--status-success); color: #fff; }
.spill.s-partial.on { background: var(--status-warning); border-color: var(--status-warning); color: #3a2c00; }
.spill.s-notmet.on { background: var(--status-danger); border-color: var(--status-danger); color: #fff; }
.spill.s-na.on     { background: var(--status-muted); border-color: var(--status-muted); color: #fff; }
.spill.s-ns.on     { background: var(--status-neutral); border-color: var(--status-neutral); color: var(--ink); }

/* ---------- cards: generic status card ---------- */
.card {
  background: linear-gradient(180deg, #fff, var(--ice)); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}

/* ---------- login card ---------- */
.login-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: linear-gradient(180deg, rgba(11,34,57,.55), rgba(11,34,57,.75)), var(--hero-photo) center / cover no-repeat, var(--navy);
}
.login {
  width: 100%; max-width: 400px; background: linear-gradient(180deg, #fff, var(--ice)); border-radius: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35); border: 3px solid var(--gold); padding: 34px 30px; text-align: center;
}

/* ---------- forms ---------- */
input, textarea, select { font: inherit; }
.field {
  width: 100%; padding: 11px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; color: var(--text);
}
.field:focus { outline: 2px solid var(--teal); outline-offset: 1px; }

/* ---------- utility ---------- */
.muted { color: var(--muted); }
.sub { color: var(--muted); margin: 0 0 14px; }
