/* TECNO UNIVERSITY — v6 redesign (light aurora + clean glass) */
:root{
  --top-h:56px;
  --top-h-mobile:48px;

  --bg0:#f7fbff;
  --bg1:#eef6ff;
  --bg2:#f6f0ff;
  --card:rgba(255,255,255,0.72);
  --card2:rgba(255,255,255,0.86);
  --stroke:rgba(15,40,70,0.10);
  --shadow: 0 18px 55px rgba(10,30,60,0.14);
  --text:#0b1220;
  --muted:rgba(11,18,32,0.62);
  --accent:#00b8ff;      /* TECNO-ish cyan */
  --accent2:#6b5cff;     /* violet */
  --danger:#ff3d6b;
}

*{box-sizing:border-box;}
html,body{height:100%;max-width:100%;overflow-x:hidden;}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 600px at 12% 10%, rgba(0,184,255,0.22), transparent 60%),
    radial-gradient(850px 620px at 88% 20%, rgba(107,92,255,0.18), transparent 55%),
    radial-gradient(1100px 700px at 55% 110%, rgba(0,184,255,0.12), transparent 60%),
    linear-gradient(180deg, var(--bg0), var(--bg1) 55%, var(--bg2));
  overflow-x:hidden;
}

/* Subtle animated aurora layer */
.bg{
  position:fixed; inset:-20%;
  background:
    radial-gradient(700px 420px at 18% 22%, rgba(0,184,255,0.18), transparent 60%),
    radial-gradient(720px 520px at 78% 28%, rgba(107,92,255,0.16), transparent 62%),
    radial-gradient(900px 650px at 52% 78%, rgba(0,184,255,0.10), transparent 60%);
  filter: blur(30px);
  opacity:0.85;
  pointer-events:none;
  animation: floaty 10s ease-in-out infinite alternate;
}
@keyframes floaty{
  from{transform: translate3d(-10px,-6px,0) scale(1);}
  to{transform: translate3d(10px,8px,0) scale(1.02);}
}

.wrap, .shell{
  min-height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:40px 16px;
}
.shell.wide{padding:86px 16px 44px;width:100%;max-width:100%;overflow-x:hidden;}

.card{
  width:min(980px, 100%);
  border-radius:26px;
  background:linear-gradient(180deg, var(--card), rgba(255,255,255,0.55));
  border:1px solid var(--stroke);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding:22px;
}

h1{margin:0 0 8px;font-size:28px;letter-spacing:0.2px;}
.sub{margin:0 0 16px;color:var(--muted);line-height:1.35;}

.brand{
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:10px;
}
.brand img.logo{
  height:96px;
  width:auto;
  max-width:min(92vw, 420px);
  object-fit:contain;
  filter: drop-shadow(0 14px 26px rgba(10,30,60,0.16));
}

/* Inputs */
label.lbl, label{
  display:block;
  color:var(--muted);
  font-size:13px;
  margin:10px 0 6px;
}
input.inp, input, select.select{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid rgba(15,40,70,0.14);
  background:rgba(255,255,255,0.85);
  color:var(--text);
  outline:none;
}
input:focus, input.inp:focus, select.select:focus{
  border-color: rgba(0,184,255,0.55);
  box-shadow: 0 0 0 4px rgba(0,184,255,0.14);
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid rgba(15,40,70,0.12);
  background:
    linear-gradient(135deg, rgba(0,184,255,0.95), rgba(107,92,255,0.92));
  color:#fff;
  font-weight:800;
  cursor:pointer;
  user-select:none;
  text-decoration:none;
  box-shadow: 0 10px 26px rgba(0,90,150,0.18);
  transition: transform .14s ease, filter .14s ease, background .14s ease, box-shadow .14s ease, border-color .14s ease, color .14s ease;
}
.btn:hover{transform: translateY(-1px);filter:brightness(0.94);}
.btn:active{transform: translateY(0px);}
.btn.secondary{
  background: rgba(255,255,255,0.85);
  color: var(--text);
  border-color: rgba(15,40,70,0.12);
  box-shadow: 0 10px 26px rgba(10,30,60,0.10);
}
.btn.ghost{
  background: rgba(255,255,255,0.55);
  color: var(--text);
  border-color: rgba(15,40,70,0.10);
  box-shadow: none;
}
.btn.danger{
  background: rgba(255,61,107,0.92);
  border-color: rgba(255,61,107,0.30);
}
.btn.small{padding:9px 10px;border-radius:12px;font-weight:800;}

.muted{color:var(--muted);}
.err, .error{color:var(--danger);margin-top:10px;white-space:pre-wrap;display:none;}

.row{display:flex;gap:12px;}
.row > div{flex:1;}
.row > input{flex:1;min-width:0;}
.row-between{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:14px;flex-wrap:wrap;}
.link{color:rgba(0,110,200,0.95);text-decoration:none;font-weight:800;}
.link:hover{text-decoration:underline;}

/* ===== Fixed header (Hub/Admin) ===== */
.top{
  position:fixed; top:0; left:0; right:0;
  z-index:20;
  height: var(--top-h);
  padding:0 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.88), rgba(255,255,255,0.60));
  border-bottom:1px solid rgba(15,40,70,0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.top .brand{
  margin:0;
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}
.top .brand img{display:block;}
.logo.small{
  height:34px;
  width:auto;
  max-width: 240px;
  object-fit:contain;
  filter: drop-shadow(0 8px 18px rgba(10,30,60,0.12));
}
.top-title{
  font-weight:900;
  color:var(--text);
  font-size:14px;
  letter-spacing:0.2px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.icon-btn{
  width:38px;
  height:38px;
  border-radius:14px;
  border:1px solid rgba(15,40,70,0.12);
  background: rgba(255,255,255,0.70);
  box-shadow: 0 10px 24px rgba(10,30,60,0.10);
  display:grid;
  place-items:center;
  cursor:pointer;
  user-select:none;
}
.icon-btn:active{transform: translateY(1px);}
.icon-dots{
  width:4px;height:4px;border-radius:999px;
  background: rgba(15,40,70,0.75);
  position:relative;
}
.icon-dots::before,.icon-dots::after{
  content:"";
  width:4px;height:4px;border-radius:999px;
  background: rgba(15,40,70,0.75);
  position:absolute; left:0;
}
.icon-dots::before{ top:-7px; }
.icon-dots::after{ top:7px; }

.menu{
  position:absolute;
  top:54px;
  right:10px;
  min-width: 220px;
  padding:8px;
  border-radius:16px;
  border:1px solid rgba(15,40,70,0.12);
  background: rgba(255,255,255,0.82);
  box-shadow: 0 20px 50px rgba(10,30,60,0.18);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.menu-user{
  padding:10px 10px 8px;
  font-size:12px;
  color:var(--muted);
  line-height:1.25;
}
.menu-sep{
  height:1px;
  background: rgba(15,40,70,0.10);
  margin:6px 8px;
}
.menu-item{
  width:100%;
  text-align:left;
  padding:10px 10px;
  border-radius:12px;
  border:0;
  background:transparent;
  cursor:pointer;
  font-weight:900;
  color: var(--text);
}
.menu-item:hover{background: rgba(120,170,230,0.16);}
.menu-item.danger{color: rgba(200,30,60,0.92);}
.menu-item.danger:hover{background: rgba(220,40,70,0.10);}

.menu-sub{
  margin:6px 0 2px;
  padding:6px;
  border-radius:14px;
  border:1px solid rgba(15,40,70,0.10);
  background: rgba(255,255,255,0.78);
}
.menu-sub .menu-item{
  font-weight:800;
  padding:9px 10px;
}


/* Header menu button: no rounded square, just divider + lines */
body[data-page="webinars_ff"] .top #menuBtn,
body[data-page="seller_webinars"] .top #menuBtn,
body[data-page="partners"] .top #menuBtn,
body[data-page="admin"] .top #menuBtn,
body[data-page="hub"] .top #menuBtn,
body[data-page="staff"] .top #menuBtn,
body[data-page="seller_home"] .top #menuBtn{
  width:34px;
  height:34px;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  padding-left:14px;
  position:relative;
}
body[data-page="webinars_ff"] .top #menuBtn::before,
body[data-page="seller_webinars"] .top #menuBtn::before,
body[data-page="partners"] .top #menuBtn::before,
body[data-page="admin"] .top #menuBtn::before,
body[data-page="hub"] .top #menuBtn::before,
body[data-page="staff"] .top #menuBtn::before,
body[data-page="seller_home"] .top #menuBtn::before{
  content:"";
  position:absolute;
  left:2px;
  top:4px;
  bottom:4px;
  width:1px;
  background:rgba(15,40,70,0.14);
}
@media (max-width:520px){
  body[data-page="webinars_ff"] .top #menuBtn,
  body[data-page="seller_webinars"] .top #menuBtn,
  body[data-page="partners"] .top #menuBtn,
  body[data-page="admin"] .top #menuBtn,
  body[data-page="hub"] .top #menuBtn,
  body[data-page="staff"] .top #menuBtn,
  body[data-page="seller_home"] .top #menuBtn{ width:30px; height:30px; padding-left:12px; }
}

.menu-nav-toggle{
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.menu-nav-toggle::after{
  content:"▸";
  font-size:12px;
  color:var(--muted);
}
.menu-nav-toggle.is-open::after{ content:"▾"; }
.menu-tree{ margin-top:6px; }
.menu-tree .menu-item{ font-weight:800; }
.menu-subdeep{
  display:none;
  margin:4px 0 6px 10px;
  padding:6px;
  border-left:1px solid rgba(15,40,70,0.10);
}
.menu-subdeep.open{ display:block; }
.menu-card-link{
  display:block;
  width:100%;
  text-align:left;
  padding:9px 10px;
  border:0;
  border-radius:12px;
  background:rgba(246,248,252,0.95);
  font-weight:700;
  color:var(--text);
  margin:4px 0;
  cursor:pointer;
}
.menu-card-link:hover{ background:rgba(120,170,230,0.16); }

/* Desktop collapsible filters (staff specific panels) */
.bb-filter-panel .bb-filter-body{display:block;}
.bb-filter-panel.is-collapsed .bb-filter-body{display:none;}

/* Mobile header: ultra-compact */
@media (max-width: 520px){
  /* Force fixed, small header height */
  .top{height: var(--top-h-mobile); padding:0 8px;}
  .logo.small{height:20px; max-width: 60vw; filter:none;}
  .icon-btn{width:24px; height:24px; border-radius:10px;}
  /* Keep content below the fixed header */
  .shell.wide{padding-top: calc(var(--top-h-mobile) + 18px);} 
  .menu{top: calc(var(--top-h-mobile) + 6px); right:8px; min-width: 200px;}
  .top-title{display:none;}
}

@media (max-width: 380px){
  .top{height: 44px; padding:0 8px;}
  .logo.small{height:18px; max-width: 64vw;}
  .icon-btn{width:24px; height:24px; border-radius:10px;}
  .shell.wide{padding-top: 62px;}
  .menu{top: 50px;}
}

/* ===== Projects (Hub) ===== */
.projects{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap:14px;
}
.proj{
  border-radius:22px;
  border:1px solid rgba(15,40,70,0.10);
  background:linear-gradient(180deg, var(--card2), rgba(255,255,255,0.62));
  padding:18px;
  min-height:150px;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  box-shadow: 0 10px 28px rgba(10,30,60,0.10);
}
.proj-title{font-size:18px;font-weight:900;margin-bottom:6px;}
.proj-sub{color:var(--muted);font-size:13px;line-height:1.35;}

.proj-test-tag{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-top:10px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(0,110,200,0.18);
  background:rgba(0,110,200,0.08);
  color:rgba(11,18,32,0.85);
  font-size:12px;
  font-weight:900;
  letter-spacing:0.06em;
  text-transform:uppercase;
}

/* ===== Admin Tables / Panels ===== */
.panel{
  background:linear-gradient(180deg, rgba(255,255,255,0.76), rgba(255,255,255,0.58));
  border:1px solid rgba(15,40,70,0.10);
  border-radius:20px;
  padding:16px;
}
.table-wrap{overflow:auto;border-radius:16px;border:1px solid rgba(15,40,70,0.10);background:rgba(255,255,255,0.55);}
table{width:100%;border-collapse:collapse;}
th,td{padding:10px 8px;border-bottom:1px solid rgba(15,40,70,0.08);text-align:left;font-size:13px;}
th{color:rgba(11,18,32,0.84);font-weight:900;}

.actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.footerLinks{margin-top:14px;display:flex;gap:12px;flex-wrap:wrap;}
.footerLinks a{color:rgba(0,110,200,0.95);text-decoration:none;font-weight:800;}
.footerLinks a:hover{text-decoration:underline;}

.table-wrap tbody tr td{transition: background .14s ease;}
.table-wrap tbody tr:hover td{background: rgba(15,40,70,0.05);}
.table-client-pager{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:10px;flex-wrap:wrap;}
.table-client-pager .tcp-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;}
.table-client-pager[hidden]{display:none !important;}
.cols-modal-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;margin-top:10px;}
.cols-modal-item{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid rgba(15,40,70,0.10);border-radius:12px;background:rgba(255,255,255,0.7);}

/* ===== Tabs ===== */
.tabs{display:flex;gap:10px;margin-bottom:14px;flex-wrap:wrap;}
.tabbtn{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(15,40,70,0.10);
  background:rgba(255,255,255,0.60);
  color:var(--muted);
  cursor:pointer;
  font-weight:900;
}
.tabbtn.active{
  color: var(--text);
  border-color: rgba(0,184,255,0.30);
  background: rgba(0,184,255,0.16);
}

/* ===== Modal ===== */
.modal{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:18px;}
.modal-backdrop{position:absolute;inset:0;background:rgba(10,20,40,0.68);}
.modal-card{
  position:relative;
  width:min(520px, 100%);
  border-radius:22px;
  background:linear-gradient(180deg, var(--card2), rgba(255,255,255,0.62));
  border:1px solid rgba(15,40,70,0.10);
  box-shadow: 0 18px 60px rgba(10,30,60,0.22);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding:18px;
}
.modal-title{font-size:18px;font-weight:950;margin-bottom:6px;}
.modal-sub{color:var(--muted);font-size:13px;line-height:1.35;margin-bottom:10px;}

/* Scrollable / responsive modal (used for large modals like User Card) */
.modal-card-scroll{
  max-height: calc(100vh - 36px);
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.modal-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
}
.modal-card-scroll .modal-head{
  position:sticky;
  top:0;
  z-index:2;
  padding-bottom:10px;
  margin-bottom:10px;
  border-bottom:1px solid rgba(15,40,70,0.10);
  background: linear-gradient(180deg, rgba(255,255,255,0.72), rgba(255,255,255,0.54));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.modal-body{ /* generic helper */ }
.modal-card-scroll .modal-body{
  overflow:auto;
  padding-right:4px;
}

@media (max-width: 560px){
  .modal{ padding:10px; }
  .modal-card{ padding:14px; border-radius:18px; }
  .modal-card-scroll{ max-height: calc(100vh - 20px); }
}

/* Multi-select */
.ms{ border:1px solid rgba(255,255,255,0.12); border-radius:12px; padding:10px; background:rgba(0,0,0,0.12); }
.ms-head{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:10px; }
.ms-search{ flex:1; min-width:160px; padding:10px 12px; border-radius:10px; border:1px solid rgba(255,255,255,0.12); background:rgba(0,0,0,0.18); color:inherit; }
.ms-actions{ display:flex; gap:8px; }
.ms-list{ max-height:240px; overflow:auto; display:flex; flex-direction:column; gap:6px; padding-right:6px; }
.ms-item{ display:flex; gap:8px; align-items:center; padding:6px 8px; border-radius:10px; border:1px solid rgba(255,255,255,0.08); background:rgba(255,255,255,0.03); cursor:pointer; }
.ms-item input{ transform: translateY(1px); }
.ms-id{ margin-left:auto; opacity:0.55; font-size:12px; }


/* Debug log box (admin settings) */
.logbox{
  margin:0;
  padding:12px 14px;
  border:1px solid var(--stroke);
  border-radius:16px;
  background:rgba(11,18,32,0.03);
  color:rgba(11,18,32,0.86);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size:12px;
  line-height:1.35;
  white-space:pre-wrap;
  word-break:break-word;
  max-height:320px;
  overflow:auto;
}

/* ===== Address suggestions (DaData) ===== */
.suggest-wrap{ position:relative; }
.suggest-list{
  position:absolute;
  left:0; right:0;
  top: calc(100% + 6px);
  z-index: 80;
  display:none;
  max-height: 240px;
  overflow:auto;
  border-radius: 14px;
  border:1px solid rgba(15,40,70,0.12);
  background: rgba(255,255,255,0.96);
  box-shadow: 0 18px 60px rgba(10,30,60,0.18);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.suggest-item{
  padding:10px 12px;
  cursor:pointer;
  font-size:13px;
  line-height:1.25;
  color: rgba(11,18,32,0.92);
  border-top: 1px solid rgba(15,40,70,0.06);
}
.suggest-item:first-child{ border-top: none; }
.suggest-item:hover,
.suggest-item.active{ background: rgba(0,184,255,0.14); }
.suggest-muted{ color: rgba(11,18,32,0.55); font-size:12px; margin-top:4px; }

/* User Card modal tweaks */
.modal-top{ align-items:flex-start; }
.modal-top .modal-card{ margin-top:12px; }

@media (max-width: 560px){
  #userCardModal .row{ flex-direction:column; }
  #userCardModal .row > div{ width:100%; }
}

/* ===== Role access (Admin) ===== */
.ra-role{ padding:0; overflow:visible; }
.ra-role-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 14px;
  cursor:pointer;
  user-select:none;
}
.ra-role-left{ display:flex; align-items:center; gap:10px; min-width:0; }
.ra-arrow{
  display:inline-flex;
  width:26px;
  height:26px;
  border-radius:10px;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(15,40,70,0.12);
  background: rgba(11,18,32,0.03);
  transition: transform .15s ease;
}
.ra-role[data-open="1"] .ra-arrow{ transform: rotate(90deg); }
.ra-role-body{ padding:0 14px 14px; display:none; }
.ra-role[data-open="1"] .ra-role-body{ display:block; }
.ra-sections{ display:flex; flex-direction:column; gap:10px; }

.ra-dd{ position:relative; }
.ra-dd-btn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.ra-dd-btn .ra-dd-title{ font-weight:600; }
.ra-dd-btn .ra-dd-meta{ display:flex; align-items:center; gap:8px; }
.ra-dd-btn .ra-dd-count{ opacity:0.7; font-weight:500; }
.ra-dd-menu{
  position:absolute;
  left:0; right:0;
  top: calc(100% + 8px);
  z-index: 60;
  border-radius: 16px;
  border:1px solid rgba(15,40,70,0.12);
  background: rgba(255,255,255,0.98);
  box-shadow: 0 18px 60px rgba(10,30,60,0.18);
  padding:10px;
  display:none;
  max-height: 320px;
  overflow:auto;
}
.ra-dd[data-open="1"] .ra-dd-menu{ display:block; }
.ra-dd-item{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:8px 10px;
  border-radius: 12px;
  cursor:pointer;
  border:1px solid rgba(15,40,70,0.06);
  background: rgba(11,18,32,0.02);
  margin-bottom:8px;
}
.ra-dd-item:last-child{ margin-bottom:0; }
.ra-dd-item:hover{ background: rgba(0,184,255,0.10); }
.ra-dd-item input{ margin-top:2px; }
.ra-dd-hint{ font-size:12px; opacity:0.65; margin-top:2px; }

@media (max-width: 560px){
  .ra-role-header{ padding:12px; }
  .ra-role-body{ padding:0 12px 12px; }
}



/* =========================
   New hub/seller layout (BitBanker-inspired)
   ========================= */

.icon-btn--flat{
  background: transparent !important;
  border: 1px solid rgba(15, 40, 70, 0.18);
  box-shadow: none;
}
.icon-btn--flat:hover{
  background: rgba(15,40,70,0.06) !important;
}

.icon-hamburger{
  display:block;
  width:18px;
  height:12px;
  position:relative;
}
.icon-hamburger::before,
.icon-hamburger::after,
.icon-hamburger span{
  content:"";
  position:absolute;
  left:0;
  right:0;
  height:2px;
  border-radius:2px;
  background: rgba(15,40,70,0.75);
}
.icon-hamburger::before{ top:0; }
.icon-hamburger span{ top:5px; }
.icon-hamburger::after{ bottom:0; }

.icon-qr{
  display:block;
  width:18px;
  height:18px;
  border-radius:4px;
  border:2px solid rgba(15,40,70,0.75);
  position:relative;
  box-sizing:border-box;
}
.icon-qr::before,
.icon-qr::after{
  content:"";
  position:absolute;
  width:6px;
  height:6px;
  border:2px solid rgba(15,40,70,0.75);
  border-radius:2px;
  box-sizing:border-box;
}
.icon-qr::before{ left:1px; top:1px; }
.icon-qr::after{ right:1px; bottom:1px; }

/* Splash (logo on white, then fade to page) */
.splash{
  position:fixed;
  inset:0;
  z-index:9999;
  background:#fff;
  display:grid;
  place-items:center;
  opacity:1;
  transition: opacity 1.2s ease;
}
.splash.hide{
  opacity:0;
  pointer-events:none;
}
.splash-logo{
  width:min(220px, 60vw);
  height:auto;
}

/* Softer background for hubs */
body[data-page="hub"],
body[data-page="seller_home"],
body[data-page="seller_webinars"],
body[data-page="webinars_ff"],
body[data-page="admin"],
body[data-page="staff"]{
  background: linear-gradient(180deg, #f5f7fc 0%, #eef3fb 100%);
}
body[data-page="hub"] .bg,
body[data-page="seller_home"] .bg,
body[data-page="seller_webinars"] .bg,
body[data-page="webinars_ff"] .bg,
body[data-page="admin"] .bg,
body[data-page="staff"] .bg{
  display:none;
}

.hub-layout{
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

.news-strip{
  position: relative;
  display:flex;
  max-width:100%;
  overflow:auto;
  padding-bottom:6px;
  margin: 6px 0 18px;
  scroll-snap-type: x mandatory;
}
.news-strip .news-track{
  display:flex;
  gap:12px;
  width:max-content;
  padding-bottom:6px;
}
.news-strip.marquee{
  overflow:hidden;
  scroll-snap-type: none;
}
.news-strip.marquee .news-track{
  animation: marquee var(--marquee-duration, 18s) linear infinite;
  will-change: transform;
}
.news-strip.marquee:hover .news-track{
  animation-play-state: paused;
}
@keyframes marquee{
  from{ transform: translateX(0); }
  to{ transform: translateX(calc(-1 * var(--marquee-distance, 0px))); }
}

.news-card{
  min-width: min(420px, 92vw);
  background: #fff;
  border: 1px solid rgba(15,40,70,0.10);
  border-left: 4px solid rgba(11,61,145,0.35);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: none;
  scroll-snap-align: start;
  display:flex;
  flex-direction:column;
  gap: 8px;
}
.news-img{
  width:100%;
  height: 110px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(15,40,70,0.08);
}
.news-link{
  margin-top: 2px;
  display:inline-flex;
  align-self:flex-start;
  gap:8px;
  font-weight: 800;
  text-decoration:none;
  color: #0b3d91;
  border: 1px solid rgba(11,61,145,0.20);
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(11,61,145,0.03);
}
.news-link:hover{ background: rgba(11,61,145,0.06); }
.news-title{
  font-weight: 800;
  color: #0f2c4a;
  letter-spacing: .2px;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.news-sub{
  margin-top: 6px;
  color: rgba(15,40,70,0.7);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap:anywhere;
  word-break:break-word;
}

.hub-section{
  margin: 0 0 18px;
}
.hub-section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin: 0 0 10px;
}
.hub-section-title{
  font-size: 18px;
  font-weight: 900;
  color: #0f2c4a;
  overflow-wrap:anywhere;
  word-break:break-word;
}
.hub-section-sub{
  font-size: 13px;
  color: rgba(15,40,70,0.65);
  overflow-wrap:anywhere;
  word-break:break-word;
}

.svc-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.svc-card{
  width:100%;
  max-width:100%;
  text-align:left;
  /* Flatter BitBanker-like service cards */
  background: #fff;
  border: 1px solid rgba(15,40,70,0.10);
  border-radius: 16px;
  padding: 14px 14px;
  /* almost-flat shadow like BitBanker */
  box-shadow: none;
  display:flex;
  align-items:center;
  gap: 12px;
  cursor:pointer;
  transition: background .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.svc-card:hover{
  background: rgba(15,40,70,0.01);
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  border-color: rgba(15,40,70,0.16);
}
.svc-card:active{
  box-shadow: none;
}
.svc-card[disabled]{
  opacity:.55;
  cursor:not-allowed;
  transform:none !important;
}
.svc-ico{
  width:40px;
  height:40px;
  border-radius: 14px;
  background: var(--ico-bg, rgba(15,40,70,0.04));
  color: var(--ico-fg, #0b3d91);
  border:1px solid rgba(15,40,70,0.08);
  display:grid;
  place-items:center;
}
.svc-ico svg{
  width:22px;
  height:22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-icon-theme="blue"] .svc-ico{
  --ico-bg: rgba(30,136,229,0.10);
  --ico-fg: #1e88e5;
}
body[data-icon-theme="color"] .svc-ico{
  --ico-bg: rgba(15,40,70,0.06);
  --ico-fg: #0b3d91;
}
body[data-icon-theme="color"] .svc-ico[data-ico="admin"]{ --ico-bg:#fee2e2; --ico-fg:#dc2626; }
body[data-icon-theme="color"] .svc-ico[data-ico="staff"]{ --ico-bg:#ede9fe; --ico-fg:#6d28d9; }
body[data-icon-theme="color"] .svc-ico[data-ico="lms"]{ --ico-bg:#e0f2fe; --ico-fg:#0284c7; }
body[data-icon-theme="color"] .svc-ico[data-ico="webinar"]{ --ico-bg:#dcfce7; --ico-fg:#16a34a; }
body[data-icon-theme="color"] .svc-ico[data-ico="quiz"]{ --ico-bg:#ffedd5; --ico-fg:#ea580c; }
body[data-icon-theme="color"] .svc-ico[data-ico="ksp"]{ --ico-bg:#cffafe; --ico-fg:#0891b2; }
body[data-icon-theme="color"] .svc-ico[data-ico="forms"]{ --ico-bg:#fce7f3; --ico-fg:#db2777; }
body[data-icon-theme="color"] .svc-ico[data-ico="chat"]{ --ico-bg:#e2e8f0; --ico-fg:#334155; }
body[data-icon-theme="color"] .svc-ico[data-ico="trophy"]{ --ico-bg:#fef9c3; --ico-fg:#ca8a04; }
body[data-icon-theme="color"] .svc-ico[data-ico="gamepad"]{ --ico-bg:#e0e7ff; --ico-fg:#4f46e5; }
body[data-icon-theme="color"] .svc-ico[data-ico="dice"]{ --ico-bg:#fde68a; --ico-fg:#b45309; }
body[data-icon-theme="color"] .svc-ico[data-ico="robot"]{ --ico-bg:#dbeafe; --ico-fg:#2563eb; }
body[data-icon-theme="color"] .svc-ico[data-ico="partners"]{ --ico-bg:#ecfccb; --ico-fg:#4d7c0f; }
body[data-icon-theme="color"] .svc-ico[data-ico="link"]{ --ico-bg:#f1f5f9; --ico-fg:#0f172a; }

.svc-main{
  flex:1;
  min-width: 0;
}
.svc-title{
  font-weight: 900;
  color: #0f2c4a;
  letter-spacing: .2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.svc-sub{
  margin-top: 4px;
  font-size: 13px;
  color: rgba(15,40,70,0.65);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.svc-go{
  width:34px;
  height:34px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid rgba(15,40,70,0.10);
  display:grid;
  place-items:center;
  color: rgba(15,40,70,0.8);
  font-weight: 900;
}

/* Cards are fully clickable; hide the arrow-in-square */
.svc-go{ display:none; }

/* Better mobile */
@media (max-width: 900px){
  .svc-grid{ grid-template-columns: 1fr; }
  .hub-section-head{ flex-direction:column; align-items:flex-start; }
  .hub-section-sub{ margin-top:2px; }
  .news-card{ min-width: 88vw; }
}

/* Mobile polish for hub/seller pages */
@media (max-width: 560px){
  .shell.wide{ padding:72px 12px 34px; justify-content:flex-start; }
  .page-title{ font-size:20px; margin: 4px 0 6px; }
  .page-lead{ margin:10px 0 14px; font-size:13px; }
  .hub-section{ margin: 0 0 14px; }
  .hub-section-title{ font-size:16px; }
  .hub-section-sub{ font-size:12.5px; }
  .svc-card{ padding:12px 12px; gap:10px; border-radius:16px; }
  .svc-ico{ width:36px; height:36px; border-radius:13px; }
  .svc-title{ white-space:normal; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
  .svc-sub{ white-space:normal; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; font-size:12.5px; }
  .news-card{ min-width: 86vw; padding:12px 14px; }
  .news-img{ height: 96px; }
}

/* Wide tables: horizontal scroll */
.table-wrap{
  width:100%;
  overflow:auto;
  border-radius: 14px;
  border:1px solid rgba(15,40,70,0.08);
}
.table-wrap .table{
  min-width: 780px;
  border:0;
}


.svc-ico svg{ width:22px; height:22px; stroke:#0f2c4a; fill:none; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.svc-ico svg path{ vector-effect: non-scaling-stroke; }


/* Lead line under news strip */
.page-lead{margin:12px 0 18px;color:#6b7280;font-size:14px;overflow-wrap:anywhere;word-break:break-word;}

/* Main welcome title */
.page-title{
  margin: 6px 0 6px;
  color:#0d223f;
  font-size:24px;
  font-weight:800;
  letter-spacing:-0.2px;
  max-width:100%;
  overflow-wrap:anywhere;
  word-break:break-word;
}


/* PNG icon pack support */
.svc-ico img{width:100%;height:100%;display:block;object-fit:contain;}
.svc-ico .emoji-ico{font-size:26px; line-height:1; display:block; filter: saturate(1.05);} 



/* BitBanker-like layout (Admin + Staff) */
body[data-page="admin"], body[data-page="staff"]{
  background:#eef2f7;
}
body[data-page="admin"] .bg,
body[data-page="staff"] .bg{
  display:none;
}
.bb-shell{
  /* a bit wider so central card can be wider while keeping "Разделы" strictly on the right */
  max-width:1320px;
  margin:0 auto;
  padding:18px 14px 90px; /* leave space for bottom bar on mobile */
}
.bb-layout{
  display:flex;
  gap:16px; /* small offset between center and aside */
  align-items:flex-start;
  flex-wrap:nowrap;
}
.bb-main{ flex:1; min-width:0; }
.bb-aside{ width:320px; position:sticky; top:16px; }

/* Stable centered two-column layout (admin/staff): keep center card width stable and center it */
body[data-page="admin"] .bb-layout,
body[data-page="staff"] .bb-layout{
  justify-content:center;
}
body[data-page="admin"] .bb-main,
body[data-page="staff"] .bb-main{
  /* wider + stable center column (like Staff → Список) */
  flex:0 1 1040px;
  max-width:1040px;
  min-width:0;
}
body[data-page="admin"] .bb-aside,
body[data-page="staff"] .bb-aside{
  flex:0 0 320px;
  margin-left:4px;
}

body[data-page="admin"] .bb-center-card,
body[data-page="staff"] .bb-center-card{width:100%;}
body[data-page="admin"] .bb-main{ justify-self:center; }
body[data-page="admin"] .bb-center-card{ margin:0 auto; }

/* Staff: ensure every subview stretches to the same stable width */
body[data-page="staff"] .tab,
body[data-page="staff"] #usersListView,
body[data-page="staff"] #usersCreateView,
body[data-page="staff"] #usersEmployeeRegsView,
body[data-page="staff"] #invClicksView,
body[data-page="staff"] #invSellerRegsView,
body[data-page="staff"] #logs{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
body[data-page="staff"] .bb-center-card .panel,
body[data-page="staff"] .bb-center-card .filters,
body[data-page="staff"] .bb-center-card .table-wrap{
  width:100%;
  max-width:100%;
  box-sizing:border-box;
}
body[data-page="staff"] .bb-center-card .table-wrap table{ width:100%; }
@media (max-width: 1400px){
  body[data-page="admin"] .bb-main,
  body[data-page="staff"] .bb-main{
    flex:1 1 auto;
    max-width:none;
  }
  body[data-page="admin"] .bb-aside,
  body[data-page="staff"] .bb-aside{
    width:320px;
  }
}

/* Safety: never let the right "Разделы" panel fall under the center on desktop */
@media (min-width: 981px){
  /* Use grid to make the two-column layout unbreakable on desktop */
  body[data-page="admin"] .bb-layout,
  body[data-page="staff"] .bb-layout{
    display:grid !important;
    grid-template-columns: minmax(0, 1120px) 340px;
    column-gap:18px;
    justify-content:center;
    align-items:start;
  }
  body[data-page="admin"] .bb-main,
  body[data-page="staff"] .bb-main{ grid-column:1; }
  body[data-page="admin"] .bb-aside,
  body[data-page="staff"] .bb-aside{ grid-column:2; }
  body[data-page="admin"] .bb-main,
  body[data-page="staff"] .bb-main{
    min-width:0 !important;
  }
  body[data-page="admin"] .bb-aside,
  body[data-page="staff"] .bb-aside{
    width:340px !important;
  }
}

.bb-aside-card{ padding:16px; border-radius:18px; }
.bb-sections{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.bb-sections .tabbtn{
  width:100%;
  text-align:left;
  border-radius:14px;
  padding:12px 12px;
  background:#f6f8fc;
  border:1px solid rgba(0,0,0,.06);
  color:#0b1220;
  font-weight:600;
}
.bb-sections .tabbtn.active{
  background:#ffffff;
  border-color:rgba(45,95,180,.30);
  box-shadow:0 6px 18px rgba(15,23,42,.08);
}

/* Hide the original top-level tabs (we use the right "Разделы" panel instead) */
body[data-page="admin"] .bb-main-tabs,
body[data-page="staff"] .bb-main-tabs{
  display:none;
}

/* Make cards look closer to BitBanker */
body[data-page="admin"] .card,
body[data-page="staff"] .card{
  border-radius:18px;
  box-shadow:0 10px 30px rgba(15,23,42,.08);
  border:1px solid rgba(0,0,0,.06);
}

/* Subtabs: pill-like */
body[data-page="staff"] #usersSubTabs.tabs,
body[data-page="staff"] #invSubTabs.tabs{
  background:#f1f5fb;
  padding:6px;
  border-radius:16px;
  gap:6px;
}
body[data-page="staff"] #usersSubTabs .tabbtn,
body[data-page="staff"] #invSubTabs .tabbtn{
  border-radius:14px;
  background:transparent;
  border:0;
}
body[data-page="staff"] #usersSubTabs .tabbtn.active,
body[data-page="staff"] #invSubTabs .tabbtn.active{
  background:#ffffff;
  box-shadow:0 6px 18px rgba(15,23,42,.08);
}

/* Mobile bottom bar */
.bb-bottombar{
  position:fixed;
  left:0; right:0; bottom:0;
  display:none;
  z-index:50;
  height:56px;
  background:#ffffff;
  border-top:1px solid rgba(0,0,0,.08);
  align-items:center;
}
.bb-bottom-left{
  width:64px;
  border:0;
  background:transparent;
  font-size:18px;
  font-weight:700;
  color:#0b1220;
  border-right:1px solid rgba(0,0,0,.08);
}
.bb-bottom-right{
  flex:1;
  border:0;
  background:transparent;
  font-weight:700;
  color:#0b1220;
  font-size:15px;
}

.bb-sheet{
  position:fixed;
  inset:0;
  display:none;
  z-index:60;
}
.bb-sheet.open{ display:block; }
.bb-sheet-backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.55);
}
.bb-sheet-card{
  position:absolute;
  left:10px; right:10px; bottom:72px;
  background:#fff;
  border-radius:18px;
  border:1px solid rgba(0,0,0,.08);
  box-shadow:0 16px 40px rgba(15,23,42,.18);
  max-height:70vh;
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
.bb-sheet-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 14px 10px;
  border-bottom:1px solid rgba(0,0,0,.08);
}
.bb-sheet-title{ font-weight:800; }
.bb-sheet-close{
  border:0;
  background:#f1f5fb;
  width:34px; height:34px;
  border-radius:12px;
  font-size:20px;
  line-height:1;
}
.bb-sheet-list{
  padding:10px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.bb-section-item{
  width:100%;
  text-align:left;
  border-radius:14px;
  padding:12px 12px;
  background:#f6f8fc;
  border:1px solid rgba(0,0,0,.06);
  color:#0b1220;
  font-weight:700;
}
.bb-section-item.active{
  background:#ffffff;
  border-color:rgba(45,95,180,.30);
  box-shadow:0 6px 18px rgba(15,23,42,.08);
}


/* Top back button in header (Admin + Staff) */
.bb-top-back{
  border:0;
  background:transparent;
  color:#0b1220;
  font-size:20px;
  font-weight:900;
  width:34px;
  height:34px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-left:6px;
}
.bb-top-back:hover{ background:rgba(15,23,42,.06); }
@media (max-width: 980px){
  .bb-top-back{ margin-left:2px; }
}

/* Tabs: smoother + scroll on mobile */
body[data-page="admin"] .tabbtn,
body[data-page="staff"] .tabbtn{
  transition: background .18s ease, box-shadow .18s ease, transform .18s ease, color .18s ease;
}
@media (max-width: 980px){
  body[data-page="staff"] #usersSubTabs,
  body[data-page="staff"] #invSubTabs{
    overflow-x:auto;
    flex-wrap:nowrap;
    white-space:nowrap;
    -webkit-overflow-scrolling:touch;
  }
  body[data-page="staff"] #usersSubTabs .tabbtn,
  body[data-page="staff"] #invSubTabs .tabbtn{
    flex:0 0 auto;
  }
}

/* Mobile filters: button -> sheet */
.bb-filter-btn{
  width:100%;
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  border-radius:16px;
  border:1px solid rgba(0,0,0,.06);
  background:#f6f8fc;
  padding:12px 12px;
  font-weight:800;
  color:#0b1220;
}
.bb-filter-btn .bb-filter-ico{
  width:28px;
  height:28px;
  border-radius:12px;
  background:#ffffff;
  border:1px solid rgba(0,0,0,.06);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
}
.bb-filter-btn .bb-filter-meta{
  font-weight:700;
  color:#64748b;
  margin-left:auto;
  font-size:13px;
}

/* Filter sheet layout (full height) */
.bb-sheet-card--filter{
  left:10px; right:10px;
  top:10px; bottom:10px;
  max-height:none;
}
.bb-sheet-foot{
  padding:12px 12px 14px;
  border-top:1px solid rgba(0,0,0,.08);
}
.bb-filter-apply{
  width:100%;
  border-radius:16px;
  padding:14px 14px;
  font-weight:900;
}


/* Better wrapping for dense filter rows on mobile */
@media (max-width: 980px){
  body[data-page="admin"] .bb-main .row > div,
  body[data-page="staff"] .bb-main .row > div,
  body[data-page="admin"] .bb-main .row > .field,
  body[data-page="staff"] .bb-main .row > .field{
    min-width:0 !important;
    flex: 1 1 100% !important;
  }
  body[data-page="admin"] .bb-main .row button.btn,
  body[data-page="staff"] .bb-main .row button.btn{
    width:100% !important;
  }
}


/* Responsive */
@media (max-width: 980px){
  .bb-aside{ display:none; }
  .bb-shell{ padding-bottom:110px; }
  .bb-bottombar{ display:flex; }
}

/* Hub cards: color palette + upload */
.bb-color-picker{
  display:flex;
  gap:10px;
  align-items:center;
}
.bb-color-picker input[type="color"]{
  width:44px;
  height:40px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.10);
  background:#fff;
  padding:0;
}
.bb-swatches{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}
.bb-swatch{
  width:22px;
  height:22px;
  border-radius:9px;
  border:1px solid rgba(0,0,0,.10);
  cursor:pointer;
}
.bb-upload-row{
  margin-top:8px;
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.bb-upload-row input[type="file"]{
  max-width:240px;
}

/* Back arrow in top header: show on desktop only (mobile uses bottom bar) */
.bb-top-back{ display:inline-flex; }
@media (max-width: 980px){
  .bb-top-back{ display:none; }
}

/* Admin/Staff central card layout: keep central width stable and allow inner horizontal scroll */
.bb-layout{ align-items:flex-start; }
.bb-center-card{ overflow:hidden; }
.bb-center-card .table-wrap{ overflow-x:auto; }
.bb-center-card table{ max-width:100%; }
@media (min-width: 900px){
  .bb-layout{ grid-template-columns: minmax(680px, 1fr) 340px; }
  .bb-aside{ align-self:flex-start; }
}

/* Buttons inside admin/staff central blocks: flat, no bounce, hover like hub cards */
body[data-page="admin"] .bb-center-card .btn,
body[data-page="staff"] .bb-center-card .btn{
  box-shadow:none !important;
  transform:none !important;
  transition: background .14s ease, box-shadow .14s ease, border-color .14s ease, color .14s ease;
}
body[data-page="admin"] .bb-center-card .btn:hover,
body[data-page="staff"] .bb-center-card .btn:hover{
  filter: brightness(0.94);
  box-shadow: 0 2px 10px rgba(0,0,0,0.04) !important;
  border-color: rgba(15,40,70,0.16) !important;
}
body[data-page="admin"] .bb-center-card .btn:active,
body[data-page="staff"] .bb-center-card .btn:active{
  box-shadow:none !important;
}

/* Hub admin card icon nudge for alignment */
.svc-ico[data-ico="admin"] svg{ transform: translateY(1px); }


#usersListView,#usersCreateView,#usersEmployeeRegsView{width:100%;}

/* Keep central tab content width consistent across all subtabs */
.bb-main .tab,
.bb-center-card .tab{width:100%;max-width:100%;box-sizing:border-box;}
.bb-main .tab .panel,
.bb-main .tab .table-wrap,
.bb-main .tab .filters,
.bb-main .tab .row-between{max-width:100%;box-sizing:border-box;}
.bb-main .tab .table-wrap table{width:100%;}


/* --- Portal layout fixes (admin/staff) --- */
@media (min-width: 981px){
  body[data-page="admin"] .bb-layout,
  body[data-page="staff"] .bb-layout{
    justify-content:center;
    align-items:flex-start;
    flex-wrap:nowrap !important;
    gap:18px;
  }
  body[data-page="admin"] .bb-aside,
  body[data-page="staff"] .bb-aside{
    flex:0 0 340px;
    width:340px;
  }
  body[data-page="admin"] .bb-main,
  body[data-page="staff"] .bb-main{
    /* one consistent wide width for ALL tabs/subtabs */
    width:min(1120px, calc(100vw - 340px - 64px));
    flex:0 0 auto;
    min-width:680px;
  }
  body[data-page="admin"] .bb-center-card,
  body[data-page="staff"] .bb-center-card{
    width:100%;
  }
  body[data-page="staff"] .tab,
  body[data-page="staff"] .panel,
  body[data-page="staff"] .filters,
  body[data-page="staff"] .table-wrap{
    width:100%;
    box-sizing:border-box;
  }
}



@media (max-width: 900px){
  body[data-page="staff"] #cu_tg_wrap.cu-tg-wrap{
    min-width:100%;
    flex:0 0 100%;
  }
}

/* Mobile webinar tables + simple bottom back bar */
.bb-bottombar--simple{ justify-content:flex-start; }
.bb-bottom-left--wide{ width:100%; border-right:0; }
.web-mobile-action{ display:none; margin-top:8px; }
.webinar-url{ margin-top:4px; word-break:break-all; }
@media (max-width: 980px) and (orientation: portrait){
  body[data-page="webinars_ff"] .shell.wide,
  body[data-page="seller_webinars"] .shell.wide,
  body[data-page="partners"] .shell.wide{ padding-bottom:110px; }
  body[data-page="webinars_ff"] .bb-bottombar--simple,
  body[data-page="seller_webinars"] .bb-bottombar--simple,
  body[data-page="partners"] .bb-bottombar--simple{ display:flex; }
  body[data-page="webinars_ff"] .web-col-date,
  body[data-page="seller_webinars"] .web-col-date{ width:92px !important; min-width:92px; }
  body[data-page="webinars_ff"] .web-col-action,
  body[data-page="seller_webinars"] .web-col-action,
  body[data-page="webinars_ff"] td.web-action-cell,
  body[data-page="seller_webinars"] td.web-action-cell{ display:none; }
  body[data-page="webinars_ff"] .web-mobile-action,
  body[data-page="seller_webinars"] .web-mobile-action{ display:block; }
  body[data-page="webinars_ff"] .webinar-url,
  body[data-page="seller_webinars"] .webinar-url{ display:none; }
  body[data-page="webinars_ff"] td.web-date-cell,
  body[data-page="seller_webinars"] td.web-date-cell{ width:92px; min-width:92px; white-space:normal; }
  body[data-page="webinars_ff"] td.web-date-cell .btn,
  body[data-page="seller_webinars"] td.web-date-cell .btn{ width:100%; }
}

/* Stronger mobile fit for admin/staff central cards */
body[data-page="admin"] .bb-center-card .table-wrap > table,
body[data-page="staff"] .bb-center-card .table-wrap > table,
body[data-page="admin"] .bb-center-card .table-wrap > .table,
body[data-page="staff"] .bb-center-card .table-wrap > .table{
  min-width:720px;
  width:max-content;
}
@media (max-width: 980px){
  body[data-page="admin"] .bb-shell,
  body[data-page="staff"] .bb-shell{
    padding:60px 8px 110px;
  }
  body[data-page="admin"] .bb-layout,
  body[data-page="staff"] .bb-layout,
  body[data-page="admin"] .bb-main,
  body[data-page="staff"] .bb-main{
    width:100%;
    max-width:100%;
    min-width:0;
  }
  body[data-page="admin"] .bb-center-card,
  body[data-page="staff"] .bb-center-card{
    width:100%;
    max-width:100%;
    padding:14px;
    border-radius:16px;
  }
  body[data-page="admin"] .bb-center-card > .tab,
  body[data-page="staff"] .bb-center-card > .tab,
  body[data-page="admin"] .bb-center-card .panel,
  body[data-page="staff"] .bb-center-card .panel,
  body[data-page="admin"] .bb-center-card .filters,
  body[data-page="staff"] .bb-center-card .filters{
    min-width:0;
    max-width:100%;
  }
  body[data-page="admin"] .bb-center-card .table-wrap,
  body[data-page="staff"] .bb-center-card .table-wrap{
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
}


/* Invite modal mobile stacking */
.invite-link-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}
@media (max-width: 980px) and (orientation: portrait){
  body[data-page="hub"] .invite-link-row{
    flex-direction:column;
    align-items:stretch;
    gap:8px;
  }
  body[data-page="hub"] .invite-link-row input{ width:100%; }
  body[data-page="hub"] .invite-link-actions{
    width:100%;
    justify-content:stretch;
  }
  body[data-page="hub"] .invite-link-actions .btn{
    flex:1 1 0;
    width:100%;
  }
}

/* Admin departments mobile/table alignment */
.dep-tree-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;}
@media (max-width: 980px){
  body[data-page="admin"] .dep-toolbar{
    max-width:100%;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    padding-bottom:2px;
    flex-wrap:nowrap !important;
    justify-content:flex-start;
  }
  body[data-page="admin"] .dep-toolbar .btn{ flex:0 0 auto; }
  body[data-page="admin"] #departments .row-between{
    align-items:flex-start;
    gap:10px;
    flex-wrap:wrap;
  }
  body[data-page="admin"] #departments .card{
    min-width:0;
    overflow-x:hidden;
  }
}


.bb-bottom-label{margin-left:8px;font-weight:800;}
.bb-bottom-left--wide{display:flex;align-items:center;justify-content:flex-start;padding:0 14px;}


/* v60 UI refinements */
.cols-modal-grid{display:flex;flex-direction:column;gap:10px;margin-top:10px;}
.cols-modal-item{display:grid;grid-template-columns:minmax(0,1fr) 42px;align-items:center;gap:10px;padding:8px 12px;border:1px solid rgba(15,40,70,0.10);border-radius:12px;background:rgba(255,255,255,0.7);}
.cols-modal-item span{text-align:left;}
.cols-modal-item input[type="checkbox"]{justify-self:center;align-self:center;margin:0;}

body[data-page="register"] select.select,
body[data-page="seller_register"] select.select{
  -webkit-appearance:none;
  -moz-appearance:none;
  appearance:none;
  padding-right:42px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%2365798f' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 14px center;
  background-size:16px 16px;
}

@media (min-width: 981px){
  body[data-page="partners"] .shell.wide .card{
    width:min(1240px, 100%);
    max-width:1240px;
  }
}


/* v61 form spacing refinements */
body[data-page="register"] #submit,
body[data-page="seller_register"] #submit,
body[data-page="login"] #submit{
  margin-top:12px;
}
body[data-page="staff"] #usersCreateView .row{
  flex-wrap:wrap;
}
@media (max-width: 900px){
  body[data-page="staff"] #cu_tg_wrap.cu-tg-wrap{
    width:100%;
    min-width:100%;
    flex:0 0 100%;
    order:99;
  }
}
body[data-page="admin"] #partnerdept .card,
body[data-page="admin"] #partnerdept .panel{
  width:100%;
  box-sizing:border-box;
}
