/* ============================================================
   IHMS — Integrated Healthcare Management System
   Shared design theme (palette + base + components)
   Palette: #001B48  #02457A  #018ABE  #97CADB  #D6E8EE
   Reuse this file on every page for a consistent brand.
   ============================================================ */

:root {
  /* ---- Brand palette ---- */
  --ink:        #001B48;   /* deepest navy  — dark sections, headings */
  --ink-soft:   #04265c;   /* derived       — dark gradient mid-stop  */
  --brand:      #02457A;   /* primary blue  — buttons, links          */
  --brand-700:  #013a68;   /* darker hover                            */
  --accent:     #018ABE;   /* bright blue   — accents, highlights     */
  --accent-300: #4fb0d8;   /* lighter accent                          */
  --soft:       #97CADB;   /* soft blue     — borders, decorative     */
  --mist:       #D6E8EE;   /* mist          — section tints, badges    */
  --mist-50:    #eef6fa;   /* near-white tint                          */
  --paper:      #f6fafc;   /* page background                          */
  --white:      #ffffff;

  /* ---- Text ---- */
  --text:       #0d2138;   /* body text (navy-charcoal)               */
  --text-muted: #5a708b;   /* secondary text                          */
  --text-on-dark:#dfeaf5;  /* body on dark sections                   */

  /* ---- Gradients ---- */
  --grad-brand: linear-gradient(135deg, #02457A 0%, #018ABE 100%);
  --grad-deep:  linear-gradient(160deg, #001B48 0%, #02457A 78%);
  --grad-soft:  linear-gradient(135deg, #D6E8EE 0%, #97CADB 100%);
  --grad-mesh:
     radial-gradient(38rem 38rem at 88% -8%,  rgba(1,138,190,.22), transparent 60%),
     radial-gradient(34rem 34rem at -6% 110%, rgba(151,202,219,.35), transparent 60%);

  /* ---- Elevation ---- */
  --shadow-sm:  0 1px 2px rgba(0,27,72,.06), 0 2px 6px rgba(0,27,72,.05);
  --shadow-md:  0 10px 30px rgba(0,27,72,.10);
  --shadow-lg:  0 24px 60px rgba(0,27,72,.16);
  --shadow-brand: 0 16px 38px rgba(1,138,190,.35);

  /* ---- Radii & motion ---- */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;
  --ease: cubic-bezier(.22,.61,.36,1);
  --t-fast: .18s;
  --t: .32s;

  /* ---- Layout ---- */
  --container: 1180px;

  /* ---- Type ---- */
  --font-head: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.12;
  margin: 0 0 .6em;
  font-weight: 800;
  letter-spacing: -.02em;
}

p { margin: 0 0 1rem; }
a { color: var(--brand); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--accent); }
img { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--accent); color: #fff; }

/* Custom scrollbar */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: var(--mist-50); }
::-webkit-scrollbar-thumb { background: var(--soft); border-radius: 99px; border: 3px solid var(--mist-50); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================== Layout =========================== */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.section { padding: clamp(64px, 9vw, 120px) 0; position: relative; }
.section--tint { background: var(--mist-50); }
.section--soft { background: linear-gradient(180deg, var(--white) 0%, var(--mist-50) 100%); }

.section-head { max-width: 680px; margin: 0 auto clamp(40px, 6vw, 64px); text-align: center; }
.section-head.is-left { margin-left: 0; text-align: left; }
.section-title {
  font-size: clamp(1.9rem, 3.6vw, 2.85rem);
  margin-bottom: .5rem;
}
.section-sub { color: var(--text-muted); font-size: 1.08rem; margin: 0; }

/* Eyebrow / chip badge */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--font-head); font-weight: 700;
  font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--brand);
  background: var(--mist);
  border: 1px solid rgba(1,138,190,.18);
  padding: .42rem .9rem; border-radius: var(--r-pill);
  margin-bottom: 1.1rem;
}
.eyebrow i, .eyebrow svg { width: 15px; height: 15px; }

/* ============================== Utilities ======================== */
.text-grad {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.muted { color: var(--text-muted); }
.center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--text-muted); }

/* ============================== Buttons ========================== */
.btn {
  --bg: var(--brand);
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-head); font-weight: 700; font-size: .98rem;
  line-height: 1; cursor: pointer; white-space: nowrap;
  padding: .9rem 1.6rem; border-radius: var(--r-pill);
  border: 1.5px solid transparent; color: #fff; background: var(--bg);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease);
}
.btn i, .btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-3px); color: #fff; }

.btn--brand   { background: var(--grad-brand); box-shadow: var(--shadow-brand); }
.btn--brand:hover { box-shadow: 0 22px 46px rgba(1,138,190,.45); }

.btn--ink     { background: var(--ink); }
.btn--ink:hover { background: var(--brand-700); box-shadow: var(--shadow-md); }

.btn--ghost   { background: transparent; color: var(--brand); border-color: rgba(2,69,122,.3); }
.btn--ghost:hover { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: var(--shadow-md); }

.btn--light   { background: #fff; color: var(--brand); }
.btn--light:hover { color: var(--accent); box-shadow: var(--shadow-lg); }

.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--outline-light:hover { background: #fff; color: var(--brand); border-color: #fff; }

.btn--lg { padding: 1.05rem 2rem; font-size: 1.05rem; }
.btn--block { width: 100%; }

/* ============================== Cards =========================== */
.card {
  background: #fff; border: 1px solid var(--mist);
  border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), border-color var(--t) var(--ease);
}

/* ============================== Forms =========================== */
.field { margin-bottom: 1.05rem; }
.field > label {
  display: block; font-family: var(--font-head); font-weight: 600;
  font-size: .9rem; color: var(--ink); margin-bottom: .45rem;
}
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > i, .input-wrap > svg {
  position: absolute; left: 16px; width: 19px; height: 19px;
  color: var(--text-muted); pointer-events: none;
}
.input {
  width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--text);
  padding: .92rem 1rem .92rem 46px;
  background: var(--mist-50); border: 1.5px solid var(--mist);
  border-radius: var(--r-md); outline: none;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.input::placeholder { color: #93a6bd; }
.input:focus {
  border-color: var(--accent); background: #fff;
  box-shadow: 0 0 0 4px rgba(1,138,190,.14);
}
.input--plain { padding-left: 1rem; }
.input-toggle {
  position: absolute; right: 8px; background: none; border: 0; cursor: pointer;
  color: var(--text-muted); padding: 8px; display: inline-flex; border-radius: 8px;
}
.input-toggle:hover { color: var(--brand); background: var(--mist); }
.input-toggle i, .input-toggle svg { width: 19px; height: 19px; }

/* Two-column form rows */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.form-row .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

/* Alerts */
.alert { padding: .85rem 1.1rem; border-radius: var(--r-md); font-size: .94rem; margin-bottom: 1rem; display: flex; gap: .6rem; align-items: center; }
.alert i, .alert svg { width: 18px; height: 18px; flex: 0 0 auto; }
.alert--error   { background: #fdecec; color: #b3261e; border: 1px solid #f6c9c6; }
.alert--success { background: #e7f6ee; color: #1c7a4b; border: 1px solid #bfe6d0; }
.alert--info    { background: var(--mist-50); color: var(--brand); border: 1px solid var(--mist); }

/* ============================== Motion guard ==================== */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  [data-aos] { opacity: 1 !important; transform: none !important; }
}
