/* ==========================================================================
   Flamingo Portal — mobile redesign (phase 1)
   Load this file LAST (after portal-compat.css). Everything is scoped to
   body.fl-ui, so removing that class from <body> switches the redesign off.
   ========================================================================== */

/* ---- 1. Self-hosted font (no Google Fonts, works offline in the PWA) ---- */
@font-face{font-family:"Plus Jakarta Sans";font-style:normal;font-weight:400;font-display:swap;src:url("../fonts/plus-jakarta-sans-400.woff2") format("woff2")}
@font-face{font-family:"Plus Jakarta Sans";font-style:normal;font-weight:500;font-display:swap;src:url("../fonts/plus-jakarta-sans-500.woff2") format("woff2")}
@font-face{font-family:"Plus Jakarta Sans";font-style:normal;font-weight:600;font-display:swap;src:url("../fonts/plus-jakarta-sans-600.woff2") format("woff2")}
@font-face{font-family:"Plus Jakarta Sans";font-style:normal;font-weight:700;font-display:swap;src:url("../fonts/plus-jakarta-sans-700.woff2") format("woff2")}
@font-face{font-family:"Plus Jakarta Sans";font-style:normal;font-weight:800;font-display:swap;src:url("../fonts/plus-jakarta-sans-800.woff2") format("woff2")}

/* ---- 2. Design tokens ---------------------------------------------------- */
body.fl-ui{
  --fl-font:"Plus Jakarta Sans","Segoe UI",system-ui,-apple-system,Roboto,Arial,sans-serif;
  --fl-bar:#1E3A5F;      /* app bar / drawer header */
  --fl-navy:#1E3A5F;     /* headings, active icons */
  --fl-orange:#DF7A00;   /* main actions */
  --fl-bg:#F7F4EE;       /* page */
  --fl-card:#FFFFFF;
  --fl-ink:#12233A;
  --fl-muted:#667085;
  --fl-line:#E6DFD2;
  --fl-active:#E8EFF7;
  --fl-nav:#FFFFFF;
  --fl-green:#168C55; --fl-gold:#FFC20A; --fl-red:#C73F3F;
  --fl-r:18px;
  /* point every legacy font variable at the new family */
  --portal-font-family:var(--fl-font);--portal-ui-font:var(--fl-font);
  --flamingo-ui-font:var(--fl-font);--flamingo-heading-font:var(--fl-font);
}
html[data-portal-theme="dark"] body.fl-ui,html[data-theme="dark"] body.fl-ui{
  --fl-bar:#14233A;--fl-navy:#8FB4E8;--fl-orange:#F29A2E;--fl-bg:#0E131B;--fl-card:#171E28;
  --fl-ink:#F2F6FC;--fl-muted:#9AA7B8;--fl-line:#2A3140;--fl-active:#22314A;--fl-nav:#121923;
  --fl-green:#35B27A;--fl-red:#E36B6B;
}

/* ---- 3. One font everywhere (desktop + phone) --------------------------- */
body.fl-ui,
body.fl-ui :where(h1,h2,h3,h4,h5,h6,p,a,span,b,strong,small,li,label,th,td,div,button,input,select,textarea,.btn,dialog){
  font-family:var(--fl-font)!important;
}
body.fl-ui{font-feature-settings:"tnum" 1;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}

/* ==========================================================================
   PHONE  (≤ 760px — same breakpoint the portal already uses)
   ========================================================================== */
@media (max-width:760px), (max-device-width: 760px){

  html,body.fl-ui{max-width:100%;overflow-x:hidden}
  body.fl-ui{background:var(--fl-bg)!important;color:var(--fl-ink);font-size:14px;line-height:1.5}
  body.fl-ui .shell{display:block!important}
  body.fl-ui main{margin:0!important;width:100%!important;padding-bottom:calc(92px + env(safe-area-inset-bottom))!important}
  body.fl-ui .content{padding:14px!important}

  /* ---- App bar ---- */
  body.fl-ui .topbar{
    position:sticky!important;top:0;z-index:30;display:flex!important;align-items:center;gap:12px;
    min-height:72px!important;height:auto!important;margin:0!important;
    padding:calc(env(safe-area-inset-top) + 10px) 14px 10px!important;
    background:var(--fl-bar)!important;color:#fff!important;border:0!important;box-shadow:none!important;
  }
  body.fl-ui .topbar .menu{
    flex:0 0 auto;width:44px;height:44px;padding:0!important;border:0!important;border-radius:13px!important;
    background:rgba(255,255,255,.14)!important;color:#fff!important;display:grid!important;place-items:center;
  }
  body.fl-ui .topbar-copy{min-width:0;flex:1}
  body.fl-ui .topbar-context{display:none!important}
  body.fl-ui .topbar h1{margin:0!important;font-size:19px!important;font-weight:700!important;line-height:1.2!important;color:#fff!important;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.fl-ui .topbar p{margin:2px 0 0!important;font-size:12px!important;font-weight:500;color:#B9C8DB!important;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.fl-ui .topbar-meta{display:flex!important;flex:0 0 auto;align-items:center;gap:8px}
  body.fl-ui .topbar-date,
  body.fl-ui .topbar-user>span:last-child{display:none!important}
  body.fl-ui .topbar-avatar{width:36px;height:36px}

  /* ---- Drawer (existing .sidebar, toggled by body.nav-open) ---- */
  body.fl-ui .sidebar{
    position:fixed!important;inset:0 auto 0 0!important;z-index:60!important;
    width:min(320px,86vw)!important;height:100dvh!important;padding:0 0 calc(16px + env(safe-area-inset-bottom))!important;
    overflow-y:auto;overscroll-behavior:contain;background:var(--fl-card)!important;color:var(--fl-ink)!important;
    border-radius:0 24px 24px 0!important;transform:translateX(-104%)!important;transition:transform .22s ease!important;
  }
  body.fl-ui.nav-open .sidebar{transform:none!important;box-shadow:0 0 0 100vmax rgba(6,16,30,.55)!important}
  body.fl-ui.nav-open:after{display:none!important}
  body.fl-ui .sidebar .portal-brand{
    display:flex;align-items:center;gap:12px;margin:0!important;
    padding:calc(env(safe-area-inset-top) + 16px) 18px 18px!important;background:var(--fl-bar)!important;color:#fff!important;
  }
  body.fl-ui .sidebar .brand-logo{height:46px!important;width:auto!important;padding:4px;background:#fff;border-radius:12px}
  body.fl-ui .sidebar .brand-copy,body.fl-ui .sidebar .brand-copy *{color:#fff!important}
  body.fl-ui .sidebar nav{padding:10px 12px!important}
  body.fl-ui .side-group-toggle{min-height:46px;font-size:12px!important;font-weight:700!important;letter-spacing:.08em;text-transform:uppercase;color:var(--fl-muted)!important}
  body.fl-ui .side-link{
    display:flex!important;align-items:center;gap:14px;min-height:46px;padding:0 14px!important;margin:2px 0;
    border-radius:14px!important;font-size:15px!important;font-weight:500!important;color:var(--fl-ink)!important;background:transparent!important;
  }
  body.fl-ui .side-link svg{width:21px;height:21px;flex:0 0 auto;color:var(--fl-muted)}
  body.fl-ui .side-link.active{background:var(--fl-active)!important;color:var(--fl-navy)!important;font-weight:700!important;box-shadow:inset 4px 0 0 var(--fl-orange)}
  body.fl-ui .side-link.active svg{color:var(--fl-navy)}
  body.fl-ui .sidebar-foot{padding:12px 16px 0!important;border-top:1px solid var(--fl-line)!important;background:transparent!important}
  body.fl-ui .sidebar-foot *{color:var(--fl-ink)}
  body.fl-ui .sidebar-signout{min-height:44px;color:var(--fl-red)!important;font-weight:700}
  body.fl-ui .sidebar-signout *{color:var(--fl-red)!important}

  /* ---- Bottom tab bar (markup in snippets/tabbar.php) ---- */
  body.fl-ui .fl-tabbar{
    position:fixed;left:0;right:0;bottom:0;z-index:40;display:grid;grid-template-columns:repeat(5,1fr);align-items:end;
    height:calc(68px + env(safe-area-inset-bottom));padding:6px 4px env(safe-area-inset-bottom);
    background:var(--fl-nav);border-top:1px solid var(--fl-line);
  }
  body.fl-ui .fl-tabbar a,body.fl-ui .fl-tabbar button{
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:56px;padding:0;
    font-size:11px!important;font-weight:500!important;color:var(--fl-muted)!important;background:none;border:0;text-decoration:none;cursor:pointer;
  }
  body.fl-ui .fl-tabbar svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
  body.fl-ui .fl-tabbar .on{color:var(--fl-navy)!important;font-weight:700!important}
  body.fl-ui .fl-tabbar .on svg{box-sizing:content-box;padding:4px 12px;margin:-4px 0;border-radius:14px;background:var(--fl-active)}
  body.fl-ui .fl-tabbar .fl-scan{color:var(--fl-orange)!important;font-weight:700!important}
  body.fl-ui .fl-tabbar .fl-scan svg{
    box-sizing:border-box;width:58px;height:58px;padding:16px;margin:-34px 0 0;border-radius:50%;
    background:var(--fl-orange);color:#fff;stroke:#fff;border:4px solid var(--fl-bg);
  }

  /* ---- Cards, KPIs, panels ---- */
  body.fl-ui .panel,body.fl-ui .card,body.fl-ui .station-card{border-radius:var(--fl-r)!important;padding:14px!important;box-shadow:none!important;border:1px solid var(--fl-line)!important;background:var(--fl-card)!important}
  body.fl-ui .stats{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important}
  body.fl-ui .stat-card{padding:14px!important;border-radius:var(--fl-r)!important;min-width:0}
  body.fl-ui .stat-card strong{font-size:22px!important;font-weight:800!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.fl-ui .stat-card span{font-size:12px!important;font-weight:500}

  /* ---- Typography ---- */
  body.fl-ui h2{font-size:17px;font-weight:700}
  body.fl-ui h3{font-size:16px;font-weight:700}
  body.fl-ui small,body.fl-ui .muted{font-size:12px}

  /* ---- Forms: 16px text stops iOS/Android auto-zoom ---- */
  body.fl-ui .form-grid,body.fl-ui .form-stack{grid-template-columns:1fr!important}
  body.fl-ui input:not([type=checkbox]):not([type=radio]),body.fl-ui select,body.fl-ui textarea{
    min-height:48px;font-size:16px!important;font-weight:500;padding:12px 14px!important;border-radius:14px!important;
    border:1.5px solid #C9D2DC!important;background:var(--fl-card)!important;color:var(--fl-ink)!important;
  }
  body.fl-ui input:focus,body.fl-ui select:focus,body.fl-ui textarea:focus{border-color:var(--fl-navy)!important;box-shadow:0 0 0 3px rgba(30,58,95,.15)!important;outline:0}
  body.fl-ui label{font-size:12.5px!important;font-weight:700!important}
  body.fl-ui .btn{min-height:48px;padding:0 18px;border-radius:14px!important;font-size:15px!important;font-weight:700!important}
  body.fl-ui .btn.primary{background:var(--fl-orange)!important;color:#fff!important;border:0!important}
  body.fl-ui .btn.secondary,body.fl-ui .btn.light{background:var(--fl-card)!important;color:var(--fl-navy)!important;border:1.5px solid var(--fl-navy)!important}

  /* ---- Filters: stack, full width ---- */
  body.fl-ui .filters{display:grid!important;grid-template-columns:1fr 1fr;gap:10px}
  body.fl-ui .filters>*{min-width:0!important}

  /* ---- Tabs: scrollable pills with vector icons ---- */
  body.fl-ui .role-subtabs,
  body.fl-ui .subtabs,
  body.fl-ui .tabs,
  body.fl-ui .attendance-hub-tabs,
  body.fl-ui .fin-tabs,
  body.fl-ui .crew-tabs,
  body.fl-ui .crew-management-tabs,
  body.fl-ui .band-tabs,
  body.fl-ui .leadership-tabs,
  body.fl-ui .blog-tabs,
  body.fl-ui .settings-subtabs,
  body.fl-ui .scout-status-tabs {
    display:flex!important;flex-wrap:nowrap!important;gap:8px;overflow-x:auto;-webkit-overflow-scrolling:touch;padding:2px 0 10px;scrollbar-width:none;overscroll-behavior-x:contain;
  }
  body.fl-ui .role-subtabs::-webkit-scrollbar,
  body.fl-ui .subtabs::-webkit-scrollbar,
  body.fl-ui .tabs::-webkit-scrollbar,
  body.fl-ui .attendance-hub-tabs::-webkit-scrollbar,
  body.fl-ui .fin-tabs::-webkit-scrollbar,
  body.fl-ui .crew-tabs::-webkit-scrollbar,
  body.fl-ui .crew-management-tabs::-webkit-scrollbar,
  body.fl-ui .band-tabs::-webkit-scrollbar,
  body.fl-ui .leadership-tabs::-webkit-scrollbar,
  body.fl-ui .blog-tabs::-webkit-scrollbar,
  body.fl-ui .settings-subtabs::-webkit-scrollbar,
  body.fl-ui .scout-status-tabs::-webkit-scrollbar {
    display:none;
  }
  body.fl-ui .role-subtabs a,
  body.fl-ui .subtabs a,
  body.fl-ui .tabs a,
  body.fl-ui .attendance-hub-tabs a,
  body.fl-ui .fin-tabs a,
  body.fl-ui .crew-tabs a,
  body.fl-ui .crew-management-tabs a,
  body.fl-ui .band-tabs a,
  body.fl-ui .leadership-tabs a,
  body.fl-ui .blog-tabs a,
  body.fl-ui .settings-subtabs a,
  body.fl-ui .scout-status-tabs a {
    flex:0 0 auto;min-height:42px;display:inline-flex;align-items:center;gap:7px;padding:0 15px;border-radius:999px;
    font-size:13px;font-weight:600;white-space:nowrap;background:var(--fl-card);border:1px solid var(--fl-line);color:var(--fl-muted);
  }
  body.fl-ui .role-subtabs a.active,
  body.fl-ui .subtabs a.active,
  body.fl-ui .tabs a.active,
  body.fl-ui .attendance-hub-tabs a.active,
  body.fl-ui .fin-tabs a.active,
  body.fl-ui .crew-tabs a.active,
  body.fl-ui .crew-management-tabs a.active,
  body.fl-ui .band-tabs a.active,
  body.fl-ui .leadership-tabs a.active,
  body.fl-ui .blog-tabs a.active,
  body.fl-ui .settings-subtabs a.active,
  body.fl-ui .scout-status-tabs a.active {
    background:var(--fl-bar)!important;border-color:var(--fl-bar)!important;color:#fff!important;
  }
  body.fl-ui .tab-icon,
  body.fl-ui .portal-tab-icon {
    width:16px;height:16px;min-width:16px;min-height:16px;stroke:currentColor;fill:none;flex-shrink:0;
  }

  /* ---- Tables → record cards (class added by flamingo-mobile.js) ---- */
  body.fl-ui .table-wrap:has(table.fl-cards){overflow:visible!important;border:0!important;background:transparent!important;border-radius:0!important}
  body.fl-ui table.fl-cards,body.fl-ui table.fl-cards tbody{display:block!important;width:100%!important;min-width:0!important;background:transparent!important}
  body.fl-ui table.fl-cards thead{display:none!important}
  body.fl-ui table.fl-cards tr{
    display:grid!important;grid-template-columns:1fr 1fr;gap:10px 14px;margin:0 0 12px!important;padding:14px!important;
    background:var(--fl-card)!important;border:1px solid var(--fl-line)!important;border-radius:var(--fl-r)!important;
  }
  body.fl-ui table.fl-cards td{display:block!important;min-width:0!important;max-width:none!important;padding:0!important;border:0!important;
    font-size:14px!important;font-weight:500;white-space:normal!important;overflow-wrap:anywhere}
  body.fl-ui table.fl-cards td::before{content:attr(data-label)!important;display:block!important;margin-bottom:2px;
    font-size:10.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--fl-muted)}
  body.fl-ui table.fl-cards td:first-child{grid-column:1/-1;font-size:16px!important;font-weight:700}
  body.fl-ui table.fl-cards td:first-child::before,
  body.fl-ui table.fl-cards td[colspan]::before,
  body.fl-ui table.fl-cards td[data-label=""]::before{display:none!important}
  body.fl-ui table.fl-cards td:last-child:has(.btn,a,button){grid-column:1/-1;display:flex!important;flex-wrap:wrap;gap:8px}
  body.fl-ui table.fl-cards td:last-child:has(.btn,a,button)::before{display:none!important}
 html body.portal-body.fl-ui .dashboard-recent table.fl-cards tr{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:8px 10px!important;padding:12px!important;box-sizing:border-box!important}
 html body.portal-body.fl-ui .dashboard-recent table.fl-cards td{width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;overflow-wrap:anywhere!important;word-break:normal!important;line-height:1.35!important}
 html body.portal-body.fl-ui .dashboard-recent table.fl-cards td[data-label="Time"]{white-space:normal!important;min-width:0!important;max-width:100%!important;overflow-wrap:anywhere!important}

  /* ---- Dialogs → bottom sheets ---- */
  body.fl-ui dialog{margin:auto 0 0!important;width:100%!important;max-width:none!important;max-height:92dvh;border-radius:24px 24px 0 0!important}
  body.fl-ui dialog::backdrop{background:rgba(6,16,30,.55)}

  /* ---- Dashboard (pages/dashboard) ---- */
  body.fl-ui .dashboard-kpi-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:12px!important}
  body.fl-ui .dashboard-kpi{min-width:0;padding:14px!important;border-radius:var(--fl-r)!important;background:var(--fl-card)!important;border:1px solid var(--fl-line)!important;box-shadow:none!important}
  body.fl-ui .dashboard-kpi strong{font-size:22px!important;font-weight:800!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  body.fl-ui .dashboard-quick-actions{display:flex!important;flex-wrap:nowrap!important;gap:8px;overflow-x:auto;padding:2px 0 12px;scrollbar-width:none}
  body.fl-ui .dashboard-quick-actions::-webkit-scrollbar{display:none}
  body.fl-ui .dashboard-quick-actions .btn{flex:0 0 auto;white-space:nowrap;min-height:44px}
  body.fl-ui .dashboard-analytics-grid,body.fl-ui .dashboard-chart-strip,body.fl-ui .dashboard-mini-grid{display:grid!important;grid-template-columns:1fr!important;gap:12px!important}
  body.fl-ui .dashboard-analytics-card{border-radius:var(--fl-r)!important;padding:14px!important;box-shadow:none!important;border:1px solid var(--fl-line)!important;background:var(--fl-card)!important;min-width:0}
  body.fl-ui .member-dashboard-hero{border-radius:20px!important;padding:18px!important;background:linear-gradient(135deg,#1E3A5F,#2B5384)!important;color:#fff!important}
  body.fl-ui .member-dashboard-hero *{color:inherit}
  body.fl-ui .member-dashboard-hero .btn{background:var(--fl-orange)!important;color:#fff!important;border:0!important}
  html body.portal-body.fl-ui .service-metric-cards{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;width:100%!important;max-width:none!important;margin:0 0 16px!important}
  html body.portal-body.fl-ui .service-metric-cards>.metric-card{display:grid!important;grid-template-columns:42px minmax(0,1fr)!important;align-items:center!important;gap:12px!important;min-height:0!important;padding:13px 15px!important;border-radius:16px!important;box-sizing:border-box!important}
  html body.portal-body.fl-ui .service-metric-cards>.metric-card>.metric-icon{grid-column:1!important;grid-row:1!important;width:40px!important;height:40px!important;flex:none!important}
  html body.portal-body.fl-ui .service-metric-cards>.metric-card>div{grid-column:2!important;min-width:0!important;width:100%!important}
  html body.portal-body.fl-ui .service-metric-cards>.metric-card small{font-size:11px!important;line-height:1.25!important;letter-spacing:.04em!important;overflow-wrap:anywhere!important}
  html body.portal-body.fl-ui .service-metric-cards>.metric-card strong{font-size:23px!important;line-height:1.1!important;margin:3px 0!important;white-space:nowrap!important}
  html body.portal-body.fl-ui .service-metric-cards>.metric-card p{font-size:12px!important;line-height:1.35!important;margin:0!important;overflow-wrap:anywhere!important}

  /* ---- Sign-in screen (pages/login) ---- */
  body.fl-ui .login-page{background:var(--fl-bar);min-height:100dvh}
  body.fl-ui .login-shell{display:block!important;min-height:100dvh}
  body.fl-ui .login-visual{display:none!important}
  body.fl-ui .login-panel{padding:0!important;min-height:100dvh;background:var(--fl-bar)!important}
  body.fl-ui .login-form-wrap{position:relative;margin:230px 0 0!important;padding:34px 24px calc(28px + env(safe-area-inset-bottom))!important;
    min-height:calc(100dvh - 230px);background:var(--fl-card)!important;border-radius:30px 30px 0 0!important;max-width:none!important;width:100%!important}
  body.fl-ui .login-mobile-brand{display:block!important;position:absolute;top:-188px;left:0;right:0;text-align:center}
  body.fl-ui .login-mobile-brand img{width:112px!important;padding:8px;background:#fff!important;border-radius:26px!important;filter:none!important}
  body.fl-ui .login-mobile-brand::after{content:"Flamingo Portal";display:block;margin-top:14px;color:#fff;font-size:26px;font-weight:800}
  body.fl-ui .back-home{position:absolute;top:-214px;left:18px;color:#fff!important;font-size:13px;font-weight:600}
  body.fl-ui .login-form-wrap h2{font-size:25px!important;font-weight:800!important;margin:0 0 4px}
  body.fl-ui .login-kicker{display:none}
  body.fl-ui .login-submit{width:100%;min-height:54px;background:var(--fl-orange)!important;color:#fff!important;border:0!important;border-radius:16px!important;font-size:17px!important}
  body.fl-ui .login-forgot-row a{color:var(--fl-orange)!important;font-weight:700}
}

/* very small phones */
@media (max-width:359px), (max-device-width: 359px){
  body.fl-ui .stats{grid-template-columns:1fr!important}
  body.fl-ui .fl-tabbar a span,body.fl-ui .fl-tabbar button span{font-size:10px}
}

/* tab bar is phone-only */
.fl-tabbar{display:none}
@media (max-width:760px), (max-device-width: 760px){body.fl-ui .fl-tabbar{display:grid}}

/* respect reduced motion */
@media (prefers-reduced-motion:reduce){body.fl-ui .sidebar{transition:none!important}}

@media(max-width:760px), (max-device-width: 760px){
 html body.fl-ui .sidebar .side-group-toggle{display:flex!important;align-items:center!important;gap:8px!important}
 html body.fl-ui .sidebar .side-group-toggle>span{flex:1;min-width:0;white-space:nowrap!important}
}

/* Last-word overrides: legacy .action-tabs styles assign fixed-width grid
   columns; explicitly release those constraints for apology review cards. */
@media(max-width:760px), (max-device-width: 760px){
 html body.portal-body.fl-ui .unified-attendance-hub .apology-review-table-wrap table.apology-review-table tbody tr>td:last-child{
  display:block!important;box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;
 }
 html body.portal-body.fl-ui .unified-attendance-hub .apology-review-table-wrap table.apology-review-table tbody tr>td:last-child .apology-action-buttons{
  display:flex!important;flex-flow:row nowrap!important;align-items:stretch!important;justify-content:stretch!important;
  box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;
  padding:0!important;border:0!important;margin:8px 0 0!important;gap:10px!important;
 }
 html body.portal-body.fl-ui .unified-attendance-hub .apology-review-table-wrap table.apology-review-table tbody tr>td:last-child .apology-action-buttons>form{
  display:block!important;flex:1 1 0!important;box-sizing:border-box!important;width:auto!important;min-width:0!important;max-width:none!important;
  padding:0!important;border:0!important;margin:0!important;
 }
 html body.portal-body.fl-ui .unified-attendance-hub .apology-review-table-wrap table.apology-review-table tbody tr>td:last-child .apology-action-buttons .btn{
  display:flex!important;align-items:center!important;justify-content:center!important;flex:1 1 0!important;
  box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:none!important;
  height:auto!important;min-height:44px!important;padding:10px 8px!important;margin:0!important;
  font-size:14px!important;line-height:1.2!important;white-space:nowrap!important;word-break:keep-all!important;
 }
}

/* Apology approvals: readable cards on narrow screens instead of compressed
   eight-column records. Desktop keeps its sortable-style table presentation. */
@media(max-width:760px), (max-device-width: 760px){
 html body.fl-ui .unified-attendance-hub .attendance-secondary-tabs[aria-label="Apology status"]{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:8px!important;
  overflow:visible!important;
  white-space:normal!important;
 }
 html body.fl-ui .unified-attendance-hub .attendance-secondary-tabs[aria-label="Apology status"]>a{
  display:flex!important;justify-content:center!important;align-items:center!important;
  min-width:0!important;width:100%!important;max-width:none!important;
  min-height:42px!important;padding:9px 10px!important;text-align:center!important;
  white-space:normal!important;line-height:1.2!important;border-radius:12px!important;
 }
 html body.fl-ui .apology-review-table-wrap{overflow:visible!important;background:transparent!important;border:0!important;box-shadow:none!important}
 html body.fl-ui .apology-review-table{display:block!important;width:100%!important;min-width:0!important;table-layout:auto!important;border:0!important}
 html body.fl-ui .apology-review-table colgroup,
 html body.fl-ui .apology-review-table thead{display:none!important}
 html body.fl-ui .apology-review-table tbody{display:grid!important;gap:12px!important;width:100%!important}
 html body.fl-ui .apology-review-table tbody tr{
  display:flex!important;flex-direction:column!important;align-items:stretch!important;
  gap:12px!important;width:100%!important;min-width:0!important;
  padding:16px!important;border:1px solid #e5ded3!important;border-radius:18px!important;
  background:#fff!important;box-shadow:0 5px 16px rgba(25,45,68,.055)!important;
 }
 html body.fl-ui .apology-review-table tbody tr>td{
  display:block!important;width:auto!important;min-width:0!important;max-width:none!important;
  padding:0!important;border:0!important;background:transparent!important;
  white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;
  font-size:13px!important;line-height:1.4!important;color:#183653!important;
 }
 html body.fl-ui .apology-review-table tbody tr>td:first-child{display:none!important}
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(2),
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(3),
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(4),
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(5),
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(6),
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(7),
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(8){grid-column:auto!important;grid-row:auto!important}
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(2),
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(3),
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(6),
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(7){display:grid!important;grid-template-columns:112px minmax(0,1fr)!important;column-gap:8px!important;align-items:start!important}
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(2)::before{content:'SCOUT'!important}
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(3)::before{content:'EVENT'!important}
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(4)::before{content:'REASON'!important}
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(5)::before{content:'EVIDENCE'!important}
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(6)::before{content:'SUBMITTED LOCATION'!important}
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(7)::before{content:'SUBMITTED'!important}
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(8)::before{content:'REVIEW'!important}
 html body.fl-ui .apology-review-table tbody tr>td::before{display:block!important;grid-column:1!important;grid-row:1 / span 5!important;color:#65748a!important;font-size:10px!important;font-weight:700!important;letter-spacing:.07em!important;line-height:1.35!important;overflow-wrap:normal!important}
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(4){display:block!important}
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(4)::before,
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(5)::before{margin-bottom:5px!important}
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(5){display:block!important}
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(8){display:block!important;padding-top:12px!important;border-top:1px solid #edf0f3!important}
 html body.fl-ui .apology-review-table tbody tr>td:nth-child(8)::before{margin-bottom:6px!important}
 html body.fl-ui .apology-review-table td strong{display:block!important;font-size:13px!important;line-height:1.3!important;font-weight:700!important;overflow-wrap:anywhere!important}
 html body.fl-ui .apology-review-table td small{display:block!important;margin-top:3px!important;font-size:11px!important;line-height:1.3!important;color:#6b7788!important;overflow-wrap:anywhere!important}
 html body.fl-ui .apology-review-table td:nth-child(4){color:#344b62!important}
 html body.fl-ui .apology-review-table td:nth-child(5) .btn{min-height:34px!important;padding:7px 10px!important;font-size:12px!important}
 html body.fl-ui .apology-review-table td:nth-child(8)>.tag{display:inline-flex!important;margin:0 0 8px!important}
 html body.fl-ui .apology-review-table td:nth-child(8) .apology-action-buttons{
  display:flex!important;flex-direction:row!important;align-items:stretch!important;
  gap:8px!important;width:100%!important;min-width:0!important;margin-top:4px!important;
 }
 html body.fl-ui .apology-review-table td:nth-child(8) .apology-action-buttons form{display:block!important;flex:1 1 0!important;width:0!important;min-width:0!important;margin:0!important}
 html body.fl-ui .apology-review-table td:nth-child(8) .apology-action-buttons .btn{display:flex!important;justify-content:center!important;width:100%!important;min-width:0!important;min-height:42px!important;padding:9px 10px!important;font-size:13px!important;white-space:nowrap!important}
 html body.fl-ui .apology-review-table tbody tr>td.empty{grid-column:auto!important;grid-row:auto!important;padding:8px!important;text-align:center!important}
}

/* Reference design: composed screens, rather than legacy card overrides. */
.fl-phone-dashboard,.fl-phone-title,.fl-phone-install,.fl-scout-cards,.fl-filter-toggle,.fl-header-bell,.fl-manage-scouts{display:none}
.login-mobile-brand>span{display:none}

/* Let action labels determine button width; older fixed widths clipped them. */
html body.fl-ui .table-wrap .action-tabs{
 display:flex!important;flex-wrap:wrap!important;align-items:center!important;
 gap:8px!important;width:auto!important;min-width:0!important;white-space:normal!important;
}
html body.fl-ui .table-wrap .action-tabs form{
 display:flex!important;flex:0 0 auto!important;width:auto!important;min-width:0!important;max-width:none!important;margin:0!important;
}
html body.fl-ui .table-wrap .action-tabs .btn{
 flex:0 0 auto!important;width:auto!important;min-width:0!important;max-width:none!important;
 height:auto!important;min-height:34px!important;padding:8px 12px!important;
 font-size:13px!important;line-height:1.25!important;white-space:nowrap!important;
 overflow:visible!important;text-overflow:clip!important;
}
@media(max-width:760px), (max-device-width: 760px){
 html body.fl-ui [hidden]{display:none!important}
 html body.fl-ui .sidebar::before,html body.fl-ui .sidebar::after{display:none!important}
 html body.fl-ui .sidebar .portal-brand{margin:0!important;width:100%!important;max-width:none!important;border:0!important;display:flex!important;flex-direction:row!important;justify-content:flex-start!important;padding:20px 18px!important}
 html body.fl-ui .sidebar .brand-copy{text-align:left!important;display:block!important}
 html body.fl-ui .side-group-toggle>svg,html body.fl-ui .side-group-toggle .side-group-icon{display:none!important}
 html body.fl-ui .side-group-toggle{border:0!important;background:none!important;box-shadow:none!important;text-transform:uppercase!important;letter-spacing:.08em!important;justify-content:space-between!important}
 html body.fl-ui .fl-summary-card small,html body.fl-ui .fl-recent-activity p{color:var(--fl-muted)!important}
 html body.fl-ui .fl-phone-dashboard .fl-more-dashboard{color:var(--fl-navy)!important}
 html body.fl-ui .fl-scan-status{display:flex;align-items:center;justify-content:space-between;margin:12px 0;font-size:12px;color:var(--fl-muted)}
 html body.fl-ui .fl-scan-status span{background:var(--fl-active);color:var(--fl-navy);padding:8px 12px;border-radius:20px;font-weight:600}
 html body.fl-ui .topbar-copy p,html body.fl-ui .fl-phone-dashboard *,html body.fl-ui .login-form-wrap *,html body.fl-ui .fl-scout-cards *{text-transform:none!important;letter-spacing:normal}
 html body.fl-ui .topbar-copy p{font-weight:500!important}
 html body.fl-ui .fl-next-session .eyebrow{text-transform:uppercase!important;letter-spacing:.12em!important}
 html body.fl-ui .fl-summary-card strong{font-weight:800!important}
 html body.fl-ui .login-form-wrap h2{font-weight:800!important}
 html body.fl-ui .login-mobile-brand::after{font-weight:800!important}
 html body.fl-ui .login-form-wrap input:focus{border-color:var(--fl-navy)!important}
 html body.fl-ui .login-page main{padding-bottom:0!important}
 html body.fl-ui .fl-manage-scouts{display:block;background:none;color:var(--fl-navy);border:0;font-size:12px;margin:12px auto;padding:8px}
 html body.fl-ui:not(.fl-scout-management) #scoutBulkForm{display:none!important}
 html body.fl-ui.fl-scout-management .fl-scout-cards{display:none!important}
 html body.fl-ui.fl-scout-management .scouts-fit-wrap{display:block!important}
 html body.fl-ui.fl-scanner-page .attendance-hub-tabs{display:flex!important;flex-wrap:nowrap!important;overflow-x:auto;background:none!important;border:0!important;padding:0!important;margin:0 0 12px!important}
 html body.fl-ui.fl-scanner-page .attendance-hub-tabs a{min-height:36px!important;padding:7px 12px!important;white-space:nowrap;font-size:11px!important;border-radius:18px!important}
 html body.fl-ui.fl-scanner-page .unified-attendance-hub,html body.fl-ui.fl-scanner-page .attendance-record-grid,html body.fl-ui.fl-scanner-page .scanner-card{background:none!important;border:0!important;padding:0!important;box-shadow:none!important;margin-top:0!important;gap:0!important}
 html body.fl-ui.fl-scanner-page .scanner-card>h2,html body.fl-ui.fl-scanner-page .scanner-card>.eyebrow{display:none!important}
 html body.fl-ui.fl-scanner-page .scanner-card>p{margin:0 0 12px!important;font-size:11px!important;line-height:1.5!important}
 html body.fl-ui.fl-scanner-page #reader{min-height:300px!important}
 html body.fl-ui.fl-scanner-page .manual-entry{display:grid!important;grid-template-columns:1fr!important;gap:8px!important}
 html body.fl-ui.fl-scanner-page .manual-entry>span{font-size:11px!important;text-align:center}
 html body.fl-ui.fl-scanner-page .manual-entry input{width:100%!important}
 html body.fl-ui.fl-scanner-page .scan-result{padding:16px!important;margin-top:12px!important}
 html body.fl-ui.fl-scanner-page .scan-result h3{font-size:14px!important}
 html body.fl-ui.fl-scanner-page .scan-result p{font-size:12px!important}
 body.fl-ui .topbar-copy p{display:block!important}
 body.fl-ui .login-form-wrap form{gap:0!important}
 body.fl-ui .fl-next-session .eyebrow{border:0!important;border-radius:0!important;padding:0!important;background:none!important;text-transform:uppercase!important}
 body.fl-ui{--primary:var(--fl-navy);--surface:var(--fl-card);--text:var(--fl-ink);--muted:var(--fl-muted);--border:var(--fl-line)}
 body.fl-ui .topbar{min-height:96px!important;padding:18px 16px!important;gap:14px!important}
 body.fl-ui .topbar .menu{width:44px!important;height:44px!important;min-height:44px!important}
 body.fl-ui .topbar-user,body.fl-ui .topbar-meta{padding:0!important;background:none!important;border:0!important}
 body.fl-ui .topbar-avatar{width:34px!important;height:34px!important;background:var(--fl-orange)!important;color:white!important;font-size:12px!important;border:0!important}
 body.fl-ui .fl-header-bell{display:grid;width:42px;height:44px;place-items:center;background:#ffffff20;border-radius:13px;color:white}
 body.fl-ui .fl-header-bell svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8}
 body.fl-ui .fl-tabbar{grid-template-columns:repeat(var(--fl-tab-count,5),1fr)!important;box-sizing:border-box!important}
 body.fl-ui .fl-tabbar .fl-scan svg{width:64px!important;height:64px!important;margin-top:-30px!important}
 body.fl-ui .fl-tabbar .fl-scan.on svg{padding:16px!important;background:var(--fl-orange)!important}
 body.fl-ui .sidebar .sidebar-collapse{display:none!important}
 body.fl-ui .sidebar .portal-brand{min-height:116px!important;border-radius:0!important}
 body.fl-ui .sidebar .brand-logo{width:62px!important;height:58px!important;object-fit:contain}
 body.fl-ui .sidebar .brand-copy b{font-size:18px!important}
 body.fl-ui .sidebar .brand-copy small{font-size:12px!important;color:#b9c8db!important}
 body.fl-ui .side-group-toggle{height:32px!important;min-height:32px!important;padding:0 12px!important}
 body.fl-ui .side-group-items{padding:0!important}
 body.fl-ui .side-link{font-size:16px!important;min-height:44px!important}
 body.fl-ui .sidebar-foot .account-row{flex-wrap:wrap!important}
 body.fl-ui .sidebar-foot .account-avatar{background:var(--fl-orange)!important;color:#fff!important}
 body.fl-ui .sidebar-foot .theme-toggle{background:transparent!important;border:0!important;color:var(--fl-ink)!important}
 body.fl-ui .fl-phone-dashboard{display:block!important}
 body.fl-ui .fl-phone-dashboard.fl-admin-phone-dashboard{display:none!important}
 body.fl-ui:not(.fl-dashboard-expanded) .crew-dashboard-theme:has(.fl-phone-dashboard:not(.fl-admin-phone-dashboard))>:not(.fl-phone-dashboard){display:none!important}
 body.fl-ui .fl-phone-dashboard h3{font-size:16px!important;line-height:1.4!important;margin:18px 2px 12px!important;color:var(--fl-ink)!important}
 body.fl-ui .fl-next-session{position:relative;overflow:hidden;background:linear-gradient(115deg,#1e3a5f,#305785)!important;border-radius:20px;padding:18px 18px 54px;color:white;min-height:138px;box-sizing:border-box}
 body.fl-ui .fl-next-session::after{content:'';position:absolute;width:180px;height:180px;border-radius:50%;background:#ffffff08;right:-80px;top:-90px;pointer-events:none}
 body.fl-ui .fl-next-session .eyebrow{font-size:10px!important;color:var(--fl-gold)!important;font-weight:700;letter-spacing:.12em}
 body.fl-ui .fl-next-session h2{font-size:22px!important;color:white!important;line-height:1.25!important;margin:3px 0 5px!important}
 body.fl-ui .fl-next-session p{font-size:12px!important;color:#b9c8db!important;margin:0!important;max-width:85%}
 body.fl-ui .fl-next-session .btn{position:absolute;right:18px;bottom:16px;display:flex!important;gap:12px;align-items:center;background:var(--fl-orange)!important;color:white!important;min-height:40px!important;padding:8px 20px!important;border:0!important;border-radius:14px!important;font-size:14px!important}
 body.fl-ui .fl-phone-dashboard svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
 body.fl-ui .fl-summary-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0 0}
 body.fl-ui .fl-summary-card{background:var(--fl-card);border:1px solid var(--fl-line);border-radius:18px;padding:13px;box-shadow:0 1px 1px #12233a08;min-width:0}
 body.fl-ui .fl-summary-icon{display:grid;place-items:center;width:34px;height:34px;border-radius:12px;background:#eaf0f6;color:var(--fl-navy);flex-shrink:0}
 body.fl-ui .fl-summary-icon.green{background:#e3f5ec;color:#168c55}
 body.fl-ui .fl-summary-icon.orange{background:#fff0dc;color:#df7a00}
 body.fl-ui .fl-summary-icon.red{background:#fbe8e8;color:#c73f3f}
 body.fl-ui .fl-summary-card strong{display:block;color:var(--fl-ink);font-size:24px!important;font-weight:800!important;line-height:1.2;margin-top:6px;overflow-wrap:anywhere}
 body.fl-ui .fl-summary-card small{display:block;font-size:12px!important;color:var(--fl-muted);margin-top:1px}
 body.fl-ui .fl-quick-actions{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
 body.fl-ui .fl-quick-actions a{color:var(--fl-ink);text-decoration:none;text-align:center;min-width:0}
 body.fl-ui .fl-quick-actions a>span{display:grid;place-items:center;width:58px;height:58px;margin:auto;border:1px solid var(--fl-line);border-radius:20px;background:var(--fl-card);color:var(--fl-navy)}
 body.fl-ui .fl-quick-actions b{display:block;font-size:11px!important;font-weight:600!important;margin-top:7px;white-space:nowrap}
 body.fl-ui .fl-section-heading{display:flex;align-items:center;justify-content:space-between;margin-top:4px}
 body.fl-ui .fl-section-heading a{font-size:12px;color:var(--fl-orange);font-weight:700}
 body.fl-ui .fl-recent-activity article{display:flex;align-items:center;gap:12px;border:1px solid var(--fl-line);border-radius:17px;background:var(--fl-card);padding:12px;margin-bottom:8px}
 body.fl-ui .fl-recent-activity strong{font-size:13px;color:var(--fl-ink);font-weight:700}
 body.fl-ui .fl-recent-activity p{font-size:12px;color:var(--fl-muted);margin:1px 0 0}
 body.fl-ui .fl-more-dashboard{background:none!important;color:var(--fl-navy)!important;border:0!important;display:block;margin:18px auto 0;padding:8px;font-size:12px!important}
 body.fl-ui .login-page,body.fl-ui .login-shell,body.fl-ui .login-panel{border:0!important;border-radius:0!important;box-shadow:none!important}
 body.fl-ui .login-form-wrap{margin-top:270px!important;padding:30px 28px 24px!important;min-height:calc(100dvh - 270px)!important;border:0!important;border-radius:30px 30px 0 0!important;box-sizing:border-box!important}
 body.fl-ui .login-mobile-brand{top:-224px!important;display:flex!important;flex-direction:column;align-items:center}
 body.fl-ui .login-mobile-brand img{width:112px!important;height:94px!important;object-fit:contain;box-sizing:border-box}
 body.fl-ui .login-mobile-brand::after{order:1;font-size:27px!important;margin-top:16px!important}
 body.fl-ui .login-mobile-brand>span{display:block;order:2;color:#b9c8db!important;font-size:13px!important;margin-top:2px}
 body.fl-ui .back-home{top:-254px!important;font-size:11px!important}
 body.fl-ui .fl-desktop-title{display:none!important}
 body.fl-ui .fl-phone-title{display:inline!important}
 body.fl-ui .login-form-wrap h2{font-size:25px!important;color:var(--fl-ink)!important}
 body.fl-ui .login-form-wrap>p.muted{font-size:14px!important;margin:3px 0 25px!important;color:var(--fl-muted)!important}
 body.fl-ui .login-form-wrap .field{margin:0 0 17px!important}
 body.fl-ui .login-form-wrap .field label{font-size:12px!important;font-weight:700!important;margin-bottom:8px!important;color:var(--fl-ink)!important}
 body.fl-ui .login-form-wrap input:not([type=checkbox]){height:54px!important;font-size:16px!important;box-shadow:none!important;border-radius:16px!important;padding:14px 18px!important}
 body.fl-ui .password-field{border:0!important;background:none!important;box-shadow:none!important;position:relative}
 body.fl-ui .password-field input{padding-right:62px!important;border:1.5px solid var(--fl-navy)!important}
 body.fl-ui .password-field button{position:absolute;right:8px;top:7px;height:40px!important;min-height:0!important;background:none!important;border:0!important;font-size:12px!important;padding:6px!important;color:var(--fl-muted)!important}
 body.fl-ui .login-remember{display:none!important}
 body.fl-ui .login-forgot-row{margin:3px 0 18px!important}
 body.fl-ui .login-forgot-row a{font-size:13px!important}
 body.fl-ui .login-submit{height:54px!important;min-height:54px!important;border-radius:17px!important}
 body.fl-ui .fl-phone-install{display:none!important}
 body.fl-ui .fl-or{display:flex;align-items:center;gap:14px;color:var(--fl-muted);font-size:12px;margin-bottom:14px}
 body.fl-ui .fl-or::before,body.fl-ui .fl-or::after{content:'';height:1px;flex:1;background:var(--fl-line)}
 body.fl-ui .fl-phone-install .btn{width:100%;display:flex!important;gap:15px;justify-content:center;align-items:center;min-height:52px!important;border:1.5px solid var(--fl-navy)!important;background:var(--fl-card)!important;border-radius:16px!important;color:var(--fl-navy)!important;font-size:13px!important}
 body.fl-ui .fl-phone-install small{display:block;text-align:center;color:var(--fl-muted);font-size:10px!important;margin-top:22px}
 body.fl-ui .recruiter-register-link{margin:18px 0 0!important}
 body.fl-ui .recruiter-register-link p,body.fl-ui .recruiter-register-link small{display:none!important}
 body.fl-ui .recruiter-register-link .btn{background:none!important;border:0!important;font-size:12px!important;min-height:0!important;padding:0!important}
 body.fl-ui[data-fl-page='/scouts'] .scouts-fit-wrap{display:none!important}
 body.fl-ui .fl-scout-cards{display:grid;gap:12px;margin-top:14px}
 body.fl-ui .fl-scout-card{padding:12px;border:1px solid var(--fl-line);border-radius:18px;background:var(--fl-card);min-width:0;box-shadow:0 1px 1px #12233a08}
 body.fl-ui .fl-scout-card-head{display:flex;align-items:center;gap:10px}
 body.fl-ui .fl-scout-card-head>div{min-width:0;flex:1}
 body.fl-ui .fl-scout-card-head h3{font-size:16px!important;margin:0!important;color:var(--fl-ink);line-height:1.3}
 body.fl-ui .fl-scout-card-head p{font-size:12px!important;margin:2px 0 0;color:var(--fl-muted)}
 body.fl-ui .fl-scout-card-head .member-avatar{width:42px!important;height:42px!important;border-radius:50%;flex-shrink:0;background:#e0ebf6;color:#3178b8;font-size:14px}
 body.fl-ui .fl-status{font-size:10px!important;font-weight:700;padding:5px 7px;border-radius:12px;color:#168c55;background:#e3f5ec;white-space:nowrap}
 body.fl-ui .fl-status.pending{background:#fff4cb;color:#917100}
 body.fl-ui .fl-scout-card dl{display:grid;grid-template-columns:1fr 1.2fr .7fr;gap:8px;border-top:1px solid var(--fl-line);padding-top:8px;margin:10px 0 0}
 body.fl-ui .fl-scout-card dt{font-size:10px;color:var(--fl-muted);text-transform:uppercase;letter-spacing:.07em}
 body.fl-ui .fl-scout-card dd{font-size:12px;font-weight:600;margin:0;color:var(--fl-ink);overflow-wrap:anywhere}
 body.fl-ui .fl-scout-card-actions{display:flex;justify-content:space-between;margin-top:8px;border-top:1px solid var(--fl-line);padding-top:6px}
 body.fl-ui .fl-scout-card-actions button{background:none;border:0;color:var(--fl-navy);font-size:11px;min-height:28px;padding:0 4px}
 body.fl-ui .scouts-list-panel{padding:0!important;background:none!important;border:0!important}
 body.fl-ui .scouts-list-panel>.panel-head{display:none!important}
 body.fl-ui .scout-status-tabs{display:flex!important;overflow:auto;gap:8px;background:none!important;border:0!important;padding:0!important}
 body.fl-ui .scout-status-tabs a{display:flex!important;flex:0 0 auto;align-items:center;gap:3px;background:var(--fl-card)!important;border:1px solid var(--fl-line)!important;border-radius:22px!important;min-height:38px!important;padding:8px 14px!important;color:var(--fl-muted)!important;font-size:12px!important}
 body.fl-ui .scout-status-tabs a.active{background:var(--fl-bar)!important;color:white!important}
 body.fl-ui .scout-status-tabs b{background:none!important;color:inherit!important;padding:0!important;font-size:12px!important}
 body.fl-ui .scouts-filter-grid{display:grid!important;grid-template-columns:1fr 48px!important;position:relative;gap:10px!important;padding:0!important;margin:12px 0!important}
 body.fl-ui .scouts-filter-grid>label:not(:first-of-type),body.fl-ui .scouts-filter-grid>.year-multi-filter,body.fl-ui .scouts-filter-grid>.filter-buttons{display:none!important}
 body.fl-ui .scouts-filter-grid>label:first-of-type{grid-column:1;min-width:0!important}
 body.fl-ui .scouts-filter-grid>label:first-of-type>span{display:none!important}
 body.fl-ui .fl-filter-toggle{display:block!important;grid-column:2;grid-row:1;background:var(--fl-orange);color:white;border:0;border-radius:15px;font-size:26px;height:48px}
 body.fl-ui .scouts-filter-grid.fl-filters-open>label,body.fl-ui .scouts-filter-grid.fl-filters-open>.year-multi-filter,body.fl-ui .scouts-filter-grid.fl-filters-open>.filter-buttons{display:flex!important;grid-column:1/-1}
 body.fl-ui .scouts-filter-grid.fl-filters-open>label:first-of-type{grid-column:1}
 body.fl-ui .scouts-actions,body.fl-ui .scout-duplicate-tabs{overflow-x:auto;flex-wrap:nowrap!important}
 body.fl-ui .scouts-actions .btn{flex-shrink:0;font-size:11px!important;min-height:32px!important;padding:6px 10px!important}
 body.fl-ui .scout-duplicate-tabs a{font-size:11px!important;white-space:nowrap}
 body.fl-ui .unified-attendance-hub{background:none!important;padding:0!important;border:0!important}
 body.fl-ui .scanner-card{background:none!important;border:0!important;padding:0!important;box-shadow:none!important}
 body.fl-ui .scanner-card>p{font-size:12px!important;color:var(--fl-muted)}
 body.fl-ui #reader{position:relative;min-height:300px!important;border-radius:24px!important;background:radial-gradient(circle at center,#23415f,#0d1b29)!important;border:0!important;overflow:hidden}
 body.fl-ui #reader:empty::before{content:'';position:absolute;inset:48px 50px 95px;border:0;border-radius:0;background:linear-gradient(var(--fl-orange),var(--fl-orange)) left top/60px 5px,linear-gradient(var(--fl-orange),var(--fl-orange)) left top/5px 60px,linear-gradient(var(--fl-orange),var(--fl-orange)) right top/60px 5px,linear-gradient(var(--fl-orange),var(--fl-orange)) right top/5px 60px,linear-gradient(var(--fl-orange),var(--fl-orange)) left bottom/60px 5px,linear-gradient(var(--fl-orange),var(--fl-orange)) left bottom/5px 60px,linear-gradient(var(--fl-orange),var(--fl-orange)) right bottom/60px 5px,linear-gradient(var(--fl-orange),var(--fl-orange)) right bottom/5px 60px;background-repeat:no-repeat}
 body.fl-ui #reader:empty::after{content:'Point the camera at a scout’s QR code';position:absolute;bottom:30px;left:18px;right:18px;color:white;text-align:center;font-size:13px}
 body.fl-ui .scanner-controls{margin:14px 0!important;display:flex;gap:10px}
 body.fl-ui .scanner-controls .btn{flex:1}
 body.fl-ui .manual-entry{border:1px solid var(--fl-line)!important;border-radius:18px!important;background:var(--fl-card)!important;padding:14px!important}
 body.fl-ui .scan-result{background:var(--fl-card)!important;color:var(--fl-ink)!important;border-color:var(--fl-line)!important;border-radius:18px!important}
 html[data-portal-theme='dark'] body.fl-ui .fl-next-session{background:#1a2e49!important}
 html[data-portal-theme='dark'] body.fl-ui .fl-summary-icon{background:#23334a}
 html[data-portal-theme='dark'] body.fl-ui .fl-summary-icon.green{background:#183d31}
 html[data-portal-theme='dark'] body.fl-ui .fl-summary-icon.orange{background:#483421}
 html[data-portal-theme='dark'] body.fl-ui .fl-summary-icon.red{background:#48272c}
}

/* Attendance view tabs contain long labels (for example, approved apologies).
   Let the row scroll on phones so labels keep their full width and never collide. */
@media(max-width:760px), (max-device-width: 760px){
 html body.fl-ui .attendance-secondary-tabs{
  display:flex!important;
  flex-wrap:nowrap!important;
  justify-content:flex-start!important;
  align-items:center!important;
  gap:6px!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  overscroll-behavior-x:contain!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:none!important;
  white-space:nowrap!important;
 }
 html body.fl-ui .attendance-secondary-tabs::-webkit-scrollbar{display:none!important}
 html body.fl-ui .attendance-secondary-tabs>a{
  display:inline-flex!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:max-content!important;
  max-width:none!important;
  white-space:nowrap!important;
  line-height:1.25!important;
  padding:8px 12px!important;
 }
}

/* Keep apology review content inside the phone viewport; nested panel flex
   children otherwise retain their desktop min-content width and get clipped. */
@media(max-width:760px), (max-device-width: 760px){
 html body.portal-body.fl-ui main,
 html body.portal-body.fl-ui main>.content,
 html body.portal-body.fl-ui main>.content>.unified-attendance-hub{
  box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100vw!important;
  margin-left:0!important;margin-right:0!important;transform:none!important;
 }
 html body.portal-body.fl-ui main>.content{padding-left:14px!important;padding-right:14px!important;overflow-x:clip!important}
 html body.portal-body.fl-ui .unified-attendance-hub,
 html body.portal-body.fl-ui .unified-attendance-hub>*{min-width:0!important;max-width:100%!important}
 html body.portal-body.fl-ui .unified-attendance-hub .panel-head,
 html body.portal-body.fl-ui .unified-attendance-hub .panel-head>div{
  display:block!important;box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;
  margin-left:0!important;margin-right:0!important;padding-left:0!important;padding-right:0!important;
  text-indent:0!important;overflow-wrap:anywhere!important;transform:none!important;
 }
 html body.portal-body.fl-ui .unified-attendance-hub .panel-head h2,
 html body.portal-body.fl-ui .unified-attendance-hub .panel-head h3,
 html body.portal-body.fl-ui .unified-attendance-hub .panel-head p{
  width:100%!important;min-width:0!important;max-width:100%!important;text-indent:0!important;
  white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;
 }
 html body.portal-body.fl-ui .unified-attendance-hub .attendance-secondary-tabs[aria-label="Apology status"]{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;
  margin-left:0!important;margin-right:0!important;overflow:visible!important;
 }
 html body.portal-body.fl-ui .unified-attendance-hub .report-summary{
  display:flex!important;align-items:center!important;flex-wrap:wrap!important;gap:8px!important;
  box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important;
  padding-left:0!important;padding-right:0!important;overflow-wrap:anywhere!important;
 }
 html body.portal-body.fl-ui .unified-attendance-hub .report-summary strong{flex:0 0 auto!important;font-size:22px!important;line-height:1.1!important}
 html body.portal-body.fl-ui .unified-attendance-hub .apology-review-table-wrap{width:100%!important;min-width:0!important;max-width:100%!important}
}
