:root{
  --bg:#f6f1e8;
  --bg-soft:#eef4fa;
  --surface:rgba(255,255,255,0.82);
  --surface-strong:rgba(255,255,255,0.93);
  --surface-muted:rgba(247,250,255,0.85);
  --line:#d8dee8;
  --line-strong:#b8c5d6;
  --text:#12223a;
  --text-soft:#5f6b7c;
  --text-light:#7e8998;
  --navy1:#183f6d;
  --navy2:#1970b5;
  --blue1:#1d66b0;
  --blue2:#43a0e4;
  --yellow1:#d89f0f;
  --yellow2:#f1c55c;
  --pink1:#b53b78;
  --pink2:#de6b9e;
  --green1:#227d4b;
  --green2:#45b876;
  --red1:#c94f4f;
  --red2:#eb7d7d;
  --success:#28724a;
  --danger:#9e2e39;
  --warning:#8b6413;
  --shadow:0 24px 60px rgba(17,35,61,0.12);
  --shadow-soft:0 12px 28px rgba(17,35,61,0.08);
  --radius-sm:14px;
  --radius-md:18px;
  --radius-lg:24px;
  --radius-xl:30px;
}

*{ box-sizing:border-box; }
html,body{ min-height:100%; }
html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family:"Avenir Next","Avenir","Segoe UI","Helvetica Neue",Arial,sans-serif;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(67,160,228,0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(241,197,92,0.18), transparent 26%),
    radial-gradient(circle at 18% 84%, rgba(222,107,158,0.11), transparent 24%),
    radial-gradient(circle at 88% 72%, rgba(69,184,118,0.10), transparent 22%),
    linear-gradient(180deg, #fbf7f0 0%, #eef4fa 46%, #fff8ef 100%);
  position:relative;
  padding-bottom:72px;
}

body::before{
  content:"";
  position:fixed;
  inset:auto;
  pointer-events:none;
  z-index:0;
  filter:blur(10px);
}

body::before{
  top:120px;
  left:-90px;
  width:260px;
  height:260px;
  border-radius:50%;
  background:rgba(67,160,228,0.10);
}

body::after{
  content:"© 2026 - Claude BERMUDEZ";
  position:absolute;
  z-index:1;
  left:16px;
  right:16px;
  bottom:20px;
  color:var(--text-soft);
  font-size:13px;
  letter-spacing:0.04em;
  text-align:center;
}

img{ max-width:100%; }
a{ color:inherit; }
strong{ font-weight:700; }

.topbar{
  padding:20px 18px 0;
  position:relative;
  z-index:5;
}

.topbar-inner,
header.topbar{
  max-width:1180px;
  margin:0 auto;
  position:relative;
  overflow:hidden;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:14px 18px;
  border-radius:var(--radius-lg);
  border:1px solid rgba(215,223,235,0.95);
  background:#ffffff;
  backdrop-filter:none;
  box-shadow:0 16px 34px rgba(17,35,61,0.10);
}

.topbar-inner::before,
header.topbar::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:linear-gradient(90deg, var(--blue2), var(--yellow2), var(--pink2), var(--green2));
}

.topbar-left,
.topbar-right{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}

.topbar-right > .back-link{ order:10; }
.topbar-right > .tasks-link{ order:20; }
.topbar-right > .navlink,
.topbar-right > .logo{ order:30; }
.topbar-right > .profile-link{ order:90; }
.topbar-right > .auth-link{ order:91; }
.topbar-right > .admin-link{ order:92; }

.brand{
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
}

.brand-logo{
  height:88px;
  width:auto;
  display:block;
  filter:drop-shadow(0 10px 22px rgba(10,33,61,0.12));
}

.profile-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  border-radius:16px;
  padding:4px;
  border:1px solid rgba(67,160,228,0.16);
  background:linear-gradient(180deg, rgba(246,250,255,0.98), rgba(239,246,255,0.94));
  box-shadow:var(--shadow-soft);
  transition:transform .18s ease, box-shadow .18s ease;
}

.profile-link:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 28px rgba(17,35,61,0.11);
}

.avatar{
  width:42px;
  height:42px;
  border-radius:50%;
  object-fit:cover;
  border:1px solid rgba(18,34,58,0.14);
  background:rgba(18,34,58,0.05);
}

.avatar-lg{
  width:74px;
  height:74px;
}

.auth-link,
.admin-link,
.tasks-link,
.back-link,
.navlink,
.logo{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 14px;
  border-radius:15px;
  border:1px solid var(--line);
  background:rgba(255,255,255,0.9);
  box-shadow:var(--shadow-soft);
  color:var(--text);
  text-decoration:none;
  font-weight:640;
  font-size:14px;
  letter-spacing:0.01em;
  transition:transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.auth-link:hover,
.admin-link:hover,
.tasks-link:hover,
.back-link:hover,
.navlink:hover,
.logo:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 28px rgba(17,35,61,0.11);
}

.auth-link,
.admin-link{
  background:linear-gradient(180deg, rgba(255,243,246,0.96), rgba(255,231,238,0.95));
  border-color:rgba(176,0,32,0.18);
}

.back-link{
  background:linear-gradient(180deg, rgba(242,248,255,0.98), rgba(231,242,255,0.94));
  border-color:rgba(29,102,176,0.18);
  color:#164d84;
}

.tasks-link{
  background:linear-gradient(180deg, rgba(255,251,233,0.98), rgba(255,244,213,0.95));
  border-color:rgba(216,159,15,0.22);
  color:#7f5b0d;
}

.admin-link{ color:#8e1737; }
.auth-link{ color:#6d2132; }

.hero,
.container{
  position:relative;
  z-index:1;
  max-width:1180px;
  margin:0 auto;
  padding:34px 20px 42px;
}

.hero{
  text-align:center;
}

.hero h1{
  margin:14px 0 10px;
  font-size:clamp(2.6rem, 5.4vw, 4.3rem);
  line-height:0.98;
  font-weight:700;
  color:var(--navy1);
  letter-spacing:-0.05em;
  text-wrap:balance;
}

.hero h2{
  margin:24px 0 18px;
  font-size:clamp(1.55rem, 3vw, 2.55rem);
  line-height:1.12;
  font-weight:500;
  color:#4e6078;
  text-wrap:balance;
}

.small-note,
.muted{
  color:var(--text-soft);
  font-size:14px;
  line-height:1.55;
}

.muted{ opacity:0.85; }

.cta{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:18px;
  margin-top:18px;
}

.route-btn{
  width:min(760px,100%);
  padding:24px 22px;
  border-radius:28px;
  border:1px solid rgba(255,255,255,0.32);
  color:#fff;
  text-decoration:none;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  font-size:clamp(1.08rem, 2.5vw, 1.5rem);
  font-weight:640;
  line-height:1.24;
  box-shadow:0 22px 42px rgba(16,33,58,0.20);
  position:relative;
  overflow:hidden;
  transition:transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.route-btn::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(120deg, rgba(255,255,255,0.25), transparent 35%, transparent 65%, rgba(255,255,255,0.12));
  pointer-events:none;
}

.route-btn:hover{
  transform:translateY(-2px);
  box-shadow:0 26px 52px rgba(16,33,58,0.26);
}

.route-btn.blue{ background:linear-gradient(135deg, var(--blue1), var(--blue2)); }
.route-btn.yellow{ background:linear-gradient(135deg, var(--yellow1), var(--yellow2)); }
.route-btn.pink{ background:linear-gradient(135deg, var(--pink1), var(--pink2)); }
.route-btn.green{ background:linear-gradient(135deg, var(--green1), var(--green2)); }
.route-btn.red{ background:linear-gradient(135deg, var(--red1), var(--red2)); }

.route-btn[aria-disabled="true"]{
  opacity:0.62;
  cursor:not-allowed;
  box-shadow:0 12px 24px rgba(16,33,58,0.10);
}

.card{
  width:100%;
  max-width:560px;
  margin:24px auto 0;
  position:relative;
  overflow:hidden;
  padding:24px;
  border-radius:var(--radius-lg);
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,251,255,0.84));
  box-shadow:var(--shadow);
  backdrop-filter:blur(10px);
}

.portail-card{
  max-width:760px;
}

.portail-title{
  margin:0 0 10px;
  color:var(--navy1);
  font-size:1.2rem;
  font-weight:680;
  text-align:left;
}

.portail-cta .route-btn{
  width:min(860px,100%);
}

.entry-hero{
  min-height:calc(100vh - 138px);
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  padding-top:18px;
  padding-bottom:54px;
}

.entry-kicker{
  margin:0;
  color:var(--blue1);
  font-size:13px;
  font-weight:800;
  letter-spacing:0.24em;
  text-transform:uppercase;
}

.entry-copy{
  width:min(720px, 100%);
  margin:0 auto;
  color:var(--text-soft);
  font-size:17px;
  line-height:1.65;
  text-wrap:balance;
}

.entry-session{
  margin:10px 0 0;
  color:#4e6078;
  font-size:14px;
  font-weight:620;
  letter-spacing:0.01em;
}

.entry-grid{
  width:min(980px, 100%);
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:22px;
  margin-top:34px;
}

.entry-route{
  width:100%;
  min-height:230px;
  padding:32px 28px;
  display:grid;
  align-content:center;
  justify-items:flex-start;
  gap:14px;
  text-align:left;
}

.entry-route-title{
  display:block;
  font-size:clamp(1.4rem, 2.6vw, 2rem);
  font-weight:760;
  line-height:1.02;
  letter-spacing:0.04em;
  text-transform:uppercase;
  text-wrap:balance;
}

.entry-route-copy{
  display:block;
  max-width:26ch;
  font-size:1rem;
  line-height:1.6;
  color:rgba(255,255,255,0.94);
}

.entry-helper{
  margin-top:18px;
}

.theme-login-page .topbar-inner{
  max-width:1240px;
}

.login-shell-page{
  position:relative;
  z-index:1;
  max-width:1240px;
  margin:0 auto;
  padding:34px 20px 56px;
}

.login-layout-grid{
  display:grid;
  grid-template-columns:minmax(0, 560px);
  justify-content:center;
  align-items:center;
  min-height:calc(100vh - 250px);
}

.login-showcase{
  padding:42px 20px 22px 6px;
  align-self:center;
}

.login-showcase h1{
  margin:12px 0 14px;
  font-size:clamp(2.9rem, 6vw, 5.1rem);
  line-height:0.94;
  font-weight:620;
  color:var(--navy1);
  letter-spacing:-0.06em;
  text-wrap:balance;
}

.login-showcase-copy{
  max-width:58ch;
  color:var(--text-soft);
  font-size:1.06rem;
  line-height:1.75;
}

.login-showcase-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
  margin-top:28px;
}

.login-showcase-card{
  position:relative;
  overflow:hidden;
  min-height:170px;
  padding:22px 20px;
  border-radius:24px;
  border:1px solid rgba(255,255,255,0.28);
  box-shadow:0 20px 38px rgba(18,34,58,0.14);
  color:#fff;
}

.login-showcase-card::after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(130deg, rgba(255,255,255,0.18), transparent 44%, transparent 70%, rgba(255,255,255,0.10));
  pointer-events:none;
}

.login-showcase-card strong,
.login-showcase-card span{
  position:relative;
  z-index:1;
  display:block;
}

.login-showcase-card strong{
  font-size:1.08rem;
  line-height:1.2;
  letter-spacing:0.08em;
  font-weight:620;
}

.login-showcase-card span{
  margin-top:12px;
  max-width:24ch;
  font-size:0.98rem;
  line-height:1.65;
  color:rgba(255,255,255,0.93);
}

.login-showcase-card-blue{
  background:linear-gradient(145deg, #1c5da0, #4f90dc);
}

.login-showcase-card-green{
  background:linear-gradient(145deg, #2b7750, #4caf74);
}

.login-card-large{
  max-width:none;
  width:100%;
  margin:0;
  align-self:center;
  padding:34px 34px 30px;
  border-radius:28px;
}

.login-title{
  margin:8px 0 8px;
  color:var(--navy1);
  font-size:clamp(1.85rem, 3vw, 2.5rem);
  line-height:1.04;
  letter-spacing:-0.04em;
  font-weight:580;
}

.login-subcopy{
  max-width:42ch;
  margin-bottom:2px;
}

.login-form-stack{
  gap:14px;
}

.theme-login-page .label{
  font-weight:560;
}

.theme-login-page .input{
  font-weight:440;
}

.theme-login-page .btn{
  font-weight:560;
}

.theme-login-page .helper-links a{
  font-weight:560;
}

.password-field{
  position:relative;
}

.password-field .input{
  padding-right:52px;
}

.password-toggle{
  position:absolute;
  top:50%;
  right:12px;
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:none;
  border-radius:12px;
  background:rgba(29,102,176,0.08);
  color:#174a80;
  cursor:pointer;
  transform:translateY(-50%);
  transition:background .18s ease, color .18s ease, transform .18s ease;
}

.password-toggle:hover{
  background:rgba(29,102,176,0.14);
  transform:translateY(calc(-50% - 1px));
}

.password-toggle:focus-visible{
  outline:none;
  box-shadow:0 0 0 4px rgba(67,160,228,0.16);
}

.password-toggle svg{
  width:18px;
  height:18px;
  stroke:currentColor;
  fill:none;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.login-notice{
  margin-top:2px;
}

.login-submit{
  width:100%;
  min-height:52px;
  margin-top:6px;
}

.login-helper-links{
  justify-content:flex-start;
}

.login-footnote{
  margin-top:2px;
}

.card::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:5px;
  background:linear-gradient(90deg, rgba(67,160,228,0.9), rgba(241,197,92,0.85), rgba(222,107,158,0.82));
}

.editor-shell-card::before{
  inset:12px 18px auto 18px;
  height:6px;
  border-radius:999px;
}

.callout,
.notice,
.alert{
  margin-top:14px;
  padding:14px 16px;
  border-radius:18px;
  border:1px solid rgba(67,160,228,0.16);
  background:linear-gradient(180deg, rgba(243,248,255,0.98), rgba(255,250,238,0.94));
  box-shadow:var(--shadow-soft);
}

.notice.success{
  border-color:rgba(40,114,74,0.22);
  background:linear-gradient(180deg, rgba(236,249,240,0.96), rgba(245,253,247,0.95));
}

.notice.error,
.alert-error{
  border-color:rgba(158,46,57,0.22);
  background:linear-gradient(180deg, rgba(255,238,241,0.96), rgba(255,245,246,0.95));
  color:#7a2534;
}

.form{
  display:flex;
  flex-direction:column;
  gap:12px;
  text-align:left;
}

.mobile-form-inline,
.mobile-stack,
.profile-summary,
.row-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.mobile-form-inline{
  align-items:center;
}

.mobile-form-inline > *{
  flex:1 1 220px;
}

.mobile-form-inline > .btn,
.mobile-form-inline > .btn-sm,
.mobile-form-inline > .mini-link,
.mobile-form-inline > .icon-btn,
.mobile-form-inline > .smallbtn{
  flex:0 0 auto;
}

.select-wide{
  min-width:520px;
}

.profile-summary{
  align-items:center;
  gap:14px;
  margin-bottom:14px;
}

.profile-card-shell{
  max-width:760px !important;
}

.profile-summary-rich{
  align-items:flex-start;
  gap:18px;
  padding:18px;
  border:1px solid rgba(184,197,214,0.65);
  border-radius:22px;
  background:linear-gradient(180deg, rgba(250,252,255,0.98), rgba(239,246,255,0.92));
  box-shadow:var(--shadow-soft);
}

.profile-summary-main{
  flex:1 1 320px;
  min-width:0;
}

.profile-title{
  font-size:22px;
  font-weight:680;
  color:var(--navy1);
}

.profile-subtitle{
  margin-top:4px;
  color:var(--text-soft);
  font-size:14px;
  line-height:1.5;
}

.profile-badges{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}

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

.profile-mini-item{
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(184,197,214,0.62);
  background:rgba(255,255,255,0.85);
}

.profile-mini-label{
  margin-bottom:6px;
  font-size:11px;
  font-weight:700;
  letter-spacing:0.08em;
  text-transform:uppercase;
  color:var(--text-light);
}

.profile-mini-value{
  font-size:14px;
  line-height:1.55;
  color:var(--text);
}

.grid2,
.grid-2,
.builder-grid,
.lesson-grid{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px;
}

.label,
.lbl{
  display:block;
  margin:0 0 6px;
  font-size:14px;
  font-weight:620;
  color:#20324b;
}

.input,
.in,
.qrow input[type="text"],
.qrow textarea,
.qrow select,
select.input,
textarea.input,
input.input,
select.in,
textarea.in,
input.in{
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--line-strong);
  background:rgba(255,255,255,0.95);
  color:var(--text);
  font-size:15px;
  font-family:inherit;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.7);
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.input:focus,
.in:focus,
.qrow input[type="text"]:focus,
.qrow textarea:focus,
.qrow select:focus,
select:focus,
textarea:focus{
  outline:none;
  border-color:rgba(29,102,176,0.65);
  box-shadow:0 0 0 4px rgba(67,160,228,0.16);
  transform:translateY(-1px);
}

.helper-links{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:10px;
  font-size:14px;
}

.helper-links a{
  color:#174a80;
  font-weight:620;
  text-decoration:none;
}

.helper-links a:hover{ text-decoration:underline; }

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

.choice-card{
  display:flex;
  align-items:flex-start;
  gap:10px;
  padding:14px;
  border-radius:16px;
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,0.96), rgba(243,248,255,0.88));
  box-shadow:var(--shadow-soft);
  cursor:pointer;
}

.choice-card input{
  margin-top:2px;
}

.choice-card span{
  font-weight:620;
  line-height:1.45;
}

.profile-section{
  margin-top:6px;
  padding:18px;
  border-radius:20px;
  border:1px solid rgba(184,197,214,0.62);
  background:linear-gradient(180deg, rgba(255,255,255,0.97), rgba(246,250,255,0.92));
  box-shadow:var(--shadow-soft);
}

.profile-section h3{
  margin:0 0 14px;
  color:var(--navy1);
  font-size:1.1rem;
  font-weight:670;
}

.account-group-section{
  margin-top:18px;
}

.account-group-section:first-of-type{
  margin-top:0;
}

.account-group-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 10px;
  padding:12px 14px;
  border-radius:18px;
  border:1px solid rgba(184,197,214,0.58);
  background:linear-gradient(180deg, rgba(247,250,255,0.98), rgba(255,250,240,0.96));
  box-shadow:var(--shadow-soft);
}

.account-group-heading strong{
  font-size:1rem;
}

.account-group-heading span{
  color:var(--text-soft);
  font-size:13px;
}

.profile-field-full{
  grid-column:1 / -1;
}

.profile-address{
  min-height:96px;
  resize:vertical;
}

.btn,
.btn-primary{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:48px;
  margin-top:6px;
  padding:12px 18px;
  border:none;
  border-radius:16px;
  background:linear-gradient(135deg, var(--navy1), var(--navy2));
  color:#fff;
  text-decoration:none;
  font-weight:650;
  font-size:15px;
  letter-spacing:0.01em;
  box-shadow:0 18px 30px rgba(20,63,109,0.22);
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.btn:hover,
.btn-primary:hover{
  transform:translateY(-1px);
  box-shadow:0 22px 36px rgba(20,63,109,0.26);
  filter:brightness(1.02);
}

.btn-sm,
.icon-btn,
.mini-link,
.smallbtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:40px;
  padding:9px 12px;
  border-radius:14px;
  border:1px solid rgba(29,102,176,0.16);
  background:linear-gradient(180deg, rgba(246,250,255,0.98), rgba(233,244,255,0.93));
  color:#163f6a;
  text-decoration:none;
  font-weight:620;
  box-shadow:var(--shadow-soft);
  transition:transform .18s ease, box-shadow .18s ease;
}

.btn-sm:hover,
.icon-btn:hover,
.mini-link:hover,
.smallbtn:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 28px rgba(17,35,61,0.11);
}

.small-btn{
  margin-top:0;
  padding:8px 11px;
  min-height:36px;
  border-radius:12px;
}

.builder-btn{
  background:linear-gradient(180deg, rgba(255,251,235,0.98), rgba(255,244,213,0.94));
  color:#76560d;
  border:1px dashed rgba(216,159,15,0.34);
  box-shadow:none;
}

.builder-btn:hover{
  box-shadow:var(--shadow-soft);
}

.btn-danger,
.danger-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:9px 12px;
  border-radius:14px;
  border:1px solid rgba(201,79,79,0.25);
  background:linear-gradient(180deg, rgba(255,244,246,0.96), rgba(255,234,238,0.96));
  color:var(--danger);
  font-weight:620;
  text-decoration:none;
  cursor:pointer;
  transition:transform .18s ease, box-shadow .18s ease;
}

.btn-danger:hover,
.danger-btn:hover{
  transform:translateY(-1px);
  box-shadow:var(--shadow-soft);
}

.inline{ display:inline-flex; }

.overview-grid,
.stats-grid{
  margin-top:18px;
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
}

.stats-grid{
  grid-template-columns:repeat(4, minmax(0, 1fr));
}

.overview-card,
.stat-card{
  position:relative;
  overflow:hidden;
  padding:20px;
  border-radius:var(--radius-lg);
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,0.96), rgba(243,248,255,0.88));
  box-shadow:var(--shadow-soft);
}

.overview-card::before,
.stat-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:6px;
}

.overview-card:nth-child(1),
.stat-card:nth-child(1){
  background:linear-gradient(160deg, rgba(255,255,255,0.97), rgba(235,245,255,0.94));
}

.overview-card:nth-child(1)::before,
.stat-card:nth-child(1)::before{
  background:linear-gradient(90deg, var(--blue1), var(--blue2), var(--yellow2));
}

.overview-card:nth-child(2),
.stat-card:nth-child(2){
  background:linear-gradient(160deg, rgba(255,255,255,0.97), rgba(255,239,247,0.94));
}

.overview-card:nth-child(2)::before,
.stat-card:nth-child(2)::before{
  background:linear-gradient(90deg, var(--pink1), var(--pink2), var(--blue2));
}

.stat-card:nth-child(3){
  background:linear-gradient(160deg, rgba(255,255,255,0.97), rgba(242,251,245,0.94));
}

.stat-card:nth-child(3)::before{
  background:linear-gradient(90deg, var(--green1), var(--green2), var(--blue2));
}

.stat-card:nth-child(4){
  background:linear-gradient(160deg, rgba(255,255,255,0.97), rgba(255,248,228,0.95));
}

.stat-card:nth-child(4)::before{
  background:linear-gradient(90deg, var(--yellow1), var(--yellow2), var(--pink2));
}

.overview-card h3,
.stat-card h3{
  margin:0 0 8px;
  font-size:1.08rem;
}

.overview-card p,
.stat-card p{
  margin:0;
}

.analytics-grid{
  margin-top:18px;
  display:grid;
  grid-template-columns:1.35fr 1fr;
  gap:16px;
}

.analytics-grid-balanced{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.analytics-card{
  position:relative;
  overflow:hidden;
  padding:22px;
  border-radius:var(--radius-lg);
  border:1px solid var(--line);
  background:linear-gradient(160deg, rgba(255,255,255,0.98), rgba(245,249,255,0.92));
  box-shadow:var(--shadow-soft);
}

.analytics-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:6px;
  background:linear-gradient(90deg, var(--blue1), var(--blue2), var(--pink2));
}

.analytics-card h3{
  margin:0 0 8px;
  font-size:1.08rem;
}

.bar-chart{
  display:flex;
  align-items:flex-end;
  gap:12px;
  min-height:240px;
  margin-top:18px;
}

.bar-chart-item{
  flex:1 1 0;
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
}

.bar-chart-value{
  font-size:12px;
  font-weight:620;
  color:var(--text-soft);
  text-align:center;
}

.bar-chart-bar-wrap{
  width:100%;
  height:170px;
  display:flex;
  align-items:flex-end;
}

.bar-chart-bar{
  width:100%;
  min-height:10px;
  border-radius:18px 18px 10px 10px;
  background:linear-gradient(180deg, var(--blue2), var(--blue1), var(--pink2));
  box-shadow:0 14px 28px rgba(29,102,176,0.20);
}

.bar-chart-label{
  font-size:12px;
  font-weight:700;
  letter-spacing:0.04em;
  color:var(--navy1);
  text-transform:uppercase;
}

.distribution-list{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:18px;
}

.distribution-row{
  display:grid;
  grid-template-columns:120px 1fr auto;
  gap:12px;
  align-items:center;
}

.distribution-label{
  font-size:13px;
  font-weight:640;
  color:var(--navy1);
}

.distribution-track{
  height:12px;
  border-radius:999px;
  overflow:hidden;
  background:linear-gradient(90deg, rgba(67,160,228,0.12), rgba(222,107,158,0.12));
}

.distribution-fill{
  height:100%;
  min-width:6px;
  border-radius:999px;
  background:linear-gradient(90deg, var(--blue1), var(--blue2), var(--pink2));
}

.distribution-fill.band-off{
  background:linear-gradient(90deg, #c8d4e3, #dce5ef);
}

.distribution-fill.band-low{
  background:linear-gradient(90deg, #7fa7cf, #a8c8e9);
}

.distribution-fill.band-mid{
  background:linear-gradient(90deg, var(--blue1), var(--blue2));
}

.distribution-fill.band-high{
  background:linear-gradient(90deg, var(--yellow1), var(--yellow2));
}

.distribution-fill.band-strong{
  background:linear-gradient(90deg, var(--pink1), var(--pink2));
}

.distribution-fill.band-done{
  background:linear-gradient(90deg, var(--green1), var(--green2));
}

.distribution-value{
  font-size:13px;
  font-weight:700;
  color:var(--text-soft);
}

.insight-list{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:16px;
}

.insight-item{
  padding:14px 16px;
  border-radius:18px;
  border:1px solid rgba(184,197,214,0.62);
  background:rgba(255,255,255,0.84);
}

.insight-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}

.mini-progress{
  width:100%;
  height:8px;
  margin:10px 0 8px;
  border-radius:999px;
  overflow:hidden;
  background:linear-gradient(90deg, rgba(67,160,228,0.12), rgba(222,107,158,0.12));
}

.mini-progress-fill{
  height:100%;
  min-width:8px;
  border-radius:999px;
  background:linear-gradient(90deg, var(--pink1), var(--pink2), var(--blue2));
}

.stat-number{
  font-size:2rem;
  line-height:1;
  font-weight:680;
  margin-bottom:8px;
  color:#11345d;
  text-shadow:0 6px 14px rgba(17,52,93,0.08);
}

.kpi-strip,
.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:14px;
}

.progress-meter{
  width:100%;
  height:12px;
  margin:12px 0 8px;
  border-radius:999px;
  overflow:hidden;
  background:linear-gradient(90deg, rgba(67,160,228,0.12), rgba(241,197,92,0.12), rgba(222,107,158,0.12));
}

.progress-fill{
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg, var(--blue1), var(--blue2), var(--pink2));
  box-shadow:0 8px 16px rgba(29,102,176,0.22);
}

.progress-fill.green{
  background:linear-gradient(90deg, var(--green1), var(--green2));
}

.step-caption{
  color:var(--text-soft);
  font-size:14px;
  line-height:1.55;
}

.path-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(216,159,15,0.22);
  background:linear-gradient(180deg, rgba(255,251,235,0.98), rgba(255,242,205,0.94));
  color:#7d5b0f;
  font-size:13px;
  font-weight:620;
}

.next-step{
  margin-top:14px;
  position:relative;
  overflow:hidden;
  padding:16px 18px;
  border-radius:20px;
  border:1px solid rgba(29,102,176,0.16);
  background:linear-gradient(180deg, rgba(244,249,255,0.98), rgba(255,247,232,0.95));
  box-shadow:var(--shadow-soft);
}

.next-step::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:4px;
  background:linear-gradient(90deg, var(--blue2), var(--pink2), var(--yellow2));
}

.next-step h3{
  margin:0 0 8px;
  font-size:1rem;
}

.next-step-path{
  margin:0 0 12px;
  font-weight:620;
  line-height:1.5;
}

.contact-highlight{
  max-width:1080px;
  margin:18px auto 0;
  text-align:left;
}

.contact-layout{
  margin-top:22px;
  display:grid;
  grid-template-columns:340px minmax(0, 1fr);
  gap:18px;
  align-items:start;
}

.contact-sidebar,
.contact-main{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.contact-compose-card,
.contact-list-card,
.contact-thread-card,
.contact-reply-card{
  max-width:none;
  margin-top:0;
  text-align:left;
}

.contact-thread-list{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.contact-thread-link{
  display:block;
  padding:14px;
  border-radius:18px;
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,0.96), rgba(244,249,255,0.88));
  text-decoration:none;
  box-shadow:var(--shadow-soft);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.contact-thread-link:hover,
.contact-thread-link.is-active{
  transform:translateY(-1px);
  border-color:rgba(29,102,176,0.22);
  box-shadow:0 18px 30px rgba(17,35,61,0.11);
}

.contact-thread-link.is-active{
  background:linear-gradient(180deg, rgba(239,247,255,0.98), rgba(250,253,255,0.95));
}

.contact-thread-link-top,
.contact-thread-header,
.contact-attachment{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.contact-thread-link-top strong{
  display:block;
  line-height:1.35;
}

.contact-thread-link-user,
.contact-thread-link-date{
  margin-top:6px;
  color:var(--text-soft);
  font-size:13px;
}

.contact-messages{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:16px;
}

.contact-message{
  padding:16px;
  border-radius:20px;
  border:1px solid var(--line);
  box-shadow:var(--shadow-soft);
}

.contact-message-eleve{
  background:linear-gradient(180deg, rgba(244,249,255,0.98), rgba(237,246,255,0.93));
  border-left:5px solid rgba(29,102,176,0.28);
}

.contact-message-formateur{
  background:linear-gradient(180deg, rgba(255,248,250,0.98), rgba(255,238,243,0.95));
  border-left:5px solid rgba(181,59,120,0.28);
}

.contact-message-head{
  display:flex;
  flex-wrap:wrap;
  justify-content:space-between;
  gap:8px;
  margin-bottom:8px;
  color:var(--text-soft);
  font-size:13px;
}

.contact-message-head strong{
  color:var(--text);
  font-size:14px;
}

.contact-message-body{
  line-height:1.65;
}

.contact-attachment{
  margin-top:12px;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(29,102,176,0.12);
  background:rgba(255,255,255,0.78);
}

.contact-attachment-meta{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
}

.contact-attachment-meta strong{
  line-height:1.35;
  word-break:break-word;
}

.followup-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.followup-item{
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(29,102,176,0.12);
  background:linear-gradient(180deg, rgba(255,255,255,0.94), rgba(244,249,255,0.88));
  box-shadow:var(--shadow-soft);
}

.dash-grid{
  margin-top:18px;
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
}

.dash-card{
  display:block;
  position:relative;
  overflow:hidden;
  padding:22px;
  border-radius:var(--radius-lg);
  border:1px solid var(--line);
  background:linear-gradient(155deg, rgba(255,255,255,0.96), rgba(244,249,255,0.85));
  color:var(--text);
  text-decoration:none;
  box-shadow:var(--shadow-soft);
  transition:transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.dash-card:nth-child(4n+1){
  background:linear-gradient(155deg, rgba(255,255,255,0.96), rgba(235,245,255,0.92));
}

.dash-card:nth-child(4n+2){
  background:linear-gradient(155deg, rgba(255,255,255,0.96), rgba(255,239,247,0.92));
}

.dash-card:nth-child(4n+3){
  background:linear-gradient(155deg, rgba(255,255,255,0.96), rgba(255,248,228,0.93));
}

.dash-card:nth-child(4n+4){
  background:linear-gradient(155deg, rgba(255,255,255,0.96), rgba(241,251,245,0.92));
}

.dash-card::before{
  content:"";
  position:absolute;
  inset:0 0 auto 0;
  height:5px;
  background:linear-gradient(90deg, var(--blue2), var(--yellow2), var(--pink2));
}

.dash-card:nth-child(4n+1)::before{
  background:linear-gradient(90deg, var(--blue1), var(--blue2), var(--yellow2));
}

.dash-card:nth-child(4n+2)::before{
  background:linear-gradient(90deg, var(--pink1), var(--pink2), var(--blue2));
}

.dash-card:nth-child(4n+3)::before{
  background:linear-gradient(90deg, var(--yellow1), var(--yellow2), var(--pink2));
}

.dash-card:nth-child(4n+4)::before{
  background:linear-gradient(90deg, var(--green1), var(--green2), var(--blue2));
}

.dash-card:hover{
  transform:translateY(-2px);
  box-shadow:0 22px 40px rgba(17,35,61,0.13);
  border-color:rgba(29,102,176,0.18);
}

.dash-title{
  font-size:1.08rem;
  font-weight:680;
  margin-bottom:8px;
}

.dash-desc{
  font-size:14px;
  color:var(--text-soft);
  line-height:1.55;
}

.theme-formateur-home .stat-card,
.theme-formateur-home .stat-card:nth-child(1),
.theme-formateur-home .stat-card:nth-child(2),
.theme-formateur-home .stat-card:nth-child(3),
.theme-formateur-home .stat-card:nth-child(4){
  border-left:5px solid #b51f45;
  border-color:rgba(176,0,32,0.16);
  background:linear-gradient(160deg, rgba(255,248,250,0.98), rgba(255,234,239,0.94));
}

.theme-formateur-home .stat-card::before,
.theme-formateur-home .stat-card:nth-child(1)::before,
.theme-formateur-home .stat-card:nth-child(2)::before,
.theme-formateur-home .stat-card:nth-child(3)::before,
.theme-formateur-home .stat-card:nth-child(4)::before{
  background:linear-gradient(90deg, #b51f45, #de6b8d, #f1a3b6);
}

.theme-formateur-home .stat-number,
.theme-formateur-home .dash-title,
.theme-formateur-home .next-step h3{
  color:#9a183b;
}

.theme-formateur-home .dash-desc,
.theme-formateur-home .step-caption{
  color:#8f4156;
}

.theme-formateur-home .next-step{
  border-left:5px solid #b51f45;
  border-color:rgba(176,0,32,0.16);
  background:linear-gradient(180deg, rgba(255,248,250,0.98), rgba(255,236,241,0.95));
}

.theme-formateur-home .next-step::before{
  background:linear-gradient(90deg, #b51f45, #de6b8d, #f1a3b6);
}

.theme-formateur-home .dash-card,
.theme-formateur-home .dash-card:nth-child(4n+1),
.theme-formateur-home .dash-card:nth-child(4n+2),
.theme-formateur-home .dash-card:nth-child(4n+3),
.theme-formateur-home .dash-card:nth-child(4n+4){
  border-left:5px solid #b51f45;
  border-color:rgba(176,0,32,0.16);
  background:linear-gradient(155deg, rgba(255,250,251,0.98), rgba(255,236,241,0.94));
}

.theme-formateur-home .dash-card::before,
.theme-formateur-home .dash-card:nth-child(4n+1)::before,
.theme-formateur-home .dash-card:nth-child(4n+2)::before,
.theme-formateur-home .dash-card:nth-child(4n+3)::before,
.theme-formateur-home .dash-card:nth-child(4n+4)::before{
  background:linear-gradient(90deg, #b51f45, #de6b8d, #f1a3b6);
}

.theme-formateur-home .dash-card:hover{
  border-color:rgba(176,0,32,0.24);
  box-shadow:0 22px 40px rgba(142,23,55,0.16);
}

.theme-formateur-analytics .analytics-card{
  border-left:5px solid #b51f45;
  border-color:rgba(176,0,32,0.16);
  background:linear-gradient(155deg, rgba(255,251,252,0.99), rgba(255,239,243,0.95));
}

.theme-formateur-analytics .analytics-card::before{
  background:linear-gradient(90deg, #b51f45, #de6b8d, #f1a3b6);
}

.theme-formateur-analytics .analytics-card h3,
.theme-formateur-analytics .distribution-label,
.theme-formateur-analytics .bar-chart-label{
  color:#9a183b;
}

.theme-formateur-analytics .distribution-fill,
.theme-formateur-analytics .bar-chart-bar,
.theme-formateur-analytics .mini-progress-fill{
  background:linear-gradient(90deg, #b51f45, #de6b8d, #6aa7de);
}

.theme-formateur-analytics .distribution-fill.band-off{
  background:linear-gradient(90deg, #d4dbe5, #e7ecf2);
}

.theme-formateur-analytics .distribution-fill.band-low{
  background:linear-gradient(90deg, #8eb0d1, #bfd6ee);
}

.theme-formateur-analytics .distribution-fill.band-mid{
  background:linear-gradient(90deg, #6a96d4, #84b7e9);
}

.theme-formateur-analytics .distribution-fill.band-high{
  background:linear-gradient(90deg, #d89f0f, #f1c55c);
}

.theme-formateur-analytics .distribution-fill.band-strong{
  background:linear-gradient(90deg, #b53b78, #de6b9e);
}

.theme-formateur-analytics .distribution-fill.band-done{
  background:linear-gradient(90deg, #227d4b, #45b876);
}

.table{
  display:flex;
  flex-direction:column;
  gap:12px;
  width:100%;
}

.mobile-row-labels .cell{
  min-width:0;
}

.tr{
  display:grid;
  grid-template-columns:2fr 2fr 1.5fr 1.5fr;
  gap:12px;
  align-items:center;
  padding:14px 16px;
  border-radius:20px;
  border:1px solid var(--line);
  border-left:4px solid rgba(67,160,228,0.24);
  background:linear-gradient(135deg, rgba(255,255,255,0.94), rgba(245,249,255,0.88));
  box-shadow:var(--shadow-soft);
}

.tr:not(.th):hover{
  transform:translateY(-1px);
}

.table .tr:not(.th):nth-child(2n){
  border-left-color:rgba(222,107,158,0.24);
}

.table .tr:not(.th):nth-child(3n){
  border-left-color:rgba(216,159,15,0.26);
}

.tr.th{
  padding:0 2px 6px;
  border:none;
  background:transparent;
  box-shadow:none;
  color:var(--text-soft);
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.08em;
}

.td-user{
  display:flex;
  align-items:center;
  gap:12px;
}

.status,
.pill,
.pill2,
.tag,
.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,0.9);
  font-size:12px;
  font-weight:620;
  line-height:1;
}

.pill,
.pill2{
  background:linear-gradient(180deg, rgba(243,248,255,0.98), rgba(231,243,255,0.95));
  border-color:rgba(29,102,176,0.16);
  color:#17497d;
}

.tag{
  background:linear-gradient(180deg, rgba(255,251,235,0.98), rgba(255,242,206,0.94));
  border-color:rgba(216,159,15,0.22);
  color:#7d5b0f;
}

.status.ok{
  background:rgba(234,247,238,0.95);
  border-color:rgba(40,114,74,0.22);
  color:var(--success);
}

.status.off{
  color:var(--text-soft);
  background:rgba(248,250,252,0.95);
}

.status.current{
  background:rgba(234,242,255,0.98);
  border-color:rgba(29,102,176,0.22);
  color:#1b5a95;
}

.badge-course{ background:rgba(248,251,255,0.94); }
.badge-folder{ background:rgba(244,246,250,0.94); }
.badge-quiz{
  background:rgba(231,244,255,0.96);
  border-color:rgba(29,102,176,0.22);
  color:#19548e;
}

.badge-resource{
  background:rgba(255,246,223,0.96);
  border-color:rgba(216,159,15,0.28);
  color:#7d5c10;
}

.badge-final{
  background:#14253c;
  color:#fff;
  border-color:#14253c;
}

.tree{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:14px;
}

.tree-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:flex-end;
  justify-content:space-between;
  gap:14px;
  margin-top:18px;
}

.tree-filter{
  flex:1 1 320px;
  min-width:240px;
  text-align:left;
}

.tree-filter-note{
  margin-top:8px;
}

.tree-filter-input{
  background:linear-gradient(180deg, rgba(255,255,255,0.98), rgba(247,251,255,0.95));
}

.tree-legend{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.legend-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:38px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid rgba(18,34,58,0.10);
  background:rgba(255,255,255,0.9);
  color:var(--text-soft);
  font-size:13px;
  font-weight:620;
  box-shadow:var(--shadow-soft);
}

.legend-dot{
  width:10px;
  height:10px;
  border-radius:50%;
  flex:0 0 10px;
}

.legend-dot-next{ background:var(--blue1); }
.legend-dot-done{ background:var(--green1); }
.legend-dot-lock{ background:#7f8b99; }

.tree-section-grid{
  margin-top:14px;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(190px, 1fr));
  gap:10px;
}

.tree-section-chip{
  display:flex;
  flex-direction:column;
  gap:6px;
  padding:14px 16px;
  border-radius:18px;
  border:1px solid rgba(29,102,176,0.14);
  background:linear-gradient(180deg, rgba(255,255,255,0.97), rgba(239,247,255,0.93));
  color:var(--text);
  text-decoration:none;
  box-shadow:var(--shadow-soft);
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.tree-section-chip:hover{
  transform:translateY(-1px);
  box-shadow:0 18px 30px rgba(17,35,61,0.10);
}

.tree-section-chip.active{
  border-color:rgba(29,102,176,0.28);
  background:linear-gradient(180deg, rgba(236,246,255,0.99), rgba(223,238,255,0.96));
}

.tree-section-chip-title{
  font-weight:700;
  line-height:1.3;
}

.tree-section-chip-meta{
  font-size:13px;
  color:var(--text-soft);
}

.structure-tree-root{
  margin-top:14px;
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(320px, 1fr));
  gap:14px;
  align-items:start;
}

.structure-tree-item{
  min-width:0;
}

.structure-tree-item-depth0{
  margin-left:0 !important;
}

.structure-tree-item-depth0 .structure-node-details{
  border-radius:28px;
  border-color:rgba(29,102,176,0.14);
  background:linear-gradient(180deg, rgba(255,255,255,0.97), rgba(239,247,255,0.93));
}

.structure-tree-item-depth0 .structure-node-details[open]{
  border-color:rgba(29,102,176,0.24);
  background:linear-gradient(180deg, rgba(248,252,255,0.99), rgba(232,243,255,0.95));
}

.structure-node-summary-top{
  flex-direction:column;
  min-height:148px;
  align-items:flex-start;
}

.structure-node-summary-top .node-summary-main{
  gap:10px;
  width:100%;
}

.structure-node-summary-top .node-summary-title{
  font-size:clamp(1.2rem, 2.2vw, 1.55rem);
  line-height:1.18;
}

.structure-node-summary-top .node-summary-meta{
  margin-left:0;
  padding-left:0;
  justify-content:flex-start;
  width:100%;
}

.structure-node-summary{
  cursor:grab;
  user-select:none;
}

.structure-node-summary:active{
  cursor:grabbing;
}

.structure-drag-handle{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:24px;
  min-height:24px;
  border-radius:999px;
  background:rgba(29,102,176,0.08);
  color:#2d6fb0;
  font-size:14px;
  letter-spacing:-0.08em;
  flex:0 0 24px;
}

.structure-node-body{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:10px;
}

.structure-tree-actions{
  padding-top:2px;
}

.structure-tree-children{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-top:4px;
}

.structure-tree-item-depth1{
  margin-left:8px;
}

.structure-tree-item-depth2{
  margin-left:16px;
}

.structure-tree-item-depth3,
.structure-tree-item-depth4,
.structure-tree-item-depth5{
  margin-left:24px;
}

.structure-tree-item.is-dragging{
  opacity:0.52;
}

.structure-drop-target > .node-details{
  border-color:rgba(29,102,176,0.28);
  box-shadow:0 0 0 4px rgba(67,160,228,0.14);
}

.node{
  margin-left:calc(var(--level) * 14px);
}

.node-details,
.tree-row,
.builder-block,
.qblock,
.course-block{
  border-radius:22px;
  border:1px solid var(--line);
  background:linear-gradient(180deg, rgba(255,255,255,0.94), rgba(246,250,255,0.84));
  box-shadow:var(--shadow-soft);
}

.node-details{
  padding:14px 16px;
}

.node-details[open]{
  background:linear-gradient(180deg, rgba(255,255,255,0.97), rgba(245,248,255,0.92));
}

.node-summary{
  cursor:pointer;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  font-weight:680;
  font-size:16px;
  list-style:none;
  color:var(--text);
}

.node-summary-main{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  min-width:0;
}

.node-summary-title{
  line-height:1.35;
}

.node-summary-meta{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:8px;
  margin-left:auto;
  padding-left:12px;
}

.node-summary::-webkit-details-marker{ display:none; }

.node-summary::before{
  content:"▸";
  display:inline-block;
  margin-right:10px;
  color:#1d66b0;
}

.node-details[open] > .node-summary::before{ content:"▾"; }

.folder-count,
.folder-total,
.folder-kind{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:5px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  letter-spacing:0.01em;
}

.folder-count{
  border:1px solid rgba(29,102,176,0.18);
  background:rgba(236,246,255,0.94);
  color:#194f86;
}

.folder-total{
  border:1px solid rgba(18,34,58,0.10);
  background:rgba(255,255,255,0.92);
  color:var(--text-soft);
}

.folder-kind{
  border:1px solid rgba(216,159,15,0.22);
  background:rgba(255,248,224,0.96);
  color:#7d5c10;
}

.node-children{
  margin-top:12px;
  padding-left:6px;
}

.node-link{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:8px 0 0;
  padding:14px 16px;
  border-radius:18px;
  border:1px solid rgba(29,102,176,0.15);
  border-left:5px solid rgba(67,160,228,0.55);
  background:linear-gradient(135deg, rgba(255,255,255,0.97), rgba(239,247,255,0.92));
  color:var(--text);
  text-decoration:none;
  font-weight:650;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.7);
  transition:transform .18s ease, box-shadow .18s ease;
}

.node-link-main{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  min-width:0;
}

.node-link-side{
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}

.node-link:hover{
  transform:translateY(-1px);
  box-shadow:0 16px 28px rgba(17,35,61,0.10);
}

.node-link-next{
  border-left-width:6px;
  box-shadow:0 16px 30px rgba(29,102,176,0.12);
}

.node-link-done{
  border-left-color:rgba(40,114,74,0.64) !important;
}

.node-link-locked{
  opacity:0.58;
  cursor:not-allowed;
}

.node-children .node:nth-child(3n+2) .node-link{
  border-left-color:rgba(222,107,158,0.55);
  background:linear-gradient(135deg, rgba(255,255,255,0.97), rgba(255,241,247,0.92));
}

.node-children .node:nth-child(3n) .node-link{
  border-left-color:rgba(216,159,15,0.52);
  background:linear-gradient(135deg, rgba(255,255,255,0.97), rgba(255,248,229,0.93));
}

.node-link-locked:hover{
  transform:none;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.7);
}

.theme-eleve .overview-card,
.theme-eleve .overview-card:nth-child(1),
.theme-eleve .overview-card:nth-child(2){
  border-left:5px solid rgba(29,102,176,0.72);
  border-color:rgba(29,102,176,0.18);
  background:linear-gradient(160deg, rgba(246,250,255,0.98), rgba(230,241,255,0.94));
}

.theme-eleve .overview-card::before,
.theme-eleve .overview-card:nth-child(1)::before,
.theme-eleve .overview-card:nth-child(2)::before{
  background:linear-gradient(90deg, var(--blue1), var(--blue2), #8cc5ee);
}

.theme-eleve .btn-sm,
.theme-eleve .smallbtn,
.theme-eleve .mini-link,
.theme-eleve .icon-btn{
  border-color:transparent;
  background:linear-gradient(135deg, var(--blue1), var(--blue2));
  color:#fff;
  box-shadow:0 16px 28px rgba(29,102,176,0.20);
}

.theme-eleve .btn-sm:hover,
.theme-eleve .smallbtn:hover,
.theme-eleve .mini-link:hover,
.theme-eleve .icon-btn:hover{
  box-shadow:0 20px 32px rgba(29,102,176,0.24);
  filter:brightness(1.03);
}

.theme-eleve .path-chip{
  border-color:rgba(29,102,176,0.18);
  background:linear-gradient(180deg, rgba(236,246,255,0.98), rgba(220,238,255,0.95));
  color:#17497d;
}

.theme-eleve .next-step{
  border-left:5px solid rgba(29,102,176,0.72);
  border-color:rgba(29,102,176,0.18);
  background:linear-gradient(180deg, rgba(243,249,255,0.98), rgba(229,241,255,0.95));
}

.theme-eleve .next-step::before{
  background:linear-gradient(90deg, var(--blue1), var(--blue2), #8cc5ee);
}

.theme-eleve .node-details{
  border-left:5px solid rgba(29,102,176,0.68);
  border-color:rgba(29,102,176,0.16);
  background:linear-gradient(180deg, rgba(248,252,255,0.98), rgba(235,245,255,0.92));
}

.theme-eleve .node-details[open]{
  border-left-color:rgba(29,102,176,0.82);
  border-color:rgba(29,102,176,0.22);
  background:linear-gradient(180deg, rgba(243,249,255,0.99), rgba(225,239,255,0.94));
}

.theme-eleve .node-summary{
  color:#143f69;
}

.theme-eleve .node-summary::before{
  color:var(--blue1);
}

.theme-eleve .node-link{
  border-color:rgba(29,102,176,0.16);
  border-left-color:rgba(29,102,176,0.62);
  background:linear-gradient(135deg, rgba(247,251,255,0.99), rgba(232,243,255,0.94));
}

.theme-eleve .tree-section-chip{
  border-color:rgba(29,102,176,0.16);
  background:linear-gradient(180deg, rgba(247,251,255,0.99), rgba(232,243,255,0.94));
}

.theme-eleve .tree-section-chip.active,
.theme-eleve .folder-count{
  border-color:rgba(29,102,176,0.22);
  background:linear-gradient(180deg, rgba(236,246,255,0.99), rgba(219,237,255,0.95));
  color:#17497d;
}

.theme-eleve .pill,
.theme-eleve .pill2,
.theme-eleve .status.current{
  border-color:rgba(29,102,176,0.22);
  background:linear-gradient(180deg, rgba(236,246,255,0.99), rgba(219,237,255,0.95));
  color:#17497d;
}

.theme-eleve .node-children .node:nth-child(3n+2) .node-link,
.theme-eleve .node-children .node:nth-child(3n) .node-link{
  border-left-color:rgba(29,102,176,0.62);
  background:linear-gradient(135deg, rgba(247,251,255,0.99), rgba(232,243,255,0.94));
}

.theme-eleve .node-link:hover{
  box-shadow:0 16px 28px rgba(29,102,176,0.14);
}

.ccp2-card{
  border-left-color:rgba(31,181,212,0.78) !important;
  border-color:rgba(31,181,212,0.20) !important;
  background:linear-gradient(160deg, rgba(245,253,255,0.99), rgba(224,248,255,0.95)) !important;
}

.ccp2-card::before{
  background:linear-gradient(90deg, #18aecd, #56d2ec, #8be8f6) !important;
}

.ccp2-card .progress-fill{
  background:linear-gradient(90deg, #149cc0, #42c8e6, #8be8f6);
  box-shadow:0 8px 16px rgba(24,174,205,0.22);
}

.ccp2-card .pill,
.ccp2-card .pill2,
.ccp2-card .path-chip{
  border-color:rgba(24,174,205,0.22);
  background:linear-gradient(180deg, rgba(236,252,255,0.99), rgba(217,247,255,0.95));
  color:#11677b;
}

.ccp2-card .btn,
.ccp2-card .btn-primary{
  background:linear-gradient(135deg, #149cc0, #42c8e6);
  box-shadow:0 18px 30px rgba(24,174,205,0.24);
}

.ccp2-card .btn-sm,
.ccp2-card .smallbtn,
.ccp2-card .mini-link,
.ccp2-card .icon-btn{
  background:linear-gradient(135deg, #149cc0, #42c8e6);
  color:#fff;
  border-color:transparent;
  box-shadow:0 16px 28px rgba(24,174,205,0.20);
}

.theme-ccp2 .btn,
.theme-ccp2 .btn-primary{
  background:linear-gradient(135deg, #149cc0, #42c8e6);
  box-shadow:0 18px 30px rgba(24,174,205,0.24);
}

.theme-ccp2 .btn-sm,
.theme-ccp2 .smallbtn,
.theme-ccp2 .mini-link,
.theme-ccp2 .icon-btn{
  background:linear-gradient(135deg, #149cc0, #42c8e6);
  color:#fff;
  border-color:transparent;
  box-shadow:0 16px 28px rgba(24,174,205,0.20);
}

.theme-ccp2 .pill,
.theme-ccp2 .pill2,
.theme-ccp2 .status.current,
.theme-ccp2 .path-chip{
  border-color:rgba(24,174,205,0.22);
  background:linear-gradient(180deg, rgba(236,252,255,0.99), rgba(217,247,255,0.95));
  color:#11677b;
}

.theme-ccp2 .progress-fill{
  background:linear-gradient(90deg, #149cc0, #42c8e6, #8be8f6);
  box-shadow:0 8px 16px rgba(24,174,205,0.22);
}

.theme-ccp2 .next-step{
  border-left:5px solid rgba(24,174,205,0.78);
  border-color:rgba(24,174,205,0.18);
  background:linear-gradient(180deg, rgba(245,253,255,0.99), rgba(225,248,255,0.95));
}

.theme-ccp2 .next-step::before{
  background:linear-gradient(90deg, #149cc0, #42c8e6, #8be8f6);
}

.theme-ccp2 .node-details{
  border-left:5px solid rgba(24,174,205,0.78);
  border-color:rgba(24,174,205,0.18);
  background:linear-gradient(180deg, rgba(248,254,255,0.99), rgba(231,249,255,0.94));
}

.theme-ccp2 .node-details[open]{
  border-left-color:rgba(24,174,205,0.88);
  border-color:rgba(24,174,205,0.24);
  background:linear-gradient(180deg, rgba(243,252,255,0.99), rgba(220,246,255,0.95));
}

.theme-ccp2 .node-summary{
  color:#0f6779;
}

.theme-ccp2 .node-summary::before{
  color:#149cc0;
}

.theme-ccp2 .node-link{
  border-color:rgba(24,174,205,0.18);
  border-left-color:rgba(24,174,205,0.74);
  background:linear-gradient(135deg, rgba(247,253,255,0.99), rgba(226,248,255,0.95));
}

.theme-ccp2 .tree-section-chip{
  border-color:rgba(24,174,205,0.18);
  background:linear-gradient(180deg, rgba(247,253,255,0.99), rgba(226,248,255,0.95));
}

.theme-ccp2 .tree-section-chip.active,
.theme-ccp2 .folder-count{
  border-color:rgba(24,174,205,0.22);
  background:linear-gradient(180deg, rgba(236,252,255,0.99), rgba(217,247,255,0.95));
  color:#11677b;
}

.theme-ccp2 .node-children .node:nth-child(3n+2) .node-link,
.theme-ccp2 .node-children .node:nth-child(3n) .node-link{
  border-left-color:rgba(24,174,205,0.74);
  background:linear-gradient(135deg, rgba(247,253,255,0.99), rgba(226,248,255,0.95));
}

.theme-ccp2 .node-link:hover{
  box-shadow:0 16px 28px rgba(24,174,205,0.16);
}

.lock{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:32px;
  height:32px;
  border-radius:50%;
  background:rgba(18,34,58,0.07);
}

.tree-row{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  padding:14px 16px;
}

.tree-main{ min-width:240px; }
.tree-title{ font-weight:700; }
.tree-meta{ margin-top:4px; }
.tree-main-tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
}

.tree-tag{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:5px 10px;
  border-radius:999px;
  border:1px solid rgba(18,34,58,0.10);
  background:rgba(255,255,255,0.92);
  color:var(--text-soft);
  font-size:12px;
  font-weight:700;
}

.tree-tag-strong{
  border-color:rgba(29,102,176,0.18);
  background:rgba(236,246,255,0.94);
  color:#17497d;
}

.tree-row{
  position:relative;
}

.tree-row::before{
  content:"";
  position:absolute;
  left:0;
  top:14px;
  bottom:14px;
  width:4px;
  border-radius:999px;
  background:rgba(29,102,176,0.22);
}

.tree-row-level0::before{
  width:6px;
  background:linear-gradient(180deg, var(--blue1), var(--blue2));
}

.tree-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.tabs,
.tabbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin:12px 0 18px;
}

.tab{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:42px;
  padding:10px 16px;
  border-radius:999px;
  border:1px solid var(--line);
  background:rgba(255,255,255,0.86);
  color:var(--text);
  text-decoration:none;
  font-weight:620;
  box-shadow:var(--shadow-soft);
  transition:transform .18s ease, box-shadow .18s ease;
}

.tab:hover{
  transform:translateY(-1px);
}

.tab.active{
  background:linear-gradient(135deg, rgba(29,102,176,0.14), rgba(222,107,158,0.16), rgba(241,197,92,0.20));
  border-color:rgba(29,102,176,0.20);
  color:#17467a;
}

.toggle{
  display:flex;
  align-items:center;
  gap:10px;
  font-weight:620;
}

.toggle input{ transform:scale(1.14); }

.lesson-card{
  margin:0;
  max-width:none;
  height:100%;
}

.qblock{
  padding:16px;
}

.qrow{
  display:grid;
  grid-template-columns:160px 1fr;
  gap:10px;
  align-items:start;
}

.course-builder-toolbar{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}

.insert-toolbar{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  border:1px dashed rgba(29,102,176,0.18);
  border-radius:16px;
  background:linear-gradient(180deg, rgba(243,248,255,0.92), rgba(255,252,244,0.92));
}

.insert-toolbar-label{
  font-size:13px;
  font-weight:700;
  color:var(--text-soft);
}

.insert-toolbar-end{
  margin-top:14px;
}

.builder-block + .insert-toolbar,
.insert-toolbar + .builder-block{
  margin-top:0;
}

.course-editor-page .btn:not(.builder-btn):not(.danger-btn),
.course-editor-page .btn-primary:not(.builder-btn):not(.danger-btn){
  border-radius:14px;
  box-shadow:0 12px 22px rgba(20,63,109,0.18);
}

.course-editor-page .btn.small-btn:not(.danger-btn){
  min-height:34px;
  padding:7px 14px;
  border-radius:13px;
  font-size:14px;
  font-weight:700;
  letter-spacing:0;
  background:linear-gradient(180deg, #2f6fab 0%, #245789 100%);
  border:1px solid rgba(17,53,92,0.12);
  box-shadow:0 10px 18px rgba(20,63,109,0.14);
}

.course-editor-page .btn.small-btn:not(.danger-btn):hover{
  box-shadow:0 14px 22px rgba(20,63,109,0.18);
  filter:brightness(1.03);
}

.course-editor-page .builder-btn{
  min-height:36px;
  padding:8px 14px;
  border-radius:14px;
  font-size:14px;
  font-weight:700;
}

.course-editor-page .insert-toolbar{
  flex-wrap:nowrap;
  justify-content:flex-start;
  gap:7px;
  padding:14px 16px;
  border-radius:20px;
  border-color:rgba(72,131,199,0.24);
  background:linear-gradient(180deg, rgba(246,250,255,0.96), rgba(255,252,246,0.94));
  overflow-x:auto;
  scrollbar-width:thin;
}

.course-editor-page .insert-toolbar-label{
  flex:0 0 auto;
  margin-right:6px;
  font-size:13px;
  font-weight:750;
  letter-spacing:-0.01em;
  white-space:nowrap;
}

.course-editor-page .builder-actions{
  gap:6px;
}

.course-editor-page .insert-toolbar .insert-block{
  flex:0 0 auto;
  min-height:32px;
  padding:6px 12px;
  border-radius:12px;
  font-size:13px;
  font-weight:700;
  letter-spacing:-0.01em;
  white-space:nowrap;
  box-shadow:0 8px 16px rgba(20,63,109,0.12);
}

.course-editor-page .insert-toolbar .insert-block:hover{
  box-shadow:0 12px 20px rgba(20,63,109,0.16);
}

.course-editor-page .insert-toolbar-end{
  flex-wrap:wrap;
}

.course-editor-page .mobile-form-inline > .btn,
.course-editor-page .mobile-stack > .btn{
  min-height:44px;
  padding:11px 18px;
  border-radius:15px;
}


.course-section-title{
  font-size:1.6rem;
  line-height:1.2;
  font-weight:750;
  color:var(--navy1);
  margin:0;
}

.course-section-subtitle{
  font-size:1.15rem;
  line-height:1.35;
  font-weight:700;
  color:var(--text-soft);
  margin:0;
}

.blocks-container{
  margin-top:16px;
  display:flex;
  flex-direction:column;
  gap:16px;
}

.builder-block{
  padding:16px;
}

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

.builder-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

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

.course-editor-page .hero{
  max-width:1400px !important;
}

.course-editor-page .card{
  position:relative;
  overflow:visible;
}

.course-editor-shell{
  display:grid;
  grid-template-columns:minmax(0, 1fr) 320px;
  grid-template-areas:"main toolbar";
  align-items:start;
  gap:24px;
  margin-top:18px;
}

.course-editor-main{
  grid-area:main;
  min-width:0;
}

.rich-editor-tool{
  border:1px solid rgba(29,102,176,0.16);
  border-radius:999px;
  background:linear-gradient(180deg, rgba(244,249,255,0.98), rgba(255,251,241,0.95));
  color:var(--navy1);
  padding:8px 12px;
  font:inherit;
  font-size:13px;
  font-weight:650;
  cursor:pointer;
  box-shadow:var(--shadow-soft);
}

.rich-editor-tool:hover{
  transform:translateY(-1px);
}

.rich-editor-surface{
  min-height:180px;
  padding:14px 16px;
  border-radius:16px;
  border:1px solid var(--line-strong);
  background:rgba(255,255,255,0.97);
  color:var(--text);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.7);
  line-height:1.7;
}

.rich-editor-active .rich-editor-surface{
  border-color:rgba(29,102,176,0.72);
  box-shadow:0 0 0 4px rgba(67,160,228,0.14);
}

.rich-editor-surface:focus{
  outline:none;
  border-color:rgba(29,102,176,0.65);
  box-shadow:0 0 0 4px rgba(67,160,228,0.16);
}

.rich-editor-surface:empty::before{
  color:var(--text-light);
  content:attr(data-placeholder);
}

.rich-editor-surface p,
.rich-editor-surface div,
.rich-editor-surface ul,
.rich-editor-surface ol,
.rich-editor-surface blockquote,
.rich-editor-surface h3,
.rich-editor-surface h4{
  margin-top:0;
}

.rich-editor-surface ul,
.rich-editor-surface ol{
  padding-left:1.2rem;
}

.rich-editor-surface li{
  margin:0 0 6px;
}

.rich-editor-surface li::marker,
.course-richtext li::marker{
  color:currentColor;
}

.rich-editor-surface li > p,
.rich-editor-surface li > div,
.rich-editor-surface li > h3,
.rich-editor-surface li > h4,
.rich-editor-surface li > blockquote,
.course-richtext li > p,
.course-richtext li > div,
.course-richtext li > h3,
.course-richtext li > h4,
.course-richtext li > blockquote{
  margin-top:0;
  margin-bottom:6px;
}

.rich-editor-surface li > :last-child,
.course-richtext li > :last-child{
  margin-bottom:0;
}

.rich-editor-surface blockquote,
.course-richtext blockquote{
  position:relative;
  margin:10px 0 16px;
  padding:14px 18px 14px 54px;
  border-left:none;
  border-radius:18px;
  background:linear-gradient(180deg, rgba(247,250,255,0.9), rgba(255,255,255,0.82));
}

.rich-editor-surface blockquote::before,
.course-richtext blockquote::before{
  content:"";
  position:absolute;
  left:12px;
  top:10px;
  bottom:10px;
  width:28px;
  background-repeat:no-repeat;
  background-size:100% 100%;
  background-position:center;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 120' preserveAspectRatio='none'%3E%3Cpath d='M24 4c-8 0-12 4-12 13v28c0 6-2 10-8 13 6 3 8 7 8 13v28c0 9 4 13 12 13' fill='none' stroke='%23c8d8ee' stroke-width='4.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  opacity:0.98;
  pointer-events:none;
}

.rich-editor-surface blockquote > :last-child,
.course-richtext blockquote > :last-child{
  margin-bottom:0;
}

.rich-editor-surface table,
.course-richtext table{
  width:100%;
  margin:0 0 14px;
  border-collapse:collapse;
  table-layout:fixed;
  overflow:hidden;
  border-radius:16px;
}

.rich-editor-surface th,
.rich-editor-surface td,
.course-richtext th,
.course-richtext td{
  border:1px solid rgba(18,34,58,0.12);
  padding:10px 12px;
  vertical-align:top;
  text-align:left;
  line-height:1.55;
}

.rich-editor-surface th,
.course-richtext th{
  background:rgba(243,247,252,0.95);
  font-weight:750;
  color:var(--navy1);
}

.floating-rich-toolbar{
  grid-area:toolbar;
  position:sticky;
  top:104px;
  height:calc(100dvh - 124px);
  max-height:calc(100dvh - 124px);
  min-height:0;
  width:100%;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:16px;
  border:1px solid rgba(18,34,58,0.1);
  border-radius:28px;
  background:rgba(255,255,255,0.94);
  backdrop-filter:blur(18px);
  box-shadow:0 22px 48px rgba(18,34,58,0.16);
  align-self:start;
  overflow-y:auto;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scrollbar-gutter:stable;
  scrollbar-width:thin;
}

.floating-rich-toolbar[data-toolbar-active="0"]{
  opacity:0.72;
}

.floating-rich-toolbar-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.floating-rich-toolbar-head strong{
  display:block;
  font-size:1rem;
  color:var(--navy1);
}

.floating-rich-toolbar-note{
  display:block;
  margin-top:4px;
  color:var(--text-soft);
  font-size:12px;
}

.floating-rich-toolbar-section{
  display:grid;
  gap:7px;
  padding-bottom:12px;
  border-bottom:1px solid rgba(18,34,58,0.08);
}

.floating-rich-toolbar-section:last-child{
  padding-bottom:0;
  border-bottom:0;
}

.floating-rich-toolbar-split{
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(104px,0.8fr);
  gap:12px;
}

.floating-rich-toolbar-label{
  font-size:12px;
  font-weight:700;
  color:var(--text-soft);
}

.floating-rich-select{
  width:100%;
  min-height:44px;
  border:1px solid rgba(18,34,58,0.08);
  border-radius:14px;
  background:linear-gradient(180deg, rgba(247,249,252,0.98), rgba(240,243,248,0.98));
  color:var(--navy1);
  font:inherit;
  font-size:14px;
  padding:0 14px;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.86);
}

.floating-rich-toolbar-button-row{
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:6px;
}

.floating-rich-toolbar-button-row-inline{
  grid-template-columns:repeat(4, minmax(0, 1fr));
}

.floating-rich-toolbar-button-row-table{
  grid-template-columns:repeat(2, minmax(0, 1fr));
}

.floating-rich-button{
  min-height:40px;
  border-radius:14px;
  border:1px solid rgba(18,34,58,0.08);
  background:linear-gradient(180deg, rgba(247,249,252,0.98), rgba(240,243,248,0.98));
  color:var(--navy1);
  font:inherit;
  font-size:16px;
  font-weight:700;
  padding:8px 10px;
  box-shadow:none;
}

.floating-rich-button:hover,
.floating-rich-color-chip:hover{
  transform:none;
  border-color:rgba(29,102,176,0.28);
}

.rich-editor-tool.is-active,
.rich-editor-tool[aria-pressed="true"]{
  background:linear-gradient(180deg, rgba(231,235,241,0.98), rgba(215,221,228,0.98));
  border-color:rgba(122,134,149,0.44);
  color:#314255;
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.92);
}

.floating-rich-button-italic{
  font-style:italic;
}

.floating-rich-button-underline{
  text-decoration:underline;
}

.floating-rich-button-highlight{
  background:linear-gradient(180deg, rgba(255, 242, 154, 0.98), rgba(255, 232, 120, 0.98));
  border-color:rgba(221, 184, 53, 0.48);
  color:#5f4a00;
  font-size:11px;
  letter-spacing:0.02em;
}

.floating-rich-button-highlight.is-active,
.floating-rich-button-highlight[aria-pressed="true"]{
  background:linear-gradient(180deg, rgba(255, 230, 109, 0.98), rgba(247, 204, 56, 0.98));
  border-color:rgba(201, 152, 17, 0.56);
  color:#4b3700;
}

.rich-editor-surface mark,
.course-richtext mark{
  background:rgba(255, 242, 154, 0.95);
  color:inherit;
  padding:0 0.08em;
  border-radius:0.22em;
}

.floating-rich-button-wide{
  font-size:12px;
  font-weight:650;
  padding:8px 6px;
}

.floating-rich-button-accent{
  background:linear-gradient(180deg, #ffb42f, #ff9800);
  color:#fff;
  border-color:rgba(255,152,0,0.5);
}

.floating-rich-color-palette{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(40px, 1fr));
  gap:8px;
}

.floating-rich-color-chip{
  min-height:40px;
  padding:6px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.floating-rich-color-dot{
  width:100%;
  min-height:26px;
  border-radius:10px;
  background:var(--floating-rich-color, #12223a);
  border:1px solid rgba(18,34,58,0.12);
  box-shadow:inset 0 1px 0 rgba(255,255,255,0.2);
}

.floating-rich-color-chip.is-active,
.floating-rich-color-chip[aria-pressed="true"]{
  background:linear-gradient(180deg, rgba(231,235,241,0.98), rgba(215,221,228,0.98));
  border-color:rgba(122,134,149,0.44);
}

.floating-rich-toolbar button:disabled,
.floating-rich-toolbar select:disabled,
.floating-rich-toolbar input:disabled{
  cursor:not-allowed;
  opacity:0.55;
}

@media (min-width: 1200px){
  .course-editor-shell{
    grid-template-columns:minmax(0, 1fr) 320px;
    grid-template-areas:"main toolbar";
  }
}

@media (max-width: 1199px){
  .course-editor-shell{
    grid-template-columns:1fr;
    grid-template-areas:
      "toolbar"
      "main";
  }

  .floating-rich-toolbar{
    top:92px;
    height:calc(100dvh - 108px);
    max-height:calc(100dvh - 108px);
    margin-bottom:16px;
  }
}

@media (max-width: 720px){
  .floating-rich-toolbar{
    padding:14px;
    border-radius:22px;
  }

  .floating-rich-toolbar-split,
  .floating-rich-toolbar-button-row{
    grid-template-columns:1fr 1fr;
  }

  .floating-rich-toolbar-button-row-inline{
    grid-template-columns:repeat(4, minmax(0,1fr));
  }

  .floating-rich-color-palette{
    grid-template-columns:repeat(auto-fit, minmax(44px, 1fr));
  }
}

.field-exercise{
  border-top:1px dashed rgba(18,34,58,0.12);
  padding-top:12px;
}

.media-guide{
  text-align:left;
}

.file-help{
  margin:0 0 8px;
  color:var(--text-soft);
  font-size:13px;
  line-height:1.5;
}

.editor-file-card{
  margin-bottom:10px;
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(29,102,176,0.14);
  background:linear-gradient(180deg, rgba(244,249,255,0.98), rgba(255,251,241,0.94));
  box-shadow:var(--shadow-soft);
}

.editor-file-card-top,
.course-resource-top,
.course-download-meta,
.course-downloads-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.editor-file-meta,
.course-download-meta > div{
  display:flex;
  flex-direction:column;
  gap:4px;
  min-width:0;
}

.editor-file-meta strong,
.course-resource-name{
  display:block;
  font-size:15px;
  font-weight:650;
  line-height:1.35;
  word-break:break-word;
}

.editor-file-meta span,
.course-resource-size,
.course-download-subline{
  color:var(--text-soft);
  font-size:13px;
  line-height:1.45;
}

.editor-file-preview{
  margin-top:12px;
}

.editor-live-preview{
  margin-top:10px;
}

.editor-image-preview{
  display:block;
  width:100%;
  max-width:360px;
  max-height:240px;
  object-fit:cover;
  border-radius:18px;
  border:1px solid var(--line);
  box-shadow:var(--shadow-soft);
}

.file-selected-name{
  margin-top:8px;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(29,102,176,0.16);
  background:rgba(244,249,255,0.98);
  color:#17497d;
  font-size:13px;
  font-weight:620;
}

.remove-file-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-top:10px;
  color:var(--text-soft);
  font-size:13px;
}

.course-view-card{ max-width:940px; }

.lesson-print-toolbar{
  max-width:980px;
  margin:24px auto 0;
  padding:14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  border:1px solid rgba(18,34,58,0.1);
  border-radius:20px;
  background:rgba(255,255,255,0.94);
  box-shadow:0 18px 40px rgba(18,34,58,0.12);
}

.lesson-print-toolbar-copy{
  display:grid;
  gap:4px;
}

.lesson-print-toolbar-copy strong{
  font-size:1rem;
  color:var(--navy1);
}

.lesson-print-toolbar-copy span{
  color:var(--text-soft);
  font-size:13px;
}

.lesson-print-toolbar-actions{
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:10px;
}

.lesson-print-mode .hero{
  max-width:1040px !important;
}

.lesson-print-card{
  max-width:980px !important;
}

.course-blocks-wrap{
  margin-top:16px;
  display:flex;
  flex-direction:column;
  gap:16px;
}

.course-block{
  padding:18px;
}

.course-block h3{
  margin:0 0 10px;
  font-size:1.1rem;
}

.course-richtext p{
  margin:0 0 10px;
  line-height:1.7;
}

.course-richtext div{
  margin:0 0 10px;
  line-height:1.7;
}

.course-richtext ul,
.course-richtext ol{
  margin:0 0 12px 1.15rem;
  padding-left:1.15rem;
}

.course-richtext li{
  margin:0 0 8px;
  line-height:1.7;
}

.course-richtext h3,
.course-richtext h4,
.course-richtext h5,
.course-richtext h6{
  margin:0 0 10px;
  color:var(--navy1);
}

.course-keypoint{
  padding:16px;
  border-left:6px solid var(--yellow1);
  border-radius:16px;
  background:linear-gradient(180deg, rgba(255,251,233,0.98), rgba(255,247,214,0.94));
}

.course-keypoint-label,
.course-exercise-label{
  font-weight:700;
  margin-bottom:8px;
}

.course-exercise{
  padding:16px;
  border-radius:18px;
  border:1px dashed rgba(29,102,176,0.26);
  background:linear-gradient(180deg, rgba(246,250,255,0.98), rgba(239,246,255,0.93));
}

.course-figure{
  margin:0;
}

.course-figure img{
  width:100%;
  max-height:440px;
  object-fit:cover;
  border-radius:18px;
  border:1px solid var(--line);
  box-shadow:var(--shadow-soft);
}

.course-figure figcaption{
  margin-top:8px;
  font-size:13px;
  color:var(--text-soft);
}

.course-figure-actions{
  margin-top:10px;
}

.course-resource{
  padding:16px;
  border-radius:18px;
  border:1px solid rgba(25,112,181,0.18);
  background:linear-gradient(180deg, rgba(244,250,255,0.98), rgba(235,245,255,0.95));
}

.course-resource-top{
  margin-bottom:10px;
}

@page{
  size:A4;
  margin:14mm;
}

@media print{
  html,
  body{
    background:#fff !important;
  }

  body.lesson-print-mode{
    color:#111;
  }

  .lesson-print-toolbar,
  .topbar,
  .hero-actions,
  .course-figure-actions,
  .course-resource-actions,
  .exercise-check,
  .exercise-feedback{
    display:none !important;
  }

  .hero,
  .course-view-card,
  .lesson-print-card,
  .card{
    max-width:none !important;
    margin:0 !important;
    padding:0 !important;
    border:none !important;
    box-shadow:none !important;
    background:#fff !important;
  }

  .course-block,
  .course-downloads-card,
  .course-keypoint,
  .course-exercise,
  .course-resource,
  .course-figure{
    break-inside:avoid-page;
    page-break-inside:avoid;
    box-shadow:none !important;
  }

  .course-blocks-wrap{
    gap:12px;
  }

  .course-richtext p,
  .course-richtext li,
  .course-richtext div,
  .exercise-prompt{
    font-size:11.5pt;
    line-height:1.55;
  }

  .course-richtext table{
    font-size:10.5pt;
  }

  .course-figure img{
    max-height:unset;
    object-fit:contain;
    box-shadow:none !important;
  }

  .course-download-item{
    border:1px solid rgba(18,34,58,0.12);
    break-inside:avoid-page;
    page-break-inside:avoid;
  }

  .exercise-input,
  .exercise-textarea,
  .exercise-cloze-input,
  .match-select{
    border:1px solid rgba(18,34,58,0.18) !important;
    box-shadow:none !important;
    background:#fff !important;
  }
}

.course-resource-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:58px;
  padding:7px 10px;
  border-radius:999px;
  border:1px solid rgba(29,102,176,0.16);
  background:linear-gradient(180deg, rgba(231,243,255,0.98), rgba(214,233,255,0.94));
  color:#184b81;
  font-size:12px;
  font-weight:700;
  letter-spacing:0.04em;
}

.course-resource-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:12px;
}

.course-downloads-card{
  margin-top:14px;
  padding:18px;
  border-radius:22px;
  border:1px solid rgba(29,102,176,0.16);
  background:linear-gradient(180deg, rgba(244,249,255,0.98), rgba(255,249,238,0.95));
  box-shadow:var(--shadow-soft);
}

.course-downloads-head{
  margin-bottom:8px;
}

.course-downloads-head h3{
  margin:0;
  font-size:1.04rem;
}

.course-download-list{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.course-download-item{
  padding:14px;
  border-radius:18px;
  border:1px solid rgba(29,102,176,0.12);
  background:rgba(255,255,255,0.8);
}

.exercise-prompt{
  margin:0 0 10px;
  font-weight:620;
}

.exercise-choice{
  display:block;
  margin:8px 0;
}

.exercise-choice input{
  margin-right:8px;
}

.exercise-input,
.exercise-textarea{
  margin:8px 0 10px;
}

.exercise-feedback{
  margin-top:12px;
  padding:10px 12px;
  border-radius:14px;
  font-weight:620;
}

.exercise-feedback-ok{
  background:rgba(234,247,238,0.98);
  border:1px solid rgba(40,114,74,0.22);
  color:var(--success);
}

.exercise-feedback-ko{
  background:rgba(255,239,241,0.98);
  border:1px solid rgba(158,46,57,0.20);
  color:var(--danger);
}

.exercise-feedback-warn{
  background:rgba(255,247,223,0.98);
  border:1px solid rgba(139,100,19,0.22);
  color:var(--warning);
}

.exercise-explanation{
  margin-top:10px;
  padding:10px 12px;
  border-radius:14px;
  background:rgba(245,248,252,0.96);
  border:1px solid rgba(18,34,58,0.08);
}

.exercise-cloze-text{
  line-height:2.1;
}

.exercise-cloze-input{
  display:inline-block;
  width:150px;
  margin:0 6px;
  vertical-align:middle;
}

.match-row{
  display:grid;
  grid-template-columns:minmax(180px,1fr) 40px minmax(180px,1fr);
  gap:10px;
  align-items:center;
  margin:10px 0;
}

.match-left{ font-weight:620; }
.match-arrow{ text-align:center; font-size:20px; color:#1b578f; }

.static-card{ text-align:left; }

.simple-list{
  margin:10px 0 0;
  padding-left:18px;
}

.simple-list li{
  margin:8px 0;
}

.container .card{
  max-width:900px;
}

.ok{ color:var(--success); }
.no{ color:var(--text-soft); }
.success{ color:var(--success); }
.error{ color:var(--danger); }
.off{ opacity:0.75; }

@keyframes riseIn{
  from{
    opacity:0;
    transform:translateY(12px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}

.card,
.dash-card,
.route-btn,
.node-details,
.tree-row,
.tr:not(.th),
.builder-block,
.qblock,
.course-block{
  animation:riseIn .36s ease both;
}

@media (max-width: 980px){
  .hero{ padding-top:28px; }
  .brand-logo{ height:72px; }
  .route-btn{ width:100%; }
}

@media (max-width: 860px){
  .login-layout-grid,
  .login-showcase-grid{
    grid-template-columns:1fr;
  }

  .login-showcase{
    padding:14px 0 0;
  }

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

  .overview-grid,
  .stats-grid,
  .analytics-grid,
  .dash-grid,
  .grid2,
  .grid-2,
  .builder-grid,
  .lesson-grid,
  .contact-layout{
    grid-template-columns:1fr !important;
  }

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

  .tr{
    grid-template-columns:1fr !important;
    gap:8px;
    padding:14px;
  }

  .tr.th{ display:none; }

  .mobile-row-labels .tr:not(.th){
    gap:12px;
  }

  .mobile-row-labels .tr:not(.th) > .cell{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:5px;
    padding-bottom:8px;
    border-bottom:1px dashed rgba(18,34,58,0.10);
  }

  .mobile-row-labels .tr:not(.th) > .cell:last-child{
    padding-bottom:0;
    border-bottom:none;
  }

  .mobile-row-labels .tr:not(.th) > .cell::before{
    content:attr(data-label);
    font-size:11px;
    font-weight:700;
    letter-spacing:0.08em;
    text-transform:uppercase;
    color:var(--text-light);
  }

  .tree-row{
    flex-direction:column;
    align-items:stretch;
  }

  .tree-actions{
    justify-content:flex-start;
  }

  .node-summary{
    flex-direction:column;
  }

  .node-summary-meta{
    margin-left:0;
    padding-left:0;
    justify-content:flex-start;
  }

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

  .contact-thread-link-top,
  .contact-thread-header,
  .contact-attachment{
    flex-direction:column;
    align-items:flex-start;
  }

  .contact-attachment .btn-sm{
    width:100%;
  }
}

@media (max-width: 760px){
  .login-shell-page{
    padding:24px 14px 34px;
  }

  .login-showcase h1{
    font-size:clamp(2.2rem, 10vw, 3.2rem);
    line-height:1;
  }

  .login-showcase-copy{
    font-size:0.97rem;
  }

  .login-showcase-card{
    min-height:0;
  }

  .login-card-large{
    padding:20px 18px 18px;
    border-radius:22px;
  }

  .topbar{
    padding:14px 12px 0;
  }

  .topbar-inner,
  header.topbar{
    flex-direction:column;
    align-items:stretch;
    gap:12px;
    padding:12px 14px;
    border-radius:20px;
  }

  .topbar-right,
  .topbar-left{
    width:100%;
    gap:8px;
  }

  .topbar-right{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:flex-start;
  }

  .brand,
  .topbar-left{
    justify-content:center;
  }

  .topbar-right > *{
    width:auto;
    flex:0 0 auto;
  }

  .profile-link{
    min-height:48px;
  }

  .brand-logo{
    height:60px;
  }

  .hero,
  .container{
    padding:24px 14px 34px;
  }

  .hero h1{
    font-size:clamp(2rem, 9vw, 2.75rem) !important;
    line-height:1.04;
  }

  .hero h2{
    font-size:clamp(1.25rem, 5.6vw, 1.8rem) !important;
    margin-top:20px;
  }

  .entry-copy{
    font-size:15px;
  }

  .entry-route{
    min-height:190px;
    padding:24px 20px;
    border-radius:24px;
  }

  .card{
    padding:18px;
    border-radius:20px;
  }

  .card[style*="max-width"],
  .hero[style*="max-width"]{
    max-width:100% !important;
  }

  .route-btn{
    padding:20px 18px;
    border-radius:22px;
  }

  .node-link{
    align-items:flex-start;
  }

  .node-link-main,
  .node-link-side{
    width:100%;
  }

  .node-link-side{
    justify-content:flex-start;
  }

  .input,
  .in,
  .qrow input[type="text"],
  .qrow textarea,
  .qrow select,
  select.input,
  textarea.input,
  input.input,
  select.in,
  textarea.in,
  input.in{
    font-size:16px;
  }

  .qrow{
    grid-template-columns:1fr !important;
  }

  .match-row{
    grid-template-columns:1fr;
  }

  .match-arrow{ display:none; }

  .exercise-cloze-input{
    width:100%;
    margin:8px 0;
  }

  .mobile-form-inline{
    flex-direction:column;
    align-items:stretch;
  }

  .mobile-form-inline > *{
    width:100%;
    flex:1 1 auto;
  }

  .select-wide,
  select[style*="min-width"]{
    min-width:0 !important;
  }

  .profile-summary{
    flex-direction:column;
    align-items:flex-start;
  }

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

  .editor-file-card-top,
  .course-resource-top,
  .course-download-meta,
  .course-downloads-head{
    flex-direction:column;
    align-items:flex-start;
  }

  .course-resource-actions{
    width:100%;
  }

  .course-resource-actions > .btn,
  .course-resource-actions > .btn-sm{
    width:100%;
  }
}

@media (max-width: 560px){
  .topbar-right{
    grid-template-columns:1fr;
  }

  .dash-card,
  .overview-card,
  .stat-card,
  .builder-block,
  .qblock,
  .course-block{
    border-radius:18px;
  }

  .tree-section-grid{
    grid-template-columns:1fr;
  }

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