/* Flunexa UI Repair 2026-08-03 — visual wrappers only. Do not alter backend logic. */
:root{
  --fx-navy:#061a3a;
  --fx-orange:#f4510b;
  --fx-orange-dark:#d84300;
  --fx-ink:#102033;
  --fx-copy:#425466;
  --fx-line:#d7e0ea;
  --fx-soft:#f6f8fb;
  --fx-radius:10px;
  --fx-container:1180px;
  --fx-section-pad:clamp(48px,6vw,88px);
  --fx-header-h:72px;
}

/* ---------- Shared public footer (compact) ---------- */
.site-footer.site-footer-compact,
.public-shell-page .site-footer.site-footer-compact{
  padding:28px 0 0;
}
.site-footer-compact .footer-grid{
  display:grid;
  grid-template-columns:1.35fr repeat(3,minmax(0,1fr));
  gap:22px 28px;
  align-items:start;
  padding-bottom:18px;
}
.site-footer-compact .footer-brand p{
  max-width:36ch;
  margin:10px 0 0;
  font-size:13px;
  line-height:1.55;
}
.site-footer-compact .brand-mark{
  width:34px;height:34px;font-size:15px;
}
.site-footer-compact h3{
  margin:0 0 10px;font-size:12px;letter-spacing:.04em;text-transform:uppercase;
}
.site-footer-compact nav a,
.site-footer-compact address a,
.site-footer-compact address p{
  display:block;margin:0 0 7px;font-size:13px;line-height:1.4;
}
.site-footer-compact .socials{margin-top:12px;gap:6px}
.site-footer-compact .socials a{width:30px;height:30px}
.site-footer-compact .footer-bottom{
  display:flex;flex-wrap:wrap;gap:10px 18px;align-items:center;justify-content:space-between;
  padding:12px 0 16px;border-top:1px solid rgba(255,255,255,.12);font-size:12px;
}
.site-footer-compact .footer-bottom > div{display:flex;flex-wrap:wrap;gap:12px}
.footer-payment-trust{
  display:flex;flex-direction:column;gap:8px;margin-top:14px;max-width:280px;
}
.footer-payment-trust strong{font-size:11px;font-weight:700;color:#d7e0e8}
.footer-payment-logos{
  list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:8px;align-items:center;
}
.footer-payment-logos li{margin:0;padding:0;line-height:0}
.footer-payment-logos img{
  display:block;height:22px;width:auto;max-width:72px;object-fit:contain;
  border-radius:4px;background:transparent;
}
@media (max-width:900px){
  .site-footer-compact .footer-grid{grid-template-columns:1fr 1fr;gap:18px}
}
@media (max-width:640px){
  .site-footer-compact .footer-grid{grid-template-columns:1fr}
  .footer-payment-logos img{height:20px}
}

/* ---------- Public header compact ---------- */
.site-header .header-shell{
  min-height:var(--fx-header-h);
  align-items:center;
}
.site-header .brand-mark{width:36px;height:36px}
.site-header .main-nav a{padding:8px 10px}
.site-header .support-pill{min-height:40px}

/* ---------- Homepage hero repair ---------- */
.fx-approved-home .hero.hero-text-first .hero-grid{
  width:min(var(--fx-container),100%);
  margin-inline:auto;
  grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr);
  gap:clamp(24px,4vw,48px);
  align-items:center;
  padding:clamp(28px,4vw,48px) 20px;
}
.fx-approved-home .hero.hero-text-first .hero-copy{
  max-width:560px;
  padding:0 !important;
  margin:0;
}
.fx-approved-home .hero h1,
.fx-approved-home .hero h1 .hero-title-primary,
.fx-approved-home .hero h1 .hero-title-support{
  max-width:18ch;
  letter-spacing:-.02em !important;
  overflow-wrap:normal;
  word-break:normal;
  hyphens:none;
  -webkit-hyphens:none;
}
.fx-approved-home .hero h1{
  font-size:clamp(2rem,3.6vw,3.35rem) !important;
  line-height:1.12 !important;
}
.fx-approved-home .hero h1 .hero-title-support{
  max-width:28ch;
  font-size:clamp(1.05rem,1.7vw,1.45rem) !important;
  line-height:1.35 !important;
  margin-top:12px;
}
.fx-approved-home .hero-lead{
  max-width:48ch;
  font-size:clamp(.98rem,1.15vw,1.08rem);
}
.fx-approved-home .hero.hero-text-first .hero-figure{
  position:relative;
  min-height:0 !important;
  max-height:560px;
  border-radius:16px;
  overflow:hidden;
  background:linear-gradient(160deg,#eef3f8,#dfe8f2);
  aspect-ratio:4/5;
}
.fx-approved-home .hero-figure picture,
.fx-approved-home .hero-figure img{
  width:100%;
  height:100%;
  object-fit:contain !important;
  object-position:center bottom;
}
.fx-approved-home .hero-figure figcaption{
  right:16px;bottom:16px;left:16px;max-width:none;
}
@media (max-width:991px){
  .fx-approved-home .hero.hero-text-first .hero-grid{
    grid-template-columns:1fr;
    padding-top:24px;
  }
  .fx-approved-home .hero h1,
  .fx-approved-home .hero h1 .hero-title-primary{max-width:none}
  .fx-approved-home .hero.hero-text-first .hero-figure{
    max-height:420px;aspect-ratio:5/4;order:2;
  }
  .fx-approved-home .hero.hero-text-first .hero-copy{order:1}
}

/* Counter / mid sections */
.fx-approved-home .impact-grid,
.fx-approved-home .stat-grid,
.fx-approved-home .proof-grid{
  align-items:stretch;
}
.fx-approved-home .impact-grid > *,
.fx-approved-home .stat-grid > *,
.fx-approved-home .proof-grid > *{
  min-height:0;
  height:100%;
}

/* ---------- Login page ---------- */
.portal-auth-page.login-entry-page .wrap,
body.public-shell-page .login-shell{
  width:min(960px,100%);
  margin:24px auto 40px;
  padding:0 16px;
}
.login-role-toggle,
.role-toggle,
.login-role-chips{
  display:flex;gap:10px;flex-wrap:wrap;margin:0 0 18px;
}
.login-role-toggle a,
.role-toggle a,
.login-role-chips a,
.login-role-chips button{
  flex:1 1 140px;min-height:44px;display:inline-flex;align-items:center;justify-content:center;
  border:1px solid var(--fx-line);border-radius:8px;background:#fff;color:var(--fx-navy);font-weight:700;
}
.login-role-toggle a.active,
.role-toggle a.active,
.login-role-chips a.active,
.login-role-chips .active{
  border-color:var(--fx-orange);background:rgba(244,81,11,.08);color:var(--fx-orange-dark);
}

/* ---------- Dedicated portal shell (Student / Trainer) ---------- */
body.portal-app-shell{
  margin:0;
  padding:0 !important;
  background:var(--fx-soft);
  color:var(--fx-ink);
  min-height:100vh;
  color-scheme:light;
}
body.portal-app-shell .portal-app{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}
body.portal-app-shell .portal-topbar{
  position:sticky;top:0;z-index:40;
  display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;
  min-height:58px;padding:10px 18px;
  background:#fff;border-bottom:1px solid var(--fx-line);
  box-shadow:0 1px 0 rgba(16,32,51,.04);
}
body.portal-app-shell .portal-topbar .brand-wrap{
  display:flex;align-items:center;gap:12px;min-width:0;
}
body.portal-app-shell .portal-topbar .brand-mark{
  display:grid;place-items:center;width:34px;height:34px;border-radius:8px;
  background:var(--fx-navy);color:#fff;font-weight:800;
}
body.portal-app-shell .portal-topbar .brand-copy strong{display:block;font-size:14px;color:var(--fx-navy)}
body.portal-app-shell .portal-topbar .brand-copy small{display:block;font-size:11px;color:var(--fx-copy)}
body.portal-app-shell .portal-topbar .actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
body.portal-app-shell .portal-topbar .back-btn,
body.portal-app-shell .portal-topbar a.btn-link{
  display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 12px;
  border:1px solid var(--fx-line);border-radius:8px;background:#fff;color:var(--fx-navy);
  text-decoration:none;font-size:13px;font-weight:700;
}
body.portal-app-shell .portal-topbar a.btn-primary-link{
  border-color:var(--fx-orange);background:var(--fx-orange);color:#fff;
}
body.portal-app-shell .portal-body{
  flex:1;
  display:grid;
  grid-template-columns:240px minmax(0,1fr);
  min-height:0;
  width:min(1280px,100%);
  margin:0 auto;
}
body.portal-app-shell .student-menu,
body.portal-app-shell .portal-sidebar{
  position:sticky;
  top:58px;
  align-self:start;
  height:calc(100vh - 58px);
  overflow:auto;
  padding:16px 12px 24px;
  background:#fff;
  border-right:1px solid var(--fx-line);
}
body.portal-app-shell .dashboard,
body.portal-app-shell .portal-main{
  min-width:0;
  padding:22px 20px 40px;
  background:transparent;
}
body.portal-app-shell .wrap,
body.portal-app-shell .card{
  width:100%;
  max-width:none;
  margin:0;
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
body.portal-app-shell .portal-top.portal-account-bar{display:none !important}
body.portal-app-shell .item,
body.portal-app-shell .panel,
body.portal-app-shell .soon,
body.portal-app-shell .question-box,
body.portal-app-shell .question{
  background:#fff !important;
  border:1px solid var(--fx-line) !important;
  color:var(--fx-ink);
  box-shadow:0 1px 2px rgba(16,32,51,.04);
}
body.portal-app-shell .item span,
body.portal-app-shell .student-menu-title,
body.portal-app-shell .dash-head p{color:var(--fx-copy)}
body.portal-app-shell .item strong,
body.portal-app-shell h1,
body.portal-app-shell h2,
body.portal-app-shell h3{color:var(--fx-navy)}
body.portal-app-shell .student-menu a{
  color:var(--fx-ink);background:transparent;border-radius:8px;
}
body.portal-app-shell .student-menu a.active{
  background:rgba(244,81,11,.1);color:var(--fx-orange-dark);font-weight:800;
}
body.portal-app-shell .student-menu a.logout{
  color:#b42318;border-color:#f3c4c0;
}
body.portal-app-shell table{background:#fff;color:var(--fx-ink)}
body.portal-app-shell th{color:var(--fx-navy);background:#f8fafc}
body.portal-app-shell td{color:var(--fx-copy)}
body.portal-app-shell .portal-foot-strip{
  margin-top:auto;padding:10px 16px;border-top:1px solid var(--fx-line);
  background:#fff;color:#64748b;font-size:12px;text-align:center;
}
@media (max-width:900px){
  body.portal-app-shell .portal-body{grid-template-columns:1fr}
  body.portal-app-shell .student-menu,
  body.portal-app-shell .portal-sidebar{
    position:static;height:auto;border-right:0;border-bottom:1px solid var(--fx-line);
    display:block;flex-wrap:nowrap;align-items:stretch;
  }
  body.portal-app-shell .student-menu-title{width:100%;margin:0 0 4px}
  body.portal-app-shell .student-menu a{display:flex;margin:4px 0;width:100%}
}

/* Prevent public footer leakage on portals */
body.portal-app-shell .site-footer{display:none !important}

/* ---------- Admin compact polish ---------- */
.admin-content-pad{padding:18px 20px 28px}
.admin-page-header{margin-bottom:16px}
.admin-page-header h2{margin:0 0 6px;font-size:1.45rem}
.admin-page-header p{margin:0;max-width:62ch;color:#64748b}
.admin-panel-box{margin-bottom:16px}
.admin-stats-grid{gap:12px}
.admin-stat-card{min-height:92px}
.admin-back-site{
  display:inline-flex;align-items:center;min-height:34px;padding:0 10px;margin:8px 12px;
  border-radius:8px;border:1px solid rgba(255,255,255,.2);color:#fff;text-decoration:none;font-size:12px;font-weight:700;
}

/* ---------- Emergency repair 2026-08-03: layout stability ---------- */
.admin-layout{
  display:block;position:relative;min-height:100vh;
}
.admin-sidebar{
  position:fixed !important;top:0;left:0;bottom:0;z-index:40;
  width:268px !important;overflow-y:auto;overflow-x:hidden;
}
.admin-main{
  margin-left:268px !important;min-width:0;width:auto;max-width:100%;
  box-sizing:border-box;position:relative;z-index:1;
}
.admin-topbar{
  display:flex !important;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
}
.admin-topbar-context{flex:1 1 auto;min-width:0}
.admin-topbar .admin-greeting,
.admin-topbar .admin-btn-logout{flex:0 0 auto}
.admin-page-header{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;
}
.admin-form,
.admin-panel-box,
.admin-centered-form{
  background:#fff;border:1px solid #dbe3ed;border-radius:10px;padding:16px 18px;
  box-shadow:0 8px 20px rgba(7,20,38,.04);
}
.admin-table-wrap{overflow-x:auto;max-width:100%}
.admin-table{width:100%;border-collapse:collapse;background:#fff}
.admin-table th,.admin-table td{padding:10px 12px;border-bottom:1px solid #e5ecf4;vertical-align:middle;font-size:13px}
.admin-table th{background:#f8fafc;text-align:left;color:#0a1d35}
.mh-licence-panel .mh-cap-card{
  background:rgba(255,255,255,.04);border:1px solid rgba(255,255,255,.08);border-radius:10px;padding:12px;
}
@media (max-width:900px){
  .admin-sidebar{transform:translateX(-100%)}
  .admin-sidebar.active{transform:translateX(0)}
  .admin-main{margin-left:0 !important}
}

/* Student portal: never show public footer / payment logos inside app shell */
body.portal-app-shell .site-footer,
body.portal-app-shell .footer-payment-trust,
body.portal-app-shell .footer-payment-logos{display:none !important}
body.portal-app-shell .portal-body{
  display:grid;grid-template-columns:270px minmax(0,1fr);gap:0;align-items:start;
}
body.portal-app-shell .student-menu,
body.portal-app-shell .portal-sidebar{
  position:sticky;top:0;align-self:start;max-height:100vh;overflow:auto;z-index:5;
}
body.portal-app-shell .portal-main,
body.portal-app-shell .content{
  min-width:0;max-width:100%;overflow-x:auto;
}
body.portal-app-shell .live-class-layout{gap:16px}
body.portal-app-shell .live-stage-content .btn[disabled]{
  opacity:.55;cursor:not-allowed;pointer-events:none;
}
@media (max-width:900px){
  body.portal-app-shell .portal-body{grid-template-columns:1fr}
  body.portal-app-shell .student-menu,
  body.portal-app-shell .portal-sidebar{position:static;max-height:none}
}

/* ---------- Gap completion 2026-08-03: form grid + portal mobile nav ---------- */
.admin-form-grid-3,
.mh-cap-grid,
.mh-view-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
}
.mh-cap-card .mh-cap-val{font-size:1.25rem;font-weight:800;margin-top:4px}
.mh-view-field{padding:10px 12px;border:1px solid #e5ecf4;border-radius:8px;background:#f8fafc}
.mh-view-field span{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:#64748b;margin-bottom:4px}
.mh-view-field strong{display:block;color:#0a1d35;font-size:13px;word-break:break-word}
.mh-assign-form label,
.mh-manual-form label,
.admin-form label{display:flex;flex-direction:column;gap:6px}
.mh-assign-form,
.mh-manual-form,
.mh-assign-form input,
.mh-manual-form input,
.mh-assign-form select,
.mh-manual-form select,
.mh-assign-form textarea,
.mh-manual-form textarea,
.mh-assign-form button,
.mh-manual-form button,
.mh-page .admin-table td form,
.mh-page .admin-table td select,
.mh-page .admin-table td button{
  pointer-events:auto !important;
  position:relative;
  z-index:2;
}
.mh-assign-form input:not([disabled]),
.mh-manual-form input:not([disabled]),
.mh-assign-form select:not([disabled]),
.mh-manual-form select:not([disabled]),
.mh-assign-form textarea:not([disabled]),
.mh-manual-form textarea:not([disabled]){
  background:#fff;
  color:#0a1d35;
}
.mh-manual-form input[readonly]{
  background:#f1f5f9;
  color:#334155;
}
.mh-manual-form .admin-btn-primary{
  background:#f4510b;
  border-color:#f4510b;
  color:#fff;
}
@media (max-width:1024px){
  .admin-form-grid-3,.mh-cap-grid,.mh-view-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:640px){
  .admin-form-grid-3,.mh-cap-grid,.mh-view-grid{grid-template-columns:1fr}
}

.portal-menu-toggle,
.portal-menu-close{
  display:none;
  align-items:center;justify-content:center;
  min-height:40px;padding:0 14px;
  border:1px solid var(--fx-line,#dbe3ed);border-radius:8px;
  background:#fff;color:var(--fx-navy,#0a1d35);
  font-size:13px;font-weight:800;cursor:pointer;
}
.portal-nav-backdrop{
  display:none;position:fixed;inset:0;z-index:45;
  background:rgba(7,20,38,.45);
}
.portal-sidebar-head{
  display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px;
}
@media (max-width:900px){
  .portal-menu-toggle{display:inline-flex;margin:12px 12px 0}
  .portal-menu-close{display:inline-flex}
  body.portal-app-shell .portal-body{grid-template-columns:1fr !important;position:relative}
  body.portal-app-shell .student-menu,
  body.portal-app-shell .portal-sidebar{
    position:fixed !important;top:0;left:0;bottom:0;z-index:50;
    width:min(300px,86vw);max-height:100vh;height:100vh;
    overflow:auto;transform:translateX(-105%);
    transition:transform .2s ease;
    border-right:1px solid var(--fx-line,#dbe3ed);
    background:#fff !important;
    display:block !important;flex-wrap:nowrap !important;
    padding:16px 14px 28px;
  }
  body.portal-nav-open .portal-sidebar,
  body.portal-nav-open .student-menu{transform:translateX(0)}
  body.portal-nav-open .portal-nav-backdrop{display:block}
  body.portal-app-shell .student-menu a,
  body.portal-app-shell .portal-sidebar a{
    display:block !important;margin:4px 0;width:100%;
  }
}
@media (min-width:901px){
  .portal-menu-toggle,.portal-menu-close,.portal-nav-backdrop{display:none !important}
  body.portal-app-shell .portal-sidebar-head .portal-menu-close{display:none !important}
}

/* Portal shell: fixed sidebar + main scroll + live embed width */
@media (min-width:901px){
  body.portal-app-shell{overflow:hidden;height:100%}
  body.portal-app-shell .portal-app{height:100vh;display:flex;flex-direction:column;overflow:hidden}
  body.portal-app-shell .portal-body{
    flex:1 1 auto;min-height:0 !important;
    grid-template-columns:280px minmax(0,1fr) !important;
    overflow:hidden;
  }
  body.portal-app-shell .student-menu,
  body.portal-app-shell .portal-sidebar{
    position:sticky !important;top:0;height:100%;overflow-x:hidden !important;overflow-y:auto !important;
  }
  body.portal-app-shell .portal-main,
  body.portal-app-shell .dashboard{
    min-width:0;overflow:auto !important;overscroll-behavior:contain;
  }
}
body.portal-app-shell .live-class-layout.is-meeting.is-sdk-wide{grid-template-columns:minmax(0,1fr) !important}
body.portal-app-shell .live-class-layout.is-meeting.is-sdk-wide .live-class-details{display:none !important}
body.portal-app-shell .live-class-layout.is-meeting:not(.is-sdk-wide){grid-template-columns:minmax(0,1fr) minmax(240px,300px) !important}
body.portal-app-shell .live-class-layout.is-meeting:not(.is-sdk-wide) .live-class-details{display:block !important}
.live-embed-shell{position:absolute;inset:0;width:100%;height:100%;min-height:0;background:#000}
.live-embed-frame{display:block;width:100% !important;height:100% !important;min-height:80vh;border:0 !important;background:#000}
.live-class-stage.is-sdk-wide .live-stage-screen{min-height:80vh}
body.live-meeting-active{overflow:hidden}
body.live-meeting-active .portal-main,body.live-meeting-active .dashboard{overflow:hidden !important}
.live-class-stage.is-meeting .live-stage-screen{min-height:0;overflow:hidden;place-items:stretch}
body.portal-app-shell .item{padding:14px 16px !important}
body.portal-app-shell .reader-layout{grid-template-columns:minmax(170px,230px) minmax(0,1fr) !important}

/* ---------- FINAL 2026-08-03: portal sidebar + cards + forms + tables ---------- */
@media (max-width:900px){
  body.portal-app-shell .student-menu,
  body.portal-app-shell .portal-sidebar{
    display:block !important;
    flex-wrap:nowrap !important;
    white-space:normal !important;
  }
  body.portal-app-shell .student-menu a,
  body.portal-app-shell .portal-sidebar a{
    display:flex !important;
    width:100% !important;
    margin:4px 0 !important;
    white-space:normal !important;
  }
}
@media (min-width:901px){
  body.portal-app-shell .portal-body,
  body.portal-app-shell .portal-layout{
    grid-template-columns:280px minmax(0,1fr) !important;
  }
  body.portal-app-shell .student-menu,
  body.portal-app-shell .portal-sidebar{
    width:280px !important;
    max-width:280px !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
  }
  body.portal-app-shell .student-menu a,
  body.portal-app-shell .portal-sidebar a{
    display:flex !important;
    width:100% !important;
    max-width:100% !important;
    white-space:normal !important;
    overflow-wrap:anywhere;
    line-height:1.35;
    min-height:42px;
    margin:0 0 6px !important;
  }
}
body.portal-app-shell .item span,
body.portal-app-shell .item strong{
  display:block !important;
}
body.portal-app-shell .item span{
  margin-bottom:8px !important;
  text-transform:uppercase;
  letter-spacing:.04em;
  font-size:12px !important;
  font-weight:800;
}
body.portal-app-shell .item strong{
  font-size:17px !important;
  line-height:1.35;
  word-break:break-word;
}
body.portal-app-shell .grid{
  grid-template-columns:repeat(auto-fit,minmax(200px,1fr)) !important;
  gap:12px !important;
}
body.portal-app-shell .item{
  min-height:0 !important;
}
body.portal-app-shell .dashboard label,
body.portal-app-shell .portal-main label{
  display:flex !important;
  flex-direction:column !important;
  align-items:stretch !important;
  gap:6px !important;
  width:100%;
  margin:0 0 12px !important;
  font-weight:700;
}
body.portal-app-shell .dashboard label > input,
body.portal-app-shell .dashboard label > select,
body.portal-app-shell .dashboard label > textarea,
body.portal-app-shell .portal-main label > input,
body.portal-app-shell .portal-main label > select,
body.portal-app-shell .portal-main label > textarea{
  width:100% !important;
  max-width:100% !important;
  min-height:42px;
  box-sizing:border-box;
}
body.portal-app-shell .dashboard label > textarea,
body.portal-app-shell .portal-main label > textarea{
  min-height:110px;
}
body.portal-app-shell .two{
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  gap:14px !important;
}
body.portal-app-shell .question-row{
  display:grid !important;
  grid-template-columns:minmax(0,1.4fr) minmax(160px,.7fr) minmax(110px,.45fr) !important;
  gap:12px !important;
  align-items:start !important;
}
body.portal-app-shell .question-row > label:first-child{
  grid-column:1 / -1;
}
body.portal-app-shell .password-field-wrap{
  position:relative;
  display:block;
  width:100%;
}
body.portal-app-shell .password-field-wrap input[type="password"],
body.portal-app-shell .password-field-wrap input[type="text"]{
  width:100% !important;
  padding-right:48px !important;
}
body.portal-app-shell .password-eye-btn{
  position:absolute !important;
  top:50%;
  right:8px;
  transform:translateY(-50%);
  width:36px !important;
  min-width:36px !important;
  height:36px !important;
  min-height:36px !important;
  margin:0 !important;
  padding:0 !important;
  border:1px solid var(--fx-line,#dbe3ed) !important;
  border-radius:8px !important;
  background:#fff !important;
  color:var(--fx-navy,#0a1d35) !important;
  font-size:16px !important;
  line-height:1 !important;
  cursor:pointer;
  flex:none !important;
}
body.portal-app-shell .table-wrap{
  overflow-x:auto;
  max-width:100%;
}
body.portal-app-shell .dashboard table td .actions,
body.portal-app-shell .dashboard table .row-actions,
body.portal-app-shell .dashboard table td > div{
  display:flex;
  flex-direction:row;
  flex-wrap:wrap;
  gap:6px;
  align-items:center;
}
body.portal-app-shell .dashboard table td .btn,
body.portal-app-shell .dashboard table td button,
body.portal-app-shell .dashboard table td a.btn,
body.portal-app-shell .dashboard table td a.outline{
  display:inline-flex !important;
  width:auto !important;
  min-height:34px;
  padding:6px 10px;
  white-space:nowrap;
}
@media (max-width:860px){
  body.portal-app-shell .two,
  body.portal-app-shell .question-row{
    grid-template-columns:1fr !important;
  }
  body.portal-app-shell .question-row > label:first-child{grid-column:auto}
}
/* Public header must stay above hero/founder overlays */
.fx-approved-home .site-header,
.public-shell-page .site-header{
  position:sticky;
  top:0;
  z-index:120 !important;
}
.fx-approved-home .menu-toggle,
.public-shell-page .menu-toggle{
  z-index:130 !important;
}
.fx-approved-home .hero,
.fx-approved-home .hero-figure,
.fx-approved-home .hero-figure figcaption,
.fx-approved-home .hero-proof-panel{
  z-index:1 !important;
}


/* ===== FINAL mobile public + portal (390 / 412 / 480) ===== */
html, body.public-shell-page { overflow-x: hidden; }
@media (max-width: 980px) {
  .public-shell-page .site-header { position: sticky !important; top: 0; z-index: 120 !important; }
  .public-shell-page .menu-toggle { display: inline-flex !important; z-index: 130 !important; }
  .public-shell-page .hero,
  .public-shell-page .hero-figure,
  .public-shell-page .hero-figure figcaption,
  .public-shell-page .hero-proof-panel,
  .fx-approved-home .hero-figure figcaption { z-index: 1 !important; }
}
@media (max-width: 480px) {
  .public-shell-page .header-shell { min-height: 64px; gap: 8px; padding-inline: 8px; }
  .public-shell-page .menu-toggle,
  .fx-approved-home .menu-toggle {
    width: 44px !important; min-width: 44px !important;
    height: 44px !important; min-height: 44px !important;
  }
  .public-shell-page .brand-copy small { display: none; }
  body.portal-app-shell .dashboard,
  body.portal-app-shell .portal-main { padding: 14px 12px 88px !important; }
  body.portal-app-shell .two,
  body.portal-app-shell .profile-form .profile-grid,
  body.portal-app-shell .question-row { grid-template-columns: 1fr !important; }
  body.portal-app-shell .grid { grid-template-columns: 1fr !important; }
  body.portal-app-shell .actions > * { width: 100%; justify-content: center; }
  body.portal-app-shell .table-wrap { -webkit-overflow-scrolling: touch; }
  body.portal-app-shell .dash-head { display: block !important; }
  body.portal-app-shell .dash-head .actions { margin-top: 10px; }
}
@media (max-width: 412px) {
  body.portal-app-shell .portal-topbar { padding: 8px 10px; }
  body.portal-app-shell .portal-topbar .actions a { min-height: 34px; padding: 0 10px; font-size: 12px; }
}
@media (max-width: 390px) {
  .public-shell-page .brand-mark { width: 36px; height: 36px; }
  body.portal-app-shell .student-menu,
  body.portal-app-shell .portal-sidebar { width: min(292px, 90vw) !important; }
}
body.portal-app-shell,
body.portal-app-shell .wrap,
body.portal-app-shell .card,
body.portal-app-shell .portal-body,
body.portal-app-shell .dashboard { max-width: 100vw; }
body.portal-app-shell .dashboard form,
body.portal-app-shell .panel,
body.portal-app-shell .profile-form,
body.portal-app-shell .assessment-builder-form { max-width: 100%; overflow: visible; }
