/* ==========================================================================
   OrthoVentures Australia — Website & Agent Portal
   Design system built to the OrthoVentures Brand Guidelines v1.0
   Brand Blue #1E1EA0 · Navy #0E0E50 · Dark Grey #444444 · Off White #F5F5F7
   Typeface: Montserrat
   ========================================================================== */

:root {
  /* Brand colour system */
  --ov-blue:        #1E1EA0;
  --ov-blue-600:    #1A1A8C;
  --ov-blue-050:    #ECECF8;
  --ov-navy:        #0E0E50;
  --ov-navy-700:    #15155f;
  --ov-grey:        #444444;
  --ov-grey-500:    #6b6b75;
  --ov-grey-300:    #b9b9c2;
  --ov-line:        #e4e4ee;
  --ov-offwhite:    #F5F5F7;
  --ov-white:       #FFFFFF;

  /* Semantic */
  --ov-success:     #1b8a5a;
  --ov-success-bg:  #e7f4ee;
  --ov-warn:        #b07a00;
  --ov-warn-bg:     #fbf2dc;
  --ov-danger:      #b3261e;
  --ov-danger-bg:   #fbe9e8;

  /* Type */
  --font: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(14,14,80,.06), 0 1px 3px rgba(14,14,80,.05);
  --shadow-md: 0 4px 16px rgba(14,14,80,.08);
  --shadow-lg: 0 18px 48px rgba(14,14,80,.16);
  --header-h: 76px;
}

/* ----- Reset / base ----- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ov-grey);
  background: var(--ov-white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--ov-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ov-navy); margin: 0 0 .5em; line-height: 1.2; }
h1 { font-weight: 700; font-size: clamp(30px, 4.4vw, 46px); letter-spacing: .01em; }
h2 { font-weight: 700; font-size: clamp(24px, 3vw, 32px); letter-spacing: .005em; }
h3 { font-weight: 600; font-size: 20px; }
h4 { font-weight: 600; font-size: 16px; }
p { margin: 0 0 1rem; }

.label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 11px;
  color: var(--ov-blue);
}
.subtext { font-weight: 300; letter-spacing: .04em; color: var(--ov-grey-500); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 84px 0; }
.section--tight { padding: 56px 0; }
.bg-offwhite { background: var(--ov-offwhite); }
.bg-navy { background: var(--ov-navy); color: rgba(255,255,255,.86); }
.bg-navy h1, .bg-navy h2, .bg-navy h3 { color: #fff; }
.center { text-align: center; }
.muted { color: var(--ov-grey-500); }
.maxw-680 { max-width: 680px; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ----- Buttons ----- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-weight: 600; font-size: 14px; letter-spacing: .02em;
  padding: 12px 24px; border-radius: var(--radius-sm); border: 1.5px solid transparent;
  cursor: pointer; transition: all .16s ease; text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--ov-blue); color: #fff; }
.btn-primary:hover { background: var(--ov-blue-600); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; color: var(--ov-blue); border-color: var(--ov-blue); }
.btn-outline:hover { background: var(--ov-blue); color: #fff; }
.btn-ghost { background: transparent; color: var(--ov-grey); border-color: var(--ov-line); }
.btn-ghost:hover { border-color: var(--ov-blue); color: var(--ov-blue); }
.btn-white { background: #fff; color: var(--ov-navy); }
.btn-white:hover { background: var(--ov-offwhite); }
.btn-lg { padding: 15px 32px; font-size: 15px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ----- Site header ----- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ov-line);
  height: var(--header-h); display: flex; align-items: center;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand-logo img { height: 38px; width: auto; }
.nav { display: flex; align-items: center; gap: 8px; }
.nav a.navlink {
  color: var(--ov-grey); font-weight: 600; font-size: 14px;
  padding: 8px 14px; border-radius: 6px; transition: all .15s;
}
.nav a.navlink:hover { color: var(--ov-blue); background: var(--ov-offwhite); text-decoration: none; }
.nav a.navlink.active { color: var(--ov-blue); }
.nav-spacer { width: 1px; height: 24px; background: var(--ov-line); margin: 0 6px; }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ov-navy); margin: 4px 0; transition: .2s; }

/* ----- Hero ----- */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(150deg, var(--ov-navy) 0%, var(--ov-blue) 130%);
  color: #fff; padding: 96px 0 104px;
}
.hero::after {
  content: ""; position: absolute; right: -120px; top: -80px; width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(255,255,255,.10) 0%, transparent 62%);
  pointer-events: none;
}
.hero .label { color: #9fa0e8; }
.hero h1 { color: #fff; max-width: 16ch; }
.hero p.lead { font-size: 18px; font-weight: 300; letter-spacing: .01em; color: rgba(255,255,255,.85); max-width: 56ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }
.hero-watermark {
  position: absolute; right: -40px; bottom: -60px; width: 360px; opacity: .07;
  pointer-events: none; user-select: none;
}

/* ----- Cards / grids ----- */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: #fff; border: 1px solid var(--ov-line); border-radius: var(--radius);
  padding: 28px; transition: all .18s ease;
}
.card--hover:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: #d8d8ec; }

/* Partner tiles */
/* Hip & knee icon pair, centred under the partnerships heading */
.joint-icons { display: flex; gap: 14px; justify-content: center; margin: 24px 0 0; }
.joint-icon {
  width: 92px; height: 92px; display: flex; align-items: center; justify-content: center;
  background: #fff; border: 1px solid var(--ov-line); border-radius: 14px; box-shadow: var(--shadow-sm);
  padding: 10px;
}
.joint-icon img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; display: block; }

.partner-tile { display: flex; flex-direction: column; height: 100%; text-align: center; }
.partner-logo {
  height: 90px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.partner-logo img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; object-position: center; }
.partner-logo[data-supplier="microport"] img,
.partner-logo[data-supplier="evolutis"] img { max-height: 56px; }
.partner-logo[data-supplier="permedica"] img { max-height: 90px; }
.partner-logo .wordmark { font-weight: 800; font-size: 22px; letter-spacing: .02em; color: var(--ov-navy); }
.partner-tile .cat { font-size: 13px; color: var(--ov-grey-500); margin-bottom: 14px; flex: 1; }
.partner-tile .partner-link { margin-top: 18px; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; justify-content: center; }

/* Feature row */
.feature { display: flex; gap: 16px; align-items: flex-start; }
.feature .ficon {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px;
  background: var(--ov-blue-050); color: var(--ov-blue);
  display: flex; align-items: center; justify-content: center;
}
.feature h4 { margin-bottom: 4px; }
.feature p { font-size: 14px; margin: 0; }

/* ----- Notice / callout ----- */
.notice {
  border-left: 4px solid var(--ov-blue); background: var(--ov-blue-050);
  padding: 16px 20px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 14px; color: var(--ov-navy);
}
.notice--amber { border-color: var(--ov-warn); background: var(--ov-warn-bg); color: #6b4e00; }

/* ----- Footer ----- */
.site-footer { background: var(--ov-navy); color: rgba(255,255,255,.66); padding: 56px 0 28px; }
.site-footer img { height: 34px; margin-bottom: 18px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.site-footer h5 { color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: .14em; margin: 0 0 14px; font-weight: 700; }
.site-footer a { color: rgba(255,255,255,.72); font-size: 14px; display: block; margin-bottom: 9px; }
.site-footer a:hover { color: #fff; }
.footer-bottom {
  margin-top: 40px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  font-size: 12.5px; color: rgba(255,255,255,.5);
}
.footer-disclaimer { font-size: 12px; color: rgba(255,255,255,.45); margin-top: 14px; max-width: 60ch; line-height: 1.6; }

/* ----- Forms ----- */
.field { margin-bottom: 18px; }
.field label, .form-label {
  display: block; font-weight: 600; font-size: 13px; color: var(--ov-navy);
  margin-bottom: 6px;
}
.field .req { color: var(--ov-danger); margin-left: 2px; }
.field .hint { font-size: 12px; color: var(--ov-grey-500); margin-top: 5px; font-weight: 300; }
.input, .select, .textarea {
  width: 100%; font-family: var(--font); font-size: 14px; color: var(--ov-grey);
  padding: 11px 14px; border: 1.5px solid var(--ov-line); border-radius: var(--radius-sm);
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--ov-blue); box-shadow: 0 0 0 3px var(--ov-blue-050);
}
.textarea { resize: vertical; min-height: 110px; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b6b75' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 22px; }
.form-grid .full { grid-column: 1 / -1; }

/* Radio yes/no pills */
.yesno { display: inline-flex; border: 1.5px solid var(--ov-line); border-radius: var(--radius-sm); overflow: hidden; }
.yesno label { margin: 0; cursor: pointer; }
.yesno input { position: absolute; opacity: 0; pointer-events: none; }
.yesno span { display: block; padding: 9px 22px; font-size: 13px; font-weight: 600; color: var(--ov-grey-500); transition: .15s; }
.yesno input:checked + span { background: var(--ov-blue); color: #fff; }
.yesno label + label span { border-left: 1.5px solid var(--ov-line); }

/* File dropzone */
.dropzone {
  border: 2px dashed var(--ov-grey-300); border-radius: var(--radius); padding: 28px;
  text-align: center; color: var(--ov-grey-500); cursor: pointer; transition: .15s; background: var(--ov-offwhite);
}
.dropzone:hover, .dropzone.drag { border-color: var(--ov-blue); background: var(--ov-blue-050); color: var(--ov-blue); }
.filelist { list-style: none; padding: 0; margin: 14px 0 0; }
.filelist li {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; background: #fff;
  border: 1px solid var(--ov-line); border-radius: var(--radius-sm); margin-bottom: 8px; font-size: 13px;
}
.filelist .fname { flex: 1; color: var(--ov-navy); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist .fsize { color: var(--ov-grey-500); font-size: 12px; }
.filelist .fremove { background: none; border: none; color: var(--ov-danger); cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 6px; }

/* ----- Auth / login ----- */
.auth-wrap { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: 1fr 1fr; }
.auth-art {
  background: linear-gradient(160deg, var(--ov-navy), var(--ov-blue));
  color: #fff; padding: 64px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden;
}
.auth-art img { height: 42px; margin-bottom: 40px; }
.auth-art h2 { color: #fff; max-width: 14ch; }
.auth-art .pts { list-style: none; padding: 0; margin: 28px 0 0; }
.auth-art .pts li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 16px; font-size: 15px; font-weight: 300; color: rgba(255,255,255,.85); }
.auth-art .pts svg { flex: 0 0 22px; margin-top: 2px; }
.auth-form-side { display: flex; align-items: center; justify-content: center; padding: 48px; }
.auth-card { width: 100%; max-width: 380px; }
.auth-card h1 { font-size: 28px; margin-bottom: 6px; }

/* ----- Portal layout ----- */
.portal { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; background: var(--ov-offwhite); }
.portal-side { background: var(--ov-navy); color: rgba(255,255,255,.8); padding: 22px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.portal-side .brand { padding: 6px 10px 22px; }
.portal-side .brand img { height: 30px; }
.portal-nav { list-style: none; padding: 0; margin: 0; flex: 1; }
.portal-nav .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: rgba(255,255,255,.4); padding: 16px 12px 8px; font-weight: 700; }
.portal-nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 8px;
  color: rgba(255,255,255,.78); font-size: 14px; font-weight: 500; cursor: pointer; transition: .14s; margin-bottom: 2px;
}
.portal-nav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.portal-nav a.active { background: var(--ov-blue); color: #fff; }
.portal-nav a svg { flex: 0 0 18px; opacity: .9; }
.portal-user { border-top: 1px solid rgba(255,255,255,.12); padding-top: 14px; margin-top: 8px; }
.portal-user .who { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ov-blue); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: 0 0 34px; }
.avatar-sm { width: 28px; height: 28px; flex: 0 0 28px; font-size: 11px; }
.who-cell { display: flex; align-items: center; gap: 10px; }
.portal-user .who .nm { font-size: 13px; color: #fff; font-weight: 600; line-height: 1.3; }
.portal-user .who .rl { font-size: 11px; color: rgba(255,255,255,.55); }

.portal-main { padding: 0; overflow-x: hidden; }
.portal-topbar {
  background: #fff; border-bottom: 1px solid var(--ov-line); padding: 16px 36px;
  display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10;
}
.portal-topbar h1 { font-size: 22px; margin: 0; }
.portal-content { padding: 32px 36px 60px; max-width: 1100px; }

/* Stat cards */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 30px; }
.stat { background: #fff; border: 1px solid var(--ov-line); border-radius: var(--radius); padding: 20px 22px; }
.stat .n { font-size: 30px; font-weight: 700; color: var(--ov-navy); line-height: 1; }
.stat .l { font-size: 12.5px; color: var(--ov-grey-500); margin-top: 8px; font-weight: 500; }

/* Section header inside portal */
.psec { background: #fff; border: 1px solid var(--ov-line); border-radius: var(--radius); margin-bottom: 24px; overflow: hidden; }
.psec-head { padding: 18px 24px; border-bottom: 1px solid var(--ov-line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.psec-head h3 { margin: 0; }
.psec-body { padding: 24px; }
.psec-body.flush { padding: 0; }

/* Supplier resource block */
.supplier-head { display: flex; align-items: center; gap: 16px; }
.supplier-badge { width: 52px; height: 52px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; color: #fff; flex: 0 0 52px; }
.reslist { list-style: none; padding: 0; margin: 0; }
.reslist li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--ov-line); }
.reslist li:last-child { border-bottom: none; }
.reslist .ricon { width: 38px; height: 38px; border-radius: 8px; background: var(--ov-offwhite); display: flex; align-items: center; justify-content: center; color: var(--ov-blue); flex: 0 0 38px; }
.reslist .rmeta { flex: 1; }
.reslist .rmeta .rt { font-weight: 600; font-size: 14px; color: var(--ov-navy); }
.reslist .rmeta .rd { font-size: 12.5px; color: var(--ov-grey-500); }
.tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 9px; border-radius: 20px; }
.tag-link { background: var(--ov-blue-050); color: var(--ov-blue); }
.tag-pdf { background: #fbe9e8; color: #b3261e; }
.tag-form { background: #e7f4ee; color: #1b8a5a; }
.tag-doc { background: #eef0fb; color: #3a3ad0; }

/* ----- Tables ----- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tbl th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--ov-grey-500); font-weight: 700; padding: 13px 18px; border-bottom: 1px solid var(--ov-line); background: var(--ov-offwhite);
  white-space: nowrap;
}
table.tbl td { padding: 14px 18px; border-bottom: 1px solid var(--ov-line); color: var(--ov-grey); vertical-align: middle; }
table.tbl tbody tr { cursor: pointer; transition: background .12s; }
table.tbl tbody tr:hover { background: var(--ov-blue-050); }
table.tbl tbody tr:last-child td { border-bottom: none; }
.ref-cell { font-weight: 700; color: var(--ov-navy); }

/* Status pills */
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 4px 11px; border-radius: 20px; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-new { background: var(--ov-blue-050); color: var(--ov-blue); }
.status-review { background: var(--ov-warn-bg); color: var(--ov-warn); }
.status-progress { background: #e9f0fb; color: #2d5fc0; }
.status-closed { background: var(--ov-success-bg); color: var(--ov-success); }

/* Detail view */
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--ov-line); border-radius: var(--radius); overflow: hidden; }
.detail-grid .dcell { padding: 14px 20px; border-bottom: 1px solid var(--ov-line); }
.detail-grid .dcell:nth-child(odd) { border-right: 1px solid var(--ov-line); }
.detail-grid .dk { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ov-grey-500); font-weight: 700; margin-bottom: 4px; }
.detail-grid .dv { font-size: 14px; color: var(--ov-navy); font-weight: 500; }
.detail-section-title { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ov-blue); font-weight: 700; margin: 28px 0 12px; }

/* Attachments preview */
.attach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 12px; }
.attach { border: 1px solid var(--ov-line); border-radius: var(--radius-sm); padding: 12px; text-align: center; background: #fff; }
.attach .ico { color: var(--ov-blue); margin-bottom: 8px; }
.attach .an { font-size: 12px; color: var(--ov-navy); font-weight: 500; word-break: break-word; }
.attach .as { font-size: 11px; color: var(--ov-grey-500); }

/* Toast / banner */
.toast {
  position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ov-navy); color: #fff; padding: 14px 22px; border-radius: 10px; box-shadow: var(--shadow-lg);
  font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: all .3s ease; z-index: 200;
  display: flex; align-items: center; gap: 10px; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--ov-success); }

/* Prototype ribbon */
.proto-ribbon {
  background: repeating-linear-gradient(45deg, var(--ov-navy), var(--ov-navy) 12px, #16165c 12px, #16165c 24px);
  color: #fff; text-align: center; font-size: 12px; letter-spacing: .04em; padding: 7px 16px; font-weight: 500;
}
.proto-ribbon strong { color: #fff; }

/* Email preview (notification mock) */
.email-preview { border: 1px solid var(--ov-line); border-radius: var(--radius); overflow: hidden; }
.email-preview .eph { background: var(--ov-offwhite); padding: 14px 20px; border-bottom: 1px solid var(--ov-line); font-size: 13px; }
.email-preview .eph .erow { display: flex; gap: 8px; margin-bottom: 4px; }
.email-preview .eph .erow b { color: var(--ov-navy); min-width: 56px; }
.email-preview .epb { padding: 22px; font-size: 13.5px; }

/* Helpers */
.flex { display: flex; }
.between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-24 { margin-bottom: 24px; }
.wrap-gap { display: flex; flex-wrap: wrap; gap: 10px; }
.hidden { display: none !important; }

/* ----- Responsive ----- */
@media (max-width: 920px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .nav { position: fixed; top: var(--header-h); left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 12px; gap: 4px; border-bottom: 1px solid var(--ov-line); box-shadow: var(--shadow-md); transform: translateY(-150%); transition: transform .25s; }
  .nav.open { transform: translateY(0); }
  .nav a.navlink { padding: 12px 14px; }
  .nav-spacer { display: none; }
  .nav-toggle { display: block; }
  .nav .btn { margin-top: 6px; }
  /* Portal collapses to single column; sidebar becomes top bar */
  .portal { grid-template-columns: 1fr; }
  .portal-side { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px; padding: 12px; }
  .portal-side .brand { padding: 6px 10px; }
  .portal-nav { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; }
  .portal-nav .grp { display: none; }
  .portal-nav a { margin-bottom: 0; padding: 8px 10px; font-size: 13px; }
  .portal-user { border-top: none; padding-top: 0; margin: 0; margin-left: auto; }
  .portal-user .who { padding: 0; }
  .portal-content { padding: 22px 18px 50px; }
  .portal-topbar { padding: 14px 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid .dcell:nth-child(odd) { border-right: none; }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 72px; }
  .section { padding: 56px 0; }
}

/* ----- HCP confirmation gate ----- */
.hcp-gate-open { overflow: hidden; }
.hcp-gate {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(14, 14, 80, .82);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; overflow-y: auto;
  animation: hcp-fade .18s ease-out;
}
@keyframes hcp-fade { from { opacity: 0; } to { opacity: 1; } }
.hcp-gate__card {
  background: var(--ov-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-width: 640px; width: 100%;
  padding: 40px 40px 36px;
  text-align: left;
  animation: hcp-rise .22s ease-out;
}
@keyframes hcp-rise { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.hcp-gate__logo { width: 180px; height: auto; margin-bottom: 24px; }
.hcp-gate__card .label { margin-bottom: 10px; }
.hcp-gate__card h2 {
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.35;
  margin-bottom: 14px;
}
.hcp-gate__card h2 strong { color: var(--ov-blue); font-weight: 700; }
.hcp-gate__card p { color: var(--ov-grey); font-size: 14.5px; }
.hcp-gate__actions {
  display: flex; gap: 12px;
  margin-top: 28px; flex-wrap: wrap;
}
.hcp-gate__actions .btn { flex: 1 1 220px; }
@media (max-width: 520px) {
  .hcp-gate__card { padding: 28px 22px 24px; }
  .hcp-gate__logo { width: 150px; margin-bottom: 18px; }
  .hcp-gate__actions { flex-direction: column; }
  .hcp-gate__actions .btn { flex: 0 0 auto; width: 100%; }
}

/* ----- Adverse event classification (portal complaint form) ----- */
.ae-class { display: grid; gap: 10px; }
.ae-class label {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 14px; background: #fff; border: 1.5px solid var(--ov-line);
  border-radius: var(--radius-sm); cursor: pointer; transition: border-color .15s ease, background .15s ease;
}
.ae-class label:hover { border-color: var(--ov-blue); }
.ae-class label:has(input:checked) { border-color: var(--ov-danger); background: #fff; box-shadow: 0 0 0 3px rgba(179,38,30,.08); }
.ae-class input[type=radio] { margin-top: 4px; accent-color: var(--ov-danger); }
.ae-class span { display: block; }
.ae-class strong { display: block; color: var(--ov-navy); font-weight: 600; font-size: 14.5px; }
.ae-class .due {
  display: inline-block; margin: 2px 0 4px;
  font: 700 11px/1 var(--font); color: var(--ov-danger);
  letter-spacing: .08em; text-transform: uppercase;
}
.ae-class .hint { display: block; color: var(--ov-grey-500); font-size: 12.5px; line-height: 1.45; }

/* Submission detail toolbar */
.submission-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }

/* Complaint / event page — instructions + download list */
.instr-list { padding-left: 22px; line-height: 1.75; margin: 0; color: var(--ov-grey); }
.instr-list li { margin-bottom: 6px; }
.complaint-form-list { display: grid; gap: 12px; }
.complaint-form-card {
  display: flex; align-items: center; gap: 16px;
  padding: 16px 18px;
}
.complaint-form-card .supplier-badge { flex: 0 0 44px; width: 44px; height: 44px; font-size: 15px; }
.complaint-form-card .cf-meta { flex: 1; min-width: 0; }
.complaint-form-card .cf-name { font-weight: 600; color: var(--ov-navy); font-size: 15px; }
.complaint-form-card .cf-note { color: var(--ov-grey-500); font-size: 12.5px; margin-top: 2px; }
.complaint-form-card .btn { flex-shrink: 0; }
@media (max-width: 560px) {
  .complaint-form-card { flex-wrap: wrap; }
  .complaint-form-card .btn { flex-basis: 100%; justify-content: center; }
}

/* Print-only attachment images (rendered inline in the PDF export) */
.print-only-block { display: none; }
.print-image { margin: 0; padding: 0; }
.print-image img { max-width: 100%; }

/* Resource folders (agent-facing, collapsible) */
.res-folder + .res-folder { margin-top: 10px; }
.res-folder { border-radius: var(--radius-sm); overflow: hidden; }
.res-folder > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 10px;
  font-size: 12.5px; font-weight: 700; color: var(--ov-navy);
  letter-spacing: .06em; text-transform: uppercase;
  padding: 10px 14px;
  background: var(--ov-blue-050); border-radius: var(--radius-sm);
  transition: background .15s;
}
.res-folder > summary::-webkit-details-marker { display: none; }
.res-folder > summary:hover { background: #E0E0F0; }
.res-folder-chev { display: inline-block; transition: transform .18s ease; color: var(--ov-blue); flex-shrink: 0; }
.res-folder[open] > summary .res-folder-chev { transform: rotate(90deg); }
.res-folder-icon { display: inline-flex; align-items: center; color: var(--ov-blue); }
.res-folder-label { flex: 1; }
.res-folder-count { color: var(--ov-grey-500); font-weight: 500; letter-spacing: 0; text-transform: none; }
.res-folder > .reslist { padding-top: 6px; }
.res-folder-body { padding: 4px 0 0; }
.res-subfolder { margin-left: 16px; margin-top: 4px; }
.res-subfolder > summary.res-subfolder-title {
  font-size: 11.5px; letter-spacing: .05em;
  padding: 6px 12px; background: #F1F1F9;
}
.res-subfolder > summary.res-subfolder-title:hover { background: #E4E4F0; }

/* Back-to-top floating button */
.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 40;
  width: 42px; height: 42px; padding: 0; border-radius: 50%;
  border: none; background: var(--ov-blue); color: #fff;
  box-shadow: var(--shadow-md); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(10px) scale(.95);
  pointer-events: none; transition: opacity .18s, transform .18s;
}
.to-top:hover { background: var(--ov-blue-600); }
.to-top.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
@media (max-width: 560px) { .to-top { right: 14px; bottom: 14px; } }

/* Native dialog styling */
.ov-dialog {
  border: none; border-radius: var(--radius);
  padding: 24px 28px; max-width: 560px; width: 92vw;
  box-shadow: var(--shadow-lg);
  color: var(--ov-grey); font-family: var(--font);
}
.ov-dialog::backdrop { background: rgba(14, 14, 80, .55); }
.ov-dialog h3 { color: var(--ov-navy); }
.ov-dialog .form-grid .field.full { grid-column: 1 / -1; }

/* ----- Print / export view for submission ----- */
@media print {
  @page { size: A4; margin: 12mm 14mm; }
  html, body { background: #fff !important; color: #000 !important; }
  .no-print, .site-header, .portal-side, .portal-topbar, .site-footer, .toast, .hcp-gate { display: none !important; }
  .portal { grid-template-columns: 1fr !important; }
  .portal-main { grid-column: 1 / -1 !important; }
  .portal-content { padding: 0 !important; max-width: none !important; }
  .psec { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  .detail-section-title { margin-top: 18px; break-after: avoid; }
  .detail-grid { display: block; }
  .dcell { padding: 6px 0; border: none !important; page-break-inside: avoid; }
  .dcell .dk { font-weight: 700; color: #000; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 2px; }
  .dcell .dv { font-size: 12.5px; color: #000; }
  .attach-grid { display: block; }
  .attach { display: block; padding: 4px 0; border-bottom: 1px dotted #999; page-break-inside: avoid; }
  .attach { font-size: 12.5px; }
  .attach a { color: #000 !important; text-decoration: none !important; }
  a { color: #000 !important; text-decoration: none !important; }
  /* Show embedded attachment images and lay each out cleanly on a page */
  .print-only-block { display: block; }
  .print-images .detail-section-title { margin-top: 18px; }
  .print-image { break-inside: avoid; page-break-inside: avoid; margin: 12px 0; text-align: center; }
  .print-image img { max-width: 100%; max-height: 85vh; border: 1px solid #999; }
  .print-image figcaption { font-size: 11px; color: #444; margin-top: 4px; }
  h1, h2, h3, h4 { color: #000 !important; }
  .status { border: 1px solid #444; padding: 1px 6px !important; }
}
