/* DifferentDucks Education — Master Visual Source of Truth v1.0
   Product UI layer for Reach. */

:root{
  --mallard:#1F5E3E;
  --mallard-dark:#194D33;
  --mallard-pressed:#123A26;
  --navy:#1E293B;
  --navy-dark:#111A29;
  --sage:#A7B8A1;
  --sage-2:#EEF2EC;
  --marigold:#E0B23D;
  --earth:#8B6A3D;
  --sandstone:#D7C9B6;
  --cream:#FCFBF8;
  --white:#FFFFFF;
  --ink:#1E293B;
  --muted:#66727C;
  --border:#DCE3DC;
  --danger:#B54747;
  --danger-soft:#F9EAEA;
  --success:#2F6F4E;
  --success-soft:#EAF2EC;
  --warning:#A46616;
  --warning-soft:#FBF1D7;
  --information:#356A8D;
  --shadow:0 2px 8px rgba(30,41,59,.06);
  --shadow-lg:0 16px 40px rgba(30,41,59,.14);
  --radius:16px;
  --radius-sm:10px;
}

html{background:var(--cream);scroll-behavior:smooth}
body{
  background:var(--cream);
  color:var(--ink);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:16px;
  line-height:1.5;
  text-rendering:optimizeLegibility;
}

button,input,textarea,select{font-family:inherit}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,a:focus-visible,summary:focus-visible{
  outline:3px solid rgba(31,94,62,.28);
  outline-offset:2px;
}

.app-shell{grid-template-columns:272px minmax(0,1fr)}
.sidebar{
  background:var(--navy);
  padding:24px 20px;
  gap:24px;
  box-shadow:none;
}
.nav{gap:4px}
.nav button{
  min-height:48px;
  padding:0 14px;
  border-radius:10px;
  font-size:14px;
  font-weight:650;
  opacity:.86;
  transition:background-color 140ms ease,color 140ms ease,opacity 140ms ease;
}
.nav button.active{
  background:rgba(31,94,62,.5);
  box-shadow:inset 3px 0 0 #80C49A;
  opacity:1;
}
.nav button:hover{background:rgba(255,255,255,.08);opacity:1}
.nav button.active:hover{background:rgba(31,94,62,.58)}
.sidebar-cycle{
  padding:16px;
  border-color:rgba(167,184,161,.24);
  border-radius:16px;
  background:rgba(167,184,161,.07);
  box-shadow:none;
}
.sidebar-cycle strong{font-variant-numeric:tabular-nums}
.sidebar-footer button{min-height:44px;border-radius:10px}

.main{padding:40px 48px 64px}
.view-section{max-width:1440px}
.topbar,.page-title{gap:32px;margin-bottom:32px}
.topbar h1{
  margin:4px 0 8px;
  color:var(--navy);
  font-family:Recoleta,"Iowan Old Style",Palatino,Georgia,serif;
  font-size:clamp(38px,3vw,48px);
  font-weight:600;
  line-height:1.05;
  letter-spacing:-.03em;
}
.page-title h1,.login-auth h1{
  margin:4px 0 8px;
  color:var(--navy);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:clamp(38px,3vw,48px);
  font-weight:700;
  line-height:1.05;
  letter-spacing:-.035em;
}
h2,h3,.section-head h2,.mini-head h3,.goal-card h3,.teacher-card h3,.modal h2{
  color:var(--navy);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-weight:700;
  letter-spacing:-.015em;
}
.section-head h2{font-size:26px;line-height:1.2}
.goal-card h3{font-size:18px;line-height:1.32}
.topbar p,.page-title p{font-size:16px;line-height:1.55}
.eyebrow{letter-spacing:.1em;font-size:12px;font-weight:750}
.role-pill{padding:8px 12px;border-radius:999px;font-size:14px;font-weight:700}

.grid{gap:16px}
.stats{gap:16px;margin-bottom:24px}
.card,.goal-card,.teacher-card{
  border-color:var(--border);
  border-radius:16px;
  box-shadow:var(--shadow);
}
.card{padding:20px}
.stat strong,.evidence-summary .card strong,.detail-metric strong{
  color:var(--navy);
  font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-variant-numeric:tabular-nums;
  font-weight:650;
}
.stat strong{font-size:32px;line-height:1.15}
.home-grid{gap:24px;grid-template-columns:minmax(0,1.9fr) minmax(300px,.8fr)}
.side-stack{gap:16px;top:24px}
.side-stack .card:nth-child(1),.side-stack .card:nth-child(2),.side-stack .card:nth-child(3),
.evidence-summary .card:nth-child(1),.evidence-summary .card:nth-child(2),.evidence-summary .card:nth-child(3){border-top-width:1px}
.side-stack .card:first-child{background:var(--sage-2)}
.next-action{font-size:15px}
.section-head{margin:32px 0 16px}

.btn{
  min-height:48px;
  padding:0 20px;
  border-radius:10px;
  font-size:14px;
  font-weight:700;
  transition:background-color 140ms ease,border-color 140ms ease,color 140ms ease,box-shadow 140ms ease;
}
.btn:hover{transform:none}
.btn-primary{background:var(--mallard)}
.btn-primary:hover{background:var(--mallard-dark)}
.btn-primary:active{background:var(--mallard-pressed)}
.btn-secondary{background:var(--sage-2);color:var(--mallard-dark)}
.btn-ghost{border-color:var(--navy);color:var(--navy);background:var(--white)}
.btn-ghost:hover{background:var(--sage-2);border-color:var(--mallard)}
.btn-danger{background:var(--danger);border-color:var(--danger);color:#fff}
.btn-danger:hover{background:#9E3D3D}
.icon-btn{width:44px;height:44px;border-radius:10px;font-size:22px}

.segmented{gap:4px;padding:4px;border-radius:14px;background:#E9EDE8}
.segmented button{min-height:40px;padding:0 14px;border-radius:10px;font-size:14px}
.segmented button.active{box-shadow:0 1px 4px rgba(30,41,59,.1)}
.goal-list{gap:16px}
.goal-card{padding:20px;gap:12px;box-shadow:var(--shadow)}
.goal-card:hover{border-color:rgba(31,94,62,.4);box-shadow:0 8px 24px rgba(30,41,59,.08)}
.goal-card p{line-height:1.55}
.badge{padding:4px 8px;border-radius:999px;font-size:12px}
.progress-line{height:6px;background:#E9EEEA}
.progress-line span{background:var(--mallard)}
.requirements{padding:14px 16px;border-radius:10px;margin-bottom:24px}
.empty{border-radius:16px;background:rgba(255,255,255,.6)}

.field{gap:8px}
.field>span{font-size:14px;font-weight:700;color:var(--navy)}
.field input,.field select,.staff-table select{
  min-height:48px;
  padding:0 14px;
  border-color:var(--border);
  border-radius:10px;
}
.field textarea{min-height:120px;padding:12px 14px;border-color:var(--border);border-radius:10px}
.field input:hover,.field textarea:hover,.field select:hover,.staff-table select:hover{border-color:var(--sage)}
.field input:focus,.field textarea:focus,.field select:focus,.staff-table select:focus{border-color:var(--mallard)}
.check-row{min-height:44px;align-items:center}
.check-row input{width:18px;height:18px;margin:0;accent-color:var(--mallard)}
.actions{gap:8px;margin-top:16px}

.modal-backdrop{background:rgba(30,41,59,.48);backdrop-filter:blur(3px)}
.modal{border-radius:24px;padding:24px;box-shadow:var(--shadow-lg)}
.modal h2{font-size:28px;line-height:1.2}
.modal-head{margin-bottom:24px}
.notice{border-radius:10px;border:1px solid transparent;padding:12px 16px}
.notice-error{border-color:rgba(181,71,71,.2)}
.notice-success{border-color:rgba(47,111,78,.2)}
.notice-error::before{content:"! ";font-weight:800}
.notice-success::before{content:"✓ ";font-weight:800}

.login-page{padding:32px;background:var(--cream)}
.login-card{
  width:min(1080px,100%);
  min-height:560px;
  display:grid;
  grid-template-columns:50% 50%;
  padding:0;
  overflow:hidden;
  text-align:left;
  border-radius:24px;
  box-shadow:0 24px 64px rgba(30,41,59,.14);
}
.login-card::after{display:none}
.login-card>.brand{
  width:auto;
  min-width:0;
  min-height:560px;
  margin:0;
  padding:48px 36px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:14px;
  background:var(--sage-2);
  text-align:center;
}
.login-card>.brand::after{
  content:"Different learners. Different pathways.";
  max-width:280px;
  margin-top:24px;
  color:var(--mallard);
  font-size:17px;
  font-weight:700;
  line-height:1.35;
}
.login-card .brand-mark{width:190px;height:126px;margin:0;background-size:contain}
.login-card .brand strong{font-size:29px;line-height:1.12}
.login-card .brand small{font-size:14px;color:var(--muted)}
.login-auth{padding:56px;display:flex;flex-direction:column;justify-content:center;min-width:0}
.login-auth h1{font-size:42px}
.login-auth>p{max-width:430px;margin:0;color:var(--muted);line-height:1.55}
.login-card form{width:100%;max-width:none;margin:28px 0 0;text-align:left}
.login-card form .field>span{text-align:left}
.login-card #loginMessage{margin:16px 0 0;text-align:left}

@media(max-width:1100px){
  .main{padding:32px 32px 56px}
  .home-grid{grid-template-columns:1fr}
}

@media(max-width:900px){
  .app-shell{grid-template-columns:1fr}
  .sidebar{position:static;height:auto;padding:16px;gap:16px}
  .nav{display:flex;overflow-x:auto;scrollbar-width:thin;padding-bottom:4px}
  .nav button{flex:0 0 auto;white-space:nowrap}
  .sidebar-cycle{margin-top:0}
  .main{padding:28px 24px 48px}
}

@media(max-width:720px){
  .login-page{padding:16px}
  .login-card{min-height:0;grid-template-columns:1fr;border-radius:20px}
  .login-card>.brand{min-height:190px;padding:28px 24px 24px}
  .login-card>.brand::after{margin-top:8px;font-size:15px}
  .login-card .brand-mark{width:142px;height:82px}
  .login-card .brand strong{font-size:24px}
  .login-card .brand small{display:none}
  .login-auth{padding:32px 24px 36px}
  .login-auth h1{font-size:36px}
}

@media(max-width:620px){
  .main{padding:24px 16px 40px}
  .topbar,.page-title{margin-bottom:24px}
  .topbar h1,.page-title h1{font-size:36px}
  .stats{gap:12px}
  .card,.goal-card{padding:16px}
  .actions{gap:8px}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  *,*::before,*::after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}
}
