:root {
  --aqua: #9bd9d7;
  --aqua-soft: #dff7f6;
  --aqua-deep: #008f92;
  --blush: #e9a9b9;
  --blush-soft: #fdeaf0;
  --ink: #21363b;
  --ink-strong: #18292e;
  --ink-soft: rgba(23, 38, 42, 0.55);
  --nav-dark: #22363b;
  --nav-muted: #9aa8ad;
  --paper: #fffdf8;
  --muted: #536366;
  --line: rgba(23, 38, 42, 0.12);
  --white: #ffffff;
  --shadow: 0 24px 70px rgba(0, 82, 86, 0.18);
  --radius-lg: 34px;
  --radius-md: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 18% 8%, rgba(233, 169, 185, 0.28) 0 54px, transparent 55px),
    radial-gradient(circle at 8% 18%, rgba(255, 255, 255, 0.55) 0 18px, transparent 19px),
    radial-gradient(circle at 94% 12%, rgba(255, 255, 255, 0.48) 0 26px, transparent 27px),
    linear-gradient(180deg, var(--aqua-soft), #f8fffe 48%, var(--paper));
  font-family: "Inter", Arial, sans-serif;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  z-index: -1;
  pointer-events: none;
}

body::before {
  width: 230px;
  height: 520px;
  left: -82px;
  top: 150px;
  background:
    radial-gradient(circle at 48% 8%, transparent 0 16px, rgba(23, 38, 42, 0.24) 17px 19px, transparent 20px),
    radial-gradient(circle at 64% 30%, transparent 0 25px, rgba(23, 38, 42, 0.22) 26px 28px, transparent 29px),
    radial-gradient(circle at 40% 52%, transparent 0 19px, rgba(23, 38, 42, 0.2) 20px 22px, transparent 23px),
    radial-gradient(circle at 74% 75%, transparent 0 31px, rgba(0, 143, 146, 0.18) 32px 34px, transparent 35px);
}

body::after {
  width: 260px;
  height: 560px;
  right: -96px;
  top: 118px;
  background:
    radial-gradient(circle at 42% 12%, rgba(255, 255, 255, 0.64) 0 25px, transparent 26px),
    radial-gradient(circle at 68% 36%, transparent 0 28px, rgba(23, 38, 42, 0.2) 29px 31px, transparent 32px),
    radial-gradient(circle at 34% 62%, rgba(233, 169, 185, 0.48) 0 46px, transparent 47px),
    radial-gradient(circle at 76% 84%, transparent 0 20px, rgba(23, 38, 42, 0.18) 21px 23px, transparent 24px);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.is-hidden {
  display: none !important;
}

.site-header {
  position: sticky;
  top: 10px;
  z-index: 20;
  padding: 0 0 10px;
  background: transparent;
  pointer-events: none;
}

.navbar {
  width: min(1180px, calc(100% - 40px));
  min-height: 64px;
  margin: 0 auto;
  padding: 0 22px 0 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--white);
  background: rgba(17, 25, 28, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  box-shadow: 0 16px 34px rgba(14, 29, 32, 0.2);
  backdrop-filter: blur(18px);
  pointer-events: auto;
  transition: min-height 0.25s ease, width 0.25s ease, padding 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.site-header.is-scrolled .navbar {
  width: min(1040px, calc(100% - 64px));
  min-height: 52px;
  padding: 0 18px 0 20px;
  background: rgba(17, 25, 28, 0.88);
  box-shadow: 0 12px 28px rgba(14, 29, 32, 0.16);
}

body.panel-active .site-header .navbar:not(.panel-top-navbar) {
  display: none;
}

.panel-top-navbar {
  justify-content: space-between;
}

.panel-top-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.panel-back-link {
  min-height: 40px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  font-weight: 900;
}

.brand {
  flex: 0 0 auto;
}

.brand img {
  width: 108px;
  border: 0;
  border-radius: 12px;
  box-shadow: none;
  transition: width 0.25s ease, border-radius 0.25s ease;
}

.site-header.is-scrolled .brand img {
  width: 88px;
  border-radius: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--nav-muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links a {
  padding: 10px 12px;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--white);
  background: rgba(255, 255, 255, 0.08);
}

.nav-links a.is-active {
  box-shadow: none;
}

.nav-cta,
.button {
  border: 2px solid var(--ink);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 24px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.navbar .nav-cta {
  min-height: 40px;
  padding: 0 22px;
  color: var(--white);
  background: #516074;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.navbar .nav-cta:hover {
  background: #607086;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.site-header.is-scrolled .navbar .nav-cta {
  min-height: 36px;
  padding: 0 18px;
}

.nav-cta,
.button-primary {
  color: var(--white);
  background: var(--ink-strong);
  box-shadow: 5px 5px 0 var(--blush);
}

.nav-cta:hover,
.button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 8px 8px 0 var(--blush);
}

.button-secondary {
  color: var(--ink);
  background: var(--white);
  box-shadow: 5px 5px 0 var(--ink-soft);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--white);
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.hero,
.page-hero,
.cta-strip,
.contact,
.about-panel,
.process {
  width: min(1180px, calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 10px 10px 0 var(--ink-soft);
}

.hero {
  position: relative;
  overflow: hidden;
  width: min(1280px, calc(100% - 40px));
  margin-top: 34px;
  padding: 76px;
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  align-items: center;
  gap: 54px;
  background: linear-gradient(135deg, var(--aqua), #c8efee);
}

.hero::before {
  content: "Swim into English";
  position: absolute;
  right: 54px;
  bottom: 24px;
  color: rgba(23, 38, 42, 0.12);
  font-family: "Patrick Hand", cursive;
  font-size: clamp(3rem, 8vw, 6.5rem);
  transform: rotate(-4deg);
}

.bubble {
  position: absolute;
  border: 3px solid rgba(233, 169, 185, 0.82);
  border-radius: 50%;
  background: rgba(253, 234, 240, 0.26);
}

.bubble-one {
  width: 58px;
  height: 58px;
  left: 36px;
  top: 54px;
}

.bubble-two {
  width: 32px;
  height: 32px;
  right: 38%;
  top: 36px;
}

.hero-content,
.hero-visual {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--aqua-deep);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 24px;
  font-size: clamp(3rem, 7vw, 6.2rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.45rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

h3 {
  margin-bottom: 12px;
  font-size: 1.25rem;
}

.hero-text,
.page-hero p,
.section-heading p:not(.eyebrow),
.card p,
.feature p,
.course-card p,
.contact p,
.about-panel p,
.process p,
.contact-info span {
  color: var(--muted);
  line-height: 1.75;
}

.hero-text {
  max-width: 610px;
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-visual {
  display: grid;
  justify-items: center;
  gap: 22px;
}

.hero-visual img,
.logo-panel img {
  width: min(100%, 430px);
  border: 2px solid var(--ink);
  border-radius: 28px;
  box-shadow: 12px 12px 0 var(--ink-soft);
}

.swim-card {
  width: min(100%, 380px);
  padding: 20px;
  color: var(--white);
  background: var(--ink-strong);
  border-radius: 24px;
  transform: rotate(-2deg);
}

.swim-card span {
  display: block;
  color: var(--blush);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
}

.swim-card strong {
  display: block;
  margin-top: 8px;
  font-family: "Patrick Hand", cursive;
  font-size: 2.1rem;
}

.stats {
  width: min(1040px, calc(100% - 40px));
  margin: -34px auto 90px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.stats article,
.card,
.feature,
.course-card,
.contact-form,
.contact-info article {
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: 6px 6px 0 var(--ink-soft);
}

.stats article {
  padding: 28px;
}

.stats strong {
  display: block;
  margin-bottom: 6px;
  color: var(--aqua-deep);
  text-shadow: 3px 3px 0 var(--blush-soft);
  font-size: 2.2rem;
  line-height: 1;
}

.stats span {
  color: var(--muted);
  font-weight: 800;
}

.section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 110px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 38px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  padding: 30px;
}

.link-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.link-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 10px 10px 0 var(--ink-soft);
}

.card-icon {
  display: inline-grid;
  min-width: 58px;
  height: 58px;
  margin-bottom: 28px;
  padding: 0 12px;
  place-items: center;
  color: var(--ink);
  background: linear-gradient(135deg, var(--aqua), var(--blush));
  border: 2px solid var(--ink);
  border-radius: 18px;
  font-weight: 900;
}

.page-hero {
  position: relative;
  overflow: hidden;
  margin-top: 38px;
  margin-bottom: 90px;
  padding: 74px;
  background:
    radial-gradient(circle at 74% 72%, rgba(233, 169, 185, 0.58) 0 48px, transparent 49px),
    radial-gradient(circle at 92% 20%, rgba(255, 255, 255, 0.72) 0 34px, transparent 35px),
    radial-gradient(circle at 8% 72%, rgba(255, 255, 255, 0.46) 0 24px, transparent 25px),
    var(--aqua);
}

.page-hero p {
  max-width: 760px;
  font-size: 1.1rem;
}

.split-hero {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 42px;
  align-items: center;
}

.logo-panel {
  display: grid;
  place-items: center;
}

.about-panel,
.process,
.cta-strip,
.contact {
  margin-bottom: 110px;
  padding: 54px;
  background: var(--paper);
}

.about-panel {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 40px;
  align-items: center;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.feature {
  padding: 26px;
}

.feature h3::before {
  content: "";
  display: block;
  width: 48px;
  height: 10px;
  margin-bottom: 22px;
  background: var(--aqua);
  border: 2px solid var(--ink);
  border-radius: 999px;
}

.large-feature {
  min-height: 250px;
}

.course-list {
  display: grid;
  gap: 22px;
}

.course-card {
  padding: 28px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  align-items: start;
}

.course-card h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.process-grid article {
  padding: 26px;
  border-radius: var(--radius-md);
  background: var(--aqua-soft);
}

.process-grid span {
  display: inline-grid;
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  place-items: center;
  color: var(--white);
  background: var(--ink-strong);
  border-radius: 50%;
  font-weight: 900;
}

.cta-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: var(--aqua);
}

.cta-strip h2 {
  margin-bottom: 0;
}

.contact {
  display: grid;
  grid-template-columns: 0.85fr 1fr;
  gap: 46px;
  align-items: start;
}

.page-contact {
  margin-top: 38px;
}

.contact-info {
  display: grid;
  gap: 14px;
  margin-top: 34px;
}

.contact-info article {
  padding: 18px;
}

.contact-info strong {
  display: block;
  margin-bottom: 6px;
}

.contact-form {
  padding: 28px;
  display: grid;
  gap: 18px;
}

.contact-form label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-weight: 900;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 15px 16px;
  color: var(--ink);
  background: #fbfbfb;
  font: inherit;
}

.contact-form select,
.login-form select,
.create-user-form select,
.modal-form select {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 15px 16px;
  color: var(--ink);
  background: #fbfbfb;
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
}

.login-section {
  width: min(1180px, calc(100% - 40px));
  margin: 38px auto 110px;
  padding: 58px;
  display: grid;
  grid-template-columns: 0.95fr 0.75fr;
  gap: 48px;
  align-items: center;
  background:
    radial-gradient(circle at 8% 16%, rgba(255, 255, 255, 0.62) 0 34px, transparent 35px),
    radial-gradient(circle at 92% 78%, rgba(255, 255, 255, 0.52) 0 48px, transparent 49px),
    linear-gradient(135deg, var(--aqua), #d7f5f4);
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 10px 10px 0 var(--ink-soft);
}

.login-copy p:not(.eyebrow) {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.75;
}

.login-note {
  max-width: 520px;
  margin-top: 30px;
  padding: 20px;
  display: grid;
  gap: 6px;
  background: rgba(255, 255, 255, 0.65);
  border: 2px solid var(--ink);
  border-radius: 22px;
}

.login-note span,
.login-small {
  color: var(--muted);
  line-height: 1.6;
}

.login-form {
  padding: 30px;
  display: grid;
  gap: 18px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 28px;
  box-shadow: 8px 8px 0 var(--ink-soft);
}

.login-logo img {
  width: 150px;
  border: 2px solid var(--ink);
  border-radius: 16px;
}

.login-form h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.login-form p {
  margin-bottom: 8px;
  color: var(--muted);
}

.login-form label {
  display: grid;
  gap: 8px;
  font-weight: 900;
}

.login-form input[type="email"],
.login-form input[type="password"],
.create-user-form input,
.modal-form input {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 15px 16px;
  color: var(--ink);
  background: #fbfbfb;
  font: inherit;
}

.login-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.login-options a {
  color: var(--aqua-deep);
}

.check-row {
  display: inline-flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
}

.check-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--aqua-deep);
}

.account-dashboard {
  width: min(1560px, calc(100% - 36px));
  margin: 18px auto 110px;
  padding: 0;
  background: transparent;
}

.panel-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: start;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}

.dashboard-content,
.panel-menu {
  border: 2px solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: 10px 10px 0 var(--ink-soft);
}

.dashboard-content {
  padding: 42px;
  background: var(--paper);
}

.dashboard-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 30px;
}

.panel-menu {
  position: static;
  padding: 24px;
  display: grid;
  align-items: stretch;
  gap: 12px;
  color: var(--white);
  background:
    radial-gradient(circle at 88% 12%, rgba(155, 217, 215, 0.12) 0 40px, transparent 41px),
    var(--nav-dark);
}

.panel-menu-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  margin-right: 0;
  white-space: nowrap;
}

.menu-icon,
.panel-menu-item .panel-icon {
  color: var(--aqua);
  font-weight: 900;
}

.panel-menu-divider {
  width: 100%;
  height: 1px;
  margin: 8px 0;
  background: rgba(155, 217, 215, 0.28);
}

.panel-menu-item {
  width: 100%;
  min-height: 50px;
  margin-bottom: 0;
  padding: 0 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255, 255, 255, 0.78);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  text-align: left;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.panel-top-navbar .panel-menu-item {
  width: auto;
  min-height: 40px;
  padding: 0 14px;
  color: var(--nav-muted);
  background: transparent;
}

.panel-top-navbar .panel-menu-item.panel-logout {
  color: #ff7b7b;
}

.panel-menu-item:hover,
.panel-menu-item.is-active {
  color: var(--ink);
  background: linear-gradient(135deg, var(--aqua), var(--blush-soft));
  border-color: rgba(255, 255, 255, 0.24);
}

.panel-menu-item:hover .panel-icon,
.panel-menu-item.is-active .panel-icon {
  color: var(--ink);
}

.panel-logout {
  color: #ff6b6b;
}

.panel-logout:hover,
#logout-button:hover {
  color: var(--white);
  background: #d93025;
  border-color: #d93025;
}

.panel-logout:hover .panel-icon {
  color: var(--white);
}

.dashboard-heading p:not(.eyebrow),
.panel-section p,
.admin-card p {
  color: var(--muted);
  line-height: 1.7;
}

.panel-icon {
  position: relative;
  width: 20px;
  height: 20px;
  display: inline-block;
  flex: 0 0 20px;
}

.panel-icon::before,
.panel-icon::after {
  content: "";
  position: absolute;
  inset: auto;
  background: currentColor;
}

.icon-profile::before {
  width: 8px;
  height: 8px;
  left: 6px;
  top: 2px;
  border-radius: 50%;
}

.icon-profile::after {
  width: 16px;
  height: 8px;
  left: 2px;
  bottom: 2px;
  border-radius: 9px 9px 3px 3px;
}

.icon-calendar::before {
  width: 16px;
  height: 14px;
  left: 2px;
  top: 4px;
  border-radius: 4px;
}

.icon-calendar::after {
  width: 16px;
  height: 2px;
  left: 2px;
  top: 8px;
  background: var(--nav-dark);
}

.icon-users::before {
  width: 16px;
  height: 10px;
  left: 2px;
  top: 7px;
  border-radius: 3px;
}

.icon-users::after {
  width: 16px;
  height: 3px;
  left: 2px;
  top: 3px;
  box-shadow: 0 10px 0 currentColor;
}

.icon-logout::before {
  width: 13px;
  height: 10px;
  left: 2px;
  top: 5px;
  border: 3px solid currentColor;
  border-right: 0;
  background: transparent;
}

.icon-logout::after {
  width: 10px;
  height: 10px;
  right: 1px;
  top: 5px;
  background: transparent;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transform: rotate(45deg);
}

.profile-card,
.info-card,
.admin-card {
  padding: 28px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: var(--radius-md);
  box-shadow: 6px 6px 0 var(--blush);
}

.profile-card {
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: linear-gradient(135deg, var(--aqua), var(--blush));
  border: 2px solid var(--ink);
  border-radius: 50%;
  font-size: 2rem;
  font-weight: 900;
}

.admin-panel {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 22px;
}

.groups-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.groups-list {
  display: grid;
  gap: 16px;
}

.group-card {
  padding: 20px;
  background: linear-gradient(135deg, var(--aqua-soft), var(--blush-soft));
  border: 2px solid var(--ink);
  border-radius: 20px;
}

.group-card-header,
.group-member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.group-card-header {
  margin-bottom: 16px;
}

.group-card h4 {
  margin: 0;
  font-size: 1.25rem;
}

.group-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 14px;
}

.group-controls select {
  width: 100%;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 12px 13px;
  color: var(--ink);
  background: #fbfbfb;
  font: inherit;
}

.group-members {
  display: grid;
  gap: 8px;
}

.group-member-row {
  padding: 10px 12px;
  background: var(--white);
  border: 1px solid rgba(33, 54, 59, 0.18);
  border-radius: 14px;
}

.mini-action {
  border: 0;
  color: #d93025;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.create-user-form {
  margin-top: 22px;
  display: grid;
  gap: 16px;
}

.create-user-form label {
  display: grid;
  gap: 8px;
  font-weight: 900;
}

.user-list {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.user-row {
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--aqua-soft);
  border: 2px solid var(--ink);
  border-radius: 18px;
}

.user-row {
  cursor: context-menu;
}

.user-row strong,
.user-row span {
  display: block;
}

.user-row span {
  color: var(--muted);
  font-size: 0.9rem;
}

.role-badge {
  padding: 8px 13px;
  color: var(--white);
  background: var(--ink-strong);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.schedule-heading {
  margin-bottom: 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.calendar-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 16px;
}

.calendar-sidebar,
.calendar-main {
  background: var(--white);
  border: 1px solid rgba(33, 54, 59, 0.18);
  border-radius: 18px;
  box-shadow: 0 8px 28px rgba(33, 54, 59, 0.08);
}

.calendar-sidebar {
  padding: 16px;
  overflow: hidden;
}

.calendar-create {
  width: 100%;
  min-height: 42px;
  margin-bottom: 18px;
  border: 1px solid rgba(33, 54, 59, 0.34);
  border-radius: 12px;
  color: var(--ink);
  background: linear-gradient(135deg, var(--aqua), #c9eeee);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  box-shadow: 0 3px 0 rgba(33, 54, 59, 0.18);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.calendar-create:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 0 rgba(33, 54, 59, 0.18);
}

.mini-calendar-title,
.calendar-list h4 {
  margin-bottom: 12px;
  font-weight: 900;
}

.mini-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px 2px;
  width: 100%;
  margin-bottom: 22px;
}

.mini-day-label,
.mini-day {
  width: 100%;
  max-width: 30px;
  min-width: 0;
  min-height: 28px;
  display: grid;
  place-items: center;
  justify-self: center;
  font-size: 0.78rem;
}

.mini-day-label {
  color: var(--muted);
  font-weight: 900;
}

.mini-day {
  border: 0;
  border-radius: 50%;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.mini-day.is-muted {
  color: rgba(83, 99, 102, 0.42);
}

.mini-day.is-week {
  background: var(--blush-soft);
}

.mini-day.is-today {
  color: var(--white);
  background: var(--aqua-deep);
  box-shadow: 0 0 0 4px var(--blush-soft);
}

.calendar-list {
  display: grid;
  gap: 10px;
}

.calendar-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.calendar-list input {
  accent-color: var(--aqua-deep);
}

.calendar-main {
  overflow: hidden;
  min-width: 0;
}

.calendar-toolbar {
  min-height: 64px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(33, 54, 59, 0.14);
  background: linear-gradient(180deg, #fff, #fbfffe);
}

.calendar-nav-button,
.calendar-icon-button,
.calendar-view-pill {
  border: 1px solid rgba(33, 54, 59, 0.22);
  border-radius: 999px;
  background: var(--white);
  font: inherit;
  font-weight: 900;
}

.calendar-nav-button {
  padding: 8px 14px;
  cursor: pointer;
}

.calendar-nav-group {
  display: flex;
  gap: 6px;
}

.calendar-icon-button {
  width: 36px;
  height: 36px;
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.calendar-view-pill {
  margin-left: auto;
  padding: 8px 14px;
  color: var(--aqua-deep);
  background: linear-gradient(135deg, var(--aqua-soft), var(--blush-soft));
}

.schedule-grid {
  max-height: min(72vh, 760px);
  overflow: auto;
  border: 0;
  border-radius: 0;
  background: var(--white);
  scrollbar-color: var(--aqua-deep) rgba(33, 54, 59, 0.12);
  scrollbar-width: thin;
}

.schedule-grid::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.schedule-grid::-webkit-scrollbar-track {
  background: rgba(33, 54, 59, 0.12);
  border-radius: 999px;
}

.schedule-grid::-webkit-scrollbar-thumb {
  background: var(--aqua-deep);
  border-radius: 999px;
}

.mobile-schedule {
  display: none;
}

.calendar-week {
  width: 100%;
  min-width: calc(74px + (7 * var(--calendar-day-width, 128px)));
}

.calendar-week-header {
  position: sticky;
  top: 0;
  z-index: 9;
  display: grid;
  grid-template-columns: 74px repeat(7, minmax(var(--calendar-day-width, 128px), 1fr));
  width: 100%;
  background: #fff;
  border-bottom: 1px solid rgba(33, 54, 59, 0.14);
}

.calendar-week-body {
  display: grid;
  grid-template-columns: 74px repeat(7, minmax(var(--calendar-day-width, 128px), 1fr));
  width: 100%;
}

.calendar-time-axis {
  position: sticky;
  left: 0;
  z-index: 4;
  grid-column: 1;
  grid-row: 1;
  border-right: 1px solid rgba(33, 54, 59, 0.1);
  background: #fff;
}

.time-label {
  position: absolute;
  right: 8px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.calendar-days-grid {
  display: contents;
}

.calendar-day-column {
  position: relative;
  grid-row: 1;
  border-right: 1px solid rgba(33, 54, 59, 0.1);
  cursor: context-menu;
}

.calendar-day-column.is-today {
  background: rgba(223, 247, 246, 0.28);
}

.calendar-day-column.is-drop-target,
.calendar-day-column.is-context-target {
  background: rgba(155, 217, 215, 0.16);
  box-shadow: inset 0 0 0 1px var(--aqua-deep);
}

.hour-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(33, 54, 59, 0.1);
  pointer-events: none;
}

.schedule-table {
  min-width: 1200px;
  display: grid;
  grid-template-columns: 74px repeat(7, minmax(155px, 1fr));
}

.schedule-cell {
  min-width: 0;
  min-height: 82px;
  padding: 6px;
  display: grid;
  gap: 6px;
  align-content: start;
  border-right: 1px solid rgba(33, 54, 59, 0.1);
  border-bottom: 1px solid rgba(33, 54, 59, 0.1);
}

.schedule-head,
.day-cell {
  display: grid;
  place-items: center;
  background: #fff;
  font-weight: 900;
}

.calendar-corner {
  position: sticky;
  left: 0;
  z-index: 10;
  min-height: 62px;
  padding: 8px 4px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  background: #fff;
}

.day-head {
  min-height: 62px;
  gap: 2px;
  display: grid;
  place-items: center;
  font-weight: 900;
  background: #fff;
}

.day-head span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.day-head strong {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-size: 1rem;
}

.day-head.is-today strong {
  color: var(--white);
  background: var(--aqua-deep);
}

.period-head {
  position: sticky;
  left: 0;
  z-index: 5;
  gap: 2px;
  align-content: start;
  justify-items: end;
  padding-top: 9px;
  text-align: center;
  cursor: context-menu;
  box-shadow: 0 0 0 rgba(33, 54, 59, 0);
  transition: background 0.18s ease, box-shadow 0.22s ease;
}

.period-head:hover,
.period-head.is-context-target {
  background: var(--aqua-soft);
  box-shadow: inset 0 0 0 2px var(--aqua-deep);
}

.schedule-grid.is-scrolled-x .calendar-time-axis,
.schedule-grid.is-scrolled-x .calendar-corner {
  box-shadow: 10px 0 18px rgba(33, 54, 59, 0.12);
}

.period-head span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.1;
}

.period-head small {
  color: rgba(83, 99, 102, 0.68);
  font-size: 0.58rem;
  font-weight: 700;
}

.day-cell {
  font-size: 1.6rem;
}

.lesson-block {
  position: absolute;
  left: 4px;
  right: 4px;
  min-width: 0;
  min-height: 28px;
  padding: 6px 8px 6px 12px;
  display: grid;
  gap: 2px;
  align-content: start;
  overflow: hidden;
  border: 1px solid rgba(33, 54, 59, 0.12);
  border-radius: 7px;
  color: var(--ink);
  cursor: default;
  box-shadow: 0 1px 2px rgba(33, 54, 59, 0.14);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
  z-index: 2;
}

.lesson-block.can-delete {
  cursor: grab;
}

.lesson-block:hover {
  z-index: 3;
  filter: saturate(1.08);
  box-shadow: 0 5px 13px rgba(33, 54, 59, 0.2);
  transform: translateY(-1px);
}

.lesson-color-dot {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: rgba(33, 54, 59, 0.46);
}

.lesson-block.is-dragging,
.mobile-lesson.is-dragging {
  opacity: 0.55;
}

.lesson-subject {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.lesson-time {
  color: rgba(33, 54, 59, 0.74);
  font-size: 0.66rem;
  font-weight: 700;
  white-space: nowrap;
}

.lesson-meta {
  display: block;
  color: rgba(33, 54, 59, 0.75);
  font-size: 0.64rem;
  font-weight: 800;
}

.lesson-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-files {
  margin-top: 2px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 4px;
}

.lesson-files-label {
  display: none;
  color: rgba(33, 54, 59, 0.66);
  font-size: 0.58rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.lesson-file-link {
  max-width: 100%;
  min-height: 19px;
  padding: 2px 6px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(33, 54, 59, 0.22);
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-size: 0.6rem;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lesson-file-link span {
  width: 8px;
  height: 10px;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  border-radius: 2px;
  box-shadow: 2px 2px 0 var(--blush-soft);
}

.lesson-file-link:hover {
  background: var(--blush-soft);
}

.lesson-block.is-compact-with-files {
  padding-top: 3px;
  padding-bottom: 3px;
  gap: 0;
}

.lesson-block.is-compact-with-files .lesson-subject {
  font-size: 0.72rem;
  line-height: 1.05;
}

.lesson-block.is-compact-with-files .lesson-time {
  font-size: 0.58rem;
  line-height: 1.05;
}

.lesson-block.is-compact-with-files .lesson-meta {
  display: none;
}

.lesson-block.is-compact-with-files .lesson-files {
  margin-top: 2px;
  gap: 2px;
}

.lesson-block.is-compact-with-files .lesson-file-link {
  min-height: 15px;
  padding: 1px 5px;
  gap: 4px;
  font-size: 0.54rem;
}

.lesson-block.is-compact-with-files .lesson-file-link span {
  width: 7px;
  height: 8px;
}

.lesson-empty {
  min-height: 48px;
}

.schedule-slot {
  cursor: context-menu;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.schedule-slot.is-today {
  background: rgba(223, 247, 246, 0.34);
}

.schedule-slot:hover,
.schedule-slot.is-context-target,
.schedule-slot.is-drop-target {
  background: rgba(155, 217, 215, 0.14);
  box-shadow: inset 0 0 0 1px var(--aqua-deep);
}

.lesson-color-0 { background: #9bd9d7; }
.lesson-color-1 { background: #c9f3cb; }
.lesson-color-2 { background: #fff7b2; }
.lesson-color-3 { background: #cdd9ff; }
.lesson-color-4 { background: #f5cfcf; }
.lesson-color-5 { background: #e7d6ff; }
.lesson-color-6 { background: #ffc4dc; }

.mobile-day-card {
  padding: 14px;
  display: grid;
  gap: 12px;
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 20px;
}

.mobile-day-card.is-today {
  border-color: var(--aqua-deep);
  box-shadow: 5px 5px 0 rgba(0, 143, 146, 0.24);
}

.mobile-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-day-head span {
  color: var(--muted);
  font-weight: 900;
}

.mobile-day-head strong {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--white);
  background: var(--aqua-deep);
  border-radius: 50%;
}

.mobile-period-row {
  padding-top: 12px;
  display: grid;
  gap: 10px;
  border-top: 1px solid rgba(33, 54, 59, 0.14);
  border-radius: 14px;
  transition: background 0.18s ease, box-shadow 0.18s ease;
}

.mobile-period-row:hover,
.mobile-period-row.is-drop-target {
  background: rgba(155, 217, 215, 0.18);
  box-shadow: inset 0 0 0 2px var(--aqua-deep);
}

.mobile-period-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 900;
}

.mobile-period-time button,
.mobile-empty-add,
.mobile-lesson-actions button {
  border: 1px solid rgba(33, 54, 59, 0.22);
  border-radius: 999px;
  background: var(--white);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.mobile-period-time button {
  padding: 7px 10px;
  color: var(--aqua-deep);
}

.mobile-period-time button:disabled {
  cursor: default;
  opacity: 0.65;
}

.mobile-period-lessons {
  display: grid;
  gap: 8px;
}

.mobile-empty-add {
  width: 100%;
  padding: 10px 12px;
  color: var(--ink);
  background: var(--aqua-soft);
}

.mobile-empty-text {
  margin: 0;
  color: var(--muted);
}

.mobile-lesson {
  padding: 12px;
  display: grid;
  gap: 10px;
  border: 2px solid rgba(33, 54, 59, 0.22);
  border-radius: 16px;
  cursor: grab;
  touch-action: none;
}

.mobile-lesson .lesson-files {
  justify-content: flex-start;
}

.mobile-lesson strong,
.mobile-lesson span {
  display: block;
}

.mobile-lesson span {
  color: rgba(33, 54, 59, 0.72);
  font-size: 0.84rem;
  font-weight: 900;
}

.mobile-lesson-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-lesson-actions button {
  padding: 8px 12px;
}

.mobile-lesson-actions button:last-child {
  color: #d93025;
}

.schedule-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: start center;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  padding: 24px 20px;
  overflow-x: hidden;
  overflow-y: scroll;
  background: rgba(24, 41, 46, 0.48);
  backdrop-filter: blur(8px);
  overscroll-behavior: contain;
}

.schedule-modal-card {
  position: relative;
  width: min(480px, 100%);
  margin: 0 auto 24px;
  overflow: visible;
  padding: 30px;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 28px;
  box-shadow: 10px 10px 0 var(--ink-soft);
}

.schedule-modal-card h3 {
  margin-bottom: 18px;
  font-size: 1.7rem;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
}

.modal-form {
  display: grid;
  gap: 14px;
}

.modal-form label {
  display: grid;
  gap: 8px;
  font-weight: 900;
}

.modal-form input[type="color"] {
  width: 100%;
  height: 52px;
  padding: 6px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  background: var(--white);
  cursor: pointer;
}

.lesson-time-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.attachment-panel {
  padding: 14px;
  display: grid;
  gap: 10px;
  background: linear-gradient(135deg, var(--aqua-soft), var(--blush-soft));
  border: 2px solid var(--ink);
  border-radius: 18px;
}

.attachment-panel > strong {
  font-size: 1rem;
}

.attachment-panel p,
.attachment-panel small {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.file-upload {
  min-height: 46px;
  padding: 0 14px;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  background: var(--white);
  border: 2px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--blush);
}

.file-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.attachment-list {
  display: grid;
  gap: 8px;
}

.selected-attachments {
  padding: 10px;
  display: grid;
  gap: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px dashed var(--ink);
  border-radius: 14px;
}

.selected-attachments > strong {
  font-size: 0.9rem;
}

.selected-attachment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 900;
}

.selected-attachment-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-attachment-row small {
  flex: 0 0 auto;
  color: var(--muted);
}

.attachment-row {
  padding: 10px;
  display: grid !important;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(33, 54, 59, 0.18);
  border-radius: 14px;
}

.attachment-row span,
.attachment-row small {
  min-width: 0;
}

.attachment-row strong,
.attachment-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-row em {
  color: var(--muted);
  font-size: 0.78rem;
  font-style: normal;
}

.user-picker {
  display: grid;
  gap: 8px;
}

.user-picker-list {
  max-height: 178px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding: 8px;
  background: var(--aqua-soft);
  border: 2px solid var(--ink);
  border-radius: 16px;
}

.user-picker-option {
  min-height: 48px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid rgba(33, 54, 59, 0.18);
  border-radius: 12px;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.user-picker-option:hover,
.user-picker-option.is-selected {
  background: var(--aqua);
}

.user-picker-option span {
  color: var(--muted);
  font-size: 0.82rem;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
}

.button-danger {
  color: var(--white);
  background: #d93025;
  border-color: #d93025;
  box-shadow: 5px 5px 0 rgba(217, 48, 37, 0.28);
}

.modal-help {
  margin: 0 0 16px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-loading {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 48% 40%, rgba(155, 217, 215, 0.26), transparent 18%),
    radial-gradient(circle at 56% 52%, rgba(0, 143, 146, 0.18), transparent 22%),
    rgba(24, 41, 46, 0.88);
  backdrop-filter: blur(12px);
}

.auth-loading-card {
  position: relative;
  width: min(440px, calc(100% - 40px));
  display: grid;
  justify-items: center;
  gap: 28px;
  isolation: isolate;
}

.auth-loading-card::before,
.auth-loading-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  border: 2px solid rgba(155, 217, 215, 0.45);
  animation: loadingBubble 1.2s ease-in-out infinite alternate;
}

.auth-loading-card::before {
  width: 82px;
  height: 82px;
  left: 36px;
  top: -24px;
}

.auth-loading-card::after {
  width: 118px;
  height: 118px;
  right: 22px;
  bottom: 18px;
  animation-delay: 0.25s;
}

.auth-loading-card img {
  width: 190px;
  border: 2px solid var(--ink);
  border-radius: 22px;
  box-shadow:
    0 0 44px rgba(155, 217, 215, 0.36),
    8px 8px 0 rgba(155, 217, 215, 0.32);
  animation: loadingLogo 0.9s ease-in-out infinite alternate;
}

.auth-loading-bar {
  width: 100%;
  height: 16px;
  overflow: hidden;
  background: rgba(15, 23, 26, 0.55);
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(155, 217, 215, 0.16);
}

.auth-loading-bar span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--aqua), var(--aqua-deep));
  border-radius: inherit;
  transform-origin: left center;
  animation: authLoad 0.3s ease-out forwards;
}

@keyframes authLoad {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}

@keyframes loadingLogo {
  from {
    transform: translateY(0) scale(1);
  }
  to {
    transform: translateY(-5px) scale(1.025);
  }
}

@keyframes loadingBubble {
  from {
    opacity: 0.35;
    transform: translateY(0) scale(0.92);
  }
  to {
    opacity: 0.82;
    transform: translateY(-10px) scale(1.06);
  }
}

.toast-stack {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 160;
  width: min(380px, calc(100% - 32px));
  display: grid;
  gap: 12px;
  pointer-events: none;
}

.toast {
  position: relative;
  overflow: hidden;
  padding: 16px;
  display: grid;
  gap: 10px;
  color: var(--ink);
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 20px;
  box-shadow:
    0 18px 42px rgba(24, 41, 46, 0.2),
    8px 8px 0 var(--ink-soft);
  pointer-events: auto;
  animation: toastIn 0.28s cubic-bezier(.2,.85,.25,1.15);
}

.toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--aqua-deep);
}

.toast::after {
  content: "";
  position: absolute;
  right: -30px;
  top: -30px;
  width: 92px;
  height: 92px;
  background: rgba(155, 217, 215, 0.24);
  border-radius: 50%;
}

.toast strong {
  display: block;
  margin-bottom: 4px;
}

.toast p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.toast-success {
  border-color: var(--aqua-deep);
}

.toast-success::before {
  background: var(--aqua-deep);
}

.toast-error {
  border-color: var(--blush);
}

.toast-error::before {
  background: var(--blush);
}

.toast.is-leaving {
  animation: toastOut 0.18s ease-in forwards;
}

.toast-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.toast-actions button {
  min-height: 36px;
  padding: 0 14px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
}

.toast-actions .toast-danger {
  color: var(--ink);
  background: var(--blush-soft);
  border-color: var(--blush);
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateX(24px) translateY(-8px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateX(24px) scale(0.96);
  }
}

.footer {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 34px;
  padding: 32px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  border-top: 2px solid var(--ink);
}

.footer img {
  width: 118px;
  border: 2px solid var(--ink);
  border-radius: 14px;
}

.footer p {
  margin: 0;
}

@media (max-width: 1280px) {
  .account-dashboard {
    width: min(100% - 28px, 1560px);
  }

  .dashboard-content {
    padding: 30px;
  }

  .panel-workspace {
    grid-template-columns: 1fr;
  }

  .calendar-shell {
    grid-template-columns: 270px minmax(0, 1fr);
  }

  .schedule-table {
    min-width: 1260px;
  }
}

@media (max-width: 1180px) {
  .site-header {
    top: 6px;
  }

  .panel-top-navbar {
    width: min(100% - 16px, 1180px);
    padding: 8px 10px;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .panel-top-navbar::-webkit-scrollbar {
    display: none;
  }

  .panel-back-link,
  .panel-top-navbar .panel-menu-item {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 14px;
    white-space: nowrap;
  }

  .panel-top-links {
    flex: 1 1 auto;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .panel-top-links::-webkit-scrollbar {
    display: none;
  }

  .account-dashboard {
    width: min(100% - 18px, 1180px);
    margin-top: 10px;
  }

  .dashboard-content {
    padding: 22px;
    border-radius: 26px;
    box-shadow: 6px 6px 0 var(--ink-soft);
  }

  .calendar-shell {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .calendar-sidebar {
    display: grid;
    grid-template-columns: minmax(190px, 240px) minmax(220px, 1fr) minmax(180px, 220px);
    gap: 14px;
    align-items: start;
    padding: 14px;
  }

  .calendar-create {
    grid-column: auto;
    margin-bottom: 0;
  }

  .mini-calendar-grid {
    margin-bottom: 0;
  }

  .calendar-main {
    min-width: 0;
  }

  .calendar-toolbar {
    min-height: 58px;
    padding: 10px 12px;
    gap: 10px;
  }

  .schedule-table {
    min-width: 1060px;
    grid-template-columns: 78px repeat(7, minmax(130px, 1fr));
  }
}

@media (max-width: 1040px) {
  .nav-links {
    gap: 6px;
    font-size: 0.88rem;
  }

  .nav-links a {
    padding: 9px 10px;
  }
}

@media (max-width: 940px) {
  .navbar {
    min-height: 62px;
  }

  .brand img {
    width: 96px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    position: absolute;
    left: 20px;
    right: 20px;
    top: 74px;
    display: none;
    padding: 20px;
    flex-direction: column;
    align-items: stretch;
    background: var(--white);
    border: 2px solid var(--ink);
    border-radius: 20px;
    box-shadow: 8px 8px 0 var(--ink-soft);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-cta {
    display: none;
  }

  .hero,
  .split-hero,
  .about-panel,
  .contact,
  .login-section,
  .panel-workspace,
  .dashboard-layout,
  .admin-panel,
  .calendar-shell,
  .group-controls {
    grid-template-columns: 1fr;
  }

  .calendar-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .calendar-sidebar {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 18px;
    align-items: start;
  }

  .mini-calendar {
    width: 100%;
  }

  .calendar-create {
    grid-column: 1 / -1;
  }

  .calendar-view-pill {
    margin-left: 0;
  }

  .schedule-table {
    min-width: 1120px;
    grid-template-columns: 78px repeat(7, minmax(120px, 1fr));
  }

  .schedule-grid {
    display: none;
  }

  .mobile-schedule {
    display: grid;
    gap: 14px;
    padding-top: 14px;
  }

  .calendar-main {
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .panel-menu {
    flex-wrap: wrap;
    display: flex;
  }

  .panel-top-navbar {
    align-items: center;
    flex-wrap: wrap;
    border-radius: 26px;
    padding: 12px 16px;
  }

  .panel-top-links {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .panel-menu-divider {
    display: none;
  }

  .hero,
  .page-hero {
    padding: 42px;
  }

  .stats,
  .cards,
  .feature-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    margin-top: 24px;
  }

  .cta-strip {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  .navbar,
  .hero,
  .page-hero,
  .section,
  .about-panel,
  .contact,
  .cta-strip,
  .process,
  .login-section,
  .account-dashboard,
  .dashboard-content,
  .footer,
  .stats {
    width: min(100% - 28px, 1180px);
  }

  .hero,
  .page-hero,
  .about-panel,
  .contact,
  .cta-strip,
  .process,
  .login-section,
  .account-dashboard,
  .dashboard-content,
  .panel-menu {
    padding: 28px;
    border-radius: 26px;
    box-shadow: 6px 6px 0 var(--ink-soft);
  }

  .account-dashboard {
    padding: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .login-options {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-heading,
  .user-row,
  .profile-card,
  .schedule-heading,
  .groups-heading,
  .group-card-header,
  .group-member-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-card {
    grid-template-columns: 1fr;
  }

  .panel-menu {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .panel-top-navbar {
    width: calc(100% - 16px);
    padding: 8px;
    gap: 6px;
    flex-wrap: wrap;
  }

  .panel-top-links {
    order: 3;
    width: 100%;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .panel-top-links::-webkit-scrollbar {
    display: none;
  }

  .panel-top-navbar .panel-menu-item {
    width: auto;
    flex: 0 0 auto;
  }

  .panel-top-navbar .panel-menu-item,
  .panel-back-link {
    justify-content: center;
  }

  .panel-back-link {
    width: auto;
    flex: 1 1 auto;
  }

  .dashboard-content {
    width: 100%;
    padding: 20px;
  }

  .calendar-sidebar {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .mini-calendar {
    max-width: 100%;
    width: 100%;
  }

  .mini-day-label,
  .mini-day {
    width: 28px;
    min-height: 28px;
    font-size: 0.74rem;
  }

  .calendar-toolbar {
    gap: 10px;
    padding: 12px;
  }

  #calendar-range-label {
    flex: 1 0 100%;
    order: 3;
    font-size: 0.88rem;
  }

  .calendar-view-pill {
    margin-left: auto;
  }

  .calendar-nav-button,
  .calendar-view-pill {
    padding: 8px 12px;
  }

  .schedule-grid {
    display: none;
  }

  .mobile-schedule {
    display: grid;
    gap: 14px;
  }

  .calendar-main {
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  body::before,
  body::after {
    display: none;
  }

  .course-card {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .dashboard-content,
  .calendar-sidebar,
  .calendar-main {
    border-radius: 20px;
  }

  .dashboard-content {
    padding: 12px;
  }

  .mini-calendar {
    max-width: 100%;
  }

  .mini-calendar-grid {
    gap: 3px;
  }

  .mini-day-label,
  .mini-day {
    width: 100%;
    max-width: 28px;
    min-height: 26px;
    font-size: 0.68rem;
  }

  .calendar-toolbar {
    padding: 10px;
    gap: 8px;
  }

  .calendar-nav-button {
    padding-inline: 10px;
  }

  .calendar-view-pill {
    display: none;
  }

  .mobile-day-card {
    padding: 12px;
    border-radius: 16px;
  }

  .schedule-modal {
    padding: 12px;
  }

  .schedule-modal-card {
    padding: 22px;
    border-radius: 22px;
  }

  .modal-actions .button {
    width: 100%;
  }
}
