/* RSAapp/assets/app.css
   Minimal 'app mode' overrides on top of RSAadmin admin.css */

:root{
  --accent: #d32f2f; /* rebel red */
  --cardBorder: rgba(17,24,39,0.08);
  --cardShadow: 0 14px 30px rgba(17,24,39,0.12), 0 2px 6px rgba(17,24,39,0.04);
}

/* Force app typography */
html, body{ font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }

/* Remove desktop layout assumptions */
.app .layout { display:block; }
.sidebar, .sidebar-overlay, .burger { display:none !important; }

/* Topbar: simpler */
.topbar{ position:sticky; top:0; z-index:50; padding-top: env(safe-area-inset-top); }
.topbar .topbar-left{ gap:10px; }
.topbar .brand-logo-img{ height:36px; }
.topbar .topbar-right{ gap:10px; }
.topbar .topbar-loginas{ display:none; } /* keep clean on mobile */
.topbar .topbar-user-meta{ display:none; }

.icon-btn{
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid #e5e7eb;
  background:#fff;
  border-radius:14px;
  text-decoration:none;
  color:#111827;
}
.icon-btn svg{ width:20px; height:20px; }

.page-title{ margin:0 0 12px 0; font-size:20px; font-weight:900; }

/* Content spacing for mobile */
.content{ padding:10px; max-width: 720px; margin: 0 auto; }
.card{ border-radius:18px; }
.pill, button, input, select, textarea{ border-radius:14px; }

/* Home tiles */
.home-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
}
.tile{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  min-height:120px;
  text-decoration:none;
  color:inherit;
  border:1px solid var(--cardBorder);
  background:#fff;
  border-radius:18px;
  box-shadow: var(--cardShadow);
}
.tile .ico{
  width:42px; height:42px;
  display:flex; align-items:center; justify-content:center;
  border-radius:14px;
  background: #f3f4f6;
  margin-bottom:10px;
}
.tile .ico svg{ width:22px; height:22px; }
.tile .title{ font-weight:800; }
.tile .sub{ font-size:12px; color:#6b7280; margin-top:2px; }
.tile.disabled{ opacity:.45; pointer-events:none; }

.tile.wide{
  grid-column: 1 / -1;
  min-height:78px;
  flex-direction:row;
  justify-content:flex-start;
  padding:0 16px;
  gap:12px;
}
.tile.wide .ico{ margin:0; }
.tile.wide .title{ margin-right:auto; }

/* Bottom nav */
.bottom-nav{
  position:fixed;
  left:0; right:0; bottom:0;
  background: rgba(255,255,255,.95);
  border-top:1px solid #e5e7eb;
  display:flex;
  justify-content:space-around;
  padding:10px 8px calc(10px + env(safe-area-inset-bottom));
  z-index:60;
  backdrop-filter: blur(8px);
}
.bottom-nav a{
  text-decoration:none;
  color:#111827;
  font-size:12px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:6px;
  min-width:70px;
}
.bottom-nav a.active{ color: var(--accent); font-weight:800; }
.bottom-nav svg{ width:22px; height:22px; }

/* Prevent content being hidden under bottom nav */
body{ padding-bottom: 78px; }

/* Settings */
.settings-list{ display:flex; flex-direction:column; gap:10px; }
.settings-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px;
  border:1px solid var(--cardBorder);
  background:#fff;
  border-radius:18px;
  box-shadow: var(--cardShadow);
}
.settings-row .meta{ display:flex; flex-direction:column; gap:2px; }
.settings-row .meta .label{ font-weight:900; }
.settings-row .meta .hint{ font-size:12px; color:#6b7280; }
.install-action-panel{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.install-action-panel h3{ margin-bottom:6px; }
.install-action-panel .pill{ flex:0 0 auto; }
@media (max-width:560px){
  .install-action-panel{ align-items:stretch; flex-direction:column; }
  .install-action-panel .pill{ width:100%; }
}

.switch{
  position:relative;
  width:48px;
  height:28px;
  flex:0 0 auto;
}
.switch input{ display:none; }
.switch .track{
  position:absolute;
  inset:0;
  border-radius:999px;
  background:#e5e7eb;
  border:1px solid #d1d5db;
}
.switch .thumb{
  position:absolute;
  top:3px;
  left:3px;
  width:22px;
  height:22px;
  border-radius:999px;
  background:#fff;
  border:1px solid #d1d5db;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.switch.disabled{ opacity:.45; }

/* Tables on mobile */
.table-wrap{ overflow:auto; -webkit-overflow-scrolling: touch; }
.table{ min-width: 640px; }
@media (max-width: 720px){
  .home-grid{ grid-template-columns: 1fr 1fr; }
  .table{ min-width: 560px; }
}

/* Better tap targets */
.pill, button{ min-height: 44px; }


/* ------------------------------------------------------------
   TEMP MOBILE TUNING (white → grey → white + bigger tiles)
   ------------------------------------------------------------ */
:root{
  --appGrey: #f3f4f6;
}

html, body{ background:#fff; }
body{ padding-bottom: 84px; }

.topbar{
  background:#fff;
  border-bottom:1px solid #e5e7eb;
}

/* Content: full white background (standard on all pages) */
.content{
  background: #fff;
  max-width: 720px;
  margin: 0 auto;
  padding: 10px;
  padding-left: calc(10px + env(safe-area-inset-left));
  padding-right: calc(10px + env(safe-area-inset-right));
  border-radius: 0;
}

/* Make home screen fill more of the viewport */
.content.home{
  min-height: calc(100dvh - 72px - 84px);
  display:flex;
}
.content.home .home-grid{
  flex:1;
  align-content:stretch;
  grid-auto-rows: 1fr;
}
.tile{
  min-height: clamp(140px, 18vh, 190px);
}
.tile.wide{
  min-height: 88px;
}

/* Bottom nav: solid white, no blur */
.bottom-nav{
  background:#fff;
  backdrop-filter: none;
}

/* ------------------------------------------------------------
   Concept match overrides (pure white + bigger "3D" tiles)
   ------------------------------------------------------------ */

/* Kill RSAadmin grain + grey wash */
body::before{ display:none !important; opacity:0 !important; background-image:none !important; }

/* Stronger elevation */
:root{
  --cardBorder: rgba(11,15,23,0.10);
  --cardShadow: 0 24px 60px rgba(11,15,23,0.14), 0 4px 14px rgba(11,15,23,0.06);
}

/* Pure white surfaces */
html, body{ background:#fff !important; }
.topbar{ background:#fff !important; backdrop-filter:none !important; }

/* Wider to edges */
.content{
  padding: 8px;
  padding-left: calc(8px + env(safe-area-inset-left));
  padding-right: calc(8px + env(safe-area-inset-right));
}

/* Home tiles: bigger, slightly squarer */
.home-grid{ gap:10px; }
.tile{
  border-radius: 22px;
  min-height: clamp(165px, 22vh, 235px);
}
.tile .ico{
  width:52px;
  height:52px;
  border-radius: 18px;
  background:#f3f4f6;
  margin-bottom:12px;
}
.tile .ico svg{ width:24px; height:24px; }
.tile .title{ font-size:20px; }
.tile .sub{ font-size:12px; }
.tile.wide{ border-radius: 26px; }

/* Bottom nav can handle 4 items (admin) */
.bottom-nav a{ min-width: 62px; }

/* Tactile tap feedback */
.tile:active{ transform: scale(.99); }

/* Session cards (training lists) */
.session-list{ display:flex; flex-direction:column; gap:10px; margin-top:10px; }
.session-card{
  display:block;
  padding:14px;
  border:1px solid var(--cardBorder);
  background:#fff;
  border-radius:18px;
  box-shadow: var(--cardShadow);
  text-decoration:none;
  color:inherit;
}
.session-card .row{ display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.session-card .date{ font-weight:900; }
.session-card .arena{ font-weight:800; margin-top:6px; }
.session-card .muted{ font-size:12px; }
.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid #e5e7eb;
  background:#f9fafb;
  font-size:12px;
  color:#111827;
  white-space:nowrap;
}

/* Timegroup editor: stack nicely on mobile */
.timegroup-row{
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
  padding:12px;
  border:1px solid var(--cardBorder);
  background:#fff;
  border-radius:18px;
  box-shadow: var(--cardShadow);
  margin-top:10px;
}
.timegroup-row .tg-actions{ display:flex; justify-content:flex-end; }

/* Booking cards */
.booking-list{ display:flex; flex-direction:column; gap:10px; margin-top:10px; }
.booking-card{
  padding:14px;
  border:1px solid var(--cardBorder);
  background:#fff;
  border-radius:18px;
  box-shadow: var(--cardShadow);
}
.booking-card .top{ display:flex; justify-content:space-between; gap:12px; }
.booking-card .dog{ font-weight:900; }
.booking-card .line{ margin-top:6px; font-size:13px; }
.booking-card .line .muted{ font-size:12px; }
.booking-card .meta{ margin-top:10px; display:flex; flex-wrap:wrap; gap:8px; }
.booking-card .meta a{ text-decoration:none; }


/* ------------------------------------------------------------
   iOS-style square module tiles (locked shape across devices)
   - Always 1:1 squares
   - Auto-fit columns (2 on phones, 3 on iPad, etc.)
   - Consistent rounded-square silhouette like iOS app icons
   ------------------------------------------------------------ */
:root{
  /* On phones this tracks viewport width; on larger screens it caps.
     This produces 2 columns on phones, 3 columns on iPad (with max-width 720). */
  --tileSize: clamp(140px, 44vw, 182px);
  --tileGap: 12px;
}

/* Grid: fixed-size squares that wrap into more columns when space allows */
.home-grid{
  grid-template-columns: repeat(auto-fit, minmax(var(--tileSize), var(--tileSize))) !important;
  gap: var(--tileGap) !important;
  justify-content: center;
}

/* Tile: true square + app-icon silhouette */
.tile{
  aspect-ratio: 1 / 1;
  height: auto;
  min-height: 0 !important;
  padding: 14px;
  border-radius: 22% !important; /* avoids "pill" look, keeps app-icon feel */
  box-shadow: 0 18px 44px rgba(11,15,23,0.14), 0 3px 12px rgba(11,15,23,0.06) !important;
  transition: transform .08s ease, box-shadow .08s ease;
}

.tile .ico{
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: #f1f3f5;
  margin-bottom: 12px;
}

.tile .title{
  font-size: 18px;
  line-height: 1.05;
  text-align: center;
}

.tile .sub{
  text-align: center;
}

.tile:active{
  transform: scale(0.985);
}

/* Prevent the special wide tile style from breaking square layout on home */
.home-grid .tile.wide{
  grid-column: auto;
  min-height: 0;
  flex-direction: column;
  justify-content: center;
  padding: 14px;
}

/* Slightly tighten content padding so tiles reach further towards the edges */
.content{
  padding: 10px !important;
  padding-left: calc(10px + env(safe-area-inset-left)) !important;
  padding-right: calc(10px + env(safe-area-inset-right)) !important;
}

@media (min-width: 768px){
  :root{
    --tileSize: 182px; /* lock on iPad so it becomes 3 columns, iOS-style */
    --tileGap: 14px;
  }
}

/* ------------------------------------------------------------
   iOS-style square module tiles (locked shape across devices)
   - Always 1:1 squares
   - Auto-fit columns (2 on phones, 3 on iPad, etc.)
   - Consistent rounded-square silhouette like iOS app icons
   ------------------------------------------------------------ */
:root{
  /* On phones this tracks viewport width; on larger screens it caps.
     This behaves like app icons: same shape, predictable sizing. */
  --tileSize: clamp(140px, 44vw, 182px);
  --tileGap: 12px;
  --tileRadius: 22%;
  --tileShadow: 0 18px 40px rgba(11,15,23,.14), 0 3px 10px rgba(11,15,23,.06);
}

/* Home grid: fixed-size squares (does NOT stretch into rectangles) */
.home-grid{
  grid-template-columns: repeat(auto-fit, minmax(var(--tileSize), var(--tileSize))) !important;
  gap: var(--tileGap) !important;
  justify-content: center;
  align-content: start;
}

/* Tiles: perfect squares */
.tile{
  aspect-ratio: 1 / 1;
  height: auto;
  min-height: 0 !important;
  padding: 14px;
  border-radius: var(--tileRadius) !important;
  box-shadow: var(--tileShadow) !important;
}

/* Keep the "wide" tile usable elsewhere (lists) */
.tile.wide{
  aspect-ratio: auto;
  height: auto;
  min-height: 88px;
}

/* Icon badge inside tile */
.tile .ico{
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: #f3f4f6;
  margin-bottom: 12px;
}
.tile .ico svg{ width: 24px; height: 24px; }

/* Typography inside tile */
.tile .title{ font-size: 18px; line-height: 1.1; }
.tile .sub{ font-size: 12px; }

/* On tablets, keep icon size stable and allow 3 columns naturally */
@media (min-width: 768px){
  :root{ --tileSize: 182px; }
}

/* Very small phones: allow slightly smaller tiles (still square) */
@media (max-width: 340px){
  :root{ --tileSize: 132px; }
}


/* ------------------------------------------------------------
   GRID CONTAINER FIX
   Ensures home-grid can actually grow (2 cols phone, 3+ on larger)
   ------------------------------------------------------------ */

/* Let home content use full available width */
.content.home{
  max-width: none !important;
  margin: 0 !important;
  display: block !important; /* avoid flex shrink-wrap issues */
}

.content.home .home-grid{
  width: 100% !important;
  justify-content: center;
}

/* On large screens, allow more columns by not capping content width */
@media (min-width: 1024px){
  .content{ max-width: none !important; }
}


/* ------------------------------------------------------------
   Mobile app polish v2
   Cleaner thumb-first layout, safer forms, and less desktop feel.
   ------------------------------------------------------------ */
html{
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background:#fff;
}
body{
  min-height:100dvh;
  overscroll-behavior-y:none;
  -webkit-tap-highlight-color: transparent;
  color:#0f172a;
}
.app{
  min-height:100dvh;
  background:
    linear-gradient(180deg, #fff 0%, #f8fafc 54%, #fff 100%);
}
.topbar{
  min-height:64px;
  padding: calc(8px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) 8px calc(12px + env(safe-area-inset-left)) !important;
  box-shadow: 0 1px 0 rgba(15,23,42,.07);
}
.topbar .brand-logo-img{
  height:34px !important;
  max-width:180px;
  object-fit:contain;
}
.rsa-system-brand{
  display:inline-flex;
  align-items:center;
  gap:10px;
  text-decoration:none;
}
.topbar-system-label{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:5px 9px;
  color:#991b1b;
  background:#fff1f2;
  border:1px solid #fecdd3;
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
  white-space:nowrap;
}
.topbar-right .icon-btn,
.avatar-circle{
  width:42px;
  height:42px;
  flex:0 0 42px;
}
.content{
  width:100%;
  max-width:760px !important;
  padding:14px !important;
  padding-left: calc(14px + env(safe-area-inset-left)) !important;
  padding-right: calc(14px + env(safe-area-inset-right)) !important;
  margin:0 auto !important;
}
.content.home{
  padding-top:18px !important;
  padding-bottom: calc(100px + env(safe-area-inset-bottom)) !important;
}
.home-grid{
  display:grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap:14px !important;
  justify-content:stretch !important;
  align-content:start !important;
}
.tile{
  width:100%;
  aspect-ratio:1 / 1;
  border-radius:28px !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,1), rgba(248,250,252,.96));
  border:1px solid rgba(15,23,42,.08);
  box-shadow: 0 18px 40px rgba(15,23,42,.12), 0 2px 8px rgba(15,23,42,.04) !important;
}
.tile .ico{
  width:52px;
  height:52px;
  border-radius:17px;
  background:#eef2f7;
}
.tile .title{
  font-size:clamp(15px, 4vw, 18px);
  font-weight:900;
  letter-spacing:-.03em;
}
.tile.disabled{
  opacity:.58;
  filter:saturate(.75);
}
.bottom-nav{
  left:10px;
  right:10px;
  bottom:10px;
  width:auto;
  border:1px solid rgba(15,23,42,.10);
  border-radius:24px;
  box-shadow:0 18px 44px rgba(15,23,42,.16);
  padding:8px 8px calc(8px + env(safe-area-inset-bottom));
  gap:2px;
}
.bottom-nav a{
  flex:1 1 0;
  min-width:0;
  min-height:52px;
  border-radius:18px;
  justify-content:center;
  color:#475569;
}
.bottom-nav a.active{
  background:#f8fafc;
  color:var(--accent);
}
.bottom-nav span{
  font-size:11px;
  line-height:1;
}
.bottom-nav svg{
  width:21px;
  height:21px;
}
.card,
.session-card,
.booking-card,
.settings-row,
.timegroup-row{
  border-radius:22px !important;
  box-shadow:0 14px 34px rgba(15,23,42,.10), 0 2px 8px rgba(15,23,42,.04) !important;
}
.card{
  padding:16px !important;
}
.row-actions,
.session-card [style*="justify-content:flex-end"],
.booking-card .top{
  gap:10px !important;
}
a.pill,
button,
.pill{
  min-height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:10px 14px;
  border-radius:16px !important;
  touch-action:manipulation;
}
input,
select,
textarea{
  width:100%;
  min-height:48px;
  font-size:16px !important;
  border-radius:16px !important;
}
textarea{
  min-height:112px;
}
label{
  display:block;
  margin-bottom:6px;
  font-size:12px;
  font-weight:800;
  color:#475569;
}
.grid[style*="grid-template-columns"],
.group-grid{
  grid-template-columns:1fr !important;
}
.group-grid{
  display:grid;
  gap:10px;
}
details summary{
  min-height:44px;
  display:flex;
  align-items:center;
}
.session-card .row,
.booking-card .top{
  align-items:flex-start;
}
.table-wrap,
.table{
  max-width:100%;
}
.table{
  font-size:13px;
}
#toast-container{
  left:12px;
  right:12px;
  bottom:calc(92px + env(safe-area-inset-bottom));
}
#toast-container .toast{
  max-width:none;
  width:100%;
  border-radius:18px;
}
.login-screen{
  min-height:100dvh;
  display:grid;
  place-items:center;
  padding:calc(18px + env(safe-area-inset-top)) calc(16px + env(safe-area-inset-right)) calc(18px + env(safe-area-inset-bottom)) calc(16px + env(safe-area-inset-left));
  background:
    radial-gradient(900px 480px at 50% -10%, rgba(211,47,47,.10), transparent 62%),
    linear-gradient(180deg, #fff 0%, #f8fafc 100%);
}
.login-shell{
  width:min(440px, 100%);
}
.login-logo{
  display:flex;
  justify-content:center;
  margin-bottom:18px;
}
.login-logo img{
  height:46px;
  width:auto;
  object-fit:contain;
}
.login-card{
  padding:24px !important;
  display:grid;
  gap:12px;
}
.login-card h1{
  margin:0;
  font-size:30px;
  letter-spacing:-.06em;
}
.login-card .muted{
  margin:-6px 0 4px;
}
.login-submit{
  width:100%;
  margin-top:4px;
}
.login-install{
  display:flex;
  justify-content:center;
  margin-top:2px;
  font-size:13px;
}
.login-install a{
  color:#475569;
  font-weight:700;
}
.login-error{
  margin-top:2px;
  color:var(--bad);
  font-weight:800;
  font-size:13px;
  text-align:center;
}
@media (max-width: 380px){
  .content{
    padding:10px !important;
    padding-left: calc(10px + env(safe-area-inset-left)) !important;
    padding-right: calc(10px + env(safe-area-inset-right)) !important;
  }
  .home-grid{
    gap:10px !important;
  }
  .tile{
    border-radius:24px !important;
  }
  .topbar-system-label{
    display:none;
  }
}
@media (min-width: 720px){
  .home-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
  .content.home{
    max-width:760px !important;
  }
}

/* RSAapp simple module views */
.app-page-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-end;
  flex-wrap:wrap;
  margin-bottom:14px;
}
.app-page-head h1{
  margin:0;
  font-size:30px;
  line-height:1;
  letter-spacing:0;
}
.app-page-head p{
  margin:6px 0 0;
}
.app-section{
  margin-top:14px;
}
.app-section h3{
  margin:0 0 10px;
  font-size:17px;
  letter-spacing:0;
}
.app-form{
  display:grid;
  gap:12px;
}
.app-form-two{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.app-submit{
  width:100%;
}
.check-line{
  display:flex;
  align-items:center;
  gap:10px;
  margin:0;
  font-size:14px;
}
.check-line input{
  width:20px;
  min-height:20px;
  flex:0 0 auto;
}
.app-list-card{
  display:block;
}
.course-meta-line{
  display:flex;
  justify-content:space-between;
  gap:10px;
  margin-top:10px;
  color:#64748b;
  font-size:13px;
  font-weight:800;
}
.compact-actions{
  margin-top:10px;
  display:flex;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.year-switch{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  margin:4px 0 14px;
}
.year-switch span{
  font-weight:900;
  color:#0f172a;
}
.metric-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}
.metric-card{
  min-height:112px;
  border:1px solid rgba(15,23,42,.08);
  border-radius:22px;
  background:#fff;
  padding:16px;
  box-shadow:0 14px 34px rgba(15,23,42,.10), 0 2px 8px rgba(15,23,42,.04);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}
.metric-card span{
  color:#64748b;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
}
.metric-card strong{
  color:#0f172a;
  font-size:22px;
  line-height:1.08;
  letter-spacing:0;
}
.mini-table{
  display:grid;
  gap:10px;
}
.mini-table > div{
  display:grid;
  grid-template-columns:1fr auto;
  gap:3px 10px;
  align-items:center;
  padding:12px 0;
  border-bottom:1px solid rgba(15,23,42,.08);
}
.mini-table > div:last-child{
  border-bottom:0;
}
.mini-table span{
  font-weight:900;
}
.mini-table strong{
  text-align:right;
}
.mini-table small{
  grid-column:1 / -1;
  color:#64748b;
  font-size:12px;
}
.stack-list{
  display:grid;
  gap:10px;
}
.link-card{
  min-height:64px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px;
  border:1px solid rgba(15,23,42,.08);
  border-radius:18px;
  background:#f8fafc;
  color:#0f172a;
  text-decoration:none;
}
.link-card.plain{
  background:#fff;
}
.link-card strong,
.link-card span{
  display:block;
}
.link-card span{
  margin-top:4px;
  color:#64748b;
  font-size:12px;
  font-weight:700;
}
.link-card svg{
  width:20px;
  height:20px;
  color:#94a3b8;
  flex:0 0 auto;
}
.quick-list{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.quick-list a{
  min-height:76px;
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(15,23,42,.08);
  background:#fff;
  color:#0f172a;
  text-decoration:none;
  font-weight:900;
}
.quick-list svg{
  width:22px;
  height:22px;
  color:var(--accent);
}
@media (max-width: 430px){
  .app-form-two,
  .metric-grid,
  .quick-list{
    grid-template-columns:1fr;
  }
  .metric-card{
    min-height:94px;
  }
}

/* RSAapp admin parity update */
.topbar-user{
  text-decoration:none;
  color:inherit;
}
.home-summary{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:14px;
}
.home-summary .eyebrow{
  display:block;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.home-summary h1{
  margin:4px 0 0;
  font-size:34px;
  line-height:1;
  letter-spacing:0;
}
.home-summary p{
  margin:8px 0 0;
  max-width:36rem;
  color:#64748b;
  font-size:14px;
  line-height:1.45;
}
.home-avatar-link{
  width:46px;
  height:46px;
  flex:0 0 46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#0f172a;
  background:#fff;
  border:1px solid rgba(15,23,42,.10);
  border-radius:16px;
  box-shadow:0 10px 26px rgba(15,23,42,.10);
}
.home-avatar-link svg{ width:22px; height:22px; }
.home-stat-grid{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
}
.home-stat-card{
  min-height:94px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  gap:8px;
  padding:12px;
  color:#0f172a;
  text-decoration:none;
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  border-radius:20px;
  box-shadow:0 12px 28px rgba(15,23,42,.08), 0 2px 8px rgba(15,23,42,.04);
}
.home-stat-card.static{
  pointer-events:none;
}
.home-stat-card svg{
  width:20px;
  height:20px;
  color:var(--accent);
}
.home-stat-card strong{
  font-size:24px;
  line-height:1;
}
.home-stat-card span{
  color:#64748b;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
}
.app-module-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
  margin-top:14px;
}
.app-module-card{
  min-height:148px;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:16px;
  color:#0f172a;
  text-decoration:none;
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  border-radius:22px;
  box-shadow:0 14px 34px rgba(15,23,42,.10), 0 2px 8px rgba(15,23,42,.04);
}
.app-module-icon{
  width:44px;
  height:44px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:16px;
  background:#f1f5f9;
  color:var(--accent);
}
.app-module-icon svg{ width:22px; height:22px; }
.app-module-body{
  display:block;
  flex:1;
}
.app-module-body strong{
  display:block;
  font-size:17px;
  line-height:1.12;
}
.app-module-body small{
  display:block;
  margin-top:6px;
  color:#64748b;
  font-size:12px;
  line-height:1.35;
  font-weight:700;
}
.app-module-meta{
  color:#475569;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
}
.app-menu-list{
  display:grid;
  gap:10px;
}
.app-menu-row,
.agenda-row{
  min-height:72px;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:12px;
  padding:13px;
  color:#0f172a;
  text-decoration:none;
  background:#fff;
  border:1px solid rgba(15,23,42,.08);
  border-radius:20px;
  box-shadow:0 12px 28px rgba(15,23,42,.08), 0 2px 8px rgba(15,23,42,.04);
}
.app-menu-row > span,
.agenda-icon{
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:15px;
  background:#f1f5f9;
  color:var(--accent);
}
.app-menu-row svg,
.agenda-row svg{
  width:20px;
  height:20px;
}
.app-menu-row > svg,
.agenda-row > svg{
  color:#94a3b8;
}
.app-menu-row strong,
.agenda-row strong{
  display:block;
  line-height:1.15;
}
.app-menu-row small,
.agenda-row small{
  display:block;
  margin-top:5px;
  color:#64748b;
  font-size:12px;
  line-height:1.35;
  font-weight:700;
}
.app-tabs{
  display:flex;
  gap:8px;
  margin-top:14px;
  overflow:auto;
  -webkit-overflow-scrolling:touch;
}
.app-tabs a{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:9px 14px;
  color:#475569;
  text-decoration:none;
  font-weight:900;
  background:#fff;
  border:1px solid rgba(15,23,42,.09);
  border-radius:999px;
  white-space:nowrap;
}
.app-tabs a.active{
  color:#fff;
  background:#0f172a;
  border-color:#0f172a;
}
.app-empty h3{
  margin:0 0 6px;
}
.app-empty p{
  margin:0;
}
.app-card-topline{
  display:flex;
  align-items:center;
  gap:6px;
  flex-wrap:wrap;
  margin-bottom:10px;
}
.status-pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:26px;
  padding:4px 9px;
  color:#475569;
  background:#f8fafc;
  border:1px solid rgba(15,23,42,.08);
  border-radius:999px;
  font-size:11px;
  font-weight:900;
  text-transform:uppercase;
}
.status-pill.ok{
  color:#166534;
  background:#f0fdf4;
  border-color:#bbf7d0;
}
.status-pill.draft{
  color:#92400e;
  background:#fffbeb;
  border-color:#fde68a;
}
.app-top-actions{
  justify-content:flex-start;
  margin-top:-4px;
}
.agenda-date{
  margin:6px 2px 0;
  color:#475569;
  font-size:12px;
  font-weight:900;
  text-transform:uppercase;
}
.profile-card{
  display:grid;
  grid-template-columns:auto 1fr;
  align-items:center;
  gap:14px;
}
.profile-card h3{
  margin:0;
  font-size:20px;
}
.profile-card p{
  margin:4px 0 0;
}
.profile-avatar{
  width:58px;
  height:58px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#fff;
  background:#0f172a;
  border-radius:22px;
}
.profile-avatar svg{
  width:28px;
  height:28px;
}
.mini-info-row{
  padding:12px 0;
  border-bottom:1px solid rgba(15,23,42,.08);
}
.mini-info-row:last-child{
  border-bottom:0;
}
.mini-info-row strong,
.mini-info-row span{
  display:block;
}
.mini-info-row span{
  margin-top:4px;
  color:#64748b;
  font-size:12px;
  font-weight:700;
}
.feature-chip-grid{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.feature-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:34px;
  padding:7px 10px;
  color:#166534;
  background:#f0fdf4;
  border:1px solid #bbf7d0;
  border-radius:999px;
  font-size:12px;
  font-weight:900;
}
.feature-chip.off{
  color:#94a3b8;
  background:#f8fafc;
  border-color:rgba(15,23,42,.08);
}
.feature-chip svg{
  width:15px;
  height:15px;
}
.feature-arena-card h3{
  margin-bottom:4px;
}
.feature-arena-card p{
  margin:0 0 12px;
}
@media (max-width: 560px){
  .home-stat-grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
  }
  .app-module-grid{
    grid-template-columns:1fr;
  }
  .home-summary h1{
    font-size:30px;
  }
}
@media (min-width: 880px){
  .app-module-grid{
    grid-template-columns:repeat(3, minmax(0, 1fr));
  }
}

.tile.is-tapping,
.app-menu-row.is-tapping,
.agenda-row.is-tapping,
.bottom-nav a.is-tapping,
.rebel-bottom-nav a.is-tapping,
.rebel-choice-card.is-tapping,
.rebel-action-card.is-tapping,
.rebel-list-item.is-tapping,
.pill.is-tapping,
button.is-tapping,
.icon-btn.is-tapping,
.rebel-icon-btn.is-tapping{
  opacity:.72;
  transform:scale(.985);
}
html.rsa-navigating .app{
  cursor:progress;
}
i[data-lucide]{
  display:inline-flex;
  width:1em;
  height:1em;
  align-items:center;
  justify-content:center;
}
i[data-lucide]::before{
  content:"";
  display:block;
  width:.72em;
  height:.72em;
  border:2px solid currentColor;
  border-radius:.25em;
  opacity:.38;
}

.content,
.rebel-shell,
.offsprings-app .content{
  animation:app-enter .18s cubic-bezier(.2,.8,.2,1) both;
}
.tile,
.app-menu-row,
.agenda-row,
.session-card,
.settings-row,
.rebel-choice-card,
.rebel-action-card,
.rebel-list-item,
.bottom-nav a,
.rebel-bottom-nav a,
.icon-btn,
.rebel-icon-btn,
.pill,
button{
  transition:
    transform .13s cubic-bezier(.2,.8,.2,1),
    opacity .13s ease,
    box-shadow .13s ease,
    background-color .13s ease,
    border-color .13s ease;
  will-change:transform;
}
.tile:active,
.app-menu-row:active,
.agenda-row:active,
.session-card:active,
.settings-row:active,
.rebel-choice-card:active,
.rebel-action-card:active,
.rebel-list-item:active{
  transform:scale(.975);
}
.bottom-nav a:active,
.rebel-bottom-nav a:active,
.icon-btn:active,
.rebel-icon-btn:active,
.pill:active,
button:active{
  transform:scale(.94);
}
html.rsa-page-leave .content,
html.rsa-page-leave .rebel-shell,
html.rsa-page-leave .offsprings-app .content{
  opacity:.82;
  transform:translateY(2px) scale(.995);
}
html.rsa-navigating::after{
  content:"";
  position:fixed;
  left:16px;
  right:16px;
  top:calc(6px + env(safe-area-inset-top));
  z-index:999;
  height:3px;
  border-radius:999px;
  background:linear-gradient(90deg, var(--accent), #111827);
  animation:rsa-progress .75s cubic-bezier(.2,.8,.2,1) infinite;
  transform-origin:left center;
}
@keyframes app-enter{
  from{ opacity:0; transform:translateY(8px) scale(.99); }
  to{ opacity:1; transform:translateY(0) scale(1); }
}
@keyframes rsa-progress{
  0%{ transform:scaleX(.12); opacity:.45; }
  55%{ transform:scaleX(.72); opacity:.95; }
  100%{ transform:scaleX(1); opacity:.35; }
}
@media (prefers-reduced-motion: reduce){
  *,
  *::before,
  *::after{
    animation-duration:.001ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.001ms !important;
    scroll-behavior:auto !important;
  }
}

/* Professional app personality v9 */
:root{
  --app-ink:#101216;
  --app-soft:#f6f7fb;
  --app-panel:#ffffff;
  --app-line:rgba(16,18,22,.08);
  --app-raised:0 18px 44px rgba(16,18,22,.10), 0 2px 8px rgba(16,18,22,.04);
  --app-pressed:0 8px 22px rgba(16,18,22,.10), 0 1px 4px rgba(16,18,22,.04);
}
body[data-system="rsa"] .app{
  background:
    linear-gradient(180deg, #ffffff 0%, #f6f7fb 42%, #ffffff 100%) !important;
}
.topbar{
  border-bottom:1px solid rgba(16,18,22,.06) !important;
  background:rgba(255,255,255,.92) !important;
  backdrop-filter:saturate(170%) blur(18px) !important;
}
.topbar .brand-logo-img{
  filter:drop-shadow(0 6px 12px rgba(16,18,22,.10));
}
.icon-btn,
.avatar-circle{
  border-color:rgba(16,18,22,.08) !important;
  box-shadow:0 10px 24px rgba(16,18,22,.08);
}
.workspace-card{
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:12px;
  margin:0 0 16px;
  padding:14px;
  border:1px solid var(--app-line);
  border-radius:26px;
  background:
    linear-gradient(135deg, rgba(255,255,255,1), rgba(249,250,252,.94));
  box-shadow:var(--app-raised);
}
.workspace-card::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:5px;
  background:linear-gradient(180deg, #d32f2f, #111827);
}
.workspace-mark{
  width:54px;
  height:54px;
  display:grid;
  place-items:center;
  border-radius:19px;
  color:#fff;
  background:#111827;
  box-shadow:0 14px 28px rgba(17,24,39,.22);
  font-size:14px;
  font-weight:900;
  letter-spacing:.02em;
}
.workspace-copy{
  min-width:0;
}
.workspace-copy span{
  display:block;
  color:#64748b;
  font-size:11px;
  font-weight:900;
  letter-spacing:.1em;
  text-transform:uppercase;
}
.workspace-copy h1{
  margin:4px 0 0;
  color:var(--app-ink);
  font-size:clamp(18px, 5.2vw, 26px);
  line-height:1.02;
  letter-spacing:0;
}
.workspace-switch{
  width:46px;
  height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#991b1b;
  background:#fff1f2;
  border:1px solid #fecdd3;
  border-radius:17px;
  text-decoration:none;
}
.workspace-switch svg{
  width:21px;
  height:21px;
}
.home-grid{
  gap:13px !important;
}
.tile{
  position:relative;
  overflow:hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,1), rgba(250,251,253,.96)) !important;
  border:1px solid rgba(16,18,22,.07) !important;
  box-shadow:var(--app-raised) !important;
}
.tile::after{
  content:"";
  position:absolute;
  left:18px;
  right:18px;
  bottom:14px;
  height:3px;
  border-radius:999px;
  background:var(--tile-accent, #d32f2f);
  opacity:.72;
  transform:scaleX(.42);
  transform-origin:left center;
  transition:transform .16s cubic-bezier(.2,.8,.2,1), opacity .16s ease;
}
.tile:hover::after,
.tile:focus-visible::after,
.tile.is-tapping::after{
  opacity:1;
  transform:scaleX(1);
}
.tile .ico{
  background:color-mix(in srgb, var(--tile-accent, #d32f2f) 13%, #fff) !important;
  color:var(--tile-accent, #d32f2f);
  box-shadow:inset 0 0 0 1px color-mix(in srgb, var(--tile-accent, #d32f2f) 18%, transparent);
}
.tile .title{
  color:#111827;
  font-weight:900;
}
.tile:nth-child(1){ --tile-accent:#d32f2f; }
.tile:nth-child(2){ --tile-accent:#b7791f; }
.tile:nth-child(3){ --tile-accent:#2563eb; }
.tile:nth-child(4){ --tile-accent:#0f766e; }
.tile:nth-child(5){ --tile-accent:#15803d; }
.tile:nth-child(6){ --tile-accent:#7c3aed; }
.tile:nth-child(7){ --tile-accent:#334155; }
.tile:nth-child(8){ --tile-accent:#be123c; }
.tile:nth-child(9){ --tile-accent:#111827; }
.tile:nth-child(10){ --tile-accent:#4338ca; }
.tile:nth-child(11){ --tile-accent:#ca8a04; }
.tile.is-tapping,
.tile:active{
  box-shadow:var(--app-pressed) !important;
}
.bottom-nav{
  background:rgba(255,255,255,.94) !important;
  backdrop-filter:saturate(180%) blur(18px) !important;
  border-color:rgba(16,18,22,.08) !important;
}
.bottom-nav a{
  position:relative;
}
.bottom-nav a.active{
  background:#111827 !important;
  color:#fff !important;
  box-shadow:0 10px 24px rgba(17,24,39,.18);
}
.bottom-nav a.active::after{
  content:"";
  position:absolute;
  left:50%;
  bottom:5px;
  width:4px;
  height:4px;
  border-radius:50%;
  background:#fff;
  transform:translateX(-50%);
  opacity:.9;
}
.session-card,
.settings-row,
.app-menu-row,
.agenda-row,
.metric-card,
.link-card{
  border-color:rgba(16,18,22,.07) !important;
  box-shadow:var(--app-raised) !important;
}
@supports not (background: color-mix(in srgb, #000 10%, #fff)){
  .tile .ico{
    background:#f3f4f6 !important;
  }
}
@media (min-width:720px){
  .workspace-card{
    max-width:760px;
    margin-left:auto;
    margin-right:auto;
  }
}

/* Clean Lucide icons v10 */
i[data-lucide]::before{
  content:none !important;
}
.tile .ico,
.app-module-icon,
.app-menu-row > span,
.agenda-icon,
.workspace-switch,
.rebel-card-icon,
.rebel-action-card > svg{
  background:transparent !important;
  border:0 !important;
  box-shadow:none !important;
}
.tile .ico{
  width:48px !important;
  height:48px !important;
  margin-bottom:10px !important;
}
.tile .ico svg{
  width:34px !important;
  height:34px !important;
  stroke-width:2.15;
}
.app-menu-row > span,
.agenda-icon{
  width:34px !important;
  height:34px !important;
}
.workspace-switch{
  color:#111827 !important;
}
.workspace-switch svg,
.app-menu-row svg,
.agenda-row svg,
.bottom-nav svg,
.icon-btn svg{
  stroke-width:2.15;
}
.icon-btn,
.workspace-switch{
  background:rgba(255,255,255,.72) !important;
}

/* Rebel Offsprings contrast fix */
body.offsprings-app{
  color:#101216 !important;
}
.offsprings-app .rebel-page-title,
.offsprings-app h1,
.offsprings-app h2,
.offsprings-app h3{
  color:#101216 !important;
}
.offsprings-app .muted,
.offsprings-app .help{
  color:#64748b !important;
}
.offsprings-app .rebel-stat,
.offsprings-app .rebel-action-card,
.offsprings-app .rebel-list-item,
.offsprings-app .rebel-empty{
  background:linear-gradient(180deg, rgba(255,255,255,1), rgba(250,251,253,.96)) !important;
  border-color:rgba(16,18,22,.08) !important;
  color:#101216 !important;
}
.offsprings-app .rebel-stat strong,
.offsprings-app .rebel-action-card strong,
.offsprings-app .rebel-list-item strong{
  color:#101216 !important;
}
.offsprings-app .rebel-stat span,
.offsprings-app .rebel-action-card span,
.offsprings-app .rebel-list-item span,
.offsprings-app .rebel-list-item small,
.offsprings-app .rebel-empty{
  color:#64748b !important;
}
.offsprings-app .rebel-badge{
  color:#991b1b !important;
  background:#fff1f2 !important;
  border-color:#fecdd3 !important;
}
