@import url("https://fonts.googleapis.com/css2?family=Libre+Baskerville:wght@700&family=Nunito+Sans:opsz,wght@6..12,400;6..12,500;6..12,600;6..12,700;6..12,800&display=swap");

:root {
  --blue: #c2185b;
  --blue-2: #f04483;
  --ink: #171015;
  --muted: #6e5d67;
  --line: #ead8e2;
  --panel: #ffffff;
  --soft: #fbf7f9;
  --soft-blue: #fff0f6;
  --red: #c20e15;
  --red-soft: #ffe9e7;
  --green: #16b96f;
  --amber: #c98810;
  --charcoal: #2a1721;
  --lavender: #fff0f6;
  --brand: #c2185b;
  --brand-dark: #74113f;
  --brand-deep: #4c0929;
  --brand-soft: #fff0f6;
  --brand-hot: #ff4f8f;
  --shadow: 0 18px 44px rgba(70, 11, 42, 0.08);
  --shadow-soft: 0 10px 24px rgba(70, 11, 42, 0.06);
  --radius: 18px;
  --header-height: 64px;
  --bottom-nav-height: 72px;
  --font-sans: "Nunito Sans", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Libre Baskerville", Georgia, "Times New Roman", serif;
  font-family: var(--font-sans);
}

* {
  box-sizing: border-box;
}

html {
  background: #fbf7f9;
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  background: #fbf7f9;
  font-family: var(--font-sans);
  font-weight: 500;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: var(--brand);
  text-decoration: none;
}

.is-hidden {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.site-shell {
  min-height: 100vh;
}

.auth-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: clamp(14px, 3vw, 28px);
  gap: 20px;
  background:
    radial-gradient(circle at 0% 0%, rgba(194, 24, 91, 0.12), transparent 24rem),
    linear-gradient(135deg, #fff7fb 0%, #ffffff 48%, #f8edf3 100%);
}

.auth-art {
  display: none;
}

.auth-mobile-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--ink);
  font-size: 22px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  width: 100%;
}

.auth-mobile-brand img {
  width: 46px;
  height: 46px;
  display: block;
  object-fit: contain;
  border-radius: 10px;
}

.auth-card {
  width: min(100%, 620px);
  margin: auto;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #f0d7e3;
  border-radius: 14px;
  padding: clamp(24px, 4vw, 44px);
  box-shadow: 0 18px 48px rgba(70, 11, 42, 0.1);
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-hot), #f7b3cc);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
}

.auth-brand {
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 500;
}

.brand-logo {
  width: 36px;
  height: 36px;
  display: block;
  object-fit: contain;
  border-radius: 8px;
  flex: 0 0 auto;
}

.auth-heading {
  margin: clamp(28px, 5vh, 42px) 0 clamp(20px, 4vh, 30px);
}

.eyebrow {
  color: var(--brand);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin: 0 0 10px;
}

.auth-heading h2,
.page-title h1,
.section-title,
.rep-title {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0;
}

.auth-heading h2 {
  font-size: clamp(34px, 5vw, 46px);
  line-height: 1.04;
}

.auth-heading p:last-child {
  color: #424859;
  font-size: clamp(17px, 2.2vw, 21px);
  line-height: 1.38;
  margin: 12px 0 0;
}

.field-label {
  display: block;
  color: #2d3343;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.input-shell + .field-label,
.field-spacer {
  margin-top: 22px;
}

.field-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-top: 22px;
}

.input-shell {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid #e5d4df;
  background: #fff9fc;
  min-height: 52px;
  padding: 0 16px;
  border-radius: 14px;
  color: #80889a;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.input-shell:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(194, 24, 91, 0.12);
  background: #fff;
}

.input-shell input,
.input-shell select,
.input-shell textarea {
  border: 0;
  outline: 0;
  background: transparent;
  width: 100%;
  color: var(--ink);
  min-width: 0;
}

.input-shell input::placeholder,
.input-shell textarea::placeholder {
  color: #a7adbb;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--brand);
  padding: 0;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.auth-tabs button {
  min-height: 40px;
  border: 1px solid transparent;
  background: #f8ecf2;
  color: #5a2440;
  border-radius: 999px;
  font-weight: 750;
}

.auth-tabs button.is-active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 22px rgba(194, 24, 91, 0.22);
}

.icon-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-dark);
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(70, 11, 42, 0.05);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.icon-button:hover {
  transform: translateY(-1px);
  border-color: rgba(194, 24, 91, 0.38);
  color: var(--brand);
}

.notification-button {
  position: relative;
}

.notification-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid #fff;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 8px 16px rgba(194, 24, 91, 0.25);
}

.notification-count.is-hidden {
  display: none;
}

.icon-button.ghost {
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #747b8c;
}

.action-icon-img,
.nav-icon-img {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.action-icon-img {
  width: 24px;
  height: 24px;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #3f4555;
  font-size: 18px;
  margin: 22px 0 30px;
}

.check-row input {
  width: 26px;
  height: 26px;
  accent-color: var(--blue);
}

.primary-action,
.secondary-action,
.danger-action {
  min-height: 52px;
  border: 0;
  border-radius: 14px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 750;
}

.primary-action {
  width: 100%;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 14px 28px rgba(194, 24, 91, 0.18);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.primary-action:hover {
  transform: translateY(-1px);
  background: #b21453;
  box-shadow: 0 18px 34px rgba(194, 24, 91, 0.22);
}

.auth-card .primary-action {
  min-height: 54px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-hot));
  box-shadow: 0 14px 28px rgba(194, 24, 91, 0.25);
  margin-top: 18px;
}

.auth-card .primary-action:hover {
  transform: translateY(-1px);
}

.secondary-action {
  color: var(--brand-dark);
  background: #f8eaf1;
  border: 1px solid #efd5e1;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.secondary-action:hover {
  transform: translateY(-1px);
  border-color: rgba(194, 24, 91, 0.34);
  background: #fff;
}

.primary-action:disabled,
.secondary-action:disabled {
  cursor: progress;
  opacity: 0.68;
  transform: none;
}

.danger-action {
  color: var(--red);
  background: var(--red-soft);
}

.policy-note {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 16px;
  border-top: 1px solid #f1dce7;
  color: #6e5263;
  font-size: 14px;
  line-height: 1.35;
  margin-top: 22px;
  padding-top: 18px;
}

.policy-note p {
  margin: 0;
}

.policy-note a {
  color: var(--ink);
}

.app-screen {
  min-height: 100vh;
  padding: var(--header-height) 0 var(--bottom-nav-height);
}

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(14px, 3vw, 28px);
  background: rgba(255, 250, 253, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 26px rgba(70, 11, 42, 0.05);
}

.topbar .brand-mark {
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  min-width: 0;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.avatar-button {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.92);
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  overflow: hidden;
  padding: 0;
  box-shadow: 0 10px 20px rgba(70, 11, 42, 0.14);
}

.avatar-button.has-photo {
  background: #fff;
}

.avatar-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.side-nav {
  display: none;
}

.view-stage {
  width: min(100%, 1280px);
  margin: 0 auto;
  padding: 22px clamp(14px, 4vw, 34px) 30px;
  outline: 0;
}

.bottom-nav {
  position: fixed;
  z-index: 30;
  inset: auto 0 0 0;
  height: var(--bottom-nav-height);
  display: grid;
  grid-template-columns: repeat(var(--nav-count, 4), 1fr);
  background: rgba(255, 250, 253, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
  box-shadow: 0 -14px 34px rgba(70, 11, 42, 0.08);
}

.nav-item {
  border: 0;
  background: transparent;
  color: #9d8693;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  transition: color 140ms ease, background 140ms ease, transform 140ms ease;
}

.nav-item.is-active {
  color: var(--brand);
}

.nav-item:hover {
  color: var(--brand);
}

.bottom-nav .nav-item.is-active span:first-child {
  width: 36px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #fff0f6;
}

.bottom-nav .nav-item.is-active .nav-icon-img {
  width: 36px;
  height: 28px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #fff0f6;
}

.page-grid {
  display: grid;
  gap: 20px;
}

.hero-band {
  display: grid;
  gap: 18px;
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 4vw, 34px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.hero-band::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--brand);
}

.page-title h1 {
  font-size: clamp(30px, 6vw, 52px);
  line-height: 1.05;
  max-width: 900px;
}

.page-title p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.45;
  max-width: 680px;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.compact-primary {
  min-height: 44px;
  width: auto;
  padding: 0 18px;
}

.stats-grid {
  display: grid;
  gap: 14px;
}

.stat-card,
.content-card,
.task-card,
.post-card,
.calendar-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat-card {
  min-height: 148px;
  display: grid;
  align-content: space-between;
  padding: 22px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.stat-card::after {
  content: none;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(194, 24, 91, 0.3);
  box-shadow: 0 22px 48px rgba(70, 11, 42, 0.11);
}

.stat-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--brand);
  background: #fff;
  overflow: hidden;
  border: 1px solid #f0d7e3;
}

.stat-icon.red {
  color: var(--red);
  background: #fff;
}

.stat-icon.green {
  color: #075d40;
  background: #fff;
}

.stat-icon img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.stat-kicker,
.card-kicker,
.meta-line,
.mini-label {
  color: #7a6973;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.stat-number {
  margin: 8px 0 0;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 0;
}

.stat-label {
  margin: 0;
  color: #5e4a55;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 9px;
  border: 1px solid #ead8e2;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #6c1d43;
  background: #fff;
}

.badge.red {
  color: #9c1b22;
  border-color: #f0c6c9;
  background: #fffafa;
}

.badge.green {
  color: #276048;
  border-color: #cfe5d9;
  background: #fbfffc;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin: 14px 0 12px;
}

/* Task page split */
.task-split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
  margin-top: 8px;
}

.work-column {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.work-column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 12px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--soft);
  border: 1px solid var(--line);
  border-bottom: none;
}

.work-column-header.done-header {
  background: #f4fdf8;
  border-color: rgba(22, 185, 111, 0.2);
}

.work-column-header .section-title {
  font-size: 15px;
}

.work-column-body {
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  background: var(--panel);
}

.work-column.done-col .work-column-body {
  border-color: rgba(22, 185, 111, 0.2);
}

.work-column-body .announcement-list {
  padding: 14px;
  gap: 10px;
  max-height: 68vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.work-column-count {
  font-size: 12px;
  font-weight: 700;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 999px;
  padding: 2px 10px;
  line-height: 1.6;
}

.work-column.done-col .work-column-count {
  background: rgba(22, 185, 111, 0.12);
  color: var(--green);
}

/* Done-column card overrides */
.done-col .task-card.is-done {
  border-left: 3px solid var(--green);
}

.done-col .task-card.is-overdue {
  border-left: 3px solid var(--red);
}

@media (max-width: 860px) {
  .task-split-grid {
    grid-template-columns: 1fr;
  }
}

.section-title {
  font-size: 19px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0;
}

.announcement-list,
.deadline-list,
.completed-list,
.post-list {
  display: grid;
  gap: 12px;
}

.announcement,
.deadline-row,
.completed-row {
  padding: 20px;
}

.announcement {
  display: grid;
  gap: 10px;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.announcement:hover,
.deadline-row:hover,
.completed-row:hover,
.post-card:hover {
  transform: translateY(-1px);
  border-color: rgba(194, 24, 91, 0.25);
  box-shadow: 0 16px 34px rgba(70, 11, 42, 0.08);
}

.announcement-head,
.deadline-row,
.completed-row,
.post-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.announcement h3,
.deadline-row h3,
.completed-row h3,
.task-card h3,
.post-card h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: 0;
}

.announcement p,
.task-card p,
.post-card p {
  margin: 0;
  color: #5f5260;
  line-height: 1.45;
}

.deadline-date {
  width: 48px;
  min-width: 48px;
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
  background: var(--soft-blue);
  color: var(--brand);
  font-weight: 800;
  line-height: 1;
}

.deadline-date span {
  display: block;
  background: #f8ddea;
  padding: 7px 0 3px;
  font-size: 11px;
}

.deadline-date strong {
  display: block;
  padding: 3px 0 9px;
  font-size: 20px;
}

.deadline-body {
  min-width: 0;
  flex: 1;
}

.deadline-body p {
  margin: 3px 0 0;
  color: #566176;
  font-size: 13px;
}

.map-card {
  min-height: 190px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: var(--shadow);
  position: relative;
}

.map-card::before {
  content: none;
}

.map-button {
  position: relative;
  z-index: 1;
  min-height: 50px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.filters {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
}

.search-box {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 16px;
  background: #fff9fc;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: #897783;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.search-box:focus-within {
  border-color: rgba(194, 24, 91, 0.52);
  box-shadow: 0 0 0 4px rgba(194, 24, 91, 0.1);
  background: #fff;
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
}

.segmented {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.segment {
  min-height: 38px;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  color: #4d3845;
  padding: 0 16px;
  font-weight: 750;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.segment:hover {
  transform: translateY(-1px);
  border-color: rgba(194, 24, 91, 0.28);
}

.segment.is-active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 8px 16px rgba(194, 24, 91, 0.14);
}

.task-card {
  position: relative;
  padding: 22px;
  display: grid;
  gap: 14px;
  overflow: hidden;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.task-card.is-done {
  opacity: 0.78;
  background: #fcfffd;
}

.task-card.is-done h3 {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: rgba(22, 185, 111, 0.55);
}

.task-card::before {
  content: "";
  position: absolute;
  inset: 18px auto 18px 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: var(--brand);
}

.task-card:hover {
  transform: translateY(-2px);
  border-color: rgba(194, 24, 91, 0.28);
  box-shadow: 0 22px 44px rgba(70, 11, 42, 0.1);
}

.task-card.exam::before {
  background: #6f4b5d;
}

.task-card.announcement::before {
  background: var(--green);
}

.task-card.is-overdue::before {
  background: var(--red);
}

.task-card.deadline::before {
  background: var(--red);
}

.task-tags,
.task-meta,
.post-actions,
.calendar-controls,
.legend-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.task-meta {
  color: #6a5b65;
  font-size: 13px;
}

.task-meta span,
.map-button,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.task-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
}

.task-resource {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--brand-dark);
  font-size: 14px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #efd5e1;
  background: #fff7fb;
  border-radius: 999px;
  padding: 8px 12px;
}

.task-resource span,
.task-resource a {
  overflow-wrap: anywhere;
}

.task-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.tiny-button {
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid #d7b8c8;
  border-radius: 9px;
  color: #fff;
  background: #8f174f;
  font-weight: 700;
  box-shadow: none;
  transition: border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.tiny-button.secondary {
  color: #245742;
  border-color: #c8ded2;
  background: #fbfffc;
}

.tiny-button.danger {
  color: #9c1b22;
  border-color: #f0c6c9;
  background: #fffafa;
}

.tiny-button:hover {
  border-color: #8f174f;
  background: #74113f;
}

.tiny-button.secondary:hover {
  color: #174532;
  border-color: #94b9a5;
  background: #f2faf5;
}

.tiny-button.danger:hover {
  color: #7f1218;
  border-color: #d99aa0;
  background: #fff2f3;
}

.notification-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.notification-item {
  width: 100%;
  min-height: 68px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid #efd5e1;
  border-radius: 12px;
  background: #fffdfd;
  padding: 12px 14px;
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 18px rgba(70, 11, 42, 0.05);
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease;
}

.notification-item:hover {
  transform: translateY(-1px);
  border-color: rgba(194, 24, 91, 0.28);
  background: #fff8fb;
}

.notification-item > .notification-dot {
  inline-size: 8px !important;
  min-inline-size: 8px !important;
  max-inline-size: 8px !important;
  block-size: 8px !important;
  min-block-size: 8px !important;
  max-block-size: 8px !important;
  flex: 0 0 8px;
  align-self: center;
  justify-self: center;
  aspect-ratio: 1 / 1;
  padding: 0 !important;
  border-radius: 50%;
  background: var(--brand);
  display: block;
}

.notification-item > .notification-dot.notice {
  background: var(--green);
}

.notification-item > .notification-dot.exam {
  background: #2868c9;
}

.notification-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.notification-copy strong,
.notification-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-copy strong {
  font-size: 15px;
  font-weight: 800;
}

.notification-copy span {
  color: #74636d;
  font-size: 12px;
}

.notification-open {
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.notification-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.progress-card {
  padding: 24px;
  background: #fff;
  color: var(--ink);
}

.progress-row {
  margin-top: 20px;
}

.progress-row div {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  text-transform: uppercase;
}

.progress-track {
  height: 8px;
  background: #f4e7ee;
  border-radius: 999px;
  margin-top: 8px;
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: inherit;
}

.calendar-shell {
  display: grid;
  gap: 22px;
}

.calendar-card {
  overflow: hidden;
}

.planner-card {
  padding: clamp(20px, 4vw, 34px);
  background:
    linear-gradient(180deg, rgba(255, 248, 251, 0.92), #fff 34%),
    #fff;
}

.calendar-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.calendar-toolbar h1 {
  font-size: clamp(34px, 6vw, 58px);
  line-height: 1.08;
  margin: 8px 0 0;
  letter-spacing: 0;
}

.calendar-toolbar p {
  margin: 8px 0 0;
  color: var(--muted);
}

.calendar-date-badge {
  width: 88px;
  min-width: 88px;
  border-radius: 18px;
  overflow: hidden;
  color: #fff;
  text-align: center;
  background: var(--brand);
  box-shadow: 0 14px 26px rgba(194, 24, 91, 0.18);
}

.calendar-date-badge span {
  display: block;
  padding: 7px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: rgba(70, 11, 42, 0.26);
}

.calendar-date-badge strong {
  display: block;
  padding: 9px 8px 11px;
  font-size: 34px;
  line-height: 1;
}

.calendar-control-bar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 14px;
  margin-top: 24px;
}

.calendar-selectors {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.calendar-selectors label {
  display: grid;
  gap: 7px;
  color: #7e6a76;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.calendar-select {
  min-width: 150px;
  min-height: 48px;
  border: 1px solid #ead3de;
  border-radius: 16px;
  padding: 0 42px 0 16px;
  color: var(--ink);
  background: #fff9fc;
  font-weight: 800;
  outline: 0;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.calendar-select:focus {
  border-color: rgba(194, 24, 91, 0.5);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(194, 24, 91, 0.1);
}

.calendar-controls {
  flex-wrap: nowrap;
}

.calendar-current-button {
  min-width: 124px;
  min-height: 44px;
  display: inline-grid;
  gap: 1px;
  line-height: 1.05;
}

.calendar-current-button small {
  color: #8b6478;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(42px, 1fr));
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 22px 44px rgba(70, 11, 42, 0.08);
  border-radius: 26px;
  overflow: hidden;
  margin-top: 22px;
}

.weekday,
.day-cell {
  min-height: 74px;
  border-right: 1px solid #f2e5ec;
  border-bottom: 1px solid #f2e5ec;
  display: grid;
}

.weekday {
  min-height: 50px;
  place-items: center;
  color: #8a7280;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.11em;
  background: #fff8fb;
}

.day-cell {
  position: relative;
  border: 0;
  border-right: 1px solid #f2e5ec;
  border-bottom: 1px solid #f2e5ec;
  background: #fff;
  color: var(--ink);
  padding: 12px;
  justify-items: start;
  align-content: start;
  gap: 9px;
  text-align: left;
  transition: background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.day-cell:hover {
  background: #fff8fb;
  box-shadow: inset 0 0 0 2px rgba(194, 24, 91, 0.12);
}

.day-cell.is-muted {
  color: #c8bfc6;
  background: #fffcfd;
}

.day-cell.is-selected {
  color: #fff;
  background: var(--brand-deep);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.day-number {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 13px;
  font-size: 16px;
  font-weight: 800;
}

.day-cell.is-today .day-number {
  color: #fff;
  background: var(--brand);
}

.day-cell.is-selected .day-number {
  color: var(--brand-deep);
  background: #fff;
}

.day-event-cluster {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px;
  max-width: 54px;
}

.event-count {
  min-width: 18px;
  height: 18px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #c2185b;
  font-size: 10px;
  font-weight: 800;
}

.event-count.notice {
  background: #16b96f;
}

.event-count.exam {
  background: #2868c9;
}

.event-count.inactive {
  background: #a7a1a6;
}

.legend-card {
  padding: 14px 16px;
  background: #fffdfd;
}

.calendar-key {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(70, 11, 42, 0.05);
}

.legend-row {
  color: #756270;
  font-size: 12px;
  font-weight: 750;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
}

.legend-dot.assignment {
  background: var(--brand);
}

.legend-dot.notice {
  background: var(--green);
}

.legend-dot.exam {
  background: #2868c9;
}

.legend-dot.inactive {
  background: #a7a1a6;
}

.calendar-side {
  display: grid;
  gap: 18px;
}

.timetable-shell {
  border: 1px solid var(--line);
  border-radius: 26px;
  background: #fffdfd;
  box-shadow: 0 22px 44px rgba(70, 11, 42, 0.08);
  overflow: hidden;
}

.timetable-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-bottom: 1px solid #f2e5ec;
  background: #fff8fb;
}

.timetable-header h1 {
  margin: 6px 0 0;
  font-size: clamp(26px, 4vw, 42px);
  letter-spacing: 0;
}

.timetable-label-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 10px;
  width: min(100%, 520px);
}

.timetable-label-form input {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 12px 14px;
  color: var(--ink);
}

.timetable-scroll {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}

.timetable-board {
  --slot-height: 74px;
  display: grid;
  grid-template-columns: 92px repeat(6, minmax(150px, 1fr));
  width: max(1040px, 100%);
  position: relative;
}

.timetable-corner,
.timetable-day-head,
.timetable-time-row {
  display: grid;
  place-items: center;
  border-right: 1px solid #ead8e2;
  border-bottom: 1px solid #ead8e2;
  background: #fff8fb;
  color: #6d1640;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.timetable-corner {
  position: sticky;
  left: 0;
  z-index: 4;
  grid-column: 1;
  grid-row: 1;
}

.timetable-day-head {
  position: sticky;
  top: 0;
  z-index: 3;
}

.timetable-time-row {
  position: sticky;
  left: 0;
  z-index: 2;
  padding: 8px;
  background: #fff;
  color: var(--ink);
  text-align: center;
  line-height: 1.2;
}

.timetable-cell {
  border-right: 1px solid #ead8e2;
  border-bottom: 1px solid #ead8e2;
  background: #fbfbfb;
}

.timetable-slot {
  position: relative;
  display: grid;
  gap: 6px;
  align-self: stretch;
  margin: 5px;
  padding: 44px 10px 10px;
  border: 1px solid #efd5e1;
  border-left: 4px solid var(--brand);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(70, 11, 42, 0.06);
  overflow: visible;
  z-index: 5;
}

.timetable-slot:hover,
.timetable-slot:focus-within {
  z-index: 30;
}

.timetable-slot .task-buttons {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 35;
}

.timetable-slot .tiny-button {
  min-height: 30px;
  padding: 0 10px;
}

.timetable-time {
  color: var(--brand);
  font-size: 12px;
  font-weight: 850;
}

.timetable-slot h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.timetable-slot p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.muted-text {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.agenda-card {
  overflow: hidden;
}

.agenda-header {
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  background: #fff9fc;
}

.agenda-list {
  display: grid;
  gap: 2px;
  padding: 18px 22px 26px;
}

.agenda-item {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 14px;
  min-height: 118px;
}

.agenda-time {
  color: #8a7280;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
  position: relative;
}

.agenda-time::after {
  content: "";
  position: absolute;
  top: 26px;
  bottom: -24px;
  left: 28px;
  width: 1px;
  background: var(--line);
}

.agenda-box {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 18px;
  padding: 16px;
  align-self: start;
  box-shadow: var(--shadow-soft);
}

.agenda-box.assignment {
  border-left: 5px solid var(--brand);
}

.agenda-box.test {
  border-left: 5px solid #7751b7;
}

.agenda-box.exam {
  border-left: 5px solid #ea4d89;
}

.agenda-box.announcement {
  border-left: 5px solid var(--green);
}

.agenda-box.danger {
  border-color: #f2b2ac;
  background: #fff7f6;
  color: var(--red);
}

.agenda-box h3 {
  margin: 0 0 8px;
  font-size: 17px;
  letter-spacing: 0;
}

.agenda-box.is-done {
  opacity: 0.72;
}

.agenda-resource {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 12px 0 0;
  color: var(--brand-dark);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.agenda-resource svg {
  flex: 0 0 auto;
}

.agenda-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.agenda-empty {
  min-height: 210px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  border: 2px dashed #f0dbe5;
  color: #897783;
  border-radius: 18px;
  background: #fff9fc;
  text-align: center;
  padding: 28px;
}

.agenda-empty svg {
  color: var(--brand);
}

.rep-hero {
  display: grid;
  gap: 18px;
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 4vw, 34px);
  border-radius: 24px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow);
}

.rep-hero::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--brand);
}

.rep-title {
  font-size: clamp(36px, 8vw, 56px);
  line-height: 1;
  letter-spacing: 0;
}

.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid.two {
  grid-template-columns: 1fr;
}

.schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
  border: 1px solid #f0dce6;
  border-radius: 20px;
  background: #fff9fc;
  overflow: hidden;
}

.schedule-column {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.form-card {
  padding: 24px;
}

.form-card h2 {
  margin: 0 0 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  letter-spacing: 0;
}

.edit-panel {
  margin-top: 10px;
  padding-top: 20px;
  border-top: 1px solid #f0dce6;
}

.edit-panel h3 {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 800;
}

.form-control {
  display: grid;
  gap: 8px;
}

.form-control input,
.form-control select,
.form-control textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff9fc;
  border-radius: 16px;
  padding: 14px 16px;
  color: var(--ink);
  outline: 0;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.form-control input:focus,
.form-control select:focus,
.form-control textarea:focus {
  border-color: rgba(194, 24, 91, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(194, 24, 91, 0.1);
}

.form-control textarea {
  min-height: 130px;
  resize: vertical;
}

.form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.form-actions.single {
  grid-template-columns: 1fr;
}

.owner-grid {
  display: grid;
  gap: 14px;
}

.owner-grid article {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff9fc;
  padding: 16px;
}

.owner-grid p {
  margin: 6px 0 0;
  color: #5f5260;
  line-height: 1.45;
}

.course-list {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.course-pill {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 70px;
  gap: 12px;
  align-items: center;
  border: 1px solid #efd5e1;
  border-radius: 10px;
  background: #fff;
  padding: 8px 12px;
}

.course-pill strong {
  text-transform: uppercase;
  color: var(--brand);
  font-size: 12px;
  letter-spacing: 0.04em;
}

.course-pill span {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  font-size: 14px;
}

.course-pill small {
  color: var(--muted);
  white-space: nowrap;
  text-align: right;
  font-size: 13px;
}

.owner-president-list {
  margin-top: 18px;
}

.profile-photo-panel {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff9fc;
  box-shadow: var(--shadow-soft);
}

.profile-photo-panel strong {
  display: block;
  overflow-wrap: anywhere;
}

.profile-photo-panel p {
  margin: 4px 0 0;
  color: #7a6973;
}

.profile-photo {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid #fff;
  background: var(--brand);
  color: #fff;
  font-size: 30px;
  font-weight: 800;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(70, 11, 42, 0.14);
}

.profile-photo.has-photo {
  background: #fff;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.avatar-upload {
  grid-column: 1 / -1;
  width: 100%;
}

.avatar-upload input {
  display: none;
}

.profile-grid {
  margin-top: 16px;
}

.post-card {
  padding: 24px;
  display: grid;
  gap: 18px;
  transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.post-card .post-actions {
  justify-content: space-between;
  border-top: 1px solid #f2e5ec;
  padding-top: 16px;
}

.floating-add {
  position: fixed;
  right: 18px;
  bottom: calc(var(--bottom-nav-height) + 18px);
  z-index: 25;
  width: 58px;
  height: 58px;
  border-radius: 20px;
  border: 0;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 18px 34px rgba(194, 24, 91, 0.22);
}

.modal-host {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(42, 23, 33, 0.58);
  backdrop-filter: blur(8px);
}

.modal-panel {
  position: relative;
  width: min(100%, 560px);
  max-height: min(88vh, 720px);
  overflow: auto;
  background: #fff;
  border: 1px solid #f0d7e3;
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(70, 11, 42, 0.22);
  padding: 28px;
}

.modal-panel h2 {
  margin-top: 0;
  letter-spacing: 0;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.toast-stack {
  position: fixed;
  inset: auto 14px calc(var(--bottom-nav-height) + 18px) 14px;
  z-index: 90;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.toast {
  justify-self: center;
  width: min(100%, 420px);
  padding: 14px 17px;
  background: var(--brand-deep);
  color: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 38px rgba(70, 11, 42, 0.22);
}

.desktop-only {
  display: none;
}

svg {
  width: 1.2em;
  height: 1.2em;
  display: block;
}

@media (max-width: 620px) {
  .app-screen {
    overflow-x: hidden;
  }

  .topbar {
    padding: 0 10px;
    gap: 8px;
  }

  .topbar .brand-mark {
    gap: 7px;
    font-size: 15px;
    letter-spacing: 0.02em;
    flex: 1 1 auto;
    overflow: hidden;
  }

  .topbar .brand-mark span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar .brand-logo {
    width: 28px;
    height: 28px;
  }

  .topbar-actions {
    gap: 5px;
  }

  .topbar-actions .icon-button,
  .avatar-button {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .avatar-button {
    border-radius: 50%;
  }

  .view-stage {
    padding: 16px 10px 24px;
  }

  .hero-band,
  .content-card,
  .form-card,
  .planner-card,
  .timetable-shell {
    border-radius: 18px;
  }

  .page-title h1 {
    font-size: clamp(34px, 11vw, 48px);
    line-height: 1;
  }

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

  .bottom-nav {
    overflow-x: auto;
    grid-template-columns: repeat(var(--nav-count, 4), minmax(74px, 1fr));
  }

  .nav-item {
    letter-spacing: 0.04em;
    font-size: 9px;
  }

  .timetable-header {
    padding: 16px;
  }

  .timetable-header h1 {
    font-size: 28px;
  }

  .timetable-scroll {
    border-top: 1px solid #f2e5ec;
  }

  .timetable-board {
    --slot-height: 66px;
    grid-template-columns: 72px repeat(6, 136px);
    width: calc(72px + (6 * 136px));
  }

  .timetable-corner,
  .timetable-day-head,
  .timetable-time-row {
    font-size: 10px;
  }

  .timetable-slot {
    margin: 3px;
    padding: 40px 8px 8px;
    gap: 4px;
  }

  .timetable-slot h3 {
    font-size: 13px;
  }

  .timetable-slot p,
  .timetable-time {
    font-size: 11px;
  }

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

  .timetable-header {
    display: grid;
    align-items: stretch;
  }

  .timetable-label-form {
    grid-template-columns: 1fr;
  }

  .calendar-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    align-items: start;
  }

  .calendar-control-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .calendar-date-badge {
    width: 76px;
    min-width: 76px;
    justify-self: end;
    border-radius: 16px;
  }

  .calendar-date-badge span,
  .calendar-date-badge strong {
    display: block;
    text-align: center;
  }

  .calendar-date-badge strong {
    font-size: 29px;
    padding: 8px 6px 10px;
  }

  .calendar-selectors,
  .calendar-selectors label,
  .calendar-select {
    width: 100%;
  }

  .calendar-controls {
    justify-content: space-between;
  }

  .calendar-current-button {
    min-width: 112px;
    padding: 0 14px;
  }

  .calendar-grid {
    grid-template-columns: repeat(7, minmax(38px, 1fr));
    border-radius: 20px;
  }

  .weekday {
    min-height: 42px;
    font-size: 10px;
  }

  .day-cell {
    min-height: 62px;
    padding: 8px;
  }

  .day-number {
    width: 28px;
    height: 28px;
    border-radius: 11px;
    font-size: 14px;
  }

  .day-event-cluster {
    top: 6px;
    right: 6px;
    gap: 2px;
    max-width: 38px;
  }

  .event-count {
    min-width: 15px;
    height: 15px;
    font-size: 9px;
  }

  .calendar-key {
    margin-top: 14px;
    padding: 11px 12px;
  }

  .legend-row {
    gap: 8px;
    font-size: 11px;
  }

  .agenda-item {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .agenda-time::after {
    content: none;
  }
}

@media (min-width: 760px) {
  .auth-screen {
    grid-template-columns: minmax(260px, 360px) minmax(420px, 560px);
    align-items: center;
    justify-content: center;
    padding: clamp(18px, 4vw, 42px);
    gap: 0;
  }

  .auth-art {
    display: block;
    min-height: min(640px, calc(100dvh - 56px));
    height: min(640px, calc(100dvh - 56px));
    position: relative;
    border-radius: 24px 0 0 24px;
    overflow: hidden;
    background:
      radial-gradient(circle at 50% 24%, rgba(255, 255, 255, 0.2), transparent 11rem),
      linear-gradient(160deg, #5a0a34 0%, var(--brand) 100%);
    box-shadow: 0 18px 48px rgba(70, 11, 42, 0.12);
  }

  .auth-mobile-brand {
    display: none;
  }

  .auth-art img {
    position: absolute;
    width: min(44%, 190px);
    height: auto;
    left: 50%;
    top: 27%;
    transform: translate(-50%, -50%);
    object-fit: contain;
    opacity: 0.96;
    filter: drop-shadow(0 18px 24px rgba(59, 2, 31, 0.22));
    z-index: 2;
  }

  .auth-art > img {
    top: 24%;
  }

  .auth-art-brand {
    position: absolute;
    z-index: 3;
    top: 39%;
    left: 50%;
    transform: translateX(-50%);
    display: block;
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    white-space: nowrap;
  }

  .auth-art::before {
    content: "";
    position: absolute;
    inset: auto -24% -18% auto;
    width: 78%;
    height: 44%;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
  }

  .auth-art::after {
    content: none;
  }

  .auth-art-copy {
    position: absolute;
    z-index: 3;
    left: clamp(26px, 4vw, 48px);
    right: clamp(26px, 4vw, 48px);
    bottom: clamp(28px, 6vh, 46px);
    color: #fff;
  }

  .auth-art-copy p {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 13px;
    margin: 0 0 10px;
  }

  .auth-art-copy h1 {
    max-width: 310px;
    font-family: var(--font-display);
    font-size: clamp(20px, 2.1vw, 26px);
    font-weight: 700;
    line-height: 1.03;
    letter-spacing: 0;
    margin: 0;
  }

  .auth-card {
    width: min(100%, 560px);
    min-height: min(640px, calc(100dvh - 56px));
    max-height: calc(100dvh - 56px);
    overflow: auto;
    border-radius: 0 24px 24px 0;
    margin: 0;
    box-shadow: 0 18px 48px rgba(70, 11, 42, 0.1);
  }

  .auth-card::-webkit-scrollbar {
    width: 8px;
  }

  .auth-card::-webkit-scrollbar-thumb {
    background: #cbd5e4;
    border-radius: 999px;
  }

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

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

  .home-layout,
  .tasks-layout,
  .calendar-shell {
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    align-items: start;
  }

  .calendar-card {
    grid-column: auto;
  }

  .deadline-list {
    gap: 0;
  }
}

@media (min-width: 1040px) {
  :root {
    --bottom-nav-height: 0px;
  }

  .app-screen {
    padding-left: 108px;
    padding-bottom: 0;
  }

  .bottom-nav {
    display: none;
  }

  .side-nav {
    position: fixed;
    z-index: 25;
    top: var(--header-height);
    bottom: 0;
    left: 0;
    width: 108px;
    display: grid;
    align-content: start;
    gap: 10px;
    padding: 18px 12px;
    background: var(--brand-deep);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 18px 0 34px rgba(70, 11, 42, 0.1);
  }

  .side-nav .nav-item {
    min-height: 72px;
    border-radius: 18px;
    color: rgba(255, 255, 255, 0.64);
    letter-spacing: 0.1em;
  }

  .side-nav .nav-icon-img {
    filter: invert(1);
    mix-blend-mode: normal;
    opacity: 0.72;
  }

  .side-nav .nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
  }

  .side-nav .nav-item:hover .nav-icon-img,
  .side-nav .nav-item.is-active .nav-icon-img {
    opacity: 1;
  }

  .side-nav .nav-item.is-active {
    color: #fff;
    background: var(--brand);
    box-shadow: 0 14px 26px rgba(194, 24, 91, 0.28);
  }

  .desktop-only {
    display: inline-grid;
  }

  .menu-toggle {
    display: none;
  }

  .topbar .brand-logo {
    width: 32px;
    height: 32px;
  }

  .view-stage {
    padding-top: 32px;
  }

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

@media (min-width: 760px) and (max-height: 760px) {
  .auth-screen {
    align-items: start;
  }

  .auth-art {
    height: calc(100dvh - 36px);
    min-height: 620px;
  }

  .auth-card {
    padding: 30px 42px;
    max-height: calc(100dvh - 36px);
  }

  .auth-heading {
    margin: 30px 0 22px;
  }

  .auth-heading h2 {
    font-size: 48px;
  }

  .auth-heading p:last-child {
    font-size: 22px;
    line-height: 1.3;
  }

  .input-shell {
    min-height: 52px;
  }

  .field-row {
    margin-top: 18px;
  }

  .check-row {
    font-size: 16px;
    margin: 18px 0 22px;
  }

  .policy-note {
    font-size: 14px;
    margin-top: 24px;
    padding-top: 18px;
  }
}

@media (max-width: 430px) {
  .calendar-controls .secondary-action {
    padding: 0 12px;
  }

  .auth-card {
    padding: 28px 22px;
  }

  .auth-mobile-brand {
    font-size: 23px;
    gap: 12px;
  }

  .auth-mobile-brand img {
    width: 50px;
    height: 50px;
  }

  .auth-heading {
    margin: 24px 0 34px;
  }
}
