/* ═══════════════════════════════════════════════════════════
   Medical Admin Training Portal — Styles
   ═══════════════════════════════════════════════════════════ */

/* ── Login Screen ────────────────────────────────────────── */
#ma-login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #003953;
  padding: 2rem;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}
.ma-login-wrap {
  background: #fff;
  border-radius: 16px;
  padding: 2.75rem 3rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.ma-login-logo {
  display: flex; align-items: center; gap: 12px; margin-bottom: 2rem;
}
.ma-login-dot {
  width: 44px; height: 44px; border-radius: 50%;
  background: #f15a26; color: #003953;
  font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.ma-login-title { font-size: 18px; font-weight: 700; color: #003953; }
.ma-login-sub   { font-size: 12px; color: #6b8060; }
.ma-login-heading { font-size: 1.5rem; font-weight: 700; color: #1a2a1f; margin-bottom: .5rem; }
.ma-login-desc    { font-size: 13.5px; color: #6b8060; margin-bottom: 1.75rem; }
.ma-login-error {
  background: #FDEAEA; border: 1px solid #E05555; border-radius: 8px;
  padding: .75rem 1rem; font-size: 13.5px; color: #5a0000;
  margin-bottom: 1.25rem;
}
.ma-login-field { margin-bottom: 1.1rem; }
.ma-login-field label { display: block; font-size: 13px; font-weight: 600; color: #2d4021; margin-bottom: .4rem; }
.ma-login-field input {
  width: 100%; padding: .75rem 1rem;
  border: 1.5px solid #C8DCC0; border-radius: 8px;
  font-size: 14.5px; font-family: inherit; color: #1a2a1f;
  outline: none; transition: border-color .12s;
}
.ma-login-field input:focus { border-color: #57873d; }
.ma-login-submit {
  width: 100%; padding: .85rem;
  background: #57873d; color: #fff;
  border: none; border-radius: 8px;
  font-size: 15px; font-weight: 600; font-family: inherit;
  cursor: pointer; margin-top: .5rem;
  transition: background .12s;
}
.ma-login-submit:hover   { background: #3d6129; }
.ma-login-submit:disabled { opacity: .5; cursor: default; }
.ma-login-help { font-size: 12.5px; color: #6b8060; text-align: center; margin-top: 1.25rem; }

/* ── Change Password Modal ───────────────────────────────── */
.ma-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
}
.ma-modal {
  background: #fff; border-radius: 14px; padding: 2rem 2.25rem;
  width: 100%; max-width: 400px; box-shadow: 0 16px 50px rgba(0,0,0,.25);
}
.ma-modal h3 { font-size: 1.1rem; font-weight: 700; color: #003953; margin-bottom: 1.25rem; }
.ma-modal-field { margin-bottom: .9rem; }
.ma-modal-field label { display:block; font-size:12.5px; font-weight:600; color:#2d4021; margin-bottom:.35rem; }
.ma-modal-field input { width:100%; padding:.65rem .9rem; border:1.5px solid #C8DCC0; border-radius:7px; font-size:14px; font-family:inherit; outline:none; }
.ma-modal-field input:focus { border-color:#57873d; }
.ma-modal-btns { display:flex; gap:.7rem; margin-top:1.25rem; }
.ma-modal-save   { flex:1; padding:.65rem; background:#57873d; color:#fff; border:none; border-radius:7px; font-size:14px; font-weight:600; cursor:pointer; font-family:inherit; }
.ma-modal-cancel { flex:1; padding:.65rem; background:transparent; color:#57873d; border:1.5px solid #57873d; border-radius:7px; font-size:14px; font-weight:500; cursor:pointer; font-family:inherit; }
.ma-modal-msg { font-size:13px; margin-top:.75rem; padding:.6rem .9rem; border-radius:7px; }
.ma-modal-msg.ok  { background:#EAF2E3; color:#1a3a10; }
.ma-modal-msg.bad { background:#FDEAEA; color:#5a0000; }

/* ── Portal Styles ───────────────────────────────────────── */
:root {
  --blue:       #003953;
  --blue-mid:   #005070;
  --green:      #57873d;
  --green-dark: #3d6129;
  --orange:     #f15a26;
  --light:      #F0F5EC;
  --card:       #FFFFFF;
  --bg:         #F2F5F0;
  --text:       #1a2a1f;
  --mid:        #2d4021;
  --muted:      #6b8060;
  --border:     #C8DCC0;
  --success:    #57873d;
  --danger:     #E05555;
  --ok-bg:      #EAF2E3;
  --err-bg:     #FDEAEA;
  --warn-bg:    #FEF0EA;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'DM Sans', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; }

/* ── NAV ── */
.topnav {
  background: var(--blue);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; height: 58px;
  position: sticky; top: 0; z-index: 100;
  border-bottom: 3px solid var(--orange);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-dot { width: 30px; height: 30px; border-radius: 50%; background: var(--orange); color: var(--blue); font-weight: 700; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.brand-name { color: #fff; font-weight: 600; font-size: 16px; }
.brand-sub  { color: rgba(255,255,255,0.55); font-size: 11px; }
.prog-pill  { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 20px; padding: 5px 14px; color: #fff; font-size: 12px; }

/* ── LAYOUT ── */
.layout { display: flex; max-width: 1280px; margin: 0 auto; min-height: calc(100vh - 58px); }
.sidebar {
  width: 248px; flex-shrink: 0;
  background: var(--card); border-right: 1px solid var(--border);
  padding: 1.25rem 0;
  position: sticky; top: 58px; height: calc(100vh - 58px); overflow-y: auto;
}
.sb-label { font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding: .65rem 1.2rem .3rem; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: .6rem 1.2rem; cursor: pointer; border-left: 3px solid transparent; font-size: 13.5px; color: var(--mid); transition: background .12s; }
.nav-item:hover { background: var(--light); color: var(--green); }
.nav-item.active { background: var(--light); border-left-color: var(--green); color: var(--green); font-weight: 500; }
.nav-item.done .nav-num { background: var(--green); color: #fff; }
.nav-num { width: 22px; height: 22px; border-radius: 50%; background: var(--light); color: var(--green); font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-item.active .nav-num { background: var(--blue); color: #fff; }

/* ── MAIN ── */
.main { flex: 1; padding: 2rem 2.5rem; max-width: 900px; }
.section { display: none; }
.section.active { display: block; }

/* ── HERO ── */
.hero { background: var(--blue); border-radius: 14px; padding: 2.25rem 2.75rem; margin-bottom: 1.75rem; position: relative; overflow: hidden; }
.hero::after  { content:''; position:absolute; right:-30px; top:-30px; width:200px; height:200px; border-radius:50%; background:var(--blue-mid); opacity:.4; }
.hero::before { content:''; position:absolute; right:60px; bottom:-50px; width:150px; height:150px; border-radius:50%; background:var(--orange); opacity:.12; }
.hero-badge { display:inline-flex; align-items:center; gap:6px; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.2); border-radius:20px; padding:4px 12px; color:var(--orange); font-size:11.5px; font-weight:500; margin-bottom:.85rem; position:relative; z-index:1; }
.hero h1  { font-family:'DM Serif Display',serif; font-size:2rem; color:#fff; margin-bottom:.4rem; position:relative; z-index:1; line-height:1.2; }
.hero p   { color:rgba(255,255,255,.7); font-size:14px; max-width:500px; position:relative; z-index:1; }

/* ── MODULE GRID ── */
.mod-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:.9rem; margin-bottom:1.75rem; }
.mod-card { background:var(--card); border:1px solid var(--border); border-radius:11px; padding:1.1rem; cursor:pointer; display:flex; gap:11px; align-items:flex-start; transition:box-shadow .12s, border-color .12s; }
.mod-card:hover { box-shadow:0 4px 14px rgba(0,57,83,.09); border-color:var(--green); }
.mod-icon { width:38px; height:38px; border-radius:9px; background:var(--light); display:flex; align-items:center; justify-content:center; font-size:17px; flex-shrink:0; }
.mod-card h3 { font-size:13.5px; font-weight:600; margin-bottom:3px; color:var(--text); }
.mod-card p  { font-size:11.5px; color:var(--muted); line-height:1.5; }

/* ── CONTENT CARDS ── */
.cc { background:var(--card); border:1px solid var(--border); border-radius:12px; padding:1.6rem 1.85rem; margin-bottom:1.4rem; }
.cc h2 { font-family:'DM Serif Display',serif; font-size:1.35rem; color:var(--blue); margin-bottom:.9rem; }
.cc h3 { font-size:14.5px; font-weight:600; color:var(--text); margin:1.1rem 0 .5rem; }
.cc h4 { font-size:13px; font-weight:600; color:var(--blue); margin-bottom:.4rem; }
.cc p  { font-size:13.5px; color:var(--mid); line-height:1.7; }

.hl  { background:var(--light); border-left:4px solid var(--green); border-radius:0 8px 8px 0; padding:.9rem 1.1rem; margin:.9rem 0; font-size:13.5px; color:var(--mid); line-height:1.6; }
.warn { background:var(--warn-bg); border-left:4px solid var(--orange); border-radius:0 8px 8px 0; padding:.9rem 1.1rem; margin:.9rem 0; font-size:13.5px; color:#7A3A10; line-height:1.6; }
.info { background:#EAF1F7; border-left:4px solid var(--blue); border-radius:0 8px 8px 0; padding:.9rem 1.1rem; margin:.9rem 0; font-size:13.5px; color:#00293D; line-height:1.6; }

.ol { list-style:none; padding:0; }
.ol li { display:flex; gap:11px; align-items:flex-start; padding:.65rem 0; border-bottom:1px solid var(--border); font-size:13.5px; color:var(--mid); line-height:1.6; }
.ol li:last-child { border-bottom:none; }
.ol-num { width:24px; height:24px; border-radius:50%; background:var(--green); color:#fff; font-size:11px; font-weight:600; display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:2px; }
.ol-num.blue { background:var(--blue); }
.ol-num.org  { background:var(--orange); }
.ol-title { font-weight:600; color:var(--blue); min-width:160px; }

.ul { list-style:none; padding:0; }
.ul li { padding:.35rem 0 .35rem 1.4rem; font-size:13.5px; color:var(--mid); line-height:1.6; position:relative; }
.ul li::before { content:''; position:absolute; left:0; top:.75rem; width:7px; height:7px; border-radius:50%; background:var(--orange); }

.two-col  { display:grid; grid-template-columns:1fr 1fr; gap:.9rem; margin:.9rem 0; }
.three-col { display:grid; grid-template-columns:1fr 1fr 1fr; gap:.9rem; margin:.9rem 0; }
.mini { background:var(--light); border-radius:9px; padding:.95rem 1.1rem; }
.mini h4 { font-size:12.5px; font-weight:600; color:var(--blue); margin-bottom:.4rem; }
.mini p, .mini li { font-size:12.5px; color:var(--mid); line-height:1.6; }

.tbl { width:100%; border-collapse:collapse; font-size:13px; margin:.9rem 0; }
.tbl th { background:var(--blue); color:#fff; padding:.6rem .9rem; text-align:left; font-weight:500; }
.tbl td { padding:.6rem .9rem; border-bottom:1px solid var(--border); color:var(--mid); }
.tbl tr:hover td { background:var(--light); }
.tbl .g { color:var(--green); font-weight:600; }
.tbl .o { color:var(--orange); font-weight:600; }
.tbl .b { color:var(--blue); font-weight:600; }

/* ── VIDEO ── */
.vid-wrap { background:var(--blue); border-radius:13px; overflow:hidden; margin-bottom:1.4rem; }
.vid-hdr  { padding:1.1rem 1.6rem; }
.vid-hdr h2 { color:#fff; font-family:'DM Serif Display',serif; font-size:1.25rem; }
.vid-hdr p  { color:rgba(255,255,255,.6); font-size:12.5px; }
.vid-embed-bar { padding:1.1rem 1.6rem; background:rgba(255,255,255,.06); border-bottom:1px solid rgba(255,255,255,.1); }
.vid-embed-bar p { color:rgba(255,255,255,.85); font-size:13.5px; font-weight:600; margin-bottom:.55rem; }
.vid-input-row { display:flex; gap:.7rem; align-items:center; flex-wrap:wrap; }
.vid-input { flex:1; min-width:240px; padding:.6rem .95rem; border-radius:7px; border:1.5px solid rgba(255,255,255,.22); background:rgba(255,255,255,.1); color:#fff; font-size:13.5px; font-family:inherit; outline:none; }
.vid-input::placeholder { color:rgba(255,255,255,.4); }
.vid-btn  { padding:.6rem 1.3rem; border-radius:7px; background:var(--orange); border:none; color:#fff; font-size:13.5px; font-weight:600; cursor:pointer; font-family:inherit; white-space:nowrap; }
.vid-clr  { padding:.6rem 1rem; border-radius:7px; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.18); color:rgba(255,255,255,.65); font-size:13.5px; cursor:pointer; font-family:inherit; }
.vid-msg  { margin-top:.5rem; font-size:12px; color:rgba(255,255,255,.5); }
.vid-player { background:#000; position:relative; width:100%; padding-bottom:56.25%; height:0; overflow:hidden; border-radius:8px; }
.vid-placeholder { text-align:center; padding:2rem; z-index:2; position:relative; }
.vid-player iframe, .vid-player video { position:absolute; top:0; left:0; width:100%; height:100%; border:none; border-radius:8px; }
.vid-tip { padding:.9rem 1.6rem; background:rgba(255,255,255,.04); }
.vid-tip p { color:rgba(255,255,255,.45); font-size:11.5px; line-height:1.7; }

/* ── STEPS GRID (video guide) ── */
.vsteps { display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:.7rem; margin-top:.9rem; }
.vstep { background:var(--card); border:1px solid var(--border); border-radius:9px; padding:.9rem; display:flex; gap:9px; align-items:flex-start; }
.vstep-n { width:26px; height:26px; border-radius:50%; background:var(--green); color:#fff; font-size:12px; font-weight:600; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.vstep-title { font-size:12.5px; font-weight:600; color:var(--text); margin-bottom:2px; }
.vstep-desc  { font-size:11.5px; color:var(--muted); line-height:1.5; }

/* ── QUIZ ── */
.quiz-hdr { background:var(--blue); border-radius:13px; padding:1.75rem 2.25rem; margin-bottom:1.75rem; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:1rem; }
.quiz-hdr h1 { color:#fff; font-family:'DM Serif Display',serif; font-size:1.7rem; }
.quiz-hdr p  { color:rgba(255,255,255,.65); font-size:13px; margin-top:3px; }
.qstats { display:flex; gap:1.25rem; }
.qstat .val { font-size:1.7rem; font-weight:600; color:var(--orange); }
.qstat .lbl { font-size:11.5px; color:rgba(255,255,255,.55); }
.qprog-row { display:flex; justify-content:space-between; font-size:12px; color:var(--muted); margin-bottom:.35rem; }
.qprog-bar { background:var(--border); border-radius:4px; height:7px; margin-bottom:1.75rem; overflow:hidden; }
.qprog-fill { height:100%; background:var(--green); border-radius:4px; transition:width .35s; }
.qcard { background:var(--card); border:1px solid var(--border); border-radius:13px; padding:1.75rem; margin-bottom:1.1rem; display:none; }
.qcard.active { display:block; }
.qcat { font-size:10.5px; font-weight:600; letter-spacing:.08em; text-transform:uppercase; background:var(--light); color:var(--green); padding:3px 11px; border-radius:20px; display:inline-block; margin-bottom:.9rem; }
.qtext { font-size:16.5px; font-weight:500; color:var(--text); line-height:1.5; margin-bottom:1.35rem; }
.opts { display:flex; flex-direction:column; gap:.6rem; }
.opt { display:flex; align-items:center; gap:11px; padding:.85rem 1.15rem; background:var(--card); border:1.5px solid var(--border); border-radius:9px; cursor:pointer; font-size:14.5px; color:var(--mid); transition:border-color .1s, background .1s; user-select:none; }
.opt:hover:not(.answered) { border-color:var(--green); background:var(--light); }
.opt.sel:not(.answered) { border-color:var(--green); background:var(--light); }
.opt.correct   { border-color:var(--success); background:var(--ok-bg); color:#1a3a10; }
.opt.incorrect { border-color:var(--danger);  background:var(--err-bg); color:#5a0000; }
.opt.show-ok   { border-color:var(--success); background:var(--ok-bg); color:#1a3a10; opacity:.65; }
.opt-ltr { width:28px; height:28px; border-radius:50%; background:var(--light); color:var(--green); font-size:12.5px; font-weight:600; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.opt.correct  .opt-ltr { background:var(--success); color:#fff; }
.opt.incorrect .opt-ltr { background:var(--danger);  color:#fff; }
.opt.show-ok  .opt-ltr { background:var(--success); color:#fff; }
.fb { display:none; margin-top:.9rem; padding:.85rem 1.1rem; border-radius:9px; font-size:13.5px; line-height:1.6; }
.fb.ok  { background:var(--ok-bg);  border:1px solid var(--success); color:#1a3a10; display:block; }
.fb.bad { background:var(--err-bg); border:1px solid #ffbbbb;         color:#5a0000; display:block; }
.qnav { display:flex; justify-content:space-between; align-items:center; margin-top:1.35rem; }
.btn { padding:.65rem 1.6rem; border-radius:8px; font-size:14px; font-weight:500; cursor:pointer; border:none; font-family:inherit; transition:opacity .1s; }
.btn-p { background:var(--green); color:#fff; }
.btn-p:hover { background:var(--green-dark); }
.btn-p:disabled { opacity:.35; cursor:default; }
.btn-o { background:transparent; color:var(--green); border:1.5px solid var(--green); }
.btn-o:hover { background:var(--light); }

/* ── RESULTS ── */
.results { display:none; }
.results.show { display:block; }
.score-ring { width:130px; height:130px; border-radius:50%; display:flex; flex-direction:column; align-items:center; justify-content:center; border:5px solid var(--green); margin:0 auto 1.25rem; }
.score-pct  { font-size:2.6rem; font-weight:700; color:var(--green); line-height:1; }
.score-lbl  { font-size:12px; color:var(--muted); margin-top:2px; }
.grade { display:inline-block; padding:5px 22px; border-radius:20px; font-size:15px; font-weight:600; }
.grade-pass { background:var(--ok-bg);  color:var(--green-dark); border:1px solid var(--success); }
.grade-fail { background:var(--err-bg); color:#5a0000; border:1px solid #ffbbbb; }
.res-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:.7rem; margin:1.35rem 0; }
.res-stat { background:var(--light); border-radius:9px; padding:.9rem; text-align:center; }
.res-stat .v { font-size:1.5rem; font-weight:700; color:var(--green); }
.res-stat .l { font-size:11.5px; color:var(--muted); margin-top:2px; }
.rev-item { display:flex; gap:9px; align-items:flex-start; padding:.65rem 0; border-bottom:1px solid var(--border); font-size:13.5px; }
.rev-q { color:var(--text); font-weight:500; margin-bottom:2px; }
.rev-a { color:var(--muted); font-size:12.5px; }
.rev-a span { color:var(--success); font-weight:500; }

/* ── SECTION NAV ── */
.snav { display:flex; justify-content:flex-end; gap:.7rem; margin-top:1.75rem; padding-top:1.35rem; border-top:1px solid var(--border); }

/* ── TABS ── */
.tab-bar { display:flex; border-bottom:1px solid var(--border); margin-bottom:1.35rem; }
.tab-btn { padding:.65rem 1.15rem; font-size:13.5px; font-weight:500; cursor:pointer; background:none; border:none; color:var(--muted); border-bottom:2px solid transparent; transition:color .1s; font-family:inherit; margin-bottom:-1px; }
.tab-btn.active { color:var(--green); border-bottom-color:var(--green); }
.tab-pane { display:none; }
.tab-pane.active { display:block; }

/* ── PKG CARDS ── */
.pkg-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(230px,1fr)); gap:.9rem; margin-top:.9rem; }
.pkg { background:var(--light); border-radius:10px; padding:1.1rem; }
.pkg-title { font-size:13px; font-weight:600; margin-bottom:.35rem; }
.pkg-ref   { font-size:11.5px; font-weight:600; background:#fff; border-radius:5px; padding:2px 8px; display:inline-block; margin-bottom:.6rem; }
.pkg .ul li::before { background:var(--green); }

@media(max-width:760px) {
  .sidebar { display:none; }
  .main { padding:1.25rem; }
  .two-col, .three-col { grid-template-columns:1fr; }
  .quiz-hdr { flex-direction:column; align-items:flex-start; }
}

/* ── Portal overrides for WordPress embedding ────────────── */
#ma-portal .topnav { position: sticky; top: 0; z-index: 200; }
#ma-portal { font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif; }
