﻿/* Shared application styles */
:root {
  --page: #eef5fb;
  --ink: #101828;
  --muted: #536071;
  --line: rgba(16, 24, 40, 0.12);
  --card: rgba(255, 255, 255, 0.9);
  --card-strong: rgba(255, 255, 255, 0.96);
  --shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
  --dept-business: #e95b4f;
  --dept-care: #a06198;
  --dept-design: #009aa6;
  --dept-it: #f0883f;
  --dept-stem: #66a427;
  --dept-work: #006e43;
  --dept-world: #006e43;
  --level-spectrum: linear-gradient(90deg, var(--dept-business) 0 16%, var(--dept-care) 16% 32%, var(--dept-design) 32% 48%, var(--dept-it) 48% 64%, var(--dept-stem) 64% 80%, var(--dept-work) 80% 100%);
  --level-spectrum-soft: linear-gradient(90deg, rgba(233, 91, 79, 0.16), rgba(160, 97, 152, 0.14), rgba(0, 154, 166, 0.15), rgba(240, 136, 63, 0.13), rgba(102, 164, 39, 0.15), rgba(0, 110, 67, 0.14));
  --blue: var(--dept-design);
  --orange: var(--dept-it);
  --purple: var(--dept-care);
  --green: var(--dept-stem);
  --red: var(--dept-business);
  --sidebar: rgba(24, 35, 45, 0.86);
  --background-image: url("../images/background.jpg");
  --sidebar-background:
    radial-gradient(circle at 35% 0%, rgba(255, 255, 255, 0.36), transparent 20%),
    radial-gradient(circle at 0% 18%, rgba(0, 154, 166, 0.22), transparent 32%),
    radial-gradient(circle at 110% 42%, rgba(160, 97, 152, 0.2), transparent 30%),
    linear-gradient(180deg, rgba(50, 62, 72, 0.96) 0%, rgba(25, 38, 52, 0.95) 42%, rgba(10, 24, 39, 0.95) 100%);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  letter-spacing: 0;
  background:
    var(--level-spectrum-soft),
    linear-gradient(90deg, rgba(238, 245, 251, 0.9) 0%, rgba(238, 245, 251, 0.68) 43%, rgba(238, 245, 251, 0.28) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.52) 0%, rgba(255, 255, 255, 0.2) 46%, rgba(255, 255, 255, 0.44) 100%),
    var(--background-image) center center / cover fixed no-repeat;
}

body:has(.nav-toggle:checked) {
  overflow: hidden;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(11, 114, 255, 0.28);
  outline-offset: 2px;
}

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

th,
td {
  padding: 8px 9px;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: #253248;
  font-size: 11px;
  font-weight: 800;
}

td {
  border-top: 1px solid rgba(16, 24, 40, 0.09);
  color: #1f2b3d;
  font-size: 11px;
  font-weight: 650;
}

.icon-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.nav-toggle {
  position: fixed;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.hamburger-button,
.menu-scrim {
  display: none;
}

.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.icon.small {
  width: 20px;
  height: 20px;
}

.icon.tiny {
  width: 16px;
  height: 16px;
}

.icon.big {
  width: 30px;
  height: 30px;
}

.profile > svg.icon,
.profile-button > svg.icon {
  display: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  min-height: 100vh;
  padding: 10px 16px 20px 8px;
}

.sidebar {
  position: sticky;
  top: 10px;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-self: start;
  min-height: calc(100vh - 20px);
  padding: 18px 12px 14px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: var(--sidebar-background);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(18px);
}

.sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  right: 12px;
  left: 12px;
  z-index: -1;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: var(--level-spectrum);
  box-shadow: 0 8px 20px rgba(0, 154, 166, 0.24);
}

.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0 72px, transparent 130px),
    radial-gradient(circle at 50% 7%, rgba(255, 255, 255, 0.22), transparent 72px);
  pointer-events: none;
}

.sidebar > div:first-child {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 3px 0 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.brand img {
  display: block;
  width: 118px;
  height: auto;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.42)) drop-shadow(0 7px 14px rgba(0, 0, 0, 0.2));
}

.brand-subtitle {
  width: 100%;
  margin: 8px 0 22px;
  padding-bottom: 18px;
  color: rgba(255, 255, 255, 0.74);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.35;
}

.main-nav {
  display: grid;
  gap: 4px;
  justify-content: center;
}

.nav-item {
  --nav-accent: var(--dept-design);
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 11px;
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid transparent;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 850;
  transition: background 160ms ease, color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.main-nav .nav-item:nth-child(1) {
  --nav-accent: var(--dept-business);
}

.main-nav .nav-item:nth-child(2) {
  --nav-accent: var(--dept-care);
}

.main-nav .nav-item:nth-child(3) {
  --nav-accent: var(--dept-design);
}

.main-nav .nav-item:nth-child(4) {
  --nav-accent: var(--dept-it);
}

.main-nav .nav-item:nth-child(5) {
  --nav-accent: var(--dept-stem);
}

.main-nav .nav-item:nth-child(6) {
  --nav-accent: var(--dept-work);
}

.main-nav .nav-item:nth-child(7) {
  --nav-accent: #fff;
}

.nav-item::before {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  border-radius: 999px;
  background: var(--nav-accent);
  opacity: 0.62;
  transition: opacity 160ms ease;
}

.main-nav .icon {
  width: 21px;
  height: 21px;
  color: color-mix(in srgb, var(--nav-accent) 72%, #fff);
  opacity: 0.96;
  stroke-width: 1.9;
}

.nav-item:hover {
  color: #fff;
  background: color-mix(in srgb, var(--nav-accent) 18%, transparent);
}

.nav-item:hover::before {
  opacity: 0.75;
}

.nav-item.active {
  color: #fff;
  border-color: color-mix(in srgb, var(--nav-accent) 44%, rgba(255, 255, 255, 0.38));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--nav-accent) 32%, transparent), rgba(255, 255, 255, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.nav-item.active::before {
  opacity: 1;
}

.nav-item.active .icon {
  color: #fff;
  opacity: 1;
  stroke-width: 2.05;
}

.smartschool-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  margin-top: auto;
  padding: 8px 9px;
  color: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 11px;
  font-weight: 850;
}

.smartschool-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: #fff;
  border-radius: 4px;
  background: #ff6a00;
  font-size: 18px;
  font-weight: 950;
}

.smartschool-link.logout-link {
  position: relative;
  justify-content: center;
  gap: 9px;
  padding-right: 42px;
  padding-left: 42px;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  background: linear-gradient(180deg, color-mix(in srgb, var(--dept-business) 86%, #111827), color-mix(in srgb, var(--dept-business) 70%, #111827));
  box-shadow: 0 10px 20px rgba(233, 91, 79, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.smartschool-link.logout-link:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
  background: linear-gradient(180deg, color-mix(in srgb, var(--dept-business) 94%, #111827), color-mix(in srgb, var(--dept-business) 78%, #111827));
  transform: translateY(-1px);
}

.logout-icon {
  position: absolute;
  right: 9px;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--dept-business);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.92);
}

.logout-icon .icon {
  width: 18px;
  height: 18px;
  stroke-width: 2.25;
}

@media (max-width: 1040px) {
  body {
    overflow-x: hidden;
    background-attachment: scroll;
  }

  .hamburger-button {
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 90;
    display: grid;
    grid-template-columns: 22px auto;
    grid-template-rows: 22px;
    align-items: center;
    column-gap: 11px;
    min-height: 44px;
    padding: 0 15px;
    color: #0f172a;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(245, 248, 252, 0.92));
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    cursor: pointer;
    transition: left 180ms ease, right 180ms ease, color 180ms ease, background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
    backdrop-filter: blur(14px);
  }

  .hamburger-button span {
    grid-column: 1;
    grid-row: 1;
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .hamburger-button span:nth-child(1) {
    transform: translateY(-7px);
  }

  .hamburger-button span:nth-child(2) {
    transform: translateY(0);
  }

  .hamburger-button span:nth-child(3) {
    transform: translateY(7px);
  }

  .hamburger-button b {
    grid-column: 2;
    grid-row: 1;
    font-size: 0;
    font-weight: 900;
  }

  .hamburger-button b::after {
    content: "Menu";
    font-size: 12px;
  }

  .nav-toggle:focus-visible + .hamburger-button {
    outline: 3px solid color-mix(in srgb, var(--dept-design) 28%, transparent);
    outline-offset: 2px;
  }

  .nav-toggle:checked + .hamburger-button {
    left: auto;
    right: 18px;
    color: #fff;
    border-color: rgba(255, 255, 255, 0.2);
    background:
      var(--level-spectrum-soft),
      rgba(12, 20, 29, 0.88);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  }

  .nav-toggle:checked + .hamburger-button b::after {
    content: "Sluit";
  }

  .nav-toggle:checked + .hamburger-button span:nth-child(1) {
    transform: translateY(0) rotate(45deg);
  }

  .nav-toggle:checked + .hamburger-button span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle:checked + .hamburger-button span:nth-child(3) {
    transform: translateY(0) rotate(-45deg);
  }

  .menu-scrim {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: block;
    opacity: 0;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.26);
    transition: opacity 220ms ease;
  }

  .nav-toggle:checked ~ .menu-scrim {
    opacity: 1;
    pointer-events: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
    padding: 68px 12px 18px;
  }

  .sidebar {
    position: fixed;
    inset: 0;
    z-index: 70;
    width: 100vw;
    height: 100dvh;
    min-height: 0;
    padding: clamp(78px, 10vh, 108px) clamp(22px, 5vw, 48px) clamp(24px, 5vh, 48px);
    border-radius: 0;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-16px) scale(0.985);
    background: var(--sidebar-background);
    transition: opacity 220ms ease, transform 220ms ease;
  }

  .nav-toggle:checked ~ .app-shell .sidebar {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
  }

  .sidebar .brand {
    width: 172px;
    min-height: 52px;
    margin-left: 0;
    padding: 8px 20px;
    border-radius: 12px;
  }

  .sidebar .brand img {
    width: 132px;
  }

  .sidebar .brand-subtitle {
    margin: 12px 0 clamp(26px, 5vh, 42px);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.82);
  }

  .main-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: min(720px, 100%);
    margin: 0 auto;
  }

  .nav-item {
    min-height: 76px;
    padding: 0 18px;
    gap: 14px;
    color: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    font-size: 15px;
  }

  .nav-item .icon {
    width: 24px;
    height: 24px;
  }

  .nav-item:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
  }

  .smartschool-link {
    width: min(420px, 100%);
    min-height: 56px;
    margin: clamp(26px, 5vh, 42px) auto 0;
    padding: 10px 52px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px;
    font-size: 14px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 13px;
  }
}

@media (max-width: 520px) {
  .hamburger-button {
    left: 10px;
    top: 10px;
    min-height: 40px;
    padding: 0 13px;
  }

  .nav-toggle:checked + .hamburger-button {
    right: 10px;
  }

  .app-shell {
    padding: 58px 8px 14px;
  }

  .icon.big {
    width: 24px;
    height: 24px;
  }

  .sidebar {
    padding: 72px 16px 24px;
  }

  .sidebar .brand {
    width: 154px;
    min-height: 48px;
  }

  .sidebar .brand img {
    width: 120px;
  }

  .sidebar .brand-subtitle {
    margin-bottom: 24px;
    font-size: 11px;
  }

  .main-nav {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .nav-item {
    min-height: 58px;
    padding: 0 15px;
    border-radius: 12px;
    font-size: 14px;
  }

  .nav-item .icon {
    width: 22px;
    height: 22px;
  }

  .smartschool-link {
    min-height: 50px;
    margin-top: 22px;
    border-radius: 12px;
    font-size: 13px;
  }
}
