/* =========================================================
   Jawany Insurance Agency - Portal Stylesheet
   ========================================================= */

@import url("https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700;800&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --brand-orange: #ff5600;
  --brand-teal: #0cb5c6;
  --brand-cyan: #00d8ff;
  --green: var(--brand-orange);
  --green-dark: #c94400;
  --green-soft: #fff1e9;
  --navy: #083b45;
  --navy-light: #0c6270;
  --ink: #1c2333;
  --muted: #5a6577;
  --bg: #f6f8fb;
  --white: #ffffff;
  --line: #e7ecf3;
  --shadow: 0 10px 30px rgba(8, 59, 69, 0.08);
  --shadow-lg: 0 20px 50px rgba(8, 59, 69, 0.15);
  --radius: 14px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --display: "Sora", var(--font);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html, body { max-width: 100%; overflow-x: clip; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
h1, h2, h3, h4,
.auth-card h2,
.stat .s-val,
.profile-card .avatar-lg { font-family: var(--display); }

/* ---------- Auth (login / register) ---------- */
.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
}
.auth-brand {
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-light) 100%);
  color: #fff;
  padding: 54px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-brand::after {
  content: "";
  position: absolute;
  right: -120px; bottom: -120px;
  width: 340px; height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 86, 0,.35), transparent 70%);
}
.auth-brand .logo {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 10px 12px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
  position: relative;
  z-index: 2;
}
.auth-brand .logo .brand-logo { display: block; width: auto; height: 72px; max-width: 194px; object-fit: contain; }
.auth-brand h1 { font-size: 2.2rem; line-height: 1.2; margin: 24px 0 14px; max-width: 420px; }
.auth-brand p { color: #c8d4e8; max-width: 400px; }
.auth-points { margin-top: 26px; display: grid; gap: 14px; }
.auth-points li { display: flex; align-items: center; gap: 12px; color: #dbe4f2; }
.auth-points .tick {
  width: 26px; height: 26px; flex: none;
  border-radius: 50%; background: rgba(255, 86, 0,.2);
  color: var(--green); display: grid; place-items: center; font-weight: 700;
}
.auth-foot { font-size: .82rem; color: #9fb0cc; position: relative; z-index: 2; }

.auth-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.auth-card { width: 100%; max-width: 420px; min-width: 0; }
.auth-card .eyebrow {
  display: inline-block; font-size: .72rem; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--green-dark);
  background: var(--green-soft); padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
}
.auth-card h2 { font-size: 1.7rem; color: var(--navy); margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 24px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 10px; font-family: inherit; font-size: .95rem; color: var(--ink);
  background: #fff; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(255, 86, 0,.18);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.row-between { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; font-size: .85rem; }
.row-between a { color: var(--green-dark); font-weight: 600; }
.check { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.check input { width: auto; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 10px; font-weight: 700; font-size: .95rem;
  border: none; cursor: pointer; font-family: inherit; transition: transform .15s, box-shadow .2s, background .2s;
}
.btn-primary { background: var(--green-dark); color: #fff; box-shadow: 0 8px 18px rgba(255, 86, 0,.35); }
.btn-primary:hover { background: #a93600; transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn-ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.btn-ghost:hover { border-color: var(--green); color: var(--green-dark); }
.btn-outline { background: transparent; color: var(--navy); border: 1.5px solid var(--line); }
.btn-outline:hover { border-color: var(--green); color: var(--green-dark); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-light); transform: translateY(-1px); }
.btn-lg { padding: 16px 30px; font-size: 1rem; }
.btn-sm { padding: 9px 16px; font-size: .85rem; }
.btn svg { width: 17px; height: 17px; }
.btn-ghost svg { color: var(--green-dark); }

.auth-alt { text-align: center; margin-top: 20px; color: var(--muted); font-size: .9rem; }
.auth-alt a { color: var(--green-dark); font-weight: 700; }
.back-home { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .85rem; margin-bottom: 22px; }
.back-home:hover { color: var(--green-dark); }

.form-note { display: none; padding: 11px 14px; border-radius: 10px; font-size: .88rem; margin-bottom: 16px; }
.form-note.ok { display: block; background: var(--green-soft); color: var(--green-dark); }
.form-note.err { display: block; background: #fdecec; color: #c0392b; }

/* ---------- App shell (dashboard) ---------- */
.app { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }

.backdrop { display: none; }

.sidebar {
  background: var(--navy);
  color: #cdd8ec;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .logo { display: inline-flex; align-items: center; padding: 9px 10px; margin: 0 4px 20px; border-radius: 6px; background: #fff; }
.sidebar .logo .brand-logo { display: block; width: auto; height: 68px; max-width: 184px; object-fit: contain; }
.side-nav { display: grid; gap: 4px; margin-top: 6px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 10px; font-size: .93rem; font-weight: 500;
  color: #cdd8ec; transition: background .2s, color .2s;
}
.side-nav a .ico { width: 20px; height: 20px; flex: none; display: grid; place-items: center; }
.side-nav a .ico svg { width: 20px; height: 20px; }
.side-nav a:hover { background: var(--navy-light); color: #fff; }
.side-nav a.active { background: var(--green-dark); color: #fff; box-shadow: 0 6px 16px rgba(255, 86, 0,.35); }
.side-foot { margin-top: auto; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.1); }
.side-foot a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 10px; color: #cdd8ec; font-size: .92rem; }
.side-foot a span { width: 20px; height: 20px; display: grid; place-items: center; flex: none; }
.side-foot a span svg { width: 19px; height: 19px; }
.side-foot a:hover { background: var(--navy-light); color: #fff; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topnav {
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 16px 30px; display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 20;
}
.topnav .page-title h1 { font-size: 1.35rem; color: var(--navy); }
.topnav .page-title p { font-size: .85rem; color: var(--muted); }
.topnav-right { display: flex; align-items: center; gap: 16px; }
.bell { position: relative; font-size: 1.2rem; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.bell svg { width: 22px; height: 22px; }
.bell .dot { position: absolute; top: -2px; right: -2px; width: 8px; height: 8px; border-radius: 50%; background: var(--green); border: 2px solid #fff; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--green-dark));
  color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .95rem;
}
.user-chip .u-name { font-size: .9rem; font-weight: 600; color: var(--navy); line-height: 1.2; }
.user-chip .u-role { font-size: .75rem; color: var(--muted); }
.burger { display: none; background: none; border: none; font-size: 1.5rem; color: var(--navy); cursor: pointer; }
.burger svg { width: 24px; height: 24px; }

.content { padding: 28px 30px 40px; }

/* cards + widgets */
.application-journey {
  margin-bottom: 22px;
  padding: 22px;
  border: 1px solid rgba(12,181,198,.28);
  border-left: 4px solid var(--orange, #ff5600);
  border-radius: 14px;
  background: linear-gradient(135deg,#fff 0%,#f5fcfd 100%);
  box-shadow: 0 10px 30px rgba(8,59,69,.07);
}
.application-journey[hidden] { display: none; }
.account-benefits-strip { margin-bottom: 22px; padding: 21px; border: 1px solid rgba(255,86,0,.22); border-top: 4px solid var(--brand-orange); border-radius: 14px; background: linear-gradient(145deg,#fff 0%,#fffaf7 100%); box-shadow: 0 12px 34px rgba(8,59,69,.07); }
.account-benefits-strip[hidden] { display: none; }
.account-benefits-strip h2 { margin-top: 4px; color: var(--navy); font-size: 1.08rem; }
.account-benefits-strip p { margin-top: 4px; color: var(--muted); font-size: .8rem; line-height: 1.5; }
.facility-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.facility-header > div { max-width: 760px; }
.facility-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(260px,1fr)); gap: 13px; margin-top: 17px; }
.facility-card { position: relative; padding: 17px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: 0 7px 20px rgba(8,59,69,.055); }
.facility-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; border-radius: 11px 0 0 11px; background: var(--brand-teal); }
.facility-credit::before { background: var(--brand-orange); }
.facility-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.facility-type { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .075em; text-transform: uppercase; }
.facility-value { display: block; margin-top: 15px; color: var(--navy); font: 800 1.42rem var(--display); letter-spacing: -.025em; }
.facility-card h3 { margin-top: 3px; color: var(--ink); font-size: .91rem; }
.facility-card dl { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.facility-card dl div { min-width: 0; }
.facility-card dt { color: var(--muted); font-size: .63rem; font-weight: 700; letter-spacing: .045em; text-transform: uppercase; }
.facility-card dd { margin-top: 3px; overflow-wrap: anywhere; color: var(--ink); font-size: .73rem; font-weight: 700; }
.facility-card > p { min-height: 34px; margin-top: 13px; }
.facility-link, .facility-uses { display: inline-block; margin-top: 10px; color: var(--brand-teal); font-size: .71rem; font-weight: 800; text-decoration: none; }
.facility-link:hover { text-decoration: underline; }
.facility-uses { color: var(--muted); }
.facility-control { margin-top: 14px; padding: 11px 13px; border-radius: 8px; background: #f4f8fa; color: var(--muted); font-size: .72rem; line-height: 1.5; }
.facility-control strong { color: var(--navy); }
.account-credit-panel { margin-bottom: 22px; border: 1px solid rgba(12,181,198,.3); background: #fff; box-shadow: var(--shadow); overflow: hidden; }
.account-credit-panel[hidden] { display: none; }
.account-credit-panel .panel-head { background: #f5fcfd; }
.account-credit-panel .panel-head p { margin-top: 3px; color: var(--muted); font-size: .78rem; font-weight: 400; }
.account-credit-panel .panel-head > strong { color: var(--navy); font: 800 1.06rem var(--display); }
.journey-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.journey-head h2 { margin: 4px 0 5px; color: var(--navy); font-size: 1.22rem; }
.journey-head p { max-width: 760px; margin: 0; color: var(--muted); font-size: .87rem; line-height: 1.55; }
.journey-eyebrow { color: var(--orange, #ff5600); font-size: .69rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.journey-progress { display: grid; grid-template-columns: repeat(5,1fr); gap: 0; margin: 22px 0 17px; padding: 0; list-style: none; }
.journey-step { position: relative; display: grid; justify-items: center; gap: 7px; color: var(--muted); }
.journey-step::before { content: ""; position: absolute; top: 15px; right: 50%; width: 100%; height: 2px; background: var(--line); }
.journey-step:first-child::before { display: none; }
.journey-step > span { z-index: 1; width: 31px; height: 31px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 50%; background: #fff; font-size: .74rem; font-weight: 800; }
.journey-step small { font-size: .7rem; font-weight: 700; text-align: center; }
.journey-step.is-complete::before, .journey-step.is-current::before { background: var(--teal, #0cb5c6); }
.journey-step.is-complete > span { border-color: var(--teal, #0cb5c6); background: var(--teal, #0cb5c6); color: #fff; }
.journey-step.is-current > span { border-color: var(--orange, #ff5600); color: var(--orange, #ff5600); box-shadow: 0 0 0 4px rgba(255,86,0,.13); }
.journey-step.is-current small { color: var(--navy); }
.journey-meta { display: flex; flex-wrap: wrap; gap: 12px 28px; padding-top: 15px; border-top: 1px solid var(--line); color: var(--ink); font-size: .78rem; }
.journey-meta span { display: grid; gap: 2px; }
.journey-meta b { color: var(--muted); font-size: .65rem; letter-spacing: .05em; text-transform: uppercase; }
.journey-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.temporary-password-notice { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; padding: 17px 18px; border: 1px solid rgba(255,86,0,.28); border-left: 4px solid var(--orange, #ff5600); border-radius: 12px; background: #fff8f3; }
.temporary-password-notice[hidden] { display: none; }
.temporary-password-icon { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--orange, #ff5600); color: #fff; font-weight: 800; }
.temporary-password-notice strong { color: var(--navy); }
.temporary-password-notice p { margin: 4px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.5; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 24px; }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow); display: flex; gap: 14px; align-items: center;
}
.stat .s-ico { width: 48px; height: 48px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; }
.stat .s-ico svg { width: 24px; height: 24px; }
.s-ico.g { background: var(--green-soft); color: var(--green-dark); }
.s-ico.b { background: #e7effb; color: var(--navy-light); }
.s-ico.a { background: #fff2e0; color: #d08700; }
.s-ico.p { background: #f0e9fb; color: #6f42c1; }
.s-ico.r { background: #fdeaea; color: #c0392b; }
.stat .s-val { font-size: 1.5rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.stat .s-lbl { font-size: .82rem; color: var(--muted); }

.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; }
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; margin-bottom: 18px;
}
.panel-head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.panel-head h3 { font-size: 1.05rem; color: var(--navy); }
.panel-head a { font-size: .85rem; color: var(--green-dark); font-weight: 600; }
.panel-body { padding: 20px; }

table.tbl { width: 100%; border-collapse: collapse; }
table.tbl th, table.tbl td { text-align: left; padding: 13px 16px; font-size: .9rem; }
table.tbl thead th { background: #f8fafd; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); }
table.tbl tbody tr { border-bottom: 1px solid var(--line); }
table.tbl tbody tr:last-child { border-bottom: none; }
table.tbl tbody tr:hover { background: #fafcfe; }

.tag { display: inline-flex; align-items: center; padding: 4px 11px; border-radius: 999px; font-size: .75rem; font-weight: 700; }
.tag::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: currentColor; flex-shrink: 0; }
.tag-active { background: var(--green-soft); color: var(--green-dark); }
.tag-pending { background: #fff2e0; color: #d08700; }
.tag-expired { background: #fdecec; color: #c0392b; }
.tag-paid { background: #e7effb; color: var(--navy-light); }
.tag-review { background: #f0e9fb; color: #6f42c1; }

.mini-list { display: grid; gap: 14px; }
.mini-item { display: flex; gap: 12px; align-items: flex-start; }
.mini-item .m-ico { width: 36px; height: 36px; flex: none; border-radius: 10px; background: var(--green-soft); color: var(--green-dark); display: grid; place-items: center; }
.mini-item .m-ico svg { width: 18px; height: 18px; }
.mini-item .m-t { font-size: .9rem; font-weight: 600; color: var(--navy); }
.mini-item .m-s { font-size: .8rem; color: var(--muted); }

.progress { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--green-dark)); }

.section-title { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 18px; }
.section-title h2 { font-size: 1.2rem; color: var(--navy); }

.pcard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.pcard { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.pcard-top { padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, var(--navy), var(--navy-light)); color: #fff; }
.pcard-top .p-type { font-size: .95rem; font-weight: 700; }
.pcard-top .p-no { font-size: .75rem; color: #b9c6df; }
.pcard-body { padding: 18px 20px; }
.pcard-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: .88rem; border-bottom: 1px dashed var(--line); }
.pcard-row:last-child { border-bottom: none; }

/* ===== Gradient policy summary cards (dashboard hero) ===== */
.policy-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 24px; }
.gcard {
  position: relative; overflow: hidden; border-radius: 18px; padding: 20px 22px;
  color: #fff; min-height: 138px; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 14px 34px rgba(8, 59, 69,.16);
}
.gcard::after { content: ""; position: absolute; right: -34px; top: -34px; width: 130px; height: 130px; border-radius: 50%; background: rgba(255,255,255,.14); }
.gcard::before { content: ""; position: absolute; right: 18px; bottom: -46px; width: 110px; height: 110px; border-radius: 50%; background: rgba(255,255,255,.08); }
.gcard.green { background: linear-gradient(135deg, var(--brand-orange), var(--green-dark)); }
.gcard.navy { background: linear-gradient(135deg, #2c4d92, #083b45); }
.gcard.amber { background: linear-gradient(135deg, #f5a623, #e07b00); }
.gcard .gc-type { font-size: .84rem; font-weight: 600; opacity: .95; letter-spacing: .01em; position: relative; z-index: 2; padding-right: 46px; }
.gcard .gc-lbl { font-size: .72rem; opacity: .82; position: relative; z-index: 2; }
.gcard .gc-val { font-size: 1.45rem; font-weight: 800; line-height: 1.15; letter-spacing: -.01em; position: relative; z-index: 2; white-space: nowrap; }
.gcard .gc-btn { position: absolute; right: 18px; top: 18px; width: 38px; height: 38px; border-radius: 50%; background: rgba(0,0,0,.22); display: grid; place-items: center; z-index: 3; transition: background .2s; }
.gcard .gc-btn:hover { background: rgba(0,0,0,.34); }
.gcard .gc-btn svg { width: 18px; height: 18px; stroke: #fff; }

/* status badge with leading dot */
.tag .t-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: middle; background: currentColor; }

/* ===== Modal (payment success / bill) ===== */
.modal { position: fixed; inset: 0; background: rgba(8, 59, 69,.55); display: none; place-items: center; z-index: 120; padding: 20px; }
.modal.show { display: grid; }
.modal-card {
  background: #fff; border-radius: 18px; width: 100%; max-width: 400px; overflow: hidden;
  box-shadow: 0 30px 80px rgba(8, 59, 69,.35); animation: modalPop .25s ease;
}
@keyframes modalPop { from { transform: translateY(14px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { background: linear-gradient(135deg, var(--green), var(--green-dark)); height: 96px; display: grid; place-items: center; }
.modal-check { width: 58px; height: 58px; border-radius: 50%; background: #fff; display: grid; place-items: center; box-shadow: 0 8px 20px rgba(0,0,0,.14); }
.modal-check svg { width: 30px; height: 30px; stroke: var(--green-dark); }
.modal-body { padding: 24px; text-align: center; }
.modal-body h3 { font-size: 1.25rem; color: var(--navy); margin-bottom: 6px; }
.modal-body p { font-size: .9rem; color: var(--muted); margin-bottom: 20px; line-height: 1.5; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; }

.pcard-row span { color: var(--muted); }
.pcard-row b { color: var(--navy); }
.pcard-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; }

.profile-grid { display: grid; grid-template-columns: 300px 1fr; gap: 18px; }
.profile-card { text-align: center; padding: 30px 20px; }
.profile-card .avatar-lg { width: 90px; height: 90px; border-radius: 50%; margin: 0 auto 14px; background: linear-gradient(135deg, var(--green), var(--green-dark)); color: #fff; display: grid; place-items: center; font-size: 2rem; font-weight: 800; }
.profile-card h3 { color: var(--navy); font-size: 1.2rem; }
.profile-card p { color: var(--muted); font-size: .88rem; }

.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .e-ico { font-size: 2.4rem; margin-bottom: 8px; }

/* ---------- Documents ---------- */
.doc-row { display: flex; align-items: center; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: none; }
.doc-ico { width: 42px; height: 42px; border-radius: 11px; background: var(--green-soft); color: var(--green-dark); display: grid; place-items: center; flex-shrink: 0; }
.doc-ico svg { width: 20px; height: 20px; }
.doc-meta { flex: 1; min-width: 0; }
.doc-meta b { display: block; color: var(--navy); font-size: .95rem; }
.doc-meta span { font-size: .8rem; color: var(--muted); }

/* ---------- Renewals ---------- */
.renew-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.renew-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.renew-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; }
.renew-body { padding: 0 20px 16px; }
.renew-row { display: flex; justify-content: space-between; padding: 7px 0; font-size: .88rem; }
.renew-row span { color: var(--muted); }
.renew-row b { color: var(--navy); }
.renew-foot { padding: 14px 20px; border-top: 1px solid var(--line); }

/* ---------- Messages ---------- */
.msg-row { display: flex; gap: 14px; align-items: flex-start; padding: 16px 20px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.msg-row:last-child { border-bottom: none; }
.msg-row:hover { background: var(--bg); }
.msg-row.unread { background: var(--green-soft); }
.msg-ava { width: 42px; height: 42px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .82rem; flex-shrink: 0; }
.msg-body { flex: 1; min-width: 0; }
.msg-top { display: flex; justify-content: space-between; gap: 12px; }
.msg-top b { color: var(--navy); font-size: .92rem; }
.msg-top span { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.msg-sub { color: var(--ink); font-weight: 600; font-size: .9rem; margin-top: 2px; }
.msg-prev { color: var(--muted); font-size: .84rem; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); flex-shrink: 0; margin-top: 6px; }

/* ---------- Support / Security ---------- */
.faq-list { display: flex; flex-direction: column; }
.faq-q { padding: 16px 20px; border-bottom: 1px solid var(--line); cursor: pointer; }
.faq-q:last-child { border-bottom: none; }
.faq-q b { color: var(--navy); font-size: .92rem; display: flex; justify-content: space-between; gap: 12px; }
.faq-q p { color: var(--muted); font-size: .86rem; margin: 10px 0 0; display: none; line-height: 1.6; }
.faq-q.open p { display: block; }
.faq-q.open .fq-x { transform: rotate(45deg); }
.fq-x { color: var(--green-dark); transition: transform .2s; font-size: 1.2rem; line-height: 1; }
.sec-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.sec-row:last-child { border-bottom: none; }
.sec-row .sec-meta b { display: block; color: var(--navy); font-size: .92rem; }
.sec-row .sec-meta span { color: var(--muted); font-size: .82rem; }
.toggle { width: 46px; height: 26px; border-radius: 999px; background: var(--line); border: 0; position: relative; cursor: pointer; flex-shrink: 0; transition: background .2s; }
.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle.on { background: var(--green); }
.toggle.on::after { transform: translateX(20px); }

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .profile-grid { grid-template-columns: 1fr; }
  .renew-grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-form { width: 100%; min-width: 0; }
}
@media (max-width: 768px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 60; width: 250px;
    transform: translateX(-100%); transition: transform .25s ease;
  }
  .sidebar.open { transform: translateX(0); }
  .burger { display: block; }
  .backdrop { display: none; position: fixed; inset: 0; background: rgba(8, 59, 69,.5); z-index: 50; }
  .backdrop.show { display: block; }
  .user-chip .u-meta { display: none; }
}
@media (max-width: 520px) {
  .auth-form { padding: 28px 20px; }
  .row-between { flex-wrap: wrap; gap: 8px; }
  .auth-reset-link { max-width: 100%; overflow-wrap: anywhere; }
  .stat-row { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .content { padding: 20px 16px 30px; }
  .policy-cards { grid-template-columns: 1fr; }
}

/* 2026 operational UI refinement */
:root {
  --green: var(--brand-orange);
  --green-dark: #c94400;
  --green-soft: #fff1e9;
  --navy: #083b45;
  --navy-light: #0c6270;
  --ink: #182431;
  --muted: #5d6872;
  --bg: #f3f4f1;
  --line: #dfe3df;
  --shadow: 0 3px 12px rgba(8, 59, 69,.06);
  --shadow-lg: 0 18px 46px rgba(8, 59, 69,.15);
  --radius: 7px;
  --font: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --display: var(--font);
}
.auth-brand { background: #083b45; }
.auth-brand::after { border-radius: 0; width: 55%; height: 100%; right: 0; bottom: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 42px 42px; }
.auth-brand h1 { font-family: Georgia, "Times New Roman", serif; font-size: 2.55rem; letter-spacing: -.03em; }
.auth-card .eyebrow { padding: 0; border-radius: 0; background: transparent; letter-spacing: .12em; }
.field input, .field select, .field textarea, .btn { border-radius: 4px; }
.btn-primary { box-shadow: none; }
.btn-primary:hover { transform: none; }
.sidebar { background: #063943; }
.side-nav a { border-radius: 4px; }
.side-nav a.active { background: #c94400; box-shadow: none; }
.panel, .stat, .pcard, .renew-card { border-radius: 6px; box-shadow: none; }
.stat { border-top: 2px solid var(--line); }
.gcard { border-radius: 6px; box-shadow: none; }
.gcard::before, .gcard::after { display: none; }
.gcard.green { background: #c94400; }
.gcard.navy { background: #0c6270; }
.gcard.amber { background: #a96814; }
.topnav { min-height: 72px; }
.tag { border-radius: 3px; }
.stat .s-val { overflow-wrap: anywhere; font-size: 1.28rem; }

/* Shared application interaction and operational states */
:root {
  --focus-ring: #087985;
  --danger: #a83232;
  --danger-soft: #fbecec;
  --success: #0f6b49;
  --success-soft: #e7f3ed;
  --warning: #8a5708;
  --warning-soft: #fff3dc;
}

::selection { background: #ffe1d2; color: var(--navy); }

.skip-link {
  position: fixed; top: 10px; left: 10px; z-index: 200;
  padding: 10px 14px; background: #fff; color: var(--navy);
  border: 2px solid var(--focus-ring); border-radius: 3px;
  transform: translateY(-150%);
}
.skip-link:focus { transform: translateY(0); }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
}
:where(input, select, textarea):focus-visible { outline-offset: 1px; }

.btn:disabled,
button:disabled { cursor: not-allowed; opacity: .58; transform: none; box-shadow: none; }

/* Shared, real request progress. The same data attribute is used by the
   public-site controller, preventing duplicate progress indicators. */
.jawany-progress {
  position: fixed; inset: 0 0 auto; z-index: 1000; height: 3px;
  overflow: hidden; pointer-events: none; opacity: 0; visibility: hidden;
  background: rgba(255, 86, 0,.14); transition: opacity .16s ease;
}
.jawany-progress.is-active { opacity: 1; visibility: visible; }
.jawany-progress-bar {
  display: block; width: 42%; height: 100%;
  background: linear-gradient(90deg, var(--green-dark), var(--brand-orange), var(--brand-teal), var(--brand-cyan));
  box-shadow: 0 0 10px rgba(255, 86, 0,.45);
  animation: jawanyProgress 1.05s ease-in-out infinite;
}
@keyframes jawanyProgress {
  from { transform: translateX(-115%); }
  to { transform: translateX(340%); }
}
html.jawany-is-loading { cursor: progress; }

.btn.is-loading,
button.is-loading {
  cursor: progress; opacity: .78; transform: none; box-shadow: none;
}
.btn.is-loading::before,
button.is-loading::before {
  content: ""; width: 1em; height: 1em; flex: none;
  border: 2px solid currentColor; border-right-color: transparent;
  border-radius: 50%; animation: jawanyButtonSpin .72s linear infinite;
}
@keyframes jawanyButtonSpin { to { transform: rotate(360deg); } }

.app:not(.is-authenticated) .user-chip,
.app:not(.is-authenticated) [data-ufirst],
.app:not(.is-authenticated) [data-afirst],
.app:not(.is-authenticated) [data-coname],
.app:not(.is-authenticated) [data-uname],
.app:not(.is-authenticated) [data-aname],
.app:not(.is-authenticated) [data-contact],
.app:not(.is-authenticated) [data-acode],
.app:not(.is-authenticated) [data-coacct] { visibility: hidden; }
.content { position: relative; }
.app[aria-busy="true"] .content > :not(.portal-skeleton) {
  opacity: .28; pointer-events: none; transition: opacity .16s ease;
}
.app.is-navigating { cursor: progress; }
.is-navigating-link { opacity: .7; cursor: progress; }

.portal-sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}
.portal-skeleton {
  position: absolute; inset: 0; z-index: 20; min-height: 520px;
  padding: inherit; background: var(--bg); pointer-events: none;
}
.skeleton-stat-row {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 18px; margin-bottom: 24px;
}
.skeleton-stat,
.skeleton-panel {
  display: block; border: 1px solid var(--line); border-radius: 7px;
  background: #fff; box-shadow: 0 5px 18px rgba(8, 59, 69,.04);
}
.skeleton-stat { min-height: 88px; }
.skeleton-panel-grid {
  display: grid; grid-template-columns: minmax(0,1.6fr) minmax(0,1fr);
  gap: 18px; margin-bottom: 18px;
}
.skeleton-panel { min-height: 220px; padding: 24px; }
.skeleton-panel-wide { min-height: 180px; }
.skeleton-line,
.skeleton-stat {
  background-image: linear-gradient(100deg, #edf1f5 15%, #f8fafb 35%, #edf1f5 55%);
  background-size: 220% 100%; animation: jawanySkeleton 1.25s ease-in-out infinite;
}
.skeleton-line {
  display: block; width: 100%; height: 13px; margin-bottom: 18px;
  border-radius: 3px;
}
.skeleton-title { width: 42%; height: 19px; margin-bottom: 28px; }
.skeleton-short { width: 68%; }
@keyframes jawanySkeleton {
  from { background-position: 120% 0; }
  to { background-position: -120% 0; }
}

.app-state {
  max-width: 620px; padding: 26px; background: #fff;
  border: 1px solid var(--line); border-left: 4px solid var(--green);
}
.app-state.is-error { border-left-color: var(--danger); }
.app-state h2 { color: var(--navy); font-size: 1.15rem; margin-bottom: 7px; }
.app-state p { color: var(--muted); font-size: .92rem; }
.app-state .btn { margin-top: 18px; }

.form-note[role="status"],
.form-note[role="alert"] {
  display: block; border-left: 3px solid currentColor;
  padding: 11px 13px; margin-top: 14px; font-size: .88rem;
}
.form-note.ok { background: var(--success-soft); color: var(--success); }
.form-note.err { background: var(--danger-soft); color: var(--danger); }

.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { min-width: 640px; }
table.tbl th { white-space: nowrap; }

.empty-state { padding: 34px 22px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--navy); margin-bottom: 5px; }
.operational-title { font-size: 1rem; color: var(--navy); }
.operational-copy { color: var(--muted); font-size: .88rem; margin: 5px 0 14px; }

/* Phase 3: production portal compositions */
.topnav-heading { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topnav .page-title { min-width: 0; }
.topnav .page-title h1 { letter-spacing: -.015em; }
.topnav .page-title p { margin-top: 2px; max-width: 70ch; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.stack-actions { display: flex; flex-direction: column; gap: 10px; }
.split-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.panel-offset { margin-top: 1.25rem; }
.form-aside-grid { grid-template-columns: minmax(0, 1fr) 340px; }
.claim-aside-grid { grid-template-columns: minmax(0, 1fr) 360px; }
.btn-block { width: 100%; justify-content: center; }
.form-copy { color: var(--muted); margin: 0 0 18px; font-size: .9rem; line-height: 1.6; }
.form-help { margin-top: 6px; color: var(--muted); font-size: .82rem; }
.form-divider { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }
.form-consent { margin-bottom: 18px; }
.muted { color: var(--muted); }
.record-sub { color: var(--muted); }
.record-details { margin-top: 7px; max-width: 360px; color: var(--text); }
.record-details summary { color: var(--navy); cursor: pointer; font-size: .76rem; font-weight: 700; }
.record-details p { margin: 7px 0 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; background: #f8faf8; color: var(--text); font-size: .78rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.empty-cell { text-align: center; color: var(--muted); padding: 26px 18px !important; }
.empty-copy { color: var(--muted); padding: 22px; margin: 0; }
.urgent-panel { background: var(--navy); color: #fff; border: 0; }
.urgent-panel .panel-body { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.urgent-panel h3 { color: #fff; }
.urgent-panel p { color: #d4dfeb; font-size: .9rem; }
.auth-reset-link { margin-left: auto; font-size: .88rem; font-weight: 600; }
.auth-notice { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; line-height: 1.55; }
.account-reference { margin-top: 14px; font-size: .82rem; color: var(--muted); }
.data-note { padding: 12px 16px; border-top: 1px solid var(--line); background: #fbfcfb; color: var(--muted); font-size: .8rem; }
.progress-bar { width: var(--progress, 0%); }
.msg-row { cursor: default; }
.field input[readonly] { background: #f4f7fb; color: var(--muted); cursor: not-allowed; }
.table-tools { display: flex; align-items: flex-end; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: #fbfcfb; }
.table-tools label { display: grid; gap: 5px; color: var(--muted); font-size: .74rem; font-weight: 700; }
.table-tools input, .table-tools select { min-height: 40px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--text); padding: 8px 11px; font: inherit; }
.table-search { flex: 1 1 260px; }
.table-filter { flex: 0 1 180px; }
.table-sort { appearance: none; border: 0; background: transparent; color: inherit; font: inherit; font-weight: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; padding: 0 18px 0 0; position: relative; text-align: left; }
.table-sort::after { content: "↕"; position: absolute; right: 0; opacity: .5; }
.table-sort[data-direction="ascending"]::after { content: "↑"; opacity: 1; }
.table-sort[data-direction="descending"]::after { content: "↓"; opacity: 1; }
.table-pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--line); }
.table-pager p { color: var(--muted); font-size: .82rem; }
.table-pager > div { display: flex; gap: 8px; }
.table-no-results { padding: 28px 18px; color: var(--muted); text-align: center; }
.table-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.record-action-row { margin-top: 7px; }
.portal-narrow-form { max-width: 560px; }
.btn-danger { border-color: #e6b8b4; color: var(--danger); background: #fff; }
.btn-danger:hover { background: var(--danger-soft); }
.portal-toast { position: fixed; right: 22px; bottom: 22px; z-index: 240; max-width: min(420px, calc(100vw - 32px)); padding: 13px 16px; border-radius: 8px; background: var(--navy); color: #fff; box-shadow: 0 16px 44px rgba(8, 59, 69,.25); transform: translateY(12px); opacity: 0; transition: opacity .2s, transform .2s; }
.portal-toast.is-error { background: var(--danger); }
.portal-toast.show { transform: translateY(0); opacity: 1; }
.admin-dialog { width: min(1040px, calc(100vw - 28px)); max-height: calc(100vh - 28px); padding: 0; border: 0; border-radius: 14px; color: var(--text); box-shadow: 0 28px 80px rgba(8, 59, 69,.32); }
.admin-dialog::backdrop { background: rgba(8, 59, 69,.66); }
.admin-dialog-head { padding: 20px 22px; display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.admin-dialog-head h2 { color: var(--navy); font-size: 1.2rem; }
.admin-dialog-head p { color: var(--muted); font-size: .85rem; margin-top: 4px; max-width: 68ch; }
.admin-dialog-body { padding: 22px; max-height: calc(100vh - 190px); overflow-y: auto; }
.admin-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 16px; }
.admin-form-wide { grid-column: 1 / -1; }
.admin-form-section { border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 18px; }
.admin-form-section + .admin-form-section { margin-top: 16px; }
.admin-section-head { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 14px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.admin-section-head > span { width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--navy); color: #fff; font-size: .78rem; font-weight: 800; }
.admin-section-head h3 { color: var(--navy); font-size: 1rem; line-height: 1.3; }
.admin-section-head p { color: var(--muted); font-size: .8rem; margin-top: 3px; }
.field-help { display: block; margin-top: 5px; color: var(--muted); font-size: .75rem; line-height: 1.45; }
.admin-risk-source { margin-bottom: 16px; padding: 12px 14px; border: 1px solid #cddceb; border-left: 4px solid var(--navy); border-radius: 7px; background: #f7f9fc; }
.admin-risk-source > p { color: var(--muted); font-size: .82rem; }
.admin-risk-source dl { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px 14px; }
.admin-risk-source div { min-width: 0; }
.admin-risk-source dt { color: var(--muted); font-size: .68rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.admin-risk-source dd { color: var(--ink); font-size: .82rem; font-weight: 600; overflow-wrap: anywhere; }
.admin-subgrid { min-width: 0; margin: 0 0 16px; padding: 14px 14px 0; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfb; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0 16px; }
.admin-subgrid[hidden] { display: none; }
.admin-subgrid legend { padding: 0 8px; color: var(--navy); font-size: .78rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.admin-premium-breakdown { margin-top: 2px; margin-bottom: 0; }
.admin-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--line); background: #fbfcfb; }

/* Controlled client-validity workflow */
.validity-workflow { border: 1px solid var(--line); border-top: 4px solid var(--brand-orange); background: #fff; box-shadow: var(--shadow); }
.validity-flow-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 22px 24px 18px; }
.validity-flow-head h2 { margin-top: 5px; color: var(--navy); font-size: 1.18rem; }
.validity-flow-head p { max-width: 72ch; margin-top: 5px; color: var(--muted); font-size: .86rem; }
.validity-steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-block: 1px solid var(--line); background: #fbfcfb; }
.validity-steps li { display: flex; align-items: center; gap: 9px; min-height: 58px; padding: 10px 16px; border-right: 1px solid var(--line); color: var(--navy); font-size: .78rem; font-weight: 700; }
.validity-steps li:last-child { border-right: 0; }
.validity-steps span { display: grid; width: 25px; height: 25px; flex: none; place-items: center; border: 1px solid var(--brand-teal); border-radius: 50%; background: #f3fcfd; color: var(--navy); font-size: .72rem; }
.validity-picker { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; align-items: end; gap: 14px; padding: 20px 24px 4px; }
.validity-result { margin: 0 24px 22px; border: 1px solid #cddceb; border-left: 4px solid var(--brand-teal); background: #f8fcfd; padding: 16px 18px; }
.validity-result > p { color: var(--muted); font-size: .86rem; }
.validity-client-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 13px; }
.validity-client-head h3 { color: var(--navy); font-size: 1rem; }
.validity-client-head p { color: var(--muted); font-size: .78rem; }
.validity-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.validity-summary span { padding: 6px 9px; border: 1px solid var(--line); background: #fff; font-size: .76rem; font-weight: 700; }
.validity-records { display: grid; gap: 7px; }
.validity-record { display: grid; grid-template-columns: 90px minmax(0,1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.validity-record:first-child { border-top: 0; }
.validity-record strong { color: var(--navy); font-size: .82rem; }
.validity-record small { display: block; color: var(--muted); font-size: .72rem; }
.validity-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.validity-form-panel { border: 1px solid var(--line); background: #fff; box-shadow: 0 5px 18px rgba(8,59,69,.04); }
.validity-form-panel summary { padding: 16px 18px; color: var(--navy); cursor: pointer; font: 700 .94rem var(--display); list-style-position: inside; }
.validity-form-panel[open] summary { border-bottom: 1px solid var(--line); }
.validity-form-panel form { padding: 18px; }
.validity-inline { min-height: 42px; padding: 10px 12px; border: 1px solid #cddceb; border-left: 3px solid var(--brand-teal); background: #f8fcfd; color: var(--muted); font-size: .8rem; }
.calculated-output { display: flex; align-items: center; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line); background: #f4f7fb; color: var(--navy); font-weight: 800; }
.admin-adjustment-grid { margin-top: 16px; }

@media (max-width: 992px) {
  .form-aside-grid, .claim-aside-grid { grid-template-columns: 1fr; }
  .validity-actions { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .skeleton-stat-row { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .skeleton-panel-grid { grid-template-columns: 1fr; }
  .portal-skeleton { min-height: 680px; }
}

@media (prefers-reduced-motion: reduce) {
  .jawany-progress-bar,
  .btn.is-loading::before,
  button.is-loading::before,
  .skeleton-line,
  .skeleton-stat { animation: none; }
  .jawany-progress-bar { width: 100%; transform: none; }
  .skeleton-line,
  .skeleton-stat { background: #edf1f5; }
}

@media print {
  .jawany-progress,
  .portal-skeleton,
  .btn.is-loading::before,
  button.is-loading::before { display: none !important; }
  .app[aria-busy="true"] .content > :not(.portal-skeleton) {
    opacity: 1 !important; pointer-events: auto !important;
  }
}

@media (max-width: 520px) {
  .application-journey { padding: 17px 14px; }
  .account-benefits-strip { padding: 16px 13px; }
  .facility-header { align-items: stretch; flex-direction: column; }
  .facility-header .btn { width: 100%; justify-content: center; }
  .facility-grid { grid-template-columns: 1fr; }
  .journey-head { flex-direction: column; gap: 10px; }
  .journey-progress { margin-inline: -4px; }
  .journey-step small { font-size: .62rem; }
  .journey-step > span { width: 28px; height: 28px; }
  .journey-step::before { top: 13px; }
  .journey-actions { display: grid; grid-template-columns: 1fr; }
  .journey-actions .btn { width: 100%; justify-content: center; }
  .topnav-right { gap: 8px; }
  .page-actions, .split-actions { display: grid; grid-template-columns: 1fr; }
  .page-actions .btn, .split-actions .btn { width: 100%; justify-content: center; }
  .doc-row { align-items: flex-start; flex-wrap: wrap; }
  .doc-row .btn { margin-left: 58px; }
  .table-tools { align-items: stretch; flex-direction: column; }
  .table-tools label, .table-tools .btn { width: 100%; }
  .table-pager { align-items: flex-start; flex-direction: column; }
  .admin-form-grid { grid-template-columns: 1fr; }
  .admin-subgrid, .admin-risk-source dl { grid-template-columns: 1fr; }
  .admin-form-wide { grid-column: auto; }
  .admin-dialog-head { align-items: stretch; flex-direction: column; }
  .validity-flow-head { flex-direction: column; }
  .validity-steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .validity-steps li:nth-child(2) { border-right: 0; }
  .validity-steps li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .validity-picker { grid-template-columns: 1fr; }
  .validity-result { margin-inline: 16px; }
  .validity-record { grid-template-columns: 1fr; gap: 3px; }
}

@media (max-width: 768px) {
  .topnav { padding: 13px 16px; min-height: 64px; }
  .topnav .page-title p { display: none; }
  .content { padding: 22px 16px 32px; }
  .burger { width: 44px; height: 44px; display: grid; place-items: center; }
  .sidebar { overflow-y: auto; overscroll-behavior: contain; }
  body.sidebar-open { overflow: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
