:root{
  --page:#f4f7fb;
  --card:#ffffff;
  --ink:#172033;
  --muted:#667085;
  --line:#d8dee9;
  --accent:#214c8f;
  --accent-soft:#eaf1fb;
  --shadow:0 10px 30px rgba(22,34,51,.08);
}
*{box-sizing:border-box}
html{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;background:var(--page);color:var(--ink)}
body{margin:0;min-height:100vh;background:linear-gradient(180deg,#f8fbff 0,#f4f7fb 100%);padding:28px 18px 40px}
center{max-width:1180px;margin-left:auto;margin-right:auto}
.mathema,.nodecBlack,.nodecWhite,A.nodecBlack,A.nodecWhite{font-family:inherit!important;font-size:14px!important;line-height:1.35}
.mathema{color:var(--ink)!important}
a{transition:opacity .15s ease,transform .15s ease,box-shadow .15s ease}
a:hover{opacity:.82}

/* Titluri */
body.schedule-page > center.schedule-heading{background:var(--card);border:1px solid #e6eaf0;border-radius:18px;padding:18px 20px 14px;box-shadow:var(--shadow);margin-bottom:18px}
body.schedule-page > center.schedule-heading p{margin:3px 0}
body.schedule-page .schedule-title{font-size:24px!important;font-weight:750!important;letter-spacing:.01em;color:var(--ink)!important}

/* Orar */
body.schedule-page > center:nth-of-type(2){overflow-x:auto;padding:0 1px 10px;scrollbar-width:thin}
body.schedule-page table{width:100%!important;min-width:760px;border:0!important;border-collapse:separate;border-spacing:2px;background:#dfe5ee;border-radius:14px;overflow:hidden;box-shadow:var(--shadow)}
body.schedule-page table td{border:0!important;padding:9px 8px!important;min-height:58px;vertical-align:middle}
body.schedule-page table tr:first-child td{background:#263b5b!important;color:#fff!important;font-weight:700;font-size:13px!important;letter-spacing:.05em;text-transform:uppercase;padding:11px 8px!important}
body.schedule-page table tr td:first-child{position:sticky;left:0;z-index:2;background:#fff!important;color:#344054!important;font-weight:700;box-shadow:2px 0 0 rgba(80,94,113,.12)}
body.schedule-page table tr:first-child td:first-child{background:#263b5b!important;color:#fff!important;z-index:3}
body.schedule-page td p{margin:2px 0!important}
body.schedule-page td p:first-child{font-weight:750;letter-spacing:.01em}
body.schedule-page td a{font-size:12px!important;text-decoration:none!important}
body.schedule-page td a:hover{text-decoration:underline!important}
body.schedule-page > center.schedule-footer{margin-top:18px;color:var(--muted)}
body.schedule-page > center.schedule-footer p{margin:8px 0}
body.schedule-page .validity{font-size:14px;color:var(--ink);margin-bottom:10px!important}
body.schedule-page .back-link{display:inline-block;padding:9px 14px;background:var(--accent);color:#fff!important;border-radius:999px;text-decoration:none!important;font-weight:650;box-shadow:0 4px 12px rgba(33,76,143,.18)}
body.schedule-page .copyright{font-size:12px!important;color:var(--muted)!important;margin-top:13px!important}

/* Pagina principală */
body.index-page{padding-top:44px}
body.index-page > center.index-heading{max-width:1000px;background:var(--card);border:1px solid #e5eaf1;border-radius:18px;padding:22px 20px;box-shadow:var(--shadow);margin-bottom:18px}
body.index-page .school-name{font-size:18px!important;font-weight:750;letter-spacing:.025em;color:var(--ink)!important;line-height:1.35}
body.index-page .school-year{font-size:28px!important;margin-top:7px;color:var(--accent)!important;letter-spacing:.02em}
body.index-page > center:nth-of-type(2) table{width:min(100%,1000px)!important;border-collapse:separate;border-spacing:18px;background:transparent}
body.index-page > center:nth-of-type(2) td{background:var(--card);border:1px solid #e5eaf1;border-radius:18px;padding:24px!important;box-shadow:var(--shadow);font-size:20px!important;font-weight:750;color:var(--ink)!important;vertical-align:top}
body.index-page > center:nth-of-type(2) td p{margin:8px 0 10px}
body.index-page > center:nth-of-type(2) td a{display:inline-block;margin:3px 5px 3px 0;padding:7px 10px;border-radius:9px;background:var(--accent-soft);color:var(--accent)!important;font-size:14px!important;font-weight:650;text-decoration:none!important}
body.index-page > center:nth-of-type(2) td a:hover{transform:translateY(-1px);box-shadow:0 4px 10px rgba(33,76,143,.12);opacity:1}
body.index-page > center.site-footer{margin-top:16px}
body.index-page > center.site-footer .mathema{color:var(--muted)!important;font-size:12px!important;line-height:1.8}
body.index-page > center.site-footer a{color:var(--accent)!important;text-decoration:none}

@media (max-width:720px){
  body{padding:18px 10px 28px}
  body.schedule-page > center.schedule-heading{border-radius:14px;padding:14px 12px 11px;margin-bottom:12px}
  body.schedule-page .schedule-title{font-size:20px!important}
  
  body.schedule-page table td{padding:8px 6px!important}
  body.index-page{padding-top:24px}
  body.index-page > center:nth-of-type(2) table,
  body.index-page > center:nth-of-type(2) tbody,
  body.index-page > center:nth-of-type(2) tr,
  body.index-page > center:nth-of-type(2) td{display:block;width:100%!important}
  body.index-page > center:nth-of-type(2) table{border-spacing:0}
  body.index-page > center:nth-of-type(2) td{margin-bottom:14px;padding:18px!important}
}

@media print{
  html,body{background:#fff!important}
  body{padding:0}
  body.schedule-page > center.schedule-heading{box-shadow:none;border:0;padding:0;margin-bottom:8px}
  body.schedule-page table{box-shadow:none;min-width:0;border-spacing:1px}
  body.schedule-page > center.schedule-footer{display:none}
}


.school-header {
  width: 80%;
  margin: 18px auto 4px auto;
  text-align: left;
  font-size: 0.92rem;
  font-weight: 600;
}
.schedule-heading .validity {
  margin: 4px 0 12px 0;
  font-size: 0.95rem;
}

.school-header { display: none !important; }
.schedule-footer { text-align: center; }
.schedule-footer .school-footer-name {
  text-align: center;
  margin: 8px auto 0 auto;
  font-size: 0.9rem;
}


/* Singura modificare față de formatul final anterior:
   pe mobil, toate cele 5 zile sunt afișate simultan. */
@media (max-width:720px){
  body.schedule-page > center:nth-of-type(2){
    overflow-x:visible;
    width:100%;
    max-width:100%;
    padding-left:0;
    padding-right:0;
  }
  body.schedule-page table{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
    border-spacing:1px;
  }
  body.schedule-page table td{
    min-width:0!important;
    white-space:normal!important;
    overflow-wrap:anywhere;
    word-break:normal;
    padding:6px 2px!important;
    font-size:clamp(7px,2.15vw,12px)!important;
    line-height:1.18!important;
  }
  body.schedule-page table tr td:first-child{
    width:10%!important;
    position:static;
    padding-left:1px!important;
    padding-right:1px!important;
    font-size:clamp(8px,2.3vw,12px)!important;
  }
  body.schedule-page table tr td:not(:first-child){
    width:18%!important;
  }
  body.schedule-page table tr:first-child td{
    padding:7px 1px!important;
    font-size:clamp(7px,2.15vw,11px)!important;
    letter-spacing:0!important;
  }
  body.schedule-page td p{
    margin:1px 0!important;
  }
  body.schedule-page td a{
    font-size:inherit!important;
    line-height:inherit!important;
  }
}

@media (orientation:landscape) and (max-height:600px){
  body.schedule-page table td{
    padding:7px 4px!important;
    font-size:clamp(9px,1.45vw,13px)!important;
  }
  body.schedule-page table tr td:first-child{
    width:8%!important;
    font-size:clamp(9px,1.5vw,13px)!important;
  }
  body.schedule-page table tr td:not(:first-child){
    width:18.4%!important;
  }
  body.schedule-page table tr:first-child td{
    font-size:clamp(9px,1.45vw,12px)!important;
  }
}


/* Responsive timetable fix: fit all five weekdays in narrower windows too. */
@media (max-width:1000px){
  body.schedule-page > center:nth-of-type(2){
    overflow-x:visible!important;
    width:100%!important;
    max-width:100%!important;
    padding-left:0!important;
    padding-right:0!important;
  }
  body.schedule-page table{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    table-layout:fixed!important;
  }
  body.schedule-page table td{
    min-width:0!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    padding:7px 3px!important;
    font-size:clamp(8px,1.35vw,13px)!important;
    line-height:1.18!important;
  }
  body.schedule-page table tr td:first-child{
    width:9%!important;
    position:static!important;
    font-size:clamp(8px,1.35vw,12px)!important;
  }
  body.schedule-page table tr td:not(:first-child){
    width:18.2%!important;
  }
  body.schedule-page table tr:first-child td{
    font-size:clamp(8px,1.3vw,12px)!important;
    padding-left:1px!important;
    padding-right:1px!important;
  }
  body.schedule-page td p{margin:1px 0!important}
  body.schedule-page td a{font-size:inherit!important;line-height:inherit!important}
}
