@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Manrope:wght@500;600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@20,400,0,0');

/* ==========================================================================
   SERENUS CARE - PREMIUM DESIGN SYSTEM
   Camada visual de override, sem alterar contratos de API/JS.
   ========================================================================== */

:root{
  --sc-primary:#2f5d8c;
  --sc-primary-strong:#24496d;
  --sc-secondary:#5da9e9;
  --sc-accent:#63c7b2;
  --sc-bg:#f4f8fc;
  --sc-surface:#ffffff;
  --sc-surface-soft:#f7fbff;
  --sc-text-primary:#243447;
  --sc-text-secondary:#7b8a97;
  --sc-border-soft:#e6eef5;
  --sc-danger:#d65a6b;
  --sc-success:#31b48c;
  --sc-warning:#c5a047;

  --sc-radius-xs:10px;
  --sc-radius-sm:14px;
  --sc-radius-md:18px;
  --sc-radius-lg:24px;
  --sc-radius-xl:30px;

  --sc-space-1:4px;
  --sc-space-2:8px;
  --sc-space-3:12px;
  --sc-space-4:16px;
  --sc-space-5:20px;
  --sc-space-6:24px;
  --sc-space-7:28px;
  --sc-space-8:32px;

  --sc-shadow-sm:0 4px 14px rgba(47,93,140,.08);
  --sc-shadow-md:0 12px 28px rgba(47,93,140,.1);
  --sc-shadow-lg:0 22px 48px rgba(29,53,86,.14);
  --sc-focus:0 0 0 4px rgba(99,199,178,.28);

  /* Mapeamento para variaveis antigas */
  --bg:var(--sc-bg);
  --card:var(--sc-surface);
  --fg:var(--sc-text-primary);
  --muted:var(--sc-text-secondary);
  --border:var(--sc-border-soft);
  --primary:var(--sc-primary);
  --primary-600:var(--sc-primary-strong);
  --input-bg:#ffffff;
  --ring:rgba(99,199,178,.34);
}

html[data-theme="dark"]{
  --sc-primary:#7ea9d5;
  --sc-primary-strong:#6595c7;
  --sc-secondary:#85bff0;
  --sc-accent:#77d7c4;
  --sc-bg:#0e1725;
  --sc-surface:#152133;
  --sc-surface-soft:#1b2b42;
  --sc-text-primary:#e6eef7;
  --sc-text-secondary:#9fb0c4;
  --sc-border-soft:#2a3b54;
  --sc-danger:#e18390;
  --sc-success:#5bc7a2;
  --sc-warning:#d3b66d;

  --sc-shadow-sm:0 6px 20px rgba(1,8,18,.34);
  --sc-shadow-md:0 16px 34px rgba(1,8,18,.42);
  --sc-shadow-lg:0 24px 58px rgba(1,8,18,.56);

  --bg:var(--sc-bg);
  --card:var(--sc-surface);
  --fg:var(--sc-text-primary);
  --muted:var(--sc-text-secondary);
  --border:var(--sc-border-soft);
  --primary:var(--sc-accent);
  --primary-600:#4ebca8;
  --input-bg:#122034;
  --ring:rgba(119,215,196,.3);
}

html,
body{
  font-family:Inter, Manrope, "Segoe UI", Arial, sans-serif;
  color:var(--sc-text-primary);
  background:var(--sc-bg);
}

body{
  background:
    radial-gradient(900px 360px at 84% -14%, rgba(93,169,233,.18) 0%, rgba(93,169,233,0) 72%),
    radial-gradient(700px 320px at -12% -8%, rgba(99,199,178,.18) 0%, rgba(99,199,178,0) 70%),
    var(--sc-bg);
}

*{
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

a{
  color:inherit;
}

.muted{
  color:var(--sc-text-secondary) !important;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn{
  min-height:44px;
  border-radius:var(--sc-radius-sm);
  font-weight:700;
  font-family:Inter, Manrope, "Segoe UI", Arial, sans-serif;
  letter-spacing:.01em;
  border:1px solid transparent;
  transition:background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.btn:focus-visible{
  outline:none;
  box-shadow:var(--sc-focus);
}

.btn-primary{
  color:#ffffff;
  background:linear-gradient(135deg, var(--sc-primary) 0%, var(--sc-primary-strong) 100%);
  box-shadow:0 10px 20px rgba(47,93,140,.22);
}

.btn-primary:hover{
  transform:translateY(-1px);
  filter:brightness(1.03);
}

.btn-secondary,
.btn-ghost{
  background:var(--sc-surface-soft);
  color:var(--sc-text-primary);
  border-color:var(--sc-border-soft);
}

.btn-secondary:hover,
.btn-ghost:hover{
  background:rgba(93,169,233,.12);
  border-color:rgba(47,93,140,.22);
}

.btn[disabled]{
  opacity:.55;
  cursor:not-allowed;
}

.btn.loading .btn-spinner{
  display:inline-block;
}

/* ==========================================================================
   Inputs / Forms
   ========================================================================== */

input,
select,
textarea{
  font-family:Inter, Manrope, "Segoe UI", Arial, sans-serif;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="date"],
input[type="url"],
select,
textarea{
  border-radius:var(--sc-radius-sm);
  border:1px solid var(--sc-border-soft);
  background:var(--input-bg);
  color:var(--sc-text-primary);
}

input::placeholder,
textarea::placeholder{
  color:#9daab8;
}

input:focus,
select:focus,
textarea:focus{
  outline:none;
  border-color:var(--sc-accent);
  box-shadow:var(--sc-focus);
}

.grid-form .form-group > input[type="checkbox"],
.integration-token-form .form-group > input[type="checkbox"]{
  -webkit-appearance:none;
  appearance:none;
  width:20px;
  min-width:20px;
  height:20px;
  margin:8px 0 0;
  padding:0;
  border-radius:6px;
  border:1px solid var(--sc-border-soft);
  background:var(--input-bg);
  display:grid;
  place-items:center;
  cursor:pointer;
  justify-self:start;
  box-shadow:none;
}

.grid-form .form-group > input[type="checkbox"]::after,
.integration-token-form .form-group > input[type="checkbox"]::after{
  content:"";
  width:10px;
  height:10px;
  border-radius:3px;
  background:transparent;
  transition:background .18s ease;
}

.grid-form .form-group > input[type="checkbox"]:checked,
.integration-token-form .form-group > input[type="checkbox"]:checked{
  border-color:rgba(99,199,178,.62);
}

.grid-form .form-group > input[type="checkbox"]:checked::after,
.integration-token-form .form-group > input[type="checkbox"]:checked::after{
  background:var(--sc-primary);
}

.grid-form .form-group > input[type="checkbox"]:focus-visible,
.integration-token-form .form-group > input[type="checkbox"]:focus-visible{
  outline:none;
  box-shadow:var(--sc-focus);
}

.form-group label{
  color:var(--sc-text-secondary);
  font-weight:600;
}

.grid-form{
  gap:var(--sc-space-4);
}

.form-advanced{
  border:1px solid var(--sc-border-soft);
  border-radius:var(--sc-radius-md);
  background:var(--sc-surface-soft);
  padding:10px 14px;
}

.form-advanced summary{
  cursor:pointer;
  color:var(--sc-primary);
  font-weight:700;
}

.form-subsection{
  border:1px solid var(--sc-border-soft);
  border-radius:var(--sc-radius-md);
  background:var(--sc-surface-soft);
  padding:14px;
}

.form-subsection header h4{
  margin:0 0 6px;
  color:var(--sc-primary);
}

/* ==========================================================================
   Layout shell
   ========================================================================== */

body.layout{
  min-height:100vh;
  display:grid;
  grid-template-columns:280px minmax(0,1fr);
  background:transparent;
}

body.layout.layout-sidebar-hidden{
  grid-template-columns:minmax(0,1fr);
}

body.layout.layout-sidebar-hidden .sidebar{
  display:none;
}

body.layout.layout-sidebar-hidden .sidebar-overlay{
  display:none !important;
}

.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  background:rgba(255,255,255,.74);
  backdrop-filter:blur(10px);
  border-right:1px solid var(--sc-border-soft);
  padding:20px 14px 14px;
}

html[data-theme="dark"] .sidebar{
  background:rgba(21,33,51,.76);
}

.sidebar-brand{
  border-bottom:1px solid var(--sc-border-soft);
  margin-bottom:14px;
  padding:6px 8px 16px;
}

.sidebar-logo-wordmark{
  width:min(168px,100%);
  height:auto;
  display:block;
  border-radius:0;
  background:transparent;
  border:0;
  padding:0;
  box-shadow:none;
}

.sidebar-sub{
  margin:8px 0 0;
  font-size:.84rem;
  color:var(--sc-text-secondary);
}

.sidebar-nav{
  gap:6px;
}

.nav-label{
  color:var(--sc-text-secondary);
  margin:6px 10px 10px;
  font-size:.78rem;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-family:Manrope, Inter, "Segoe UI", Arial, sans-serif;
  font-weight:700;
}

.nav-link{
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border-radius:12px;
  color:var(--sc-text-primary);
  font-family:Inter, Manrope, "Segoe UI", Arial, sans-serif;
  font-weight:600;
  font-size:.98rem;
}

.nav-link::before{
  content:"circle";
  width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 22px;
  font-family:"Material Symbols Rounded";
  font-size:20px;
  line-height:1;
  font-weight:400;
  font-style:normal;
  font-variation-settings:"FILL" 0,"wght" 350,"GRAD" 0,"opsz" 20;
  letter-spacing:normal;
  text-transform:none;
  color:#9eb0c2;
}

.nav-link[data-icon="dashboard"]::before{content:"space_dashboard";}
.nav-link[data-icon="companies"]::before{content:"domain";}
.nav-link[data-icon="people"]::before{content:"group";}
.nav-link[data-icon="professionals"]::before{content:"medical_services";}
.nav-link[data-icon="appointments"]::before{content:"event";}
.nav-link[data-icon="packages"]::before{content:"inventory_2";}
.nav-link[data-icon="products"]::before{content:"storefront";}
.nav-link[data-icon="coupons"]::before{content:"local_offer";}
.nav-link[data-icon="transactions"]::before{content:"payments";}
.nav-link[data-icon="integrations"]::before{content:"hub";}
.nav-link[data-icon="affiliates"]::before{content:"share";}
.nav-link[data-icon="patients"]::before{content:"person";}
.nav-link[data-icon="settings"]::before{content:"settings";}

.sidebar-nav > .nav-link[data-view="companies"],
.sidebar-nav > .nav-link[data-view="people"],
.sidebar-nav > .nav-link[data-view="professionals"],
.sidebar-nav > .nav-link[data-view="packages"],
.sidebar-nav > .nav-link[data-view="patients"],
.sidebar-nav > .nav-link[data-view="billing"],
.sidebar-nav > .nav-link[data-view="users"]{
  display:none !important;
}

.nav-group{
  display:grid;
  gap:4px;
}

.nav-group-toggle{
  width:100%;
  display:flex;
  align-items:center;
  gap:12px;
  padding:10px 12px;
  border:0;
  border-radius:12px;
  background:transparent;
  color:var(--sc-text-primary);
  font-family:Inter, Manrope, "Segoe UI", Arial, sans-serif;
  font-weight:600;
  font-size:.98rem;
  cursor:pointer;
  text-align:left;
}

.nav-group-toggle::before{
  content:"folder";
  width:22px;
  height:22px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 22px;
  font-family:"Material Symbols Rounded";
  font-size:20px;
  line-height:1;
  font-weight:400;
  font-style:normal;
  font-variation-settings:"FILL" 0,"wght" 350,"GRAD" 0,"opsz" 20;
  letter-spacing:normal;
  text-transform:none;
  color:#9eb0c2;
}

.nav-group-toggle[data-icon="sales"]::before{
  content:"point_of_sale";
}

.nav-group-toggle[data-icon="cadastros"]::before{
  content:"badge";
}

.nav-group-toggle[data-icon="settings"]::before{
  content:"tune";
}

.nav-group-toggle::after{
  content:"expand_more";
  margin-left:auto;
  font-family:"Material Symbols Rounded";
  font-size:20px;
  line-height:1;
  font-weight:400;
  font-style:normal;
  font-variation-settings:"FILL" 0,"wght" 350,"GRAD" 0,"opsz" 20;
  color:#9eb0c2;
  transition:transform .2s ease,color .2s ease;
}

.nav-group.is-open .nav-group-toggle::after{
  transform:rotate(180deg);
}

.nav-group-items{
  display:none;
  gap:4px;
  padding-left:18px;
}

.nav-group.is-open .nav-group-items{
  display:grid;
}

.nav-link.nav-link-child{
  font-weight:500;
  font-size:.95rem;
}

.nav-group-toggle:hover{
  background:rgba(99,199,178,.13);
  color:var(--sc-text-primary);
}

.nav-group-toggle.active,
.nav-group.has-active-child .nav-group-toggle{
  background:rgba(99,199,178,.19);
  color:var(--sc-primary);
  box-shadow:inset 0 0 0 1px rgba(99,199,178,.4);
}

.nav-group-toggle.active::before,
.nav-group.has-active-child .nav-group-toggle::before,
.nav-group-toggle.active::after,
.nav-group.has-active-child .nav-group-toggle::after{
  color:var(--sc-primary);
}

.nav-link:hover{
  background:rgba(99,199,178,.13);
  color:var(--sc-text-primary);
}

.nav-link.active{
  background:rgba(99,199,178,.19);
  color:var(--sc-primary);
  box-shadow:inset 0 0 0 1px rgba(99,199,178,.4);
}

.nav-link.active::before{
  color:var(--sc-primary);
}

.sidebar-footer{
  color:var(--sc-text-secondary);
  border-top:1px solid var(--sc-border-soft);
}

.main{
  min-width:0;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.topbar{
  position:sticky;
  top:0;
  z-index:20;
  padding:14px 22px;
  min-height:82px;
  border-bottom:1px solid var(--sc-border-soft);
  background:rgba(244,248,252,.85);
  backdrop-filter:blur(10px);
  gap:14px;
}

html[data-theme="dark"] .topbar{
  background:rgba(14,23,37,.86);
}

html[data-theme="dark"] .company-switcher-menu{
  border-color:rgba(133,152,175,.35);
  background:#102035;
  box-shadow:0 18px 34px rgba(3,8,20,.52);
}

html[data-theme="dark"] .company-switcher-option:hover{
  background:rgba(93,169,233,.18);
}

html[data-theme="dark"] .company-switcher-option.is-active{
  background:rgba(93,169,233,.22);
  box-shadow:inset 0 0 0 1px rgba(120,190,255,.45);
}

.topbar-left{
  position:relative;
  min-width:0;
  gap:12px;
}

.sidebar-toggle{
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface-soft);
}

.sidebar-toggle span{
  background:var(--sc-text-secondary);
}

.topbar-quick-actions{
  gap:8px;
}

.topbar-icon-btn{
  width:36px;
  height:36px;
  border-radius:11px;
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface-soft);
  color:var(--sc-text-secondary);
}

.topbar-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:1.1rem;
  line-height:1;
}

.topbar-icon-btn:hover{
  color:var(--sc-primary);
  border-color:rgba(93,169,233,.42);
}

.company-switcher{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  min-width:220px;
  padding:0 14px;
  min-height:44px;
  border-radius:14px;
  border:1px solid rgba(93,169,233,.4);
  background:rgba(93,169,233,.1);
  color:var(--sc-primary);
  font-weight:700;
}

.company-switcher[aria-expanded="true"]{
  border-color:rgba(93,169,233,.72);
  box-shadow:0 0 0 3px rgba(93,169,233,.18);
}

.company-switcher-caret{
  border-top-color:var(--sc-primary);
}

.company-switcher-menu{
  position:absolute;
  top:56px;
  left:0;
  z-index:40;
  min-width:320px;
  max-width:min(460px,82vw);
  max-height:320px;
  overflow:auto;
  border-radius:14px;
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface);
  box-shadow:var(--sc-shadow-md);
  padding:8px;
}

.company-switcher-menu[hidden]{
  display:none !important;
}

.company-switcher-option{
  width:100%;
  border:0;
  background:transparent;
  text-align:left;
  border-radius:10px;
  padding:10px 12px;
  cursor:pointer;
  color:var(--sc-text-primary);
  display:flex;
  flex-direction:column;
  gap:2px;
}

.company-switcher-option:hover{
  background:var(--sc-surface-soft);
}

.company-switcher-option strong{
  font-size:.94rem;
  font-weight:700;
}

.company-switcher-option span{
  font-size:.78rem;
  color:var(--sc-text-secondary);
}

.company-switcher-option.is-active{
  background:rgba(93,169,233,.12);
  box-shadow:inset 0 0 0 1px rgba(93,169,233,.34);
}

.company-switcher-empty{
  margin:0;
  padding:10px 12px;
  color:var(--sc-text-secondary);
  font-size:.84rem;
}

.topbar-title{
  color:var(--sc-primary);
  font-size:1.22rem;
  font-family:Manrope, Inter, "Segoe UI", sans-serif;
}

.topbar-sub{
  color:var(--sc-text-secondary);
}

.topbar-search{
  width:min(420px,32vw);
  min-width:220px;
}

.topbar-search input{
  width:100%;
  min-height:42px;
  border-radius:999px;
  padding:0 16px;
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface);
}

.topbar-user{
  margin-left:auto;
}

.topbar-user .user-meta strong{
  color:var(--sc-primary);
}

.content{
  padding:22px;
}

.view{
  animation:scFadeIn .22s ease;
}

.view[hidden]{
  display:none !important;
}

@keyframes scFadeIn{
  from{opacity:.6; transform:translateY(4px);}
  to{opacity:1; transform:none;}
}

/* ==========================================================================
   Panels / Cards / Dashboard
   ========================================================================== */

.panel,
.kpi-card,
.responsive-table{
  border:1px solid var(--sc-border-soft);
  border-radius:var(--sc-radius-md);
  background:var(--sc-surface);
  box-shadow:var(--sc-shadow-sm);
}

.panel > header{
  padding:20px 22px;
  border-bottom:1px solid var(--sc-border-soft);
}

.panel > header h3{
  margin:0;
  color:var(--sc-primary);
  font-size:1.4rem;
  font-family:Manrope, Inter, "Segoe UI", sans-serif;
  letter-spacing:.01em;
}

.panel-body{
  padding:20px 22px;
}

.panel-header-actions{
  gap:12px;
}

.panel-actions{
  gap:10px;
}

.panel-actions input[type="search"],
.panel-actions input[type="text"],
.panel-actions select{
  min-height:42px;
}

.view-overview{
  display:grid;
  gap:16px;
}

.kpi-grid{
  display:grid;
  gap:14px;
}

.kpi-card{
  padding:18px;
  border-radius:var(--sc-radius-md);
  background:linear-gradient(180deg, var(--sc-surface) 0%, var(--sc-surface-soft) 100%);
}

.kpi-card header h3{
  color:var(--sc-primary);
  font-size:1.02rem;
}

.kpi-card-capacity{
  gap:10px;
}

.kpi-card-capacity-filter{
  display:grid;
  gap:6px;
}

.kpi-card-capacity-filter label{
  color:var(--sc-text-secondary);
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.01em;
}

.kpi-card-capacity-filter select{
  min-height:40px;
}

.kpi-card-capacity .capacity-chart-wrap{
  margin-top:2px;
  grid-template-columns:96px minmax(0,1fr);
  gap:12px;
}

.kpi-card-capacity .capacity-pie{
  width:96px;
  height:96px;
}

.kpi-card-capacity .capacity-pie span{
  min-width:52px;
  min-height:52px;
  font-size:.88rem;
}

.kpi-card-capacity .capacity-numbers p{
  font-size:.82rem;
}

.kpi-card-capacity .capacity-numbers strong{
  font-size:1rem;
}

.kpi-card-capacity .capacity-by-professional{
  margin-top:10px;
}

.kpi-value{
  color:var(--sc-text-primary);
}

.badge,
.chip{
  border-radius:999px;
  border:1px solid rgba(99,199,178,.48);
  background:rgba(99,199,178,.16);
  color:var(--sc-primary);
  font-weight:700;
}

.status-chip{
  display:inline-flex;
  align-items:center;
  border-radius:999px;
  padding:5px 10px;
  font-size:.75rem;
  font-weight:700;
  letter-spacing:.01em;
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface-soft);
  color:var(--sc-text-secondary);
  white-space:nowrap;
}

.status-chip--success{
  color:#2f8d74;
  border-color:#c6e9df;
  background:#eaf8f3;
}

.status-chip--warning{
  color:#926f2a;
  border-color:#f2e6c6;
  background:#fdf8ea;
}

.status-chip--danger{
  color:#b25565;
  border-color:#efd2d8;
  background:#fff1f3;
}

.status-chip--info{
  color:#336f9b;
  border-color:#c9dfee;
  background:#edf6fc;
}

html[data-theme="dark"] .status-chip{
  border-color:#2a3b54;
  background:#1b2b42;
  color:#a7b7ca;
}

html[data-theme="dark"] .status-chip--success{
  color:#67d0b0;
  border-color:rgba(103,208,176,.35);
  background:rgba(103,208,176,.14);
}

html[data-theme="dark"] .status-chip--warning{
  color:#dec27a;
  border-color:rgba(222,194,122,.34);
  background:rgba(222,194,122,.12);
}

html[data-theme="dark"] .status-chip--danger{
  color:#e79ba8;
  border-color:rgba(231,155,168,.34);
  background:rgba(231,155,168,.12);
}

html[data-theme="dark"] .status-chip--info{
  color:#9fc7e9;
  border-color:rgba(159,199,233,.34);
  background:rgba(159,199,233,.12);
}

.overview-grid{
  display:grid;
  grid-template-columns:minmax(0,1.25fr) minmax(320px,.75fr);
  gap:16px;
  align-items:start;
}

.agenda-placeholder,
.agenda-message{
  border-radius:12px;
  border:1px dashed var(--sc-border-soft);
  background:var(--sc-surface-soft);
  color:var(--sc-text-secondary);
  padding:12px 14px;
}

.agenda-item{
  border:1px solid var(--sc-border-soft);
  border-radius:12px;
  background:var(--sc-surface-soft);
  padding:12px 14px;
  margin-bottom:10px;
}

.agenda-item-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.agenda-item-title{
  font-weight:700;
  color:var(--sc-primary);
}

.agenda-item-status{
  border-radius:999px;
  padding:4px 9px;
  font-size:.75rem;
  font-weight:700;
  border:1px solid transparent;
  white-space:nowrap;
}

.agenda-item-status--scheduled{
  color:#6d7f93;
  border-color:#d4e0ec;
  background:#f4f8fc;
}

.agenda-item-status--confirmed{
  color:#3273a0;
  border-color:#c4deef;
  background:#eaf6fe;
}

.agenda-item-status--completed{
  color:#2d8d73;
  border-color:#c5eadf;
  background:#eaf9f4;
}

.agenda-item-status--cancelled,
.agenda-item-status--no_show{
  color:#b25565;
  border-color:#efd3d9;
  background:#fff1f3;
}

.overview-next-list{
  display:grid;
  gap:10px;
}

.overview-next-item{
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface-soft);
  border-radius:12px;
  padding:10px 12px;
}

.overview-next-name{
  display:block;
  color:var(--sc-primary);
  font-size:.92rem;
  margin-bottom:2px;
}

.overview-next-meta{
  margin:0;
  color:var(--sc-text-secondary);
  font-size:.85rem;
}

.overview-side-stack{
  display:grid;
  gap:16px;
}

.agenda-group{
  list-style:none;
  border:1px solid var(--sc-border-soft);
  border-radius:14px;
  background:var(--sc-surface-soft);
  padding:12px;
}

.agenda-group + .agenda-group{
  margin-top:12px;
}

.agenda-group-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:0 4px 10px;
}

.agenda-group-header strong{
  color:var(--sc-primary);
  font-size:.95rem;
}

.agenda-group-header span{
  color:var(--sc-text-secondary);
  font-size:.82rem;
  font-weight:600;
}

.agenda-group-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:10px;
}

.capacity-chart-wrap{
  display:grid;
  grid-template-columns:110px minmax(0,1fr);
  gap:14px;
  align-items:center;
}

.capacity-pie{
  width:110px;
  height:110px;
  border-radius:50%;
  border:1px solid rgba(93,169,233,.22);
  display:grid;
  place-items:center;
  background:conic-gradient(rgba(123,138,151,.24) 360deg, rgba(123,138,151,.24) 360deg);
}

.capacity-pie span{
  display:inline-flex;
  min-width:58px;
  min-height:58px;
  border-radius:50%;
  align-items:center;
  justify-content:center;
  background:var(--sc-surface);
  border:1px solid var(--sc-border-soft);
  color:var(--sc-primary);
  font-weight:800;
  font-size:.95rem;
}

.capacity-numbers{
  display:grid;
  gap:6px;
}

.capacity-numbers p{
  margin:0;
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  font-size:.86rem;
  color:var(--sc-text-secondary);
}

.capacity-numbers strong{
  color:var(--sc-text-primary);
  font-size:1.06rem;
}

.capacity-by-professional{
  display:grid;
  gap:8px;
  margin-top:14px;
}

.capacity-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border:1px solid var(--sc-border-soft);
  border-radius:10px;
  padding:8px 10px;
  background:var(--sc-surface-soft);
}

.capacity-row strong{
  color:var(--sc-primary);
  font-size:.88rem;
}

.capacity-row span{
  color:var(--sc-text-secondary);
  font-size:.82rem;
}

.agenda-gaps-list{
  display:grid;
  gap:12px;
}

.agenda-gap-group{
  border:1px solid var(--sc-border-soft);
  border-radius:12px;
  background:var(--sc-surface-soft);
  padding:10px 12px;
}

.agenda-gap-group h4{
  margin:0 0 8px;
  color:var(--sc-primary);
  font-size:.92rem;
}

.agenda-gap-list{
  margin:0;
  padding-left:18px;
  display:grid;
  gap:4px;
  color:var(--sc-text-secondary);
  font-size:.84rem;
}

/* ==========================================================================
   Tables / Actions
   ========================================================================== */

.responsive-table{
  overflow:auto;
}

.responsive-table table{
  width:100%;
  border-collapse:collapse;
}

.responsive-table th{
  color:var(--sc-text-secondary);
  font-size:.8rem;
  text-transform:uppercase;
  letter-spacing:.06em;
  font-weight:700;
  border-bottom:1px solid var(--sc-border-soft);
}

.responsive-table th,
.responsive-table td{
  padding:14px 12px;
  text-align:left;
}

.responsive-table td{
  border-bottom:1px solid var(--sc-border-soft);
  color:var(--sc-text-primary);
  font-weight:520;
}

.responsive-table tbody tr:hover{
  background:rgba(93,169,233,.08);
}

.table-actions{
  white-space:nowrap;
  width:1%;
}

.table-action{
  border-radius:10px;
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface-soft);
  color:var(--sc-primary);
  font-size:.82rem;
  font-weight:700;
  padding:7px 10px;
  margin-right:6px;
  display:inline-flex;
  align-items:center;
  gap:6px;
}

.table-action:hover{
  background:rgba(99,199,178,.16);
}

.table-action-danger{
  color:#bb4f60;
  border-color:#ebc8cf;
  background:#fff2f4;
}

.table-action-danger:hover{
  background:#ffe7ea;
}

.table-action-primary{
  color:#ffffff;
  border-color:var(--sc-primary);
  background:linear-gradient(135deg, var(--sc-primary), var(--sc-primary-strong));
}

/* ==========================================================================
   Modals / Feedback
   ========================================================================== */

body.modal-open,
body.crud-modal-open{
  overflow:hidden;
}

.modal{
  padding:16px;
}

.modal-backdrop{
  background:rgba(36,52,71,.42);
}

.modal-card{
  border-radius:var(--sc-radius-lg);
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface);
  box-shadow:var(--sc-shadow-lg);
}

.modal-header{
  border-bottom:1px solid var(--sc-border-soft);
}

.modal-header h2{
  color:var(--sc-primary);
}

.modal-close{
  border-radius:12px;
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface-soft);
  color:var(--sc-text-secondary);
}

.modal-close:hover{
  color:var(--sc-primary);
}

.modal-message.error,
.error{
  color:#c75d70;
}

.modal-message.success{
  color:var(--sc-success);
}

/* People modal: keeps header/actions fixed and enables inner scroll on small viewports */
#peopleModal{
  align-items:flex-start;
  overflow-y:auto;
  padding-top:16px;
  padding-bottom:16px;
}

#peopleModal .modal-card{
  max-height:calc(100vh - 32px);
  max-height:calc(100dvh - 32px);
  overflow:hidden;
}

#peopleModal .modal-content{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  padding-right:6px;
}

.crud-form-modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(36,52,71,.42);
  backdrop-filter:blur(2px);
  z-index:76;
}

.crud-form-modal-backdrop[hidden]{
  display:none !important;
}

.crud-form-modal{
  position:fixed !important;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%);
  width:min(1024px, calc(100vw - 32px));
  max-height:calc(100vh - 32px);
  max-height:calc(100dvh - 32px);
  margin:0 !important;
  z-index:90;
  overflow:hidden;
  box-shadow:var(--sc-shadow-lg);
}

.crud-form-modal > header{
  position:sticky;
  top:0;
  z-index:2;
  background:var(--sc-surface);
  padding-right:64px;
}

.crud-form-modal > .panel-body{
  overflow:auto;
  max-height:calc(100vh - 180px);
  max-height:calc(100dvh - 180px);
}

.crud-form-close{
  position:absolute;
  top:14px;
  right:14px;
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface-soft);
  color:var(--sc-text-secondary);
  font-size:1.4rem;
  line-height:1;
  display:grid;
  place-items:center;
  cursor:pointer;
}

.crud-form-close:hover{
  color:var(--sc-primary);
  border-color:rgba(93,169,233,.42);
}

.crud-form-close:focus-visible{
  outline:none;
  box-shadow:var(--sc-focus);
}

/* ==========================================================================
   Product Wizard (inline panel)
   ========================================================================== */

#productFormPanel{
  margin-top:16px;
}

#productFormPanel:not(.crud-form-modal){
  position:relative !important;
  top:auto;
  left:auto;
  transform:none;
  width:100%;
  max-height:none;
  z-index:auto;
  overflow:visible;
}

#productFormPanel:not(.crud-form-modal) > .panel-body{
  overflow:visible;
  max-height:none;
}

.product-wizard-shell{
  display:grid;
  grid-template-columns:minmax(220px,260px) minmax(0,1fr);
  gap:18px;
  align-items:start;
}

.product-wizard-sidebar{
  display:grid;
  gap:8px;
  position:sticky;
  top:10px;
}

.product-wizard-step{
  border-radius:12px;
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface-soft);
  color:var(--sc-text-secondary);
  min-height:56px;
  padding:10px 12px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  gap:10px;
  align-items:center;
  text-align:left;
  cursor:pointer;
  transition:all .18s ease;
}

.product-wizard-step:hover{
  border-color:rgba(93,169,233,.48);
  color:var(--sc-primary);
}

.product-wizard-step.is-active,
.product-wizard-step[aria-current="step"]{
  border-color:rgba(99,199,178,.56);
  background:var(--sc-surface);
  color:var(--sc-primary);
  box-shadow:var(--sc-shadow-sm);
}

.product-wizard-step strong{
  display:block;
  font-size:.95rem;
  line-height:1.2;
}

.product-wizard-step small{
  display:block;
  margin-top:2px;
  font-size:.78rem;
  color:inherit;
  opacity:.9;
}

.product-wizard-step-dot{
  width:12px;
  height:12px;
  border-radius:999px;
  border:2px solid currentColor;
  opacity:.7;
}

.product-wizard-step.is-active .product-wizard-step-dot,
.product-wizard-step[aria-current="step"] .product-wizard-step-dot{
  background:currentColor;
  opacity:1;
}

.product-wizard-main{
  min-width:0;
}

.product-step-panel{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px 16px;
}

.product-step-panel > .grid-span-2{
  grid-column:1 / -1;
}

.product-step-panel[hidden]{
  display:none !important;
}

.product-wizard-actions{
  display:flex;
  align-items:center;
  gap:8px;
}

.product-image-upload-row{
  margin-top:10px;
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}

.product-image-upload-row input[type="file"]{
  flex:1 1 260px;
  min-width:220px;
}

.product-image-preview{
  margin-top:10px;
  min-height:64px;
  border:1px dashed var(--sc-border-soft);
  border-radius:12px;
  background:var(--sc-surface-soft);
  color:var(--sc-text-secondary);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:10px;
  text-align:center;
}

.product-image-preview img{
  display:block;
  max-width:100%;
  max-height:180px;
  border-radius:10px;
}

.product-content-guard{
  border:1px dashed var(--sc-border-soft);
  border-radius:12px;
  background:var(--sc-surface-soft);
  color:var(--sc-text-secondary);
  font-size:.9rem;
  padding:12px 14px;
}

.product-content-workspace{
  display:grid;
  gap:14px;
}

.product-content-workspace[hidden]{
  display:none !important;
}

.product-content-block,
.product-inline-editor{
  border:1px solid var(--sc-border-soft);
  border-radius:12px;
  background:var(--sc-surface-soft);
  padding:12px;
}

.product-content-block-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.product-content-block-head h4{
  margin:0;
  color:var(--sc-primary);
}

.product-content-modal{
  position:fixed;
  inset:0;
  background:rgba(36,52,71,.42);
  backdrop-filter:blur(2px);
  z-index:96;
  display:grid;
  place-items:center;
  padding:16px;
}

.product-content-modal[hidden]{
  display:none !important;
}

.product-content-modal-card{
  width:min(680px, calc(100vw - 24px));
  max-height:calc(100vh - 24px);
  max-height:calc(100dvh - 24px);
  border:1px solid var(--sc-border-soft);
  border-radius:14px;
  background:var(--sc-surface);
  box-shadow:var(--sc-shadow-lg);
  overflow:hidden;
  display:flex;
  flex-direction:column;
}

.product-content-modal-header{
  position:sticky;
  top:0;
  z-index:2;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:14px 18px;
  border-bottom:1px solid var(--sc-border-soft);
  background:var(--sc-surface);
}

.product-content-modal-header h4{
  margin:0;
  color:var(--sc-primary);
}

.product-content-modal-body{
  padding:14px 18px 18px;
  overflow:auto;
}

.lesson-rich-editor{
  border:1px solid var(--sc-border-soft);
  border-radius:12px;
  background:var(--sc-surface);
  overflow:hidden;
}

.lesson-rich-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  padding:10px;
  border-bottom:1px solid var(--sc-border-soft);
  background:var(--sc-surface-soft);
}

.lesson-rich-toolbar .btn{
  min-width:40px;
  padding:6px 9px;
  font-size:.82rem;
}

.lesson-rich-content{
  min-height:220px;
  max-height:420px;
  overflow:auto;
  padding:12px;
  color:var(--sc-text-primary);
  line-height:1.5;
}

.lesson-rich-content:focus{
  outline:none;
}

.lesson-rich-content:empty::before{
  content:'Digite o conteudo da aula aqui...';
  color:var(--sc-text-secondary);
}

.product-lesson-materials{
  border:1px dashed var(--sc-border-soft);
  border-radius:12px;
  background:var(--sc-surface-soft);
  padding:10px;
  display:grid;
  gap:8px;
}

.product-lesson-materials-empty{
  margin:0;
  color:var(--sc-text-secondary);
  font-size:.88rem;
}

.product-lesson-material-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border:1px solid var(--sc-border-soft);
  border-radius:10px;
  background:var(--sc-surface);
  padding:8px 10px;
}

.product-lesson-material-main{
  min-width:0;
  display:grid;
  gap:2px;
}

.product-lesson-material-main strong{
  color:var(--sc-text-primary);
  font-size:.88rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.product-lesson-material-main a{
  color:var(--sc-primary);
  font-size:.78rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

@media (max-width:1100px){
  .product-wizard-shell{
    grid-template-columns:1fr;
  }

  .product-wizard-sidebar{
    position:static;
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .product-wizard-step{
    min-height:50px;
  }

  .product-wizard-step small{
    display:none;
  }
}

@media (max-width:760px){
  .product-step-panel{
    grid-template-columns:1fr;
  }

  .product-wizard-sidebar{
    grid-template-columns:1fr;
  }

  .product-wizard-actions{
    width:100%;
  }

  .product-content-modal{
    padding:8px;
  }

  .product-content-modal-card{
    width:calc(100vw - 16px);
    max-height:calc(100vh - 16px);
    max-height:calc(100dvh - 16px);
  }

  .product-content-modal-header{
    padding:12px 14px;
  }

  .product-content-modal-body{
    padding:12px 14px 14px;
  }
}

/* ==========================================================================
   Login / Auth
   ========================================================================== */

body.auth-page{
  min-height:100vh;
}

.auth-wrap{
  padding:58px 16px;
}

.auth-wrap .card{
  width:min(500px,100%);
  border-radius:var(--sc-radius-xl);
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface);
  box-shadow:var(--sc-shadow-md);
  padding:30px 30px 22px;
}

.auth-wrap .brand-row{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:flex-start;
  margin-bottom:8px;
}

.auth-wrap .brand-col{
  grid-column:2;
  display:grid;
  justify-items:center;
  text-align:center;
}

.auth-wrap .brand-row #themeToggle{
  grid-column:3;
  justify-self:end;
  align-self:start;
}

.brand-logo-wordmark{
  width:min(296px,100%);
  height:auto;
  display:block;
  border-radius:0;
  border:0;
  background:transparent;
  padding:0;
}

.brand-tagline{
  margin:0;
  color:var(--sc-text-secondary);
  font-size:.95rem;
}

.auth-shortcuts{
  display:grid;
  gap:10px;
  margin-top:12px;
}

.auth-guide{
  margin-top:14px;
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface-soft);
  border-radius:var(--sc-radius-md);
  padding:12px 14px;
}

.auth-guide h2{
  margin:0 0 8px;
  color:var(--sc-primary);
  font-size:.9rem;
  letter-spacing:.05em;
}

.auth-guide ol{
  margin:0;
  padding-left:18px;
  color:var(--sc-text-secondary);
  display:grid;
  gap:4px;
}

/* ==========================================================================
   Public Store / Checkout
   ========================================================================== */

.public-store{
  width:min(1360px,95vw);
  margin:26px auto;
  display:grid;
  gap:16px;
}

.public-store-header{
  border:1px solid var(--sc-border-soft);
  border-radius:var(--sc-radius-lg);
  padding:16px 18px;
  background:var(--sc-surface);
  box-shadow:var(--sc-shadow-sm);
}

.public-checkout-logo-image{
  width:min(210px,42vw);
  height:auto;
  display:block;
  border-radius:0;
  border:0;
  background:transparent;
  padding:0;
}

.public-store-eyebrow{
  color:var(--sc-text-secondary);
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:.78rem;
}

.public-store-header h1{
  color:var(--sc-primary);
  font-family:Manrope, Inter, "Segoe UI", sans-serif;
}

.public-store-intro,
.public-store-toolbar,
.public-store-list-panel,
.public-store-detail-panel{
  border-radius:var(--sc-radius-md);
}

.public-store-intro .panel-body,
.public-store-intro-body{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}

.public-store-intro p{
  margin:0;
  color:var(--sc-text-secondary);
}

.public-store-toolbar-body{
  display:grid;
  grid-template-columns:160px minmax(220px,1fr) auto 130px minmax(220px,1fr);
  gap:10px;
  align-items:end;
}

.public-store-label{
  color:var(--sc-text-secondary);
  font-size:.82rem;
  font-weight:700;
}

.public-store-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1.08fr);
  gap:16px;
}

.public-store-list{
  display:grid;
  gap:10px;
}

.public-store-product-card{
  border:1px solid var(--sc-border-soft);
  border-radius:var(--sc-radius-sm);
  padding:14px;
  background:var(--sc-surface-soft);
  transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.public-store-product-card:hover{
  transform:translateY(-1px);
  border-color:rgba(93,169,233,.4);
  box-shadow:var(--sc-shadow-sm);
}

.public-store-product-card.is-selected{
  border-color:rgba(99,199,178,.56);
  background:rgba(99,199,178,.11);
  box-shadow:inset 0 0 0 1px rgba(99,199,178,.34);
}

.public-store-detail{
  border:1px dashed var(--sc-border-soft);
  border-radius:var(--sc-radius-sm);
  background:var(--sc-surface-soft);
}

.public-store-message{
  border-radius:var(--sc-radius-sm);
  border:1px solid rgba(93,169,233,.34);
  background:rgba(93,169,233,.1);
  color:var(--sc-text-primary);
}

.public-store-message.error{
  border-color:rgba(214,90,107,.4);
  background:rgba(214,90,107,.12);
}

.public-store-result{
  border-radius:var(--sc-radius-md);
  border:1px solid rgba(99,199,178,.4);
  background:rgba(99,199,178,.13);
}

.public-store-success{
  color:var(--sc-success);
}

/* ==========================================================================
   Student portal
   ========================================================================== */

.student-portal{
  width:min(1820px,97vw);
  margin:20px auto 34px;
  display:grid;
  gap:14px;
}

.student-portal-page{
  background:linear-gradient(180deg,#f4f8fc 0%,#eef3f9 100%);
}

.student-portal [hidden]{
  display:none !important;
}

.student-portal-header{
  border:1px solid var(--sc-border-soft);
  border-radius:var(--sc-radius-lg);
  background:var(--sc-surface);
  box-shadow:var(--sc-shadow-sm);
  padding:16px 20px;
}

.student-portal-market-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 16px;
}

.student-portal-market-brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

.student-brand-logo{
  width:auto;
  max-width:min(182px,34vw);
  max-height:52px;
  object-fit:contain;
  border:0;
  background:transparent;
  padding:0;
  margin:0;
}

.student-portal-market-brand-copy{
  display:grid;
  gap:2px;
}

.student-portal-market-brand-copy h1{
  margin:0;
  color:var(--sc-primary);
  font-size:1.35rem;
  line-height:1.12;
  font-family:Manrope, Inter, "Segoe UI", sans-serif;
}

.student-portal-market-brand-copy .muted{
  margin:0;
  font-size:.88rem;
}

.student-portal-eyebrow{
  margin:0;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:.72rem;
  color:var(--sc-text-secondary);
}

.student-portal-header h1{
  color:var(--sc-primary);
  font-family:Manrope, Inter, "Segoe UI", sans-serif;
}

.student-auth-grid{
  display:grid;
  grid-template-columns:minmax(0,560px) minmax(280px,1fr);
  align-items:stretch;
  gap:20px;
}

.student-auth-pane{
  display:grid;
  gap:16px;
}

.student-auth-card{
  border-radius:22px;
  overflow:hidden;
}

.student-auth-card > header{
  padding:28px 30px 10px;
}

.student-auth-card > header h3{
  font-size:2rem;
  line-height:1.15;
  letter-spacing:-.02em;
}

.student-auth-card > header .muted{
  margin-top:6px;
  font-size:1.04rem;
}

.student-auth-card .panel-body{
  padding:12px 30px 30px;
}

.student-auth-card .grid-form{
  gap:14px;
}

.student-auth-card .grid-form .form-group{
  margin:0;
}

.student-auth-card .grid-form input{
  min-height:56px;
  border-radius:12px;
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface-soft);
  padding:0 16px;
  font-size:1.2rem;
}

.student-auth-card .grid-form label{
  color:var(--sc-text-primary);
  font-size:1.02rem;
  font-weight:600;
}

.student-auth-main-btn{
  width:100%;
  min-height:58px;
  border-radius:999px;
  font-size:1.15rem;
  letter-spacing:.01em;
}

.student-auth-alt-btn{
  width:100%;
  min-height:58px;
  border-radius:999px;
  font-size:1.15rem;
  border-color:var(--sc-border-soft);
  background:var(--sc-surface-soft);
}

.student-auth-forgot-wrap{
  display:flex;
  justify-content:flex-end;
  margin-top:-2px;
}

.student-portal-market-tools{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.student-company-inline-field{
  min-height:44px;
  border:1px solid var(--sc-border-soft);
  border-radius:12px;
  background:var(--sc-surface-soft);
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:0 12px;
}

.student-company-inline-field span{
  color:var(--sc-text-secondary);
  font-size:.78rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.student-company-inline-field input{
  min-height:38px;
  min-width:160px;
  border:0;
  outline:none;
  background:transparent;
  color:var(--sc-text-primary);
}

.student-market-search{
  display:inline-flex;
  align-items:center;
  gap:12px;
  min-height:44px;
  min-width:min(460px,36vw);
  border:1px solid var(--sc-border-soft);
  border-radius:14px;
  background:var(--sc-surface-soft);
  color:#7f8c9f;
  padding:0 14px;
}

.student-market-search input{
  width:100%;
  min-width:120px;
  border:0;
  outline:none;
  background:transparent;
  color:var(--sc-text-primary);
}

.student-market-login{
  min-height:44px;
  min-width:118px;
  text-transform:uppercase;
  letter-spacing:.04em;
  font-weight:800;
}

#studentPortalHeader #themeToggle{
  width:42px;
  min-height:42px;
}

.student-showcase-body{
  display:grid;
  gap:12px;
  padding-top:0;
}

.student-showcase-panel > header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:18px 20px 12px;
}

.student-showcase-panel > header .muted{
  margin:0;
}

.student-showcase-title-wrap{
  display:inline-flex;
  align-items:center;
  gap:12px;
}

.student-showcase-title-dot{
  width:12px;
  height:30px;
  border-radius:999px;
  background:var(--sc-primary);
}

.student-showcase-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(330px,1fr));
  gap:18px;
}

.student-showcase-empty{
  margin:0;
  border:1px dashed var(--sc-border-soft);
  border-radius:12px;
  background:var(--sc-surface-soft);
  padding:14px;
  text-align:center;
}

.student-showcase-card{
  border:1px solid var(--sc-border-soft);
  border-radius:16px;
  background:var(--sc-surface);
  color:var(--sc-text-primary);
  text-align:left;
  padding:0;
  display:grid;
  gap:0;
  cursor:pointer;
  overflow:hidden;
  box-shadow:0 10px 20px rgba(47,93,140,.08);
  transition:transform .16s ease, border-color .16s ease, box-shadow .16s ease, filter .16s ease;
}

.student-showcase-card:hover{
  transform:translateY(-3px);
  border-color:rgba(93,169,233,.45);
  box-shadow:0 16px 32px rgba(47,93,140,.15);
}

.student-showcase-card.is-selected{
  border-color:rgba(99,199,178,.72);
  box-shadow:0 0 0 2px rgba(99,199,178,.18), 0 16px 32px rgba(47,93,140,.16);
}

.student-showcase-media{
  min-height:210px;
  background:linear-gradient(150deg, rgba(47,93,140,.95) 0%, rgba(93,169,233,.86) 78%);
}

.student-showcase-content{
  display:grid;
  gap:10px;
  padding:16px 18px 18px;
}

.student-showcase-meta-row{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}

.student-showcase-image{
  width:100%;
  min-height:210px;
  height:100%;
  object-fit:cover;
  border:0;
  border-radius:0;
  background:transparent;
}

.student-showcase-image--placeholder{
  display:grid;
  place-items:center;
  color:rgba(255,255,255,.86);
  font-size:.9rem;
  letter-spacing:.03em;
}

.student-showcase-type{
  display:inline-flex;
  width:fit-content;
  border-radius:20px;
  border:1px solid rgba(93,169,233,.34);
  background:rgba(93,169,233,.1);
  color:#325c8f;
  font-size:.74rem;
  text-transform:uppercase;
  letter-spacing:.03em;
  font-weight:700;
  padding:4px 10px;
}

.student-showcase-card h4{
  margin:0;
  color:var(--sc-text-primary);
  font-size:1.22rem;
  line-height:1.25;
}

.student-showcase-card p{
  margin:0;
  color:var(--sc-text-secondary);
  min-height:48px;
  line-height:1.42;
}

.student-showcase-description{
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.student-showcase-price-row{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:10px;
}

.student-showcase-price-stack{
  display:grid;
  gap:2px;
}

.student-showcase-price{
  color:var(--sc-text-primary);
  font-size:1.24rem;
  font-weight:800;
}

.student-showcase-price-free{
  color:var(--sc-success);
  font-size:1.2rem;
  font-weight:800;
}

.student-showcase-billing{
  color:#2f5d8c;
  border-radius:20px;
  border:1px solid rgba(47,93,140,.25);
  background:rgba(47,93,140,.09);
  padding:4px 10px;
  font-size:.74rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.03em;
}

.student-showcase-cta{
  color:#1f3f65;
  background:#f4f8fd;
  border:1px solid #d4dfeb;
  border-radius:999px;
  padding:8px 12px;
  font-weight:700;
  font-size:.8rem;
  white-space:nowrap;
}

.student-auth-card--focus{
  box-shadow:0 0 0 2px rgba(99,199,178,.35), var(--sc-shadow-sm);
  border-color:rgba(99,199,178,.72);
}

.student-auth-inline-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:14px;
  flex-wrap:wrap;
  margin:0;
}

.student-auth-inline-link{
  border:0;
  background:transparent;
  color:var(--sc-primary);
  font-size:.88rem;
  font-weight:700;
  text-decoration:underline;
  text-underline-offset:2px;
  cursor:pointer;
  padding:0;
}

.student-auth-inline-link:hover{
  color:var(--sc-primary-700, #244a72);
}

.student-auth-inline-link:disabled{
  opacity:.6;
  cursor:not-allowed;
  text-decoration:none;
}

.student-auth-visual{
  border-radius:22px;
  min-height:560px;
  padding:24px;
  display:flex;
  align-items:flex-end;
  background-color:#d9e4ef;
  background-repeat:no-repeat;
  background-size:cover;
  background-position:center;
  border:1px solid var(--sc-border-soft);
  box-shadow:var(--sc-shadow-sm);
}

.student-auth-visual-content{
  width:min(86%, 390px);
  background:rgba(255,255,255,.82);
  border:1px solid rgba(255,255,255,.68);
  border-radius:18px;
  padding:16px 18px;
  backdrop-filter:blur(4px);
  display:grid;
  gap:8px;
}

.student-auth-visual-tag{
  margin:0;
  font-size:.72rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#355a84;
}

.student-auth-visual-content h3{
  margin:0;
  color:var(--sc-primary);
  font-size:1.28rem;
  line-height:1.2;
}

.student-auth-visual-content p{
  margin:0;
  color:#274367;
  font-size:.95rem;
  line-height:1.45;
}

.student-first-access-page{
  min-height:100vh;
}

.student-first-access-shell{
  max-width:1160px;
  margin:0 auto;
}

.student-first-access-card .panel-body{
  display:grid;
  gap:14px;
}

.student-first-access-layout{
  display:grid;
  grid-template-columns:minmax(0,560px) minmax(280px,1fr);
  align-items:stretch;
  gap:20px;
}

.student-first-access-visual{
  border-radius:22px;
  min-height:560px;
  padding:24px;
  display:flex;
  align-items:flex-end;
  background-color:#d9e4ef;
  background-repeat:no-repeat;
  background-size:cover;
  background-position:center;
  border:1px solid var(--sc-border-soft);
  box-shadow:var(--sc-shadow-sm);
}

.student-first-access-visual-content{
  width:min(86%, 390px);
  background:rgba(255,255,255,.82);
  border:1px solid rgba(255,255,255,.68);
  border-radius:18px;
  padding:16px 18px;
  backdrop-filter:blur(4px);
  display:grid;
  gap:8px;
}

.student-first-access-visual-tag{
  margin:0;
  font-size:.72rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.08em;
  color:#355a84;
}

.student-first-access-visual-content h3{
  margin:0;
  color:var(--sc-primary);
  font-size:1.28rem;
  line-height:1.2;
}

.student-first-access-visual-content p{
  margin:0;
  color:#274367;
  font-size:.95rem;
  line-height:1.45;
}

.student-first-access-footer{
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:14px;
  flex-wrap:wrap;
}

html[data-theme="dark"] .student-portal-page{
  background:linear-gradient(180deg,#0f1723 0%,#111d2d 100%);
}

html[data-theme="dark"] .student-company-inline-field,
html[data-theme="dark"] .student-market-search{
  border-color:#2d4059;
  background:#16263a;
}

html[data-theme="dark"] .student-company-inline-field input,
html[data-theme="dark"] .student-market-search input{
  color:#e6eef7;
}

html[data-theme="dark"] .student-showcase-card{
  background:#17263a;
  border-color:#2a3f58;
  box-shadow:0 12px 26px rgba(3,9,18,.34);
}

html[data-theme="dark"] .student-showcase-media{
  background:linear-gradient(150deg, rgba(47,93,140,.92) 0%, rgba(93,169,233,.78) 78%);
}

html[data-theme="dark"] .student-showcase-type{
  border-color:rgba(133,191,240,.36);
  background:rgba(133,191,240,.16);
  color:#bdddff;
}

html[data-theme="dark"] .student-showcase-billing{
  border-color:rgba(126,169,213,.35);
  background:rgba(126,169,213,.2);
  color:#cde6ff;
}

html[data-theme="dark"] .student-showcase-cta{
  background:#1b314b;
  border-color:#304a68;
  color:#d8e8fb;
}

html[data-theme="dark"] .student-auth-card .grid-form input{
  background:#122035;
  border-color:#2f455f;
  color:#edf4ff;
}

html[data-theme="dark"] .student-auth-card .grid-form label{
  color:#d7e6fb;
}

html[data-theme="dark"] .student-auth-inline-link{
  color:#93ccff;
}

html[data-theme="dark"] .student-auth-alt-btn{
  background:#122035;
  border-color:#2f455f;
  color:#d7e6fb;
}

html[data-theme="dark"] .student-auth-visual-content,
html[data-theme="dark"] .student-first-access-visual-content{
  background:rgba(12,21,35,.74);
  border-color:rgba(58,88,120,.6);
}

html[data-theme="dark"] .student-auth-visual-tag,
html[data-theme="dark"] .student-first-access-visual-tag{
  color:#9ac5ef;
}

html[data-theme="dark"] .student-auth-visual-content h3,
html[data-theme="dark"] .student-first-access-visual-content h3{
  color:#dcecff;
}

html[data-theme="dark"] .student-auth-visual-content p,
html[data-theme="dark"] .student-first-access-visual-content p{
  color:#c7d9f0;
}

.student-app-shell{
  border-radius:16px;
  overflow:hidden;
  border:1px solid #1d2431;
  background:#0a111b;
  color:#eef3ff;
  box-shadow:0 20px 45px rgba(5,12,22,.35);
  display:grid;
  gap:0;
}

.student-app-configbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 16px;
  background:linear-gradient(90deg,#111825 0%,#171f2d 100%);
  border-bottom:1px solid rgba(255,255,255,.08);
}

.student-app-configbar-right{
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}

.student-app-inline-field{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:#d2dced;
  font-size:.86rem;
}

.student-app-inline-field select{
  background:#121926;
  color:#f4f7ff;
  border:1px solid #2a364d;
  border-radius:8px;
  min-height:38px;
  padding:0 10px;
}

.student-app-navbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 18px;
  background:#04090f;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.student-app-navbar-left,
.student-app-navbar-right{
  display:flex;
  align-items:center;
  gap:10px;
}

.student-app-company-meta{
  display:grid;
  gap:2px;
}

.student-app-company-meta strong{
  color:#eef4ff;
  font-size:1rem;
  line-height:1.2;
}

.student-app-company-meta .muted{
  color:#9bb0ce;
  font-size:.78rem;
}

.student-app-user-meta{
  display:grid;
  gap:2px;
  min-width:0;
}

.student-app-user-meta strong{
  color:#eaf1ff;
  font-size:.92rem;
  line-height:1.15;
  text-align:right;
}

.student-app-user-meta span{
  color:#9db2cf;
  font-size:.78rem;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:260px;
  text-align:right;
}

.student-home-shell{
  padding:18px 24px 24px;
  display:grid;
  gap:14px;
}

.student-home-header{
  display:grid;
  gap:6px;
}

.student-home-header h2{
  margin:0;
  color:#f2f7ff;
  font-size:1.8rem;
}

.student-home-header p{
  margin:0;
  color:#9eb2cd;
}

.student-home-block{
  overflow:hidden;
}

.student-home-card-grid{
  padding:14px;
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(270px,1fr));
  gap:12px;
}

.student-home-empty{
  margin:0;
  border:1px dashed rgba(156,182,214,.35);
  border-radius:12px;
  padding:14px;
  text-align:center;
}

.student-home-card{
  border:1px solid #2a3648;
  border-radius:12px;
  overflow:hidden;
  background:#0f1724;
  display:grid;
  grid-template-rows:140px 1fr;
}

.student-home-card-media{
  min-height:140px;
  background:linear-gradient(130deg,#15335a 0%,#2f5d8c 100%);
}

.student-home-card-image{
  width:100%;
  height:140px;
  object-fit:cover;
  display:block;
}

.student-home-card-image--placeholder{
  display:grid;
  place-items:center;
  color:rgba(255,255,255,.82);
  font-size:.82rem;
  letter-spacing:.03em;
}

.student-home-card-content{
  display:grid;
  gap:10px;
  padding:12px;
  align-content:start;
}

.student-home-card-type{
  display:inline-flex;
  width:fit-content;
  border-radius:999px;
  border:1px solid rgba(126,169,223,.42);
  background:rgba(47,93,140,.25);
  color:#d2e6ff;
  font-size:.68rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.03em;
  padding:4px 8px;
}

.student-home-card h4{
  margin:0;
  color:#f2f7ff;
  font-size:1rem;
  line-height:1.26;
}

.student-home-card-description{
  margin:0;
  color:#a6b8d1;
  font-size:.84rem;
  line-height:1.42;
  min-height:2.84em;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.student-home-card-stats{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  color:#bfcee4;
  font-size:.78rem;
}

.student-home-card-action{
  width:100%;
}

.student-app-icon-btn{
  width:34px;
  height:34px;
  border-radius:10px;
  border:1px solid #2a3344;
  background:#0d1521;
  color:#f0f4ff;
  cursor:pointer;
  display:grid;
  place-items:center;
}

.student-user-avatar{
  width:34px;
  height:34px;
  border-radius:50%;
  border:2px solid #3e7adf;
  background:#101827;
  color:#dce7ff;
  display:grid;
  place-items:center;
  font-size:.72rem;
  font-weight:700;
}

.student-app-link{
  border:0;
  background:transparent;
  color:#d9e4f7;
  padding:0;
  font-weight:600;
  cursor:pointer;
  text-align:left;
}

.student-app-shell .btn{
  border-color:#31435c;
}

.student-app-shell .btn-secondary{
  background:#162335;
  color:#e9f1ff;
}

.student-app-shell .btn-secondary:hover{
  background:#1d2d45;
}

.student-app-shell .btn-primary{
  background:#5e87ef;
  color:#f8fbff;
}

.student-app-shell .btn-primary:hover{
  background:#4e76dd;
}

.student-app-shell .btn-ghost{
  color:#d6e2f7;
}

.student-hero{
  min-height:360px;
  padding:42px 26px 30px;
  display:grid;
  align-content:start;
  gap:14px;
  background:
    radial-gradient(circle at 80% 5%, rgba(43,74,139,.36), transparent 32%),
    radial-gradient(circle at 0% 100%, rgba(114,141,197,.16), transparent 42%),
    linear-gradient(180deg,#4e4f57 0%,#55555d 100%);
}

.student-hero-image-wrap{
  width:min(320px,100%);
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(214,227,245,.26);
  box-shadow:0 12px 28px rgba(14,22,34,.3);
  background:rgba(6,12,21,.45);
}

.student-hero-image{
  width:100%;
  height:180px;
  object-fit:contain;
  display:block;
}

.student-hero-back{
  width:max-content;
}

.student-continue-button{
  width:max-content;
  min-height:34px;
  padding:6px 12px;
  font-size:.82rem;
  border-radius:10px;
}

.student-hero h2{
  margin:0;
  font-size:3rem;
  line-height:1.04;
  letter-spacing:-.02em;
  color:#f7fbff;
}

.student-hero-description{
  margin:0;
  max-width:760px;
  color:#e3e9f5;
  line-height:1.45;
  font-size:1.12rem;
}

.student-hero-progress{
  display:grid;
  gap:8px;
  max-width:420px;
}

.student-hero-progress span{
  color:#ecf2ff;
  font-weight:700;
}

.student-hero-progress-track{
  width:100%;
  height:6px;
  border-radius:999px;
  background:rgba(0,0,0,.38);
  overflow:hidden;
}

.student-hero-progress-track > span{
  display:block;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#7dc3ff 0%,#5f87f2 100%);
}

.student-app-tabs-wrap{
  background:#121821;
  border-top:1px solid rgba(255,255,255,.08);
  border-bottom:1px solid rgba(255,255,255,.08);
  padding:0 24px;
}

.student-app-tabs{
  display:flex;
  gap:16px;
}

.student-app-tab{
  border:0;
  background:transparent;
  color:#8f9db6;
  font-size:1.02rem;
  min-height:58px;
  padding:0 8px;
  cursor:pointer;
  border-bottom:2px solid transparent;
}

.student-app-tab.is-active{
  color:#f3f7ff;
  border-bottom-color:#f3f7ff;
}

.student-app-content-grid{
  padding:20px 24px 24px;
  display:grid;
  grid-template-columns:minmax(260px,.82fr) minmax(0,1.28fr);
  gap:14px;
}

.student-dark-panel{
  border:1px solid #2a3648;
  border-radius:14px;
  background:#101721;
  box-shadow:0 10px 20px rgba(4,10,18,.24);
}

.student-dark-panel > header{
  padding:14px 16px;
  border-bottom:1px solid rgba(255,255,255,.08);
}

.student-dark-panel > header h3{
  margin:0;
  color:#edf3ff;
}

.student-dark-panel .muted{
  color:#9caac3;
}

.student-library-list{
  padding:12px 14px 16px;
  display:grid;
  gap:10px;
}

.student-course-context-card{
  border:1px solid #2a3648;
  border-radius:12px;
  background:#0f1724;
  padding:10px 12px;
  display:grid;
  gap:4px;
}

.student-course-context-card p{
  margin:0;
  color:#d8e1f4;
  font-size:.88rem;
}

.student-library-catalog-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
  gap:10px;
  margin-bottom:12px;
}

.student-library-catalog-card{
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;
  overflow:hidden;
  background:#121d2d;
  display:grid;
  gap:0;
}

.student-library-catalog-card.is-contracted{
  border-color:rgba(99,199,178,.45);
}

.student-library-catalog-card.is-available{
  border-color:rgba(125,148,178,.34);
}

.student-library-catalog-image{
  min-height:120px;
  background:linear-gradient(135deg,#1f3f65 0%,#2f5d8c 100%);
  display:grid;
  place-items:center;
}

.student-library-catalog-image img{
  width:100%;
  height:120px;
  object-fit:cover;
  display:block;
}

.student-library-catalog-image--placeholder{
  color:rgba(255,255,255,.8);
  font-size:.78rem;
  letter-spacing:.03em;
}

.student-library-catalog-body{
  display:grid;
  gap:8px;
  padding:10px;
}

.student-library-catalog-meta{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

.student-library-catalog-type,
.student-library-catalog-billing{
  border-radius:999px;
  font-size:.68rem;
  font-weight:700;
  letter-spacing:.03em;
  text-transform:uppercase;
  padding:4px 8px;
}

.student-library-catalog-type{
  color:#d8e8fb;
  border:1px solid rgba(125,177,223,.45);
  background:rgba(47,93,140,.28);
}

.student-library-catalog-billing{
  color:#cee6ff;
  border:1px solid rgba(99,199,178,.45);
  background:rgba(99,199,178,.2);
}

.student-library-catalog-card h4{
  margin:0;
  font-size:.95rem;
  color:#f3f7ff;
}

.student-library-catalog-card p{
  margin:0;
  color:#aebed5;
  font-size:.82rem;
  min-height:34px;
}

.student-library-catalog-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
}

.student-library-catalog-price{
  color:#f3f7ff;
  font-size:.94rem;
}

.student-library-catalog-price.is-free{
  color:#7ee4c0;
}

.student-library-catalog-badge{
  border-radius:999px;
  padding:4px 8px;
  font-size:.68rem;
  font-weight:700;
}

.student-library-catalog-badge.is-contracted{
  color:#74d3ae;
  border:1px solid rgba(116,211,174,.45);
  background:rgba(24,65,52,.45);
}

.student-library-catalog-badge.is-available{
  color:#f4d08e;
  border:1px solid rgba(244,208,142,.46);
  background:rgba(69,54,24,.5);
}

.student-course-module-card{
  border:1px solid #2a3648;
  border-radius:12px;
  background:#111b2a;
  display:grid;
  gap:0;
  overflow:hidden;
}

.student-course-module-toggle{
  width:100%;
  border:0;
  border-bottom:1px solid rgba(255,255,255,.08);
  background:rgba(19,32,49,.68);
  color:#eff4ff;
  cursor:pointer;
  text-align:left;
  padding:11px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.student-course-module-toggle:hover{
  background:rgba(27,45,68,.72);
}

.student-course-module-toggle:focus-visible{
  outline:2px solid rgba(120,176,245,.7);
  outline-offset:-2px;
}

.student-course-module-toggle-main{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.student-course-module-toggle-copy{
  display:grid;
  gap:3px;
  min-width:0;
}

.student-course-module-cover{
  flex:0 0 auto;
  width:58px;
  height:40px;
  border-radius:9px;
  overflow:hidden;
  border:1px solid rgba(151,179,214,.35);
  background:#0d1727;
}

.student-course-module-cover img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.student-course-module-toggle-main strong{
  font-size:.97rem;
  color:#f3f7ff;
}

.student-course-module-toggle-main small{
  color:#9fb1cf;
  font-size:.78rem;
}

.student-course-module-toggle-icon{
  width:26px;
  height:26px;
  border-radius:8px;
  border:1px solid rgba(151,179,214,.38);
  display:grid;
  place-items:center;
  font-size:1rem;
  font-weight:700;
  color:#e0ecff;
  background:#0f1b2e;
}

.student-course-module-content{
  padding:9px 10px 10px;
}

.student-course-module-content[hidden]{
  display:none;
}

.student-course-module-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.student-course-module-head h5{
  margin:0;
  color:#f4f8ff;
  font-size:1rem;
}

.student-course-module-head span{
  color:#9caac3;
  font-size:.8rem;
}

.student-course-lesson-list{
  list-style:none;
  margin:0;
  padding:0;
  display:grid;
  gap:8px;
}

.student-course-lesson-item{
  border-radius:10px;
  border:1px solid #2a3648;
  background:#0f1724;
  padding:8px;
  transition:all .18s ease;
}

.student-course-lesson-item.is-selected{
  border-color:#4e88e8;
  background:#12203a;
  box-shadow:0 0 0 2px rgba(78,136,232,.24);
}

.student-course-lesson-item.is-continue-highlight{
  animation:studentPulse 1.1s ease;
}

@keyframes studentPulse{
  0%{box-shadow:0 0 0 0 rgba(110,179,255,.45);}
  100%{box-shadow:0 0 0 14px rgba(110,179,255,0);}
}

.student-course-lesson-btn{
  width:100%;
  border:0;
  background:transparent;
  color:#f0f5ff;
  padding:0;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:8px;
  cursor:pointer;
  text-align:left;
}

.student-course-lesson-btn:disabled{
  cursor:not-allowed;
  opacity:.75;
}

.student-course-lesson-main{
  display:flex;
  align-items:flex-start;
  gap:10px;
  min-width:0;
}

.student-course-lesson-copy{
  display:grid;
  gap:4px;
  min-width:0;
}

.student-course-lesson-thumb{
  flex:0 0 auto;
  width:56px;
  height:38px;
  border-radius:8px;
  overflow:hidden;
  border:1px solid rgba(151,179,214,.34);
  background:#0f1b2e;
}

.student-course-lesson-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.student-course-lesson-title{
  font-weight:700;
  line-height:1.3;
}

.student-course-lesson-status{
  font-size:.78rem;
  color:#9fb1cf;
}

.student-course-lesson-badge{
  border-radius:999px;
  padding:4px 10px;
  font-size:.72rem;
  border:1px solid;
  white-space:nowrap;
}

.student-course-lesson-badge.is-completed{
  color:#84deb2;
  border-color:#2d8b5f;
  background:#123025;
}

.student-course-lesson-badge.is-in-progress{
  color:#9fd4ff;
  border-color:#3f7ab8;
  background:#122942;
}

.student-course-lesson-badge.is-not-started{
  color:#d3deee;
  border-color:#56657a;
  background:#1d2938;
}

.student-course-lesson-badge.is-locked{
  color:#f3c993;
  border-color:#9b7036;
  background:#35240f;
}

.student-course-lesson-lock{
  margin-top:6px;
  display:block;
  color:#f3c993;
  font-size:.76rem;
}

.student-lesson-card{
  display:grid;
  grid-template-rows:auto minmax(220px,1fr) auto;
}

#studentLessonMeta strong{
  font-weight:800;
  color:#f3f7ff;
}

.student-lesson-viewer{
  padding:14px 16px;
  color:#eef2fb;
  background:#0f1724;
}

.student-lesson-viewer.empty{
  color:#9caac3;
}

.student-lesson-viewer .student-lesson-body,
.student-lesson-viewer .student-lesson-rich-description,
.student-lesson-viewer .student-lesson-rich-card,
.student-lesson-viewer .student-lesson-image-item{
  border-color:#2a3648;
  background:#152032;
  color:#e8f0ff;
}

.student-lesson-body{
  border-radius:12px;
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface-soft);
  padding:12px;
  line-height:1.55;
}

.student-lesson-body > :first-child{
  margin-top:0;
}

.student-lesson-body > :last-child{
  margin-bottom:0;
}

.student-lesson-body a{
  color:var(--sc-primary);
  text-decoration:underline;
  text-underline-offset:2px;
}

.student-lesson-body img{
  max-width:100%;
  height:auto;
  border-radius:10px;
}

.student-lesson-body table{
  width:100%;
  border-collapse:collapse;
}

.student-lesson-body th,
.student-lesson-body td{
  border:1px solid var(--sc-border-soft);
  padding:6px 8px;
}

.student-lesson-viewer .student-lesson-rich-section h5{
  color:#d4e1fb;
}

.student-lesson-viewer .student-lesson-image-item figcaption{
  color:#bfcee7;
}

.student-lesson-locked{
  color:#f3c993;
}

.student-lesson-actions{
  border-top:1px solid rgba(255,255,255,.08);
  padding:12px 16px 14px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.student-about-panel{
  margin:20px 24px 24px;
}

.student-about-content{
  padding:16px;
  display:grid;
  gap:14px;
}

.student-about-text{
  margin:0;
  color:#e0e9fa;
  line-height:1.55;
}

.student-about-panel .student-profile-list dt{
  color:#9fb1cf;
}

.student-about-panel .student-profile-list dd{
  color:#eef3ff;
}

.student-profile-list dt{
  color:var(--sc-text-secondary);
  font-size:.76rem;
  text-transform:uppercase;
  letter-spacing:.07em;
}

.student-profile-list dd{
  font-weight:700;
}

.student-profile-list{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px 14px;
}

.student-session-status{
  margin:8px 0 0;
  font-size:.84rem;
}

.student-session-status-expired{
  color:#c86b79;
}

.student-enrollment-card{
  border:1px solid var(--sc-border-soft);
  border-radius:var(--sc-radius-sm);
  background:var(--sc-surface-soft);
}

.student-module{
  border-top:1px solid var(--sc-border-soft);
}

.student-lesson-select{
  border-radius:12px;
  border:1px solid var(--sc-border-soft);
  background:var(--input-bg);
}

.student-lesson-item.is-selected .student-lesson-select{
  border-color:rgba(99,199,178,.56);
  background:rgba(99,199,178,.11);
}

.student-lesson-rich-description{
  border-radius:12px;
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface-soft);
  padding:12px;
  color:var(--sc-text-primary);
  line-height:1.55;
}

.student-lesson-rich-section{
  margin-top:12px;
  display:grid;
  gap:8px;
}

.student-lesson-rich-section h5{
  margin:0;
  color:var(--sc-primary);
  font-size:.92rem;
}

.student-lesson-rich-grid{
  display:grid;
  gap:10px;
}

.student-lesson-rich-card{
  border:1px solid var(--sc-border-soft);
  border-radius:12px;
  background:var(--sc-surface-soft);
  padding:10px;
  display:grid;
  gap:8px;
}

.student-lesson-rich-card strong{
  color:var(--sc-primary);
  font-size:.9rem;
}

.student-lesson-video-frame,
.student-lesson-agent-frame{
  border:1px solid var(--sc-border-soft);
  border-radius:12px;
  overflow:hidden;
  background:#000;
  aspect-ratio:16 / 9;
}

.student-lesson-video-frame iframe,
.student-lesson-agent-frame iframe{
  width:100%;
  height:100%;
  border:0;
}

.student-lesson-video-frame video{
  width:100%;
  height:100%;
  border:0;
  display:block;
  background:#000;
}

.student-lesson-image-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:10px;
}

.student-lesson-image-item{
  margin:0;
  border:1px solid var(--sc-border-soft);
  border-radius:12px;
  overflow:hidden;
  background:var(--sc-surface-soft);
}

.student-lesson-image-item img{
  width:100%;
  height:180px;
  object-fit:cover;
  display:block;
}

.student-lesson-image-item figcaption{
  padding:8px 10px;
  color:var(--sc-text-secondary);
  font-size:.84rem;
}

.student-portal-message{
  border-radius:var(--sc-radius-sm);
  border:1px solid rgba(93,169,233,.34);
  background:rgba(93,169,233,.1);
}

.student-portal-message.error{
  border-color:rgba(214,90,107,.4);
  background:rgba(214,90,107,.12);
  color:#c86b79;
}

.student-portal-message.success{
  border-color:rgba(49,180,140,.4);
  background:rgba(49,180,140,.13);
  color:var(--sc-success);
}

html[data-theme="light"] .student-app-shell{
  border-color:#d9e2ee;
  background:#f4f8fd;
  color:#17324e;
  box-shadow:0 18px 34px rgba(29,63,98,.12);
}

html[data-theme="light"] .student-app-navbar{
  background:#ffffff;
  border-bottom:1px solid #d8e3ef;
}

html[data-theme="light"] .student-app-company-meta strong{
  color:#1f3f65;
}

html[data-theme="light"] .student-app-company-meta .muted{
  color:#5a7697;
}

html[data-theme="light"] .student-app-user-meta strong{
  color:#1f3f65;
}

html[data-theme="light"] .student-app-user-meta span{
  color:#5a7697;
}

html[data-theme="light"] .student-app-icon-btn{
  border-color:#cfdbeb;
  background:#f4f9ff;
  color:#2d5a8a;
}

html[data-theme="light"] .student-user-avatar{
  background:#edf4ff;
  border-color:#5f95da;
  color:#1f4f84;
}

html[data-theme="light"] .student-app-link{
  color:#355a84;
}

html[data-theme="light"] .student-app-shell .btn{
  border-color:#c3d4e6;
}

html[data-theme="light"] .student-app-shell .btn-secondary{
  background:#ecf4ff;
  color:#2f5d8c;
}

html[data-theme="light"] .student-app-shell .btn-secondary:hover{
  background:#dfeeff;
}

html[data-theme="light"] .student-app-shell .btn-primary{
  background:#2f5d8c;
  color:#f7fbff;
}

html[data-theme="light"] .student-app-shell .btn-primary:hover{
  background:#244b72;
}

html[data-theme="light"] .student-app-shell .btn-ghost{
  color:#365b82;
}

html[data-theme="light"] .student-hero{
  background:
    radial-gradient(circle at 82% 8%, rgba(93,169,233,.24), transparent 34%),
    radial-gradient(circle at 0% 100%, rgba(47,93,140,.12), transparent 44%),
    linear-gradient(180deg,#f7fafd 0%,#eaf2fb 100%);
}

html[data-theme="light"] .student-hero-image-wrap{
  border-color:rgba(71,119,173,.3);
  box-shadow:0 10px 24px rgba(42,87,136,.2);
  background:#f1f6fd;
}

html[data-theme="light"] .student-hero h2{
  color:#1f3f65;
}

html[data-theme="light"] .student-hero-description{
  color:#33577e;
}

html[data-theme="light"] .student-hero-progress span{
  color:#27496e;
}

html[data-theme="light"] .student-hero-progress-track{
  background:rgba(28,61,99,.18);
}

html[data-theme="light"] .student-app-tabs-wrap{
  background:#edf3fa;
  border-top-color:#d6e2ef;
  border-bottom-color:#d6e2ef;
}

html[data-theme="light"] .student-home-header h2{
  color:#1f3f65;
}

html[data-theme="light"] .student-home-header p{
  color:#5b7594;
}

html[data-theme="light"] .student-home-card{
  border-color:#d6e2ef;
  background:#ffffff;
}

html[data-theme="light"] .student-home-card-media{
  background:linear-gradient(130deg,#dcecff 0%,#b8d7f8 100%);
}

html[data-theme="light"] .student-home-card-image--placeholder{
  color:#355b83;
}

html[data-theme="light"] .student-home-card-type{
  border-color:rgba(47,93,140,.32);
  background:rgba(47,93,140,.12);
  color:#2f5d8c;
}

html[data-theme="light"] .student-home-card h4{
  color:#1f3f65;
}

html[data-theme="light"] .student-home-card-description{
  color:#537191;
}

html[data-theme="light"] .student-home-card-stats{
  color:#4f6d8d;
}

html[data-theme="light"] .student-home-empty{
  border-color:#c9daeb;
}

html[data-theme="light"] .student-app-tab{
  color:#5b7391;
}

html[data-theme="light"] .student-app-tab.is-active{
  color:#214769;
  border-bottom-color:#214769;
}

html[data-theme="light"] .student-dark-panel{
  border-color:#d7e2ef;
  background:#ffffff;
  box-shadow:0 10px 22px rgba(30,64,97,.1);
}

html[data-theme="light"] .student-dark-panel > header{
  border-bottom-color:#e1e9f3;
}

html[data-theme="light"] .student-dark-panel > header h3{
  color:#1f3f65;
}

html[data-theme="light"] .student-dark-panel .muted{
  color:#5a7697;
}

html[data-theme="light"] .student-course-context-card{
  border-color:#d7e2ef;
  background:#f6faff;
}

html[data-theme="light"] .student-course-context-card p{
  color:#2d577f;
}

html[data-theme="light"] .student-course-module-card{
  border-color:#d7e2ef;
  background:#f6faff;
}

html[data-theme="light"] .student-course-module-toggle{
  border-bottom-color:#dce6f1;
  background:#ecf4ff;
  color:#1f3f65;
}

html[data-theme="light"] .student-course-module-toggle:hover{
  background:#dfecfb;
}

html[data-theme="light"] .student-course-module-toggle-main strong{
  color:#1f3f65;
}

html[data-theme="light"] .student-course-module-toggle-main small{
  color:#587493;
}

html[data-theme="light"] .student-course-module-cover{
  border-color:#bfd3e8;
  background:#ffffff;
}

html[data-theme="light"] .student-course-module-toggle-icon{
  border-color:#bfd3e8;
  background:#ffffff;
  color:#355b83;
}

html[data-theme="light"] .student-course-lesson-item{
  border-color:#d7e2ef;
  background:#ffffff;
}

html[data-theme="light"] .student-course-lesson-item.is-selected{
  border-color:#6a9edf;
  background:#edf4ff;
  box-shadow:0 0 0 2px rgba(106,158,223,.18);
}

html[data-theme="light"] .student-course-lesson-btn{
  color:#1f3f65;
}

html[data-theme="light"] .student-course-lesson-thumb{
  border-color:#bfd3e8;
  background:#ffffff;
}

html[data-theme="light"] .student-course-lesson-status{
  color:#577392;
}

html[data-theme="light"] .student-course-lesson-badge.is-completed{
  color:#187350;
  border-color:#76c6a4;
  background:#e7f8f1;
}

html[data-theme="light"] .student-course-lesson-badge.is-in-progress{
  color:#1f4f82;
  border-color:#8cb6df;
  background:#e9f2fc;
}

html[data-theme="light"] .student-course-lesson-badge.is-not-started{
  color:#4f6278;
  border-color:#c2cedd;
  background:#eef3f9;
}

html[data-theme="light"] .student-course-lesson-badge.is-locked{
  color:#8b5e1f;
  border-color:#e2bd86;
  background:#fff4e3;
}

html[data-theme="light"] .student-course-lesson-lock{
  color:#8b5e1f;
}

html[data-theme="light"] .student-lesson-viewer{
  color:#213f61;
  background:#f8fbff;
}

html[data-theme="light"] .student-lesson-viewer.empty{
  color:#587391;
}

html[data-theme="light"] #studentLessonMeta strong{
  color:#1f3f65;
}

html[data-theme="light"] .student-lesson-viewer .student-lesson-body,
html[data-theme="light"] .student-lesson-viewer .student-lesson-rich-description,
html[data-theme="light"] .student-lesson-viewer .student-lesson-rich-card,
html[data-theme="light"] .student-lesson-viewer .student-lesson-image-item{
  border-color:#d7e2ef;
  background:#ffffff;
  color:#1f3f65;
}

html[data-theme="light"] .student-lesson-viewer .student-lesson-rich-section h5{
  color:#1f4d78;
}

html[data-theme="light"] .student-lesson-viewer .student-lesson-image-item figcaption{
  color:#5a7697;
}

html[data-theme="light"] .student-lesson-locked{
  color:#8b5e1f;
}

html[data-theme="light"] .student-lesson-actions{
  border-top-color:#e1e9f3;
}

html[data-theme="light"] .student-about-text{
  color:#2e5a84;
}

html[data-theme="light"] .student-about-panel .student-profile-list dt{
  color:#5a7697;
}

html[data-theme="light"] .student-about-panel .student-profile-list dd{
  color:#1f3f65;
}

/* ==========================================================================
   Content studio
   ========================================================================== */

.content-studio{
  width:min(1420px,96vw);
  margin:20px auto;
}

.content-studio-page{
  background:linear-gradient(180deg,#f6f8fb 0%,#eef2f7 100%);
}

.studio-admin-shell{
  display:grid;
  grid-template-columns:280px minmax(0,1fr);
  gap:18px;
  align-items:start;
}

.studio-admin-sidebar{
  position:sticky;
  top:14px;
  border:1px solid var(--sc-border-soft);
  border-radius:16px;
  background:var(--sc-surface);
  box-shadow:var(--sc-shadow-sm);
  padding:18px;
  display:grid;
  gap:14px;
}

.studio-sidebar-head h1{
  margin:2px 0 0;
  font-size:1.5rem;
}

.studio-format-card{
  border:1px solid var(--sc-border-soft);
  border-radius:12px;
  background:var(--sc-surface-soft);
  padding:12px 14px;
  display:grid;
  gap:4px;
}

.studio-format-card p{
  margin:0;
  color:var(--sc-text-secondary);
  font-size:.82rem;
}

.studio-format-card strong{
  font-size:1.1rem;
}

.studio-stepper{
  display:grid;
  gap:5px;
  margin:4px 0;
  position:relative;
}

.studio-stepper::before{
  content:"";
  position:absolute;
  left:12px;
  top:8px;
  bottom:8px;
  width:2px;
  background:#d8e0eb;
  border-radius:999px;
}

.studio-step-link{
  border:0;
  border-radius:10px;
  background:transparent;
  display:grid;
  grid-template-columns:26px minmax(0,1fr);
  align-items:flex-start;
  gap:10px;
  padding:6px 4px;
  text-align:left;
  cursor:pointer;
  color:var(--sc-text-secondary);
  transition:background .18s ease,color .18s ease;
}

.studio-step-link:hover{
  background:rgba(93,169,233,.12);
  color:var(--sc-primary);
}

.studio-step-link .studio-step-dot{
  width:18px;
  height:18px;
  border-radius:50%;
  border:2px solid #c7d2e0;
  background:#fff;
  margin-top:2px;
  position:relative;
  z-index:1;
}

.studio-step-link strong{
  display:block;
  font-size:.96rem;
  font-weight:700;
}

.studio-step-link small{
  display:block;
  color:inherit;
  opacity:.86;
  margin-top:2px;
}

.studio-step-link.is-active{
  background:rgba(79,127,201,.12);
  color:#2b4d8a;
}

.studio-step-link.is-active .studio-step-dot{
  border-color:#4c71d2;
  background:#4c71d2;
  box-shadow:0 0 0 4px rgba(76,113,210,.16);
}

.studio-step-link.is-complete .studio-step-dot{
  border-color:#8cb7e9;
  background:#8cb7e9;
}

.studio-session-card{
  border-top:1px solid var(--sc-border-soft);
  padding-top:12px;
  display:grid;
  gap:10px;
}

.studio-session-card header h3{
  margin:0;
}

.studio-session-card header .muted{
  margin-top:6px;
}

.content-studio-session-list{
  margin:0;
  display:grid;
  grid-template-columns:1fr;
  gap:9px;
}

.content-studio-session-list > div{
  display:grid;
  gap:2px;
}

.content-studio-session-list dt{
  color:var(--sc-text-secondary);
  font-size:.76rem;
  text-transform:uppercase;
  letter-spacing:.07em;
}

.content-studio-session-list dd{
  margin:0;
  font-weight:700;
}

.content-studio-session-actions{
  margin-top:2px;
  display:flex;
  gap:10px;
  flex-direction:column;
}

.studio-admin-main{
  display:grid;
  gap:16px;
}

.content-studio-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.content-studio-header h2{
  margin:2px 0 4px;
  font-size:2rem;
}

.content-studio-header-actions{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}

.studio-main-actions{
  display:flex;
  align-items:flex-end;
  flex-wrap:wrap;
  gap:10px;
}

.studio-main-actions .form-group{
  margin:0;
  min-width:240px;
  flex:1 1 260px;
}

.studio-main-actions .btn{
  height:42px;
}

.studio-primary-panel .panel-body{
  display:grid;
  gap:12px;
}

.studio-form-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  gap:12px;
}

.studio-form-layout > #studioFormFields{
  grid-column:1 / -1;
}

.content-studio-filters{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
  gap:10px;
  padding:12px;
  border:1px dashed #c6d4e6;
  border-radius:12px;
  background:#f6f9fd;
  margin-bottom:12px;
}

.content-studio-filters .form-group{
  margin:0;
}

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

.studio-field-label-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}

.studio-counter-badge{
  border-radius:999px;
  border:1px solid #a9c2ee;
  color:#4a6ec7;
  padding:2px 10px;
  font-size:.75rem;
  font-weight:700;
  background:#edf3ff;
}

.studio-counter-badge.is-warning{
  border-color:#d89f6b;
  color:#7b4210;
  background:#fff1e4;
}

.studio-field-hint{
  margin:6px 0 0;
  color:var(--sc-text-secondary);
  font-size:.78rem;
}

.studio-category-chip-wrap{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}

.studio-category-chip{
  border-radius:999px;
  border:1px solid #c2cfe1;
  background:#f4f7fb;
  color:#40556e;
  padding:6px 12px;
  font-size:.76rem;
  font-weight:700;
  cursor:pointer;
  transition:all .18s ease;
}

.studio-category-chip:hover{
  border-color:#92afd9;
  background:#e7f0ff;
  color:#2c4f83;
}

.content-studio-form-fields .grid-span-2{
  grid-column:1 / -1;
}

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

.studio-wizard-panel .form-group{
  margin:0;
}

.studio-wizard-panel .form-group.grid-span-2{
  grid-column:1 / -1;
}

.content-studio-form-fields textarea{
  min-height:92px;
}

.content-studio-form-fields textarea[name="description"]{
  min-height:150px;
}

.studio-resource-composer{
  border:1px solid var(--sc-border-soft);
  border-radius:14px;
  background:#f8fbff;
  padding:12px;
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(260px,.42fr);
  gap:12px;
}

.studio-resource-main{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
  align-content:start;
}

.studio-resource-main > .form-group.grid-span-2{
  grid-column:1 / -1;
}

.studio-resource-side{
  border-left:1px solid var(--sc-border-soft);
  padding-left:12px;
  display:grid;
  align-content:start;
}

.studio-resource-side .form-group{
  margin:0;
}

.studio-resource-side .btn{
  width:100%;
  margin:0 0 8px;
}

.studio-image-drop{
  min-height:150px;
  border:1px dashed #b8c7db;
  border-radius:12px;
  background:#eef3fa;
  display:grid;
  place-items:center;
  overflow:hidden;
  margin-bottom:8px;
}

.studio-image-drop--product{
  min-height:180px;
}

.content-studio-form-fields button[data-product-cover-focus]{
  margin:0 0 8px;
}

.studio-image-drop img{
  width:100%;
  height:100%;
  min-height:150px;
  object-fit:cover;
  display:block;
}

.studio-image-drop-placeholder{
  color:#8ea0bc;
  font-size:2rem;
}

.studio-cohort-box{
  border:1px solid var(--sc-border-soft);
  border-radius:12px;
  background:#f3f6fb;
  padding:10px 12px;
  display:grid;
  gap:10px;
}

.studio-cohort-list{
  display:grid;
  gap:8px;
}

.studio-cohort-check{
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--sc-text-primary);
  font-weight:600;
}

.studio-cohort-check em{
  font-style:normal;
  margin-left:6px;
  color:#4766a6;
  border-radius:999px;
  background:#dce7ff;
  padding:2px 8px;
  font-size:.72rem;
  font-weight:700;
}

.studio-cohort-check--all{
  padding-bottom:8px;
  border-bottom:1px solid #d3ddea;
}

.studio-media-drop{
  border:1px dashed #b8c7db;
  border-radius:12px;
  background:#f4f7fc;
  padding:14px;
  display:grid;
  gap:10px;
}

.studio-media-drop p{
  margin:0;
  color:var(--sc-text-secondary);
}

.studio-media-drop textarea{
  min-height:120px;
  background:#fff;
}

.studio-toggle-row{
  display:flex;
  align-items:center;
  gap:10px;
  color:var(--sc-text-primary);
  font-weight:600;
}

.studio-form-layout .form-actions{
  border-top:1px solid var(--sc-border-soft);
  padding-top:10px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px;
}

.studio-wizard-actions{
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:8px;
}

.studio-price-input-wrap{
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
}

.studio-price-input-wrap span{
  min-height:42px;
  border:1px solid var(--sc-border-soft);
  border-right:0;
  border-radius:10px 0 0 10px;
  background:var(--sc-surface-soft);
  color:var(--sc-text-secondary);
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 14px;
}

.studio-price-input-wrap input{
  border-radius:0 10px 10px 0;
}

.content-studio-form-fields .studio-release-days[hidden],
.content-studio-form-fields .studio-release-at[hidden]{
  display:none;
}

.studio-list-panel .panel-body{
  padding-top:8px;
}

.studio-course-content-panel{
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface);
}

.studio-course-head{
  display:grid;
  gap:12px;
}

.studio-course-top-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  border-bottom:1px solid var(--sc-border-soft);
  padding-bottom:10px;
}

.studio-course-top-tab{
  border:0;
  background:transparent;
  color:var(--sc-text-secondary);
  font-weight:700;
  padding:7px 10px;
  border-radius:8px;
  cursor:pointer;
}

.studio-course-top-tab.is-active{
  color:var(--sc-primary);
  background:rgba(93,169,233,.14);
}

.studio-course-top-tab[disabled]{
  opacity:.66;
  cursor:not-allowed;
}

.studio-course-lanes{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.studio-course-lane{
  border-radius:999px;
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface-soft);
  color:var(--sc-text-secondary);
  padding:8px 14px;
  font-size:.84rem;
  font-weight:700;
  cursor:pointer;
}

.studio-course-lane.is-active{
  background:#121a25;
  color:#fff;
  border-color:#121a25;
}

.studio-course-toolbar{
  display:grid;
  grid-template-columns:minmax(220px,.36fr) minmax(260px,.5fr) auto auto;
  gap:10px;
  align-items:end;
}

.studio-course-toolbar .form-group{
  margin:0;
}

.studio-course-toolbar .btn{
  min-height:42px;
}

.studio-course-body{
  display:grid;
  gap:10px;
}

.studio-course-select-all{
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--sc-text-secondary);
  font-size:.9rem;
}

.studio-course-board{
  display:grid;
  gap:12px;
}

.studio-course-summary{
  display:flex;
  align-items:center;
  gap:12px;
  color:var(--sc-text-secondary);
  font-size:.9rem;
}

.studio-course-summary strong{
  color:var(--sc-primary);
  font-size:1rem;
}

.studio-course-module-card{
  border:1px solid var(--sc-border-soft);
  border-radius:14px;
  background:var(--sc-surface-soft);
  padding:10px;
  display:grid;
  gap:10px;
}

.studio-course-module-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

.studio-course-module-title-wrap{
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
  flex:1;
}

.studio-course-collapse{
  width:30px;
  height:30px;
  border:1px solid var(--sc-border-soft);
  border-radius:8px;
  background:var(--sc-surface);
  color:var(--sc-text-secondary);
  cursor:pointer;
}

.studio-course-module-title{
  border:0;
  background:transparent;
  padding:0;
  color:var(--sc-primary);
  font-weight:700;
  text-align:left;
  font-size:.95rem;
  cursor:pointer;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.studio-course-module-actions{
  display:flex;
  align-items:center;
  gap:8px;
}

.studio-course-module-count{
  color:var(--sc-text-secondary);
  font-size:.82rem;
  white-space:nowrap;
}

.studio-course-lessons{
  display:grid;
  gap:8px;
}

.studio-course-lesson-row{
  border:1px solid var(--sc-border-soft);
  border-radius:10px;
  background:var(--sc-surface);
  padding:8px 10px;
  display:grid;
  grid-template-columns:auto auto minmax(0,1fr) minmax(180px,.5fr) auto auto;
  align-items:center;
  gap:10px;
}

.studio-course-check{
  display:flex;
  align-items:center;
  justify-content:center;
}

.studio-course-lesson-icon{
  width:28px;
  height:28px;
  border-radius:8px;
  border:1px solid #b7cae8;
  color:#3860ab;
  background:#e9f1ff;
  display:grid;
  place-items:center;
  font-size:.72rem;
}

.studio-course-lesson-title{
  border:0;
  background:transparent;
  color:var(--sc-text-primary);
  text-align:left;
  padding:0;
  cursor:pointer;
  font-weight:600;
}

.studio-course-lesson-meta{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}

.studio-course-mini-meta{
  border-radius:999px;
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface-soft);
  color:var(--sc-text-secondary);
  font-size:.72rem;
  padding:3px 9px;
  font-weight:600;
}

.studio-course-status-pill{
  border-radius:999px;
  padding:4px 11px;
  font-size:.74rem;
  font-weight:700;
  border:1px solid;
  white-space:nowrap;
}

.studio-course-status-pill.is-published{
  color:#1e8b57;
  border-color:#8cd3a4;
  background:#eaf8ee;
}

.studio-course-status-pill.is-draft{
  color:#8d5f1d;
  border-color:#f0cc8d;
  background:#fff5e8;
}

html[data-theme="dark"] #studioFormMessage.success{
  color:var(--sc-success);
}

html[data-theme="dark"] .content-studio-page{
  background:linear-gradient(180deg,#11161f 0%,#0f1722 100%);
}

html[data-theme="dark"] .studio-stepper::before{
  background:#2f3c51;
}

html[data-theme="dark"] .studio-step-link .studio-step-dot{
  border-color:#4a5871;
  background:#1a2433;
}

html[data-theme="dark"] .studio-step-link.is-active{
  color:#9fc3ff;
  background:rgba(113,156,239,.2);
}

html[data-theme="dark"] .content-studio-filters{
  border-color:#32465f;
  background:rgba(17,30,47,.56);
}

html[data-theme="dark"] .studio-category-chip{
  border-color:#40536e;
  background:#1a2a40;
  color:#c7d8f5;
}

html[data-theme="dark"] .studio-resource-composer{
  border-color:#304258;
  background:rgba(19,30,47,.68);
}

html[data-theme="dark"] .studio-resource-side{
  border-left-color:#304258;
}

html[data-theme="dark"] .studio-image-drop{
  border-color:#3b4e67;
  background:#162335;
}

html[data-theme="dark"] .studio-cohort-box{
  border-color:#33475e;
  background:#19283d;
}

html[data-theme="dark"] .studio-cohort-check em{
  background:#29426e;
  color:#d5e5ff;
}

html[data-theme="dark"] .studio-cohort-check--all{
  border-bottom-color:#33475e;
}

html[data-theme="dark"] .studio-media-drop{
  border-color:#3b4e67;
  background:#17263c;
}

html[data-theme="dark"] .studio-price-input-wrap span{
  border-color:#3b4e67;
  background:#1a2940;
}

html[data-theme="dark"] .studio-course-lane.is-active{
  background:#2b3f63;
  border-color:#2b3f63;
}

html[data-theme="dark"] .studio-course-lesson-icon{
  border-color:#4f6991;
  background:#1d2f4a;
  color:#c6dcff;
}

html[data-theme="dark"] .studio-course-status-pill.is-published{
  background:#123024;
  border-color:#2f8f63;
  color:#8ad8ac;
}

html[data-theme="dark"] .studio-course-status-pill.is-draft{
  background:#382911;
  border-color:#a57d43;
  color:#edc685;
}

/* ==========================================================================
   Professional tabs
   ========================================================================== */

.professional-tabs-panel .panel-body{
  padding:14px 22px;
}

.professional-form-modal-body{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.professional-form-modal-body > .panel{
  margin:0;
}

.professional-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.professional-tab{
  border-radius:10px;
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface-soft);
  color:var(--sc-text-secondary);
  min-height:40px;
  padding:8px 14px;
  font-weight:700;
  cursor:pointer;
  transition:all .18s ease;
}

.professional-tab:hover{
  border-color:rgba(93,169,233,.48);
  color:var(--sc-primary);
}

.professional-tab.is-active,
.professional-tab[aria-selected="true"]{
  background:var(--sc-surface);
  border-color:rgba(99,199,178,.5);
  color:var(--sc-primary);
  box-shadow:var(--sc-shadow-sm);
}

.professional-availability-cell{
  max-width:380px;
  color:var(--sc-text-secondary);
  font-size:.9rem;
  line-height:1.45;
  white-space:normal;
}

/* ==========================================================================
   Integration/Billing tabs + badges
   ========================================================================== */

.integration-tabs{
  border-radius:12px;
  background:var(--sc-surface-soft);
  padding:6px;
}

.integration-tab{
  border-radius:10px;
  border:1px solid transparent;
  color:var(--sc-text-secondary);
}

.integration-tab.active,
.integration-tab[aria-selected="true"]{
  background:var(--sc-surface);
  border-color:var(--sc-border-soft);
  color:var(--sc-primary);
  box-shadow:var(--sc-shadow-sm);
}

.google-connection-badge{
  border-radius:999px;
  padding:6px 12px;
  font-size:.78rem;
  font-weight:700;
  border:1px solid var(--sc-border-soft);
  background:var(--sc-surface-soft);
  color:var(--sc-text-secondary);
}

.google-connection-badge--connected{
  color:#2d8d73;
  border-color:#c5eadf;
  background:#eaf9f4;
}

.google-connection-badge--not_connected{
  color:#6d7f93;
  border-color:#d4e0ec;
  background:#f4f8fc;
}

.google-connection-badge--disconnected{
  color:#6d7f93;
  border-color:#d4e0ec;
  background:#f4f8fc;
}

.google-connection-badge--error{
  color:#b25565;
  border-color:#efd3d9;
  background:#fff1f3;
}

/* ==========================================================================
   Loading hints (microinteracao simples, sem alterar JS)
   ========================================================================== */

.loading-surface{
  position:relative;
  overflow:hidden;
}

.loading-surface::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, transparent 0%, rgba(255,255,255,.42) 45%, transparent 100%);
  transform:translateX(-100%);
  animation:scShimmer 1.4s ease infinite;
  pointer-events:none;
}

@keyframes scShimmer{
  to{transform:translateX(100%);}
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width:1280px){
  .topbar-search{
    width:min(300px,32vw);
    min-width:180px;
  }

  .overview-grid{
    grid-template-columns:1fr;
  }

  .public-store-grid{
    grid-template-columns:1fr;
  }

  .public-store-intro .panel-body,
  .public-store-intro-body,
  .student-quickstart .panel-body,
  .student-quickstart-body{
    grid-template-columns:1fr;
  }

  .student-profile-list{
    grid-template-columns:1fr;
  }

  .student-app-configbar{
    align-items:flex-start;
    flex-direction:column;
  }

  .student-app-configbar-right{
    width:100%;
  }

  .student-app-content-grid{
    grid-template-columns:1fr;
  }

  .student-portal-market-header{
    display:grid;
    gap:12px;
  }

  .student-portal-market-tools{
    justify-content:flex-start;
  }

  .student-market-search{
    min-width:min(680px,100%);
    width:100%;
  }

  .studio-admin-shell{
    grid-template-columns:1fr;
  }

  .studio-admin-sidebar{
    position:static;
  }

  .content-studio-session-actions{
    flex-direction:row;
    flex-wrap:wrap;
  }

  .studio-course-toolbar{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:1040px){
  .crud-form-modal{
    width:min(960px, calc(100vw - 20px));
    max-height:calc(100vh - 20px);
    max-height:calc(100dvh - 20px);
  }

  .student-auth-grid,
  .student-first-access-layout{
    grid-template-columns:1fr;
  }

  .student-auth-visual,
  .student-first-access-visual{
    display:none;
  }

  body.layout{
    display:block;
  }

  .sidebar{
    position:fixed;
    top:0;
    left:0;
    z-index:40;
    width:min(280px,86vw);
    transform:translateX(-104%);
    transition:transform .24s ease;
    box-shadow:0 30px 70px rgba(21,33,51,.32);
  }

  .sidebar[data-open="true"]{
    transform:translateX(0);
  }

  .sidebar-overlay:not([hidden]){
    position:fixed;
    inset:0;
    z-index:30;
    background:rgba(36,52,71,.42);
  }

  .topbar{
    padding:12px 14px;
  }

  .topbar-search{
    flex:1;
    width:auto;
    min-width:0;
  }

  .topbar-left{
    flex-wrap:wrap;
  }

  .company-switcher{
    min-width:0;
    width:100%;
  }

  .company-switcher-menu{
    left:0;
    right:0;
    top:104px;
    min-width:0;
    max-width:none;
    width:min(96vw,520px);
  }
}

@media (max-width:780px){
  .crud-form-modal{
    width:calc(100vw - 12px);
    max-height:calc(100vh - 12px);
    max-height:calc(100dvh - 12px);
  }

  .crud-form-modal > header{
    padding-right:54px;
  }

  .crud-form-modal > .panel-body{
    max-height:calc(100vh - 150px);
    max-height:calc(100dvh - 150px);
  }

  .crud-form-close{
    top:10px;
    right:10px;
    width:32px;
    height:32px;
  }

  .content{
    padding:12px;
  }

  .topbar{
    min-height:72px;
    gap:8px;
  }

  .topbar-quick-actions,
  .topbar-search{
    display:none;
  }

  .topbar-user .user-meta{
    display:none;
  }

  .panel > header,
  .panel-body{
    padding:14px;
  }

  .panel > header h3{
    font-size:1.2rem;
  }

  .panel-actions{
    width:100%;
    flex-wrap:wrap;
  }

  .panel-actions > *{
    width:100%;
  }

  .capacity-chart-wrap{
    grid-template-columns:1fr;
    justify-items:start;
  }

  .auth-wrap{
    padding:20px 12px;
  }

  .auth-wrap .card{
    padding:22px 16px 16px;
  }

  .public-store,
  .student-portal{
    margin:14px auto;
  }

  .public-store-header,
  .student-portal-header{
    padding:14px;
    display:grid;
    gap:12px;
  }

  .public-store-header-actions,
  .student-portal-header-actions{
    flex-wrap:wrap;
  }

  .public-store-toolbar-body{
    grid-template-columns:1fr;
  }

  .student-auth-grid{
    grid-template-columns:1fr;
  }

  .student-auth-card > header{
    padding:22px 18px 8px;
  }

  .student-auth-card > header h3{
    font-size:1.58rem;
  }

  .student-auth-card .panel-body{
    padding:10px 18px 20px;
  }

  .student-auth-card .grid-form input{
    min-height:50px;
    font-size:1.04rem;
  }

  .student-portal-market-header{
    padding:12px;
  }

  .student-portal-market-brand{
    width:100%;
  }

  .student-portal-market-brand-copy h1{
    font-size:1.2rem;
  }

  .student-portal-market-tools{
    width:100%;
    gap:8px;
  }

  .student-company-inline-field{
    width:100%;
  }

  .student-company-inline-field input{
    min-width:0;
    width:100%;
  }

  .student-market-search{
    width:100%;
    min-width:0;
  }

  .student-market-login{
    min-width:0;
    width:100%;
  }

  .student-app-navbar{
    flex-direction:column;
    align-items:flex-start;
  }

  .student-app-navbar-right{
    width:100%;
    flex-wrap:wrap;
  }

  .student-app-user-meta{
    width:100%;
  }

  .student-app-user-meta strong,
  .student-app-user-meta span{
    text-align:left;
  }

  .student-app-navbar-right .btn{
    flex:1 1 120px;
  }

  .student-home-shell{
    padding:14px;
  }

  .student-home-card-grid{
    grid-template-columns:1fr;
    padding:12px;
  }

  .student-hero{
    padding:24px 14px 18px;
    min-height:300px;
  }

  .student-hero h2{
    font-size:2.1rem;
  }

  .student-hero-description{
    font-size:1rem;
  }

  .student-app-tabs-wrap{
    padding:0 14px;
  }

  .student-app-content-grid{
    padding:14px;
  }

  .student-about-panel{
    margin:14px;
  }

  .student-course-lesson-btn{
    flex-direction:column;
    align-items:flex-start;
  }

  .content-studio{
    margin:14px auto;
  }

  .studio-admin-sidebar{
    padding:14px;
  }

  .content-studio-header{
    display:grid;
    gap:12px;
  }

  .content-studio-header h2{
    font-size:1.5rem;
  }

  .content-studio-header-actions{
    width:100%;
  }

  .content-studio-header-actions > *{
    width:100%;
  }

  .studio-main-actions{
    width:100%;
  }

  .studio-main-actions .form-group{
    min-width:0;
    width:100%;
    flex:1 1 100%;
  }

  .studio-main-actions .btn{
    width:100%;
  }

  .content-studio-filters,
  .content-studio-form-fields{
    grid-template-columns:1fr;
  }

  .studio-wizard-panel{
    grid-template-columns:1fr;
  }

  .studio-wizard-actions{
    margin-left:0;
    width:100%;
  }

  .studio-wizard-actions .btn{
    flex:1 1 auto;
  }

  .studio-resource-composer{
    grid-template-columns:1fr;
  }

  .studio-resource-main{
    grid-template-columns:1fr;
  }

  .studio-resource-side{
    border-left:0;
    border-top:1px solid var(--sc-border-soft);
    padding-left:0;
    padding-top:12px;
  }

  .studio-course-toolbar{
    grid-template-columns:1fr;
  }

  .studio-course-lesson-row{
    grid-template-columns:auto auto minmax(0,1fr);
    align-items:start;
  }

  .studio-course-lesson-meta{
    grid-column:3;
  }

  .studio-course-status-pill{
    grid-column:3;
    justify-self:start;
  }

  .studio-course-lesson-row .table-action{
    grid-column:3;
    justify-self:start;
  }

  .studio-course-module-head{
    display:grid;
    gap:8px;
  }

  .studio-course-module-actions{
    justify-content:flex-start;
    flex-wrap:wrap;
  }
}
