:root {
  --font-primary: "Manrope", "Helvetica Neue", sans-serif;
  --font-editorial: "Cormorant Garamond", "Times New Roman", serif;
  --background: hsl(210, 20%, 98%);
  --foreground: hsl(222, 47%, 11%);
  --muted: hsl(210, 40%, 96%);
  --muted-foreground: hsl(215, 16%, 47%);
  --popover: hsl(0, 0%, 100%);
  --popover-foreground: hsl(222, 47%, 11%);
  --card: hsl(0, 0%, 100%);
  --card-foreground: hsl(222, 47%, 11%);
  --border: hsl(214, 32%, 91%);
  --input: hsl(214, 32%, 91%);
  --primary: hsl(207, 90%, 54%);
  --primary-foreground: hsl(211, 100%, 99%);
  --secondary: hsl(210, 40%, 96%);
  --secondary-foreground: hsl(222, 47%, 11%);
  --accent: hsl(210, 40%, 96%);
  --accent-foreground: hsl(222, 47%, 11%);
  --destructive: hsl(0, 84%, 60%);
  --destructive-foreground: hsl(210, 40%, 98%);
  --ring: hsl(215, 25%, 27%);
  --radius: 0.75rem;
  --brand-primary: hsl(207, 90%, 54%);
  --brand-primary-strong: hsl(207, 90%, 47%);
  --brand-primary-soft: hsl(206, 96%, 92%);
  --brand-primary-border: hsl(206, 90%, 82%);
  --brand-primary-glow: hsla(207, 95%, 60%, 0.25);
  --brand-secondary: hsl(257, 94%, 62%);
  --brand-accent: hsl(280, 85%, 60%);
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1),
    0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1),
    0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
  --glass-bg: hsla(0, 0%, 100%, 0.7);
  --glass-border: hsla(0, 0%, 100%, 0.18);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  --btn-radius: 0.75rem;
  --btn-font-weight: 600;
  --btn-transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --btn-primary-bg: var(--brand-primary);
  --btn-primary-bg-hover: var(--brand-primary-strong);
  --btn-primary-text: var(--primary-foreground);
  --btn-primary-shadow: 0 4px 14px 0 hsla(207, 90%, 45%, 0.4);
  --btn-primary-shadow-hover: 0 6px 20px 0 hsla(207, 90%, 38%, 0.5);
  --btn-gradient-from: var(--brand-primary);
  --btn-gradient-to: var(--brand-secondary);
  --btn-gradient-from-hover: hsl(207, 90%, 50%);
  --btn-gradient-to-hover: hsl(257, 92%, 58%);
  --btn-outline-border: hsl(214, 32%, 91%);
  --btn-outline-border-hover: var(--brand-primary-border);
  --btn-outline-bg-hover: hsla(207, 90%, 54%, 0.08);
  --btn-outline-text: hsl(215, 25%, 27%);
  --btn-subtle-bg: hsla(207, 90%, 54%, 0.1);
  --btn-subtle-text: hsl(209, 61%, 42%);
  --btn-inverted-bg: hsl(0, 0%, 100%);
  --btn-inverted-bg-hover: hsl(210, 33%, 97%);
  --btn-inverted-text: var(--brand-primary);
  --ink-900: #1f2538;
  --ink-800: #27304a;
  --ink-700: #3c4562;
  --ink-600: #4c5674;
  --ink-500: #55607a;
  --sand-50: #fffaf5;
  --sand-100: #fff7ef;
  --sand-200: #f7ecdf;
  --periwinkle-50: #f5f7ff;
  --periwinkle-100: #e9f0ff;
  --periwinkle-200: #d7e5ff;
  --lilac-100: #e0ddff;
  --clay-600: #a35e42;
  --clay-500: #b67a60;
  --clay-200: #eadccd;
  --clay-100: #f2dccc;
  --forest-500: #2f7a55;
  --forest-50: #e6f4ef;
  --copper-500: #804f3c;
  --surface-raised: #ffffff;
  --surface-muted: #f7f8ff;
  --border-soft: #eadccd;
  --border-strong: #d2c2b3;
  --orb-peach: rgba(253, 230, 216, 0.65);
  --orb-sky: rgba(215, 229, 255, 0.7);
  --orb-lilac: rgba(224, 221, 255, 0.7);
  --gradient-shell: linear-gradient(
    to bottom,
    var(--sand-50) 0%,
    var(--periwinkle-50) 55%,
    var(--periwinkle-100) 100%
  );
  --gradient-shell-diagonal: linear-gradient(
    135deg,
    var(--sand-100) 0%,
    var(--periwinkle-50) 55%,
    var(--periwinkle-100) 100%
  );
  --gradient-sunset: linear-gradient(
    135deg,
    hsl(214, 82%, 70%),
    hsl(329, 72%, 68%)
  );
  --gradient-sunset-hover: linear-gradient(
    135deg,
    hsl(214, 80%, 66%),
    hsl(329, 68%, 64%)
  );
  --shadow-soft: 0 18px 35px -20px rgba(32, 54, 120, 0.3);
  --shadow-ambient: 0 35px 90px -60px rgba(95, 106, 181, 0.55);
  --paper: var(--background);
  --surface: var(--card);
  --surface-strong: var(--border);
  --ink: var(--ink-900);
  --primary-strong: var(--brand-primary-strong);
  --primary-soft: var(--brand-primary-soft);
  --ink-rgb: 31, 37, 56;
  --primary-rgb: 32, 148, 243;
  --primary-strong-rgb: 12, 131, 228;
  --primary-soft-rgb: 215, 237, 254;
  --secondary-rgb: 119, 67, 249;
  --success: hsl(160, 84%, 39%);
  --success-rgb: 16, 183, 127;
  --warning: hsl(38, 90%, 56%);
  --warning-rgb: 245, 158, 11;
  --danger: hsl(0, 72%, 50%);
  --danger-rgb: 220, 38, 38;
  --accent-2: var(--brand-primary-strong);
  --accent-strong: var(--brand-primary-strong);
  --today-accent: var(--brand-primary);
  --tw-gradient-from-position: 0%;
  --tw-gradient-via-position: 50%;
  --tw-gradient-to-position: 100%;
  --line: var(--border);
  --line-strong: var(--border-strong);
  --shadow: 0 18px 45px rgba(31, 37, 56, 0.12);
  --shadow-nav: 0 12px 30px rgba(31, 37, 56, 0.08);
  --shadow-card: 0 16px 36px rgba(31, 37, 56, 0.12);
  --shadow-float: 0 24px 60px rgba(31, 37, 56, 0.16);
  --radius-sm: 0.5rem;
  --radius-md: var(--radius);
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --fc-today-bg-color: transparent;
  --auth-glow: rgba(32, 148, 243, 0.18);
  --auth-ink: var(--ink-900);
  --auth-surface: rgba(255, 255, 255, 0.96);
  --auth-border: var(--border);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: var(--font-primary);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--background);
  min-height: 100vh;
}

body.admin-mode {
  --primary: hsl(210, 90%, 52%);
  --primary-strong: hsl(210, 90%, 47%);
  --secondary: hsl(160, 84%, 39%);
  --paper: #f5f9ff;
  --surface-muted: #f0f6ff;
  --primary-rgb: 22, 133, 243;
  --primary-strong-rgb: 12, 120, 228;
  --secondary-rgb: 16, 183, 127;
  background-color: var(--background);
  background-image: radial-gradient(
      circle at 14% 10%,
      var(--orb-sky),
      transparent 46%
    ),
    radial-gradient(
      circle at 85% 14%,
      var(--orb-lilac),
      transparent 52%
    ),
    radial-gradient(
      circle at 50% 84%,
      var(--orb-peach),
      transparent 62%
    ),
    var(--gradient-shell);
}

.background-orbit {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orbit-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  filter: blur(0px);
  opacity: 0.3;
}

.glow-a {
  top: -120px;
  right: -120px;
  background: radial-gradient(
    circle,
    rgba(var(--primary-rgb), 0.26),
    transparent 70%
  );
}

.glow-b {
  bottom: -160px;
  left: -140px;
  background: radial-gradient(
    circle,
    rgba(var(--secondary-rgb), 0.2),
    transparent 68%
  );
}

.glow-c {
  top: 25%;
  left: 45%;
  width: 260px;
  height: 260px;
  background: radial-gradient(
    circle,
    rgba(144, 188, 246, 0.2),
    transparent 70%
  );
}

.orbit-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(
    rgba(var(--ink-rgb), 0.16) 1px,
    transparent 0
  );
  background-size: 64px 64px;
  opacity: 0.06;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1400px;
  margin: 0 auto;
  padding: 120px 40px 56px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.page-footer {
  display: flex;
  justify-content: center;
  padding-top: 16px;
}

.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px clamp(18px, 4vw, 44px);
  border-radius: 0;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(247, 250, 252, 0.88) 100%
  );
  border: none;
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.top-nav::after {
  content: "";
  position: absolute;
  left: clamp(18px, 4vw, 44px);
  right: clamp(18px, 4vw, 44px);
  bottom: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    rgba(var(--primary-rgb), 0.12) 0%,
    rgba(var(--primary-rgb), 0.45) 50%,
    rgba(var(--primary-rgb), 0.12) 100%
  );
  opacity: 0.7;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  height: 50px;
  width: auto;
  max-width: 300px;
  object-fit: contain;
}

.brand-title {
  margin: 0;
  font-weight: 600;
  font-size: 1.05rem;
  font-family: var(--font-primary);
}

.brand-subtitle {
  margin: 2px 0 0;
  color: var(--muted-foreground);
  font-size: 0.85rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 0.5s ease-out forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .sync-status[data-state="syncing"] .sync-dot,
  .modal-feedback.is-success.is-transient {
    animation: none;
    transform: none;
    opacity: 1;
  }
}

.hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  align-items: center;
}

.hero h1 {
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
    "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  font-weight: 600;
  font-size: clamp(2.2rem, 2.8vw, 3rem);
  margin: 0 0 4px;
}

.hero-centered {
  flex-direction: column;
  text-align: center;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 6px;
}

.hero-centered::after {
  content: none;
}

.hero-centered .status {
  align-items: center;
}


h1 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 700;
  font-family: var(--font-primary);
  letter-spacing: 0.01em;
  margin: 0 0 6px;
}

h2,
h3 {
  font-family: var(--font-primary);
  letter-spacing: 0.01em;
}

h2 {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 600;
}

h3 {
  font-size: clamp(0.98rem, 1.3vw, 1.15rem);
  font-weight: 600;
}

.subtitle {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.95rem;
}

#app[hidden],
#auth[hidden] {
  display: none;
}

.auth {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 32px;
  place-items: center;
  padding: clamp(32px, 6vw, 72px);
  background-color: #eef3f9;
  background-image: radial-gradient(
      circle at 15% 10%,
      rgba(var(--primary-rgb), 0.12),
      transparent 48%
    ),
    radial-gradient(
      circle at 85% 18%,
      rgba(var(--secondary-rgb), 0.08),
      transparent 55%
    ),
    linear-gradient(
      180deg,
      rgba(246, 248, 251, 0.82) 0%,
      rgba(238, 243, 249, 0.86) 55%,
      rgba(248, 250, 252, 0.88) 100%
    ),
    url("/background-1536.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

@media (max-width: 720px) {
  .auth {
    background-image: radial-gradient(
        circle at 15% 10%,
        rgba(var(--primary-rgb), 0.12),
        transparent 48%
      ),
      radial-gradient(
        circle at 85% 18%,
        rgba(var(--secondary-rgb), 0.08),
        transparent 55%
      ),
      linear-gradient(
        180deg,
        rgba(246, 248, 251, 0.82) 0%,
        rgba(238, 243, 249, 0.86) 55%,
        rgba(248, 250, 252, 0.88) 100%
      ),
      url("/background-900.jpg");
  }
}

.auth-card {
  background: var(--auth-surface);
  border-radius: var(--radius-xl);
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--auth-border);
  box-shadow: 0 24px 60px rgba(var(--ink-rgb), 0.14);
  display: grid;
  gap: 16px;
  width: min(520px, 100%);
}

.auth-logo {
  width: min(360px, 80%);
  height: auto;
  max-width: 100%;
  object-fit: contain;
  justify-self: center;
}

.auth-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--ink-500);
  margin: 0;
}

.auth-title {
  margin: 0;
  font-family: var(--font-editorial);
  font-size: clamp(1.7rem, 2.6vw, 2.4rem);
  color: var(--auth-ink);
}

.auth-subtitle {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.95rem;
  max-width: 38ch;
}

.auth-form {
  display: grid;
  gap: 12px;
  margin-top: 10px;
}

.auth-label {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-500);
  font-weight: 600;
}

.auth-form input {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 10px 14px;
  font-size: 0.95rem;
  font-family: var(--font-primary);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(var(--ink-rgb), 0.06);
  min-height: 40px;
}

.auth-form input:focus {
  outline: none;
  border-color: rgba(var(--primary-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.2);
}

.auth-submit {
  margin-top: 8px;
  border-radius: var(--radius-lg);
  border: none;
  padding: 10px 18px;
  min-height: 40px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-strong) 100%
  );
  box-shadow: 0 10px 20px rgba(var(--primary-rgb), 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(var(--primary-rgb), 0.3);
}

.auth-submit:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

.auth-submit:disabled {
  background: linear-gradient(135deg, #d4dae2 0%, #c7cdd6 100%);
  box-shadow: 0 2px 4px rgba(var(--ink-rgb), 0.12);
  cursor: not-allowed;
  transform: none;
}

.auth-submit:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.3);
  outline-offset: 2px;
}

.auth-hint {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(var(--ink-rgb), 0.55);
}

.auth-message {
  min-height: 20px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--primary-strong);
}

.auth-message.is-error {
  color: rgba(var(--danger-rgb), 0.92);
}

.auth-message.is-success {
  color: var(--primary);
}

.auth-side {
  display: flex;
  justify-content: center;
}

.auth-side-card {
  background: rgba(31, 37, 56, 0.92);
  color: #ffffff;
  border-radius: var(--radius-xl);
  padding: clamp(22px, 3vw, 36px);
  box-shadow: 0 24px 60px rgba(var(--ink-rgb), 0.28);
  width: min(320px, 90%);
}

.auth-side-title {
  margin: 0 0 16px;
  font-family: var(--font-primary);
  font-size: 1.25rem;
}

.auth-side-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  font-size: 0.95rem;
}

.auth-side-list li {
  padding-left: 18px;
  position: relative;
}

.auth-side-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.user-menu {
  position: relative;
}

.user-strip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 15px 14px;
  border-radius: var(--radius-lg);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease, border-color 0.15s ease;
}

.user-strip:hover,
.user-strip:focus-visible {
  background: rgba(var(--primary-rgb), 0.08);
  border-color: rgba(var(--primary-rgb), 0.25);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(var(--ink-rgb), 0.12);
  outline: none;
}

.user-caret {
  font-size: 0.7rem;
  color: rgba(var(--ink-rgb), 0.6);
}

.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 180px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  padding: 6px;
  display: grid;
  gap: 4px;
  z-index: 5;
}

.account-menu-item {
  text-decoration: none;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: var(--radius-md);
}

.account-menu-item:hover,
.account-menu-item:focus-visible {
  background: rgba(var(--primary-rgb), 0.08);
  outline: none;
}

.account-menu-sign-out {
  text-align: left;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #b91c1c;
}

.account-menu-sign-out:hover,
.account-menu-sign-out:focus-visible {
  color: #991b1b;
}

.dashboard-view {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.account-view {
  padding: 8px 0 12px;
  scroll-margin-top: 96px;
}

.admin-view {
  padding: 8px 0 12px;
  scroll-margin-top: 96px;
}

.account-card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(244, 248, 252, 0.96) 100%
  );
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow-card);
  display: grid;
  gap: 20px;
  position: relative;
  overflow: hidden;
}

.account-view .account-card {
  max-width: 860px;
  width: min(100%, 860px);
  margin: 0 auto;
}

.account-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
}

.account-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--ink-500);
  margin: 0 0 8px;
}

.account-subtitle {
  margin: 6px 0 0;
  color: var(--muted-foreground);
  font-size: 0.9rem;
}

.account-back {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 0.82rem;
  background: var(--surface-muted);
  color: var(--ink-700);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease, border-color 0.15s ease;
}

.account-back:hover {
  background: rgba(var(--primary-rgb), 0.1);
  border-color: rgba(var(--primary-rgb), 0.35);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(var(--ink-rgb), 0.12);
}

.account-back:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.account-form {
  display: grid;
  gap: 16px;
}

.account-profile-card {
  background: var(--surface-muted);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 6px 0;
  display: grid;
  gap: 0;
}

.account-row {
  display: grid;
  gap: 8px;
  padding: 12px 16px;
  align-items: start;
}

.account-row + .account-row {
  border-top: 1px solid var(--line);
}

.account-label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--ink-500);
}

.account-input {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: var(--font-primary);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(var(--ink-rgb), 0.06);
  width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  min-height: 40px;
}

.account-input:hover {
  border-color: rgba(var(--primary-rgb), 0.35);
}

.account-input:focus {
  outline: none;
  border-color: rgba(var(--primary-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.18);
}

.account-input:focus-visible {
  outline: none;
  border-color: rgba(var(--primary-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.18);
}

.account-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.account-save {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  min-height: 40px;
  font-weight: 600;
  font-size: 0.86rem;
  color: #ffffff;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-strong) 100%
  );
  box-shadow: 0 12px 26px rgba(var(--primary-rgb), 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.account-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(var(--primary-rgb), 0.3);
}

.account-save:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

.account-save:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.3);
  outline-offset: 2px;
}

.account-message {
  margin: 0;
  font-weight: 600;
  color: var(--ink-600);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  width: fit-content;
}

.account-message:empty {
  display: none;
}

.account-message.is-error {
  color: rgba(var(--danger-rgb), 0.92);
  background: rgba(var(--danger-rgb), 0.08);
  border-color: rgba(var(--danger-rgb), 0.2);
}

.account-message.is-success {
  color: rgba(var(--primary-rgb), 0.95);
  background: rgba(var(--primary-rgb), 0.12);
  border-color: rgba(var(--primary-rgb), 0.28);
}

@media (min-width: 960px) {
  .account-row {
    grid-template-columns: minmax(140px, 180px) 1fr;
    align-items: center;
  }
}

.admin-section {
  margin-top: 12px;
}

.admin-card {
  background: var(--surface-muted);
  border-radius: var(--radius-xl);
  padding: 18px;
  border: 1px solid var(--line);
  display: grid;
  gap: 16px;
}

.admin-header h3 {
  margin: 0;
}

.admin-form-card {
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 6px 0;
  display: grid;
  gap: 0;
}

.admin-divider {
  height: 1px;
  background: var(--line);
}

.visibility-controls {
  display: grid;
  gap: 10px;
}

.visibility-radio {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink);
}

.visibility-radio input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-primary);
}

.visibility-list {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: #ffffff;
}

.visibility-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--ink-700);
}

.visibility-item input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand-primary);
}

.admin-staff,
.admin-visibility,
.admin-shifts {
  display: grid;
  gap: 12px;
}

.admin-staff-header h3,
.admin-visibility-header h3,
.admin-shifts-header h3 {
  margin: 0;
}

.admin-staff-list,
.shift-list {
  display: grid;
  gap: 12px;
}

.shift-toolbar {
  display: grid;
  gap: 6px;
}

.shift-search {
  display: grid;
  gap: 6px;
}

.staff-row,
.shift-row {
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 14px;
  display: grid;
  gap: 12px;
}

.staff-summary,
.shift-summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.staff-summary.is-hidden,
.shift-summary.is-hidden {
  display: none;
}

.staff-summary-info,
.shift-summary-info {
  display: grid;
  gap: 4px;
}

.staff-name,
.shift-title {
  margin: 0;
  font-weight: 700;
  font-size: 0.95rem;
}

.staff-meta,
.shift-meta {
  margin: 0;
  color: var(--muted-foreground);
  font-size: 0.85rem;
}

.staff-edit,
.shift-edit {
  display: grid;
  gap: 12px;
}

.staff-fields,
.shift-fields {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.staff-field,
.shift-field {
  display: grid;
  gap: 6px;
}

.shift-field.is-wide {
  grid-column: 1 / -1;
}

.staff-label,
.shift-label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--ink-500);
}

.staff-input,
.shift-input {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 9px 11px;
  font-size: 0.88rem;
  font-family: var(--font-primary);
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(var(--ink-rgb), 0.06);
  min-height: 40px;
}

.staff-input:focus,
.shift-input:focus {
  outline: none;
  border-color: rgba(var(--primary-rgb), 0.55);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.18);
}

.staff-actions,
.shift-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.staff-save,
.shift-save {
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  min-height: 40px;
  font-weight: 600;
  font-size: 0.82rem;
  color: #ffffff;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-strong) 100%
  );
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(var(--primary-rgb), 0.25);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.staff-save:hover,
.shift-save:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(var(--primary-rgb), 0.3);
}

.staff-save:active,
.shift-save:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

.staff-save:focus-visible,
.shift-save:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.3);
  outline-offset: 2px;
}

.staff-delete,
.shift-delete {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.85rem;
  color: rgba(var(--danger-rgb), 0.95);
  background: rgba(239, 68, 68, 0.12);
  cursor: pointer;
}

.staff-delete:hover,
.shift-delete:hover {
  background: rgba(239, 68, 68, 0.2);
}

.staff-cancel,
.shift-cancel {
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--ink-700);
  background: var(--surface-muted);
  cursor: pointer;
  border: 1px solid var(--line);
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease, border-color 0.15s ease;
}

.staff-cancel:hover,
.shift-cancel:hover {
  background: rgba(var(--primary-rgb), 0.1);
  border-color: rgba(var(--primary-rgb), 0.3);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(var(--ink-rgb), 0.12);
}

.staff-message,
.shift-message {
  margin: 0;
  font-weight: 600;
  color: var(--ink-600);
  min-height: 18px;
}

.staff-message.is-error,
.shift-message.is-error {
  color: rgba(var(--danger-rgb), 0.92);
}

.staff-empty,
.shift-empty {
  margin: 0;
  color: var(--muted-foreground);
  font-weight: 600;
}

.status {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink-500);
}

.sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.sync-status[data-state="live"] {
  color: rgba(var(--success-rgb), 0.95);
  background: rgba(var(--success-rgb), 0.16);
  border-color: rgba(var(--success-rgb), 0.35);
}

.sync-status[data-state="syncing"] {
  color: rgba(var(--primary-rgb), 0.95);
  background: rgba(var(--primary-rgb), 0.12);
  border-color: rgba(var(--primary-rgb), 0.32);
}

.sync-status[data-state="syncing"] .sync-dot {
  animation: syncPulse 1.2s ease-in-out infinite;
}

.sync-status[data-state="issue"] {
  color: rgba(var(--warning-rgb), 0.95);
  background: rgba(var(--warning-rgb), 0.18);
  border-color: rgba(var(--warning-rgb), 0.38);
}

@keyframes syncPulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
  }
}

.banner {
  background: rgba(var(--warning-rgb), 0.18);
  color: rgba(var(--warning-rgb), 0.95);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(var(--warning-rgb), 0.4);
  font-size: 0.9rem;
  font-weight: 600;
}

.last-updated {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--muted-foreground);
}

.calendar-card,
.list-card,
.summary-card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.96) 0%,
    rgba(242, 246, 251, 0.98) 100%
  );
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
}

.list-card {
  position: relative;
}

.list-card.is-menu-open {
  z-index: 15;
}

.calendar-card {
  padding: 10px;
  margin-top: -10px;
  position: relative;
}

.calendar-card {
  position: relative;
}

.calendar-card[data-loading="true"] {
  min-height: clamp(420px, 70vh, 720px);
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 12px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 360px;
  max-width: 100%;
  min-width: 0;
  grid-column: 2;
}

.calendar-nav-button {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease, border-color 0.15s ease;
}

.calendar-nav-button:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--primary-rgb), 0.35);
  box-shadow: 0 10px 18px rgba(var(--ink-rgb), 0.12);
  background: rgba(var(--primary-rgb), 0.08);
}

.calendar-nav-button:active {
  transform: translateY(0);
  filter: brightness(0.98);
}
.calendar-nav-button:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.3);
  outline-offset: 2px;
}

.calendar-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
  text-align: center;
  flex: 1 1 auto;
}

.calendar-view-toggle {
  grid-column: 3;
  justify-self: end;
}

.calendar-card[data-loading="true"] .calendar-toolbar {
  opacity: 0;
  pointer-events: none;
}

#calendar {
  transition: opacity 0.3s ease;
}

.calendar-card[data-loading="true"] #calendar {
  opacity: 0;
}

.calendar-skeleton {
  position: absolute;
  inset: 18px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.calendar-card[data-loading="true"] .calendar-skeleton {
  opacity: 1;
  visibility: visible;
}

.calendar-skeleton-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.calendar-skeleton-title {
  width: clamp(160px, 26vw, 260px);
  height: 24px;
  border-radius: 999px;
}

.calendar-skeleton-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.calendar-skeleton-button {
  width: 34px;
  height: 28px;
  border-radius: 10px;
}

.calendar-skeleton-button-wide {
  width: 64px;
}

.calendar-skeleton-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  padding: 0 4px;
}

.calendar-skeleton-weekday {
  height: 12px;
  width: 60%;
  justify-self: center;
  border-radius: 999px;
}

.calendar-skeleton-title,
.calendar-skeleton-button,
.calendar-skeleton-weekday,
.calendar-skeleton-cell::before,
.calendar-skeleton-cell::after {
  background: linear-gradient(
    90deg,
    hsl(214, 32%, 90%) 0%,
    hsl(210, 40%, 96%) 50%,
    hsl(214, 32%, 90%) 100%
  );
  background-size: 200% 100%;
  animation: skeletonShimmer 1.6s ease-in-out infinite;
}

.calendar-skeleton-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-auto-rows: minmax(64px, 1fr);
  gap: 8px;
}

.calendar-skeleton-cell {
  position: relative;
  border-radius: var(--radius-lg);
  min-height: 64px;
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}

.calendar-skeleton-cell::before,
.calendar-skeleton-cell::after {
  content: "";
  position: absolute;
  height: 10px;
  border-radius: 999px;
}

.calendar-skeleton-cell::before {
  top: 8px;
  right: 8px;
  width: 18px;
}

.calendar-skeleton-cell::after {
  top: 28px;
  left: 10px;
  width: 60%;
}

@keyframes skeletonShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}

.list-filters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 2px rgba(var(--ink-rgb), 0.04);
  flex-wrap: wrap;
}

.list-filter {
  border: none;
  background: transparent;
  color: var(--ink-500);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.15s ease, color 0.15s ease,
    transform 0.15s ease;
}

.list-filter.is-active {
  background: var(--primary);
  color: #ffffff;
  box-shadow: 0 2px 5px rgba(var(--primary-rgb), 0.25);
}

.list-filter:hover {
  background: rgba(var(--primary-rgb), 0.12);
  color: var(--ink-800);
  transform: translateY(-1px);
}

.list-filter:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.list-filter.is-active:hover {
  background: var(--brand-primary-strong);
  color: #ffffff;
}

.list-filter:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.35);
  outline-offset: 2px;
}

.card-header h2 {
  margin: 0;
  font-weight: 600;
  font-size: 1.1rem;
}

.list-title-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--brand-primary-strong);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  transition: color 0.15s ease;
}

.list-title-button:hover {
  color: var(--brand-primary);
}

.list-title-button:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.35);
  outline-offset: 2px;
}

.list-title-caret {
  display: none;
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.card-hint {
  font-size: 0.85rem;
  color: var(--ink-500);
}

.summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.summary-item {
  background: rgba(255, 255, 255, 0.82);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  padding: 12px 16px;
  display: grid;
  gap: 6px;
}

.summary-label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--ink-500);
}

.summary-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
}

.cleaning-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-pagination {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.list-page-numbers {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.list-page-button {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 12px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease,
    transform 0.15s ease;
}

.list-page-number {
  min-width: 36px;
  text-align: center;
}

.list-page-button.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.list-page-button.is-active:hover {
  background: var(--primary);
  border-color: var(--primary);
}

.list-page-arrow {
  min-width: 40px;
  padding: 8px 10px;
}

.list-page-ellipsis {
  color: var(--muted-foreground);
  font-weight: 600;
  padding: 0 4px;
}

.list-page-button:hover {
  background: rgba(var(--primary-rgb), 0.08);
  border-color: rgba(var(--primary-rgb), 0.28);
  transform: translateY(-1px);
}

.list-page-button:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.list-page-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.cleaning-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
  cursor: pointer;
}

.cleaning-item:last-child {
  border-bottom: none;
}

.cleaning-item:hover {
  background: rgba(var(--primary-rgb), 0.08);
}

.cleaning-body {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.cleaning-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.cleaning-title {
  font-weight: 700;
  margin: 0;
  min-width: 0;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 600;
  background: var(--assignee-bg, var(--surface-muted));
  color: var(--assignee-ink, var(--ink));
  border: 1px solid rgba(var(--ink-rgb), 0.08);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.status-chip.is-unassigned {
  background: #ffffff;
  color: var(--assignee-ink, #ff4d2e);
  border: 1px dashed var(--assignee-border, rgba(255, 77, 46, 0.65));
}

.cleaning-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted-foreground);
  font-size: 0.85rem;
  margin: 0;
}

.cleaning-date {
  white-space: nowrap;
}

.time-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--ink-700);
  background: var(--surface-muted);
  border: 1px solid var(--line);
  white-space: nowrap;
}

.cleaning-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
}

.assign-quick {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink-700);
  font-weight: 600;
  font-size: 0.7rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-content: center;
  text-align: center;
}

.assign-quick:disabled {
  cursor: default;
  opacity: 0.6;
  box-shadow: none;
}

.assign-quick:disabled::after {
  content: "";
}

.assign-quick.is-unassigned {
  border: 1px dashed var(--assignee-border, rgba(255, 77, 46, 0.65));
  color: var(--assignee-ink, #ff4d2e);
}

.assign-quick.is-past {
  background: var(--surface-muted);
  border-color: var(--border);
  color: var(--muted-foreground);
  opacity: 1;
}

.assign-quick.is-past.is-unassigned {
  border-style: solid;
  color: var(--muted-foreground);
}

.assign-quick::after {
  content: "▾";
  font-size: 0.6rem;
  color: var(--assignee-caret, rgba(var(--ink-rgb), 0.45));
}

.assign-quick.is-direct::after {
  content: "";
}

.assign-quick:hover {
  background: rgba(var(--primary-rgb), 0.08);
  border-color: rgba(var(--primary-rgb), 0.28);
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(var(--ink-rgb), 0.12);
}

.assign-quick.is-unassigned:not(.is-past):hover {
  background: rgba(16, 185, 129, 0.2);
  border-color: rgba(16, 185, 129, 0.7);
  color: rgba(4, 120, 87, 0.95);
  box-shadow: 0 8px 16px rgba(16, 185, 129, 0.2);
}

.assign-quick:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.assign-quick:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.3);
  outline-offset: 2px;
}


.empty-state {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--surface-muted);
  color: var(--ink-600);
  border: 1px dashed rgba(var(--primary-rgb), 0.3);
}

.last-updated-label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.65rem;
  color: var(--ink-500);
}

.last-updated-value {
  font-weight: 600;
}

.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(20px, 4vw, 48px);
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.25s ease;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(var(--ink-rgb), 0.45);
}

.modal-card {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(242, 246, 251, 0.98) 100%
  );
  border-radius: var(--radius-xl);
  padding: clamp(22px, 3.6vw, 32px);
  width: min(600px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  z-index: 1;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-float);
  overflow: hidden;
  animation: modalPop 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(var(--ink-rgb), 0.06);
  pointer-events: none;
  z-index: 0;
}

.modal-card > :not(.modal-close) {
  position: relative;
  z-index: 1;
}

@keyframes modalPop {
  from {
    transform: translateY(18px) scale(0.96);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  color: var(--ink-600);
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.modal-close:hover {
  transform: translateY(-1px);
  color: var(--ink);
  background: rgba(var(--primary-rgb), 0.08);
}

.modal-close:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.3);
  outline-offset: 2px;
}

.modal-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.65rem;
  color: var(--ink-500);
  margin: 0 0 8px;
}

#modal-title {
  font-size: clamp(1.6rem, 2.6vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.modal-subtitle {
  margin: 0 0 12px;
  color: var(--ink-600);
  font-size: 1.05rem;
}

.modal-subtitle:empty {
  display: none;
}

.modal-summary {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink-800);
}

.modal-summary:empty {
  display: none;
}

.modal-assignee {
  display: grid;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  justify-items: center;
}

.modal-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-500);
}

.modal-assignee-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.modal-assignee-text {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}

.modal-assignee-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: rgba(var(--success-rgb), 0.95);
  background: rgba(var(--success-rgb), 0.18);
  border: 1px solid rgba(var(--success-rgb), 0.4);
}

.assignee-action {
  align-self: center;
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink-700);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.82rem;
  padding: 7px 12px;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease,
    box-shadow 0.15s ease, background 0.15s ease;
}

.assignee-action:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--primary-rgb), 0.35);
  box-shadow: 0 8px 16px rgba(var(--ink-rgb), 0.12);
  background: rgba(var(--primary-rgb), 0.08);
}

.assignee-action:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.35);
  outline-offset: 2px;
}

.assignee-action:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
  transform: none;
}

.assignee-action.is-direct {
  border: none;
  border-radius: var(--radius-lg);
  padding: 10px 18px;
  min-height: 40px;
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #ffffff;
  background: linear-gradient(
    135deg,
    var(--success) 0%,
    hsl(160, 84%, 32%) 100%
  );
  box-shadow: 0 10px 20px rgba(var(--success-rgb), 0.3);
}

.assignee-action.is-direct:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(var(--success-rgb), 0.35);
}

.assignee-action.is-direct:active {
  transform: translateY(0);
  filter: brightness(0.96);
}

.assignee-action.is-direct:focus-visible {
  outline: 2px solid rgba(var(--success-rgb), 0.35);
  outline-offset: 2px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-top: 16px;
  margin-top: auto;
  border-top: 1px solid var(--line);
}

.modal-drop,
.modal-delete {
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 8px 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease, border-color 0.15s ease;
}

.modal-drop,
.modal-delete {
  border-color: rgba(var(--danger-rgb), 0.6);
  background: rgba(var(--danger-rgb), 0.08);
  color: rgb(var(--danger-rgb));
}

.modal-drop:hover,
.modal-delete:hover {
  transform: translateY(-1px);
  background: rgba(var(--danger-rgb), 0.14);
  border-color: rgba(var(--danger-rgb), 0.75);
  box-shadow: 0 6px 12px rgba(var(--danger-rgb), 0.18);
}

.modal-drop:focus-visible,
.modal-delete:focus-visible {
  outline: 2px solid rgba(var(--danger-rgb), 0.35);
  outline-offset: 2px;
}

.modal-drop:disabled,
.modal-delete:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  box-shadow: none;
  transform: none;
}

.modal-feedback {
  margin: 10px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  align-self: center;
  text-align: center;
  opacity: 1;
}

.modal-feedback.is-success {
  color: var(--accent-2);
  align-self: center;
}

.modal-feedback.is-success.is-transient {
  animation: modalFeedbackFade 2.6s ease forwards;
}

.modal-feedback.is-error {
  color: rgba(var(--danger-rgb), 0.92);
}

.modal-feedback:empty {
  display: none;
}

@keyframes modalFeedbackFade {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }
  15% {
    opacity: 1;
    transform: translateY(0);
  }
  75% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateY(-4px);
  }
}

.assignee-menu {
  position: absolute;
  display: none;
  z-index: 15;
}

.assignee-menu.is-open {
  display: block;
}

.assignee-menu-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 10px;
  box-shadow: 0 20px 40px rgba(var(--ink-rgb), 0.16);
}

.assignee-menu-list {
  display: grid;
  gap: 4px;
  min-width: 160px;
}

.assignee-menu-item {
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-size: 0.8rem;
  background: #ffffff;
  color: var(--ink-700);
  text-align: left;
  cursor: pointer;
}

.assignee-menu-item:hover {
  border-color: rgba(var(--primary-rgb), 0.4);
  color: var(--primary-strong);
}

.assignee-menu-item.is-active {
  background: rgba(var(--primary-rgb), 0.16);
  border-color: rgba(var(--primary-rgb), 0.35);
  color: var(--primary-strong);
}

.label {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.65rem;
  color: var(--ink-500);
  margin-bottom: 4px;
}

.fc {
  font-family: inherit;
}

.fc .fc-toolbar-title {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0;
  cursor: pointer;
  line-height: 1.2;
}

.fc .fc-header-toolbar {
  display: none;
  padding: 10px 15px 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}

.fc .fc-toolbar-chunk {
  display: flex;
  align-items: stretch;
  flex-wrap: nowrap;
}

.fc .fc-toolbar-chunk:nth-child(2) {
  flex: 1;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.fc .fc-toolbar-chunk:nth-child(2) > * {
  flex: 0 0 auto;
}

.fc .fc-toolbar-chunk:nth-child(3) {
  justify-content: flex-end;
}

.fc .fc-toolbar-title {
  margin: 0;
  white-space: nowrap;
}

.fc .fc-button-group {
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  overflow: visible;
}

.fc-direction-ltr .fc-button-group > .fc-button {
  margin-left: 0 !important;
  border-radius: 0.75rem !important;
}

.fc .fc-toolbar-title:hover {
  color: var(--primary);
}

.fc .fc-scrollgrid,
.fc .fc-scrollgrid table,
.fc .fc-scrollgrid-section > td,
.fc .fc-scrollgrid-section > th {
  border: 0;
}

.fc .fc-col-header-cell {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.fc .fc-col-header-cell:first-child {
  border-left: 1px solid var(--line);
}

.fc .fc-col-header-cell-cushion {
  display: block;
  padding: 8px 0;
  color: var(--ink-500);
  font-weight: 600;
  letter-spacing: 0.2em;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.fc-timegrid .fc-col-header-cell-cushion {
  letter-spacing: 0.06em;
  text-transform: none;
  font-size: 0.78rem;
  white-space: nowrap;
}

.fc .fc-col-header {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.fc .fc-col-header tr {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

@media (max-width: 900px) {
  .fc-timegrid .fc-col-header-cell-cushion {
    font-size: 0.72rem;
    letter-spacing: 0.04em;
  }
}

.fc-theme-standard td,
.fc-theme-standard th {
  border: 0;
}

.fc .fc-daygrid-day {
  background: transparent;
}

.fc .fc-daygrid-day-frame {
  position: relative;
  margin: 0;
  padding: 3px 0;
  border-radius: 0;
  border: none;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 120px;
  height: 120px;
  overflow: hidden;
}

.fc .fc-daygrid-day-frame:hover {
  background: rgba(var(--primary-rgb), 0.06);
}

.fc .fc-daygrid-day.fc-day-past .fc-daygrid-day-frame {
  background: var(--surface-muted);
  position: relative;
  overflow: hidden;
  cursor: not-allowed;
}

.fc .fc-daygrid-day.fc-day-past .fc-daygrid-day-frame::after {
  content: "";
  position: absolute;
  top: 50%;
  left: -20%;
  width: 140%;
  height: 2px;
  background: rgba(var(--ink-rgb), 0.12);
  transform: rotate(-45deg);
  pointer-events: none;
}

.fc .fc-daygrid-day.fc-day-past .fc-daygrid-day-number {
  color: rgba(var(--ink-rgb), 0.35);
  text-decoration: none;
}

.fc .fc-day-today {
  position: relative;
  cursor: pointer;
  overflow: visible;
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 200ms;
  animation-duration: 200ms;
  z-index: 2;
}

.fc .fc-day-today .fc-daygrid-day-frame {
  background: linear-gradient(
    135deg,
    rgba(var(--primary-rgb), 0.12) 0%,
    rgba(var(--primary-rgb), 0.04) 100%
  );
  box-shadow: inset 0 0 0 2px rgba(var(--primary-rgb), 0.5);
  z-index: 2;
}

.fc .fc-day-today .fc-daygrid-day-frame:hover {
  background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.fc .fc-daygrid-day-top {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  padding: 0 10px 0;
  position: relative;
  display: flex;
  justify-content: flex-end;
  text-align: right;
  z-index: 2;
}

.fc .fc-day-today .fc-daygrid-day-top::after {
  content: none;
}

.fc .fc-day-today .fc-daygrid-day-frame::before {
  content: "Today";
  position: absolute;
  left: 0;
  right: 0;
  top: -16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--today-accent);
  box-shadow: 0 2px 4px rgba(var(--ink-rgb), 0.18);
  pointer-events: none;
  z-index: 3;
}

.fc .fc-daygrid-day-number {
  display: inline-flex;
  justify-content: flex-end;
  width: 2ch;
  padding: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--ink-500);
  text-decoration: none;
  outline: none;
}

.fc .fc-daygrid-day-number:focus,
.fc .fc-daygrid-day-number:focus-visible {
  outline: none;
  box-shadow: none;
}

.fc .fc-daygrid-day-events {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  justify-self: start;
  margin: 0 2px 0 6px;
  padding-right: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: calc(100% - 4px);
  max-height: 100%;
  overflow: visible;
  z-index: 1;
}

.fc .fc-daygrid-day-bg {
  grid-column: 1 / -1;
  grid-row: 1 / -1;
}

.fc .fc-daygrid-day-bottom {
  grid-column: 1 / -1;
  grid-row: 2;
}

.fc .fc-daygrid-event-harness {
  display: inline-block;
  max-width: 100%;
}

.fc .fc-daygrid-event {
  display: inline-block;
  max-width: 100%;
}

/* (Intentionally left without custom column widths.) */

.event-card {
  width: auto;
  max-width: 100%;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 2px;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  line-height: 1.2;
  color: var(--ink);
  transition: background 0.15s ease;
}

.event-card:not(.is-unassigned) {
  background: rgba(var(--primary-rgb), 0.12);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  border: 1px solid rgba(var(--primary-rgb), 0.3);
}

.event-card:not(.is-unassigned):hover {
  background: rgba(var(--primary-rgb), 0.18);
  border-color: rgba(var(--primary-rgb), 0.45);
}

.event-card[data-ownership="mine"]:not(.is-unassigned) {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.55);
}

.event-card[data-ownership="mine"]:not(.is-unassigned):hover {
  background: rgba(16, 185, 129, 0.28);
  border-color: rgba(16, 185, 129, 0.7);
}

.event-card.is-unassigned:hover {
  background: rgba(var(--ink-rgb), 0.06);
}

.event-card.is-unassigned {
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.event-title,
.event-assignee {
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.event-title {
  color: var(--ink);
  flex: 1 1 auto;
}

.event-assignee {
  color: var(--assignee-ink, var(--ink));
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 96%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 96%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
}

.event-card:not(.is-unassigned) .event-assignee {
  color: rgba(var(--ink-rgb), 0.82);
}

.event-card[data-ownership="mine"]:not(.is-unassigned) .event-assignee {
  color: rgba(4, 120, 87, 0.95);
}

.event-title.assign-trigger,
.event-title.is-direct,
.event-assignee.assign-trigger,
.event-assignee.is-direct {
  text-decoration: underline dotted rgba(var(--ink-rgb), 0.35);
  text-underline-offset: 2px;
}

.event-title.assign-trigger:hover,
.event-title.is-direct:hover,
.event-assignee.assign-trigger:hover,
.event-assignee.is-direct:hover {
  text-decoration-color: currentColor;
}

.event-title.is-locked,
.event-assignee.is-locked {
  cursor: default;
  opacity: 0.6;
  text-decoration: none;
}

.event-assignee.is-unassigned {
  color: var(--assignee-ink, #ff4d2e);
}

.event-separator {
  font-size: 0.58rem;
  color: var(--muted-foreground);
  flex: 0 0 auto;
}

.event-task {
  font-size: 0.62rem;
  font-weight: 600;
  color: rgba(var(--ink-rgb), 0.68);
  flex: 0 2 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: clip;
  white-space: nowrap;
}

.event-card.is-unassigned .event-time {
  display: inline-block;
  margin-left: 8px;
  padding-left: 8px;
  font-size: 0.68rem;
  color: var(--assignee-ink, #ff4d2e);
  position: relative;
  pointer-events: none;
}

.event-card.is-unassigned .event-time::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 6px;
  height: 6px;
  border-left: 1px solid var(--assignee-border, rgba(255, 77, 46, 0.65));
  border-bottom: 1px solid var(--assignee-border, rgba(255, 77, 46, 0.65));
  border-bottom-left-radius: 2px;
}

.event-card.is-unassigned .event-title {
  color: var(--assignee-ink, #ff4d2e);
}


.event-card[data-assignee-key="unassigned"],
.cleaning-item[data-assignee-key="unassigned"],
.modal-card[data-assignee-key="unassigned"] {
  --assignee-bg: #ffffff;
  --assignee-ink: #ff4d2e;
  --assignee-caret: rgba(255, 77, 46, 0.75);
  --assignee-border: rgba(255, 77, 46, 0.65);
  --assignee-separator: rgba(255, 77, 46, 0.35);
}

.event-card[data-assignee-key="sydney"],
.cleaning-item[data-assignee-key="sydney"],
.modal-card[data-assignee-key="sydney"] {
  --assignee-bg: rgba(16, 185, 129, 0.18);
  --assignee-ink: rgba(4, 120, 87, 0.95);
  --assignee-caret: rgba(4, 120, 87, 0.55);
}

.event-card[data-assignee-key="elen"],
.cleaning-item[data-assignee-key="elen"],
.modal-card[data-assignee-key="elen"] {
  --assignee-bg: rgba(214, 167, 153, 0.22);
  --assignee-ink: rgba(120, 66, 58, 0.95);
  --assignee-caret: rgba(120, 66, 58, 0.55);
}

.event-card[data-assignee-key="tyler"],
.cleaning-item[data-assignee-key="tyler"],
.modal-card[data-assignee-key="tyler"] {
  --assignee-bg: rgba(210, 176, 118, 0.24);
  --assignee-ink: rgba(123, 79, 46, 0.95);
  --assignee-caret: rgba(123, 79, 46, 0.55);
}

.event-card[data-assignee-key="brynn"],
.cleaning-item[data-assignee-key="brynn"],
.modal-card[data-assignee-key="brynn"] {
  --assignee-bg: rgba(201, 132, 104, 0.22);
  --assignee-ink: rgba(120, 62, 40, 0.95);
  --assignee-caret: rgba(120, 62, 40, 0.55);
}

.event-card[data-assignee-key="stefanie"],
.cleaning-item[data-assignee-key="stefanie"],
.modal-card[data-assignee-key="stefanie"] {
  --assignee-bg: rgba(180, 164, 150, 0.22);
  --assignee-ink: rgba(64, 52, 46, 0.95);
  --assignee-caret: rgba(64, 52, 46, 0.55);
}

.event-card[data-ownership="mine"],
.cleaning-item[data-ownership="mine"],
.modal-card[data-ownership="mine"] {
  --assignee-bg: rgba(16, 185, 129, 0.22);
  --assignee-ink: rgba(4, 120, 87, 0.95);
  --assignee-caret: rgba(4, 120, 87, 0.55);
  --assignee-border: rgba(16, 185, 129, 0.7);
  --assignee-separator: rgba(16, 185, 129, 0.4);
}

.cleaning-item[data-ownership="mine"] {
  border-left: 3px solid rgba(16, 185, 129, 0.75);
  background: rgba(16, 185, 129, 0.12);
}

.cleaning-item[data-ownership="mine"]:hover {
  background: rgba(16, 185, 129, 0.18);
}

.cleaning-item[data-ownership="mine"] .assign-quick {
  border-color: rgba(16, 185, 129, 0.65);
  background: rgba(16, 185, 129, 0.2);
  color: rgba(4, 120, 87, 0.95);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.12),
    0 0 12px rgba(16, 185, 129, 0.22);
}

.cleaning-item[data-ownership="mine"] .assign-quick:hover {
  background: rgba(16, 185, 129, 0.28);
  box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.2),
    0 0 16px rgba(16, 185, 129, 0.3);
}

.modal-card[data-ownership="mine"] {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: var(--shadow-float);
}

.month-picker {
  position: absolute;
  display: none;
  z-index: 5;
}

.month-picker.is-open {
  display: block;
}

.month-picker-card {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 12px;
  min-width: 230px;
  box-shadow: var(--shadow-card);
}

.month-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.month-picker-year {
  flex: 1;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink-800);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.month-picker-nav {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink-700);
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease, border-color 0.15s ease;
}

.month-picker-nav:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--primary-rgb), 0.35);
  box-shadow: 0 8px 14px rgba(var(--ink-rgb), 0.12);
  background: rgba(var(--primary-rgb), 0.08);
}

.month-picker-nav:active {
  transform: translateY(0);
}

.month-picker-nav:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.35);
  outline-offset: 2px;
}

.month-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.month-picker-list {
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.month-picker-label {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.62rem;
  color: var(--ink-500);
  margin: 4px 4px 0;
}

.month-picker-divider {
  height: 1px;
  background: var(--line);
  margin: 6px 0;
}

.month-picker-button {
  border: 1px solid transparent;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  width: 100%;
}

.month-picker-button:hover {
  border-color: rgba(var(--primary-rgb), 0.4);
  color: var(--primary-strong);
}

.month-picker-button.is-viewing {
  background: var(--brand-primary);
  border-color: var(--brand-primary-strong);
  color: var(--primary-foreground);
}

.month-picker-button.is-today {
  border-color: var(--brand-primary-border);
}

.fc .fc-button {
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink-700);
  font-weight: 600;
  font-size: 0.8rem;
  line-height: 1.25rem;
  padding: 0.5rem 1rem;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: transform 0.15s ease, box-shadow 0.15s ease,
    background-color 0.15s ease, color 0.15s ease;
}

.fc .fc-button.fc-button-primary {
  border-color: var(--line);
}

.fc-direction-ltr .fc-button-group > .fc-button.fc-button-primary {
  border-color: var(--line) !important;
}

.fc .fc-button:focus-visible {
  outline: 2px solid rgba(var(--primary-rgb), 0.3);
  outline-offset: 2px;
}

.fc .fc-button:focus,
.fc .fc-button:active {
  box-shadow: none;
}

.fc .fc-button:not(:disabled):hover {
  background: rgba(var(--primary-rgb), 0.08);
  color: var(--ink);
  border-color: rgba(var(--primary-rgb), 0.3);
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(var(--ink-rgb), 0.12);
}

.fc .fc-prev-button,
.fc .fc-next-button {
  width: 2.25rem;
  padding: 0;
  height: 2.25rem;
}

.fc .fc-today-button {
  min-width: 74px;
  height: 2.25rem;
}

.fc .fc-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.fc .fc-today-button:disabled {
  opacity: 1;
  background: #ffffff;
  color: var(--ink-700);
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
  background: rgba(var(--primary-rgb), 0.12);
  border-color: rgba(var(--primary-rgb), 0.3);
  color: var(--ink);
}

.fc .fc-daygrid-event {
  border-radius: 2px;
  padding: 2px 0;
  border: none;
  background: transparent;
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.fc .fc-timegrid {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.fc .fc-timegrid-body {
  position: relative;
}

.fc .fc-timegrid-axis {
  background: var(--surface-muted);
  color: var(--ink-500);
  font-weight: 600;
  font-size: 0.62rem;
}

.fc .fc-timegrid-axis-frame {
  justify-content: flex-start;
  padding: 0 8px;
}

.fc .fc-timegrid-slot {
  border-bottom: 1px solid var(--line);
}

.fc .fc-timegrid-col {
  border-left: 1px solid var(--line);
}

.fc .fc-timegrid-event {
  border-radius: var(--radius-lg);
  border: 1px solid rgba(var(--primary-rgb), 0.25);
  background: #ffffff;
  color: var(--ink);
  padding: 6px 8px;
  box-shadow: 0 8px 16px rgba(var(--ink-rgb), 0.12);
  cursor: pointer;
  overflow: hidden;
}

.fc .fc-timegrid-event .fc-event-main {
  height: 100%;
}

.week-event {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 100%;
}

.week-event-time {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-600);
}

.week-event-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.week-event-assignee {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-600);
}

.week-event.is-compact {
  gap: 2px;
}

.week-event.is-compact .week-event-title {
  font-size: 0.8rem;
  -webkit-line-clamp: 1;
}

.week-event.is-compact .week-event-assignee {
  display: none;
}

.fc .fc-timegrid-event.is-unassigned {
  border-color: rgba(255, 77, 46, 0.6);
  background: rgba(255, 77, 46, 0.08);
  color: #ff4d2e;
}

.fc .fc-timegrid-event.is-unassigned .week-event-time,
.fc .fc-timegrid-event.is-unassigned .week-event-assignee {
  color: rgba(255, 77, 46, 0.85);
}

.fc .fc-timegrid-event.is-mine {
  border-color: rgba(16, 185, 129, 0.6);
  background: rgba(16, 185, 129, 0.16);
  color: rgba(4, 120, 87, 0.95);
}

.fc .fc-timegrid-event.is-mine .week-event-time,
.fc .fc-timegrid-event.is-mine .week-event-assignee {
  color: rgba(4, 120, 87, 0.75);
}

.fc .fc-timegrid-now-indicator-line {
  border-color: #dc2626;
  border-width: 2px;
}

.fc .fc-timegrid-now-indicator-arrow {
  display: none;
}

.calendar-now-label {
  position: absolute;
  left: 50%;
  transform: translate(-50%, -50%);
  height: 18px;
  padding: 0 8px;
  background: #dc2626;
  color: #ffffff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  border-radius: var(--radius-md);
  z-index: 4;
  pointer-events: none;
}


@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .top-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 8px;
    height: 64px;
    padding: 0 20px;
  }

  .nav-actions {
    justify-content: flex-end;
    grid-column: 3;
    justify-self: end;
  }

  .brand-logo {
    height: 68px;
    max-width: 260px;
    max-height: 100%;
  }

  .nav-brand {
    grid-column: 2;
    justify-self: center;
  }

  .user-strip {
    width: 44px;
    height: 44px;
    padding: 0;
    position: relative;
    justify-content: center;
  }

  .user-strip::before {
    content: "";
    width: 18px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor;
    display: block;
  }

  .user-name {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
  }

  .user-caret {
    display: none;
  }

  .auth-logo {
    width: min(300px, 80%);
    height: auto;
    max-width: 100%;
  }

  .account-actions {
    justify-content: flex-start;
  }

  .auth {
    grid-template-columns: 1fr;
    padding: 28px 18px 40px;
  }

  #calendar-section {
    display: none;
  }

  .fc .fc-daygrid-day-frame {
    min-height: 96px;
    height: 96px;
  }

  .calendar-card[data-loading="true"] {
    min-height: clamp(360px, 65vh, 620px);
  }

  .calendar-skeleton-grid {
    grid-auto-rows: minmax(52px, 1fr);
  }

  .calendar-skeleton-cell {
    min-height: 52px;
  }

  .page {
    padding: 110px 16px 48px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    position: relative;
  }

  .list-card .card-header {
    align-items: center;
    text-align: center;
  }

  .calendar-card,
  .list-card,
  .summary-card {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .list-title-button {
    width: min(100%, 260px);
    justify-content: center;
    gap: 10px;
    margin: 0 auto;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: var(--shadow-xs);
    text-decoration: none;
  }

  .list-title-caret {
    display: inline-block;
  }

  .list-filters {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: min(340px, 95vw);
    display: none;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--card);
    box-shadow: var(--shadow-card);
    z-index: 30;
  }

  .list-filters.is-open {
    display: grid;
  }

  .list-filter {
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    letter-spacing: 0.02em;
    border-radius: var(--radius-md);
    font-size: 1rem;
  }

  .cleaning-item {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: stretch;
  }

  .cleaning-actions {
    justify-content: flex-end;
    align-self: stretch;
  }

  .assign-quick {
    height: auto;
    align-self: center;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    padding: 10px 14px;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  .card-header h2 {
    font-size: 1.2rem;
  }

  .card-hint {
    font-size: 0.9rem;
  }

  .hero h1 {
    font-size: clamp(1.7rem, 6.5vw, 2.2rem);
    margin-bottom: 2px;
  }

  .summary-label {
    font-size: 0.7rem;
  }

  .summary-value {
    font-size: 1.35rem;
  }

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

  .summary-item {
    width: 100%;
  }

  .cleaning-title {
    font-size: 1rem;
  }

  .cleaning-meta {
    font-size: 0.95rem;
  }

  .time-chip {
    font-size: 0.75rem;
  }

  .assign-quick {
    font-size: 0.82rem;
    padding: 7px 14px;
  }
}
