﻿:root {
  --bg: #f5f7f8;
  --surface: #ffffff;
  --surface-2: #eef3f1;
  --ink: #15201d;
  --muted: #66736f;
  --line: #dbe4e0;
  --brand: #0b1020;
  --brand-2: #c79a35;
  --accent: #f5c76b;
  --violet: #6ee7ff;
  --danger: #b42318;
  --ok: #15803d;
  --shadow: 0 10px 24px rgba(21, 32, 29, 0.07);
  --font-brand: "Aptos Display", "Segoe UI Variable Display", "Manrope", "Inter", ui-sans-serif, system-ui, sans-serif;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070b13;
  --surface: #0d1422;
  --surface-2: #101a2c;
  --ink: #eef6ff;
  --muted: #8aa3c7;
  --line: #1b3151;
  --brand: #f3c866;
  --brand-2: #ffe7a3;
  --accent: #d6a13b;
  --violet: #70e7ff;
  --danger: #ff9b92;
  --ok: #74d99f;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.22), 0 0 24px rgba(245, 199, 107, 0.055);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(199, 154, 53, 0.08), transparent 34%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-brand);
  text-rendering: optimizeLegibility;
}

body[data-theme="light"] {
  --bg: #f3f6f8;
  --surface: #ffffff;
  --surface-2: #eef4f7;
  --ink: #101820;
  --muted: #536578;
  --line: #ccd9e3;
  --shadow: 0 14px 32px rgba(19, 31, 45, 0.08), 0 0 18px rgba(199, 154, 53, 0.05);
}

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

button {
  border: 0;
  cursor: pointer;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background:
    linear-gradient(120deg, rgba(4, 7, 15, 0.96), rgba(47, 35, 12, 0.88)),
    url("https://images.unsplash.com/photo-1551836022-d5d88e9218df?auto=format&fit=crop&w=1800&q=80") center / cover;
}

.login-copy {
  align-self: end;
  padding: 56px;
  color: #fff;
}

.login-copy p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 18px;
  line-height: 1.55;
}

.login-copy .brand-logo.large {
  display: inline-grid;
  max-width: min(760px, calc(100vw - 112px));
  min-width: 0;
  width: auto;
  white-space: nowrap;
}

.login-copy .brand-logo.large .brand-gum {
  font-size: clamp(58px, 7.5vw, 94px);
}

.login-copy .brand-logo.large .brand-performance {
  font-size: clamp(16px, 2.05vw, 26px);
  margin-left: clamp(40px, 5.9vw, 66px);
  opacity: 1;
  transform: none;
}

.login-panel {
  width: min(440px, calc(100vw - 40px));
  margin: auto;
  padding: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 8px;
}

.login-panel h2,
.section-title h2 {
  margin: 0;
  font-size: 24px;
}

body[data-theme="dark"] .login-panel {
  background: rgba(23, 33, 31, 0.96);
  border-color: rgba(255, 255, 255, 0.12);
}

.muted {
  color: var(--muted);
}

.form-row {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, white 6%), var(--surface));
  color: var(--ink);
  border-radius: 10px;
  padding: 11px 12px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

select {
  appearance: none;
  padding-right: 40px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, white 6%), var(--surface));
  background-position:
    calc(100% - 21px) 50%,
    calc(100% - 15px) 50%,
    0 0;
  background-size:
    6px 6px,
    6px 6px,
    100% 100%;
  background-repeat: no-repeat;
}

select option {
  background: var(--surface);
  color: var(--ink);
}

body[data-theme="dark"] select option {
  background: #0d1422;
  color: #eef6ff;
}

input[type="checkbox"] {
  width: auto;
  accent-color: var(--accent);
}

textarea {
  min-height: 84px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245, 199, 107, 0.13), 0 0 18px rgba(112, 231, 255, 0.08);
}

.primary,
.secondary,
.ghost,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 999px;
  padding: 0 14px;
  font-weight: 900;
  letter-spacing: 0.01em;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease, background 150ms ease;
}

.primary {
  background: linear-gradient(135deg, #7b5a16, var(--brand-2), #ffe7a3);
  color: #15100a;
  box-shadow: 0 10px 28px rgba(245, 199, 107, 0.24);
}

.secondary {
  border: 1px solid rgba(245, 199, 107, 0.18);
  background:
    linear-gradient(135deg, rgba(245, 199, 107, 0.1), rgba(112, 231, 255, 0.05)),
    var(--surface-2);
  color: var(--brand-2);
}

.primary:hover,
.secondary:hover,
.ghost:hover,
.danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(245, 199, 107, 0.18), 0 0 18px rgba(112, 231, 255, 0.08);
}

.ghost {
  background: transparent;
  color: var(--muted);
}

.danger {
  background: rgba(180, 35, 24, 0.1);
  color: var(--danger);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
}

.sidebar {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 20;
  width: 64px;
  height: 100vh;
  background:
    linear-gradient(160deg, rgba(5, 7, 14, 0.98), rgba(18, 13, 5, 0.96));
  color: #fff;
  padding: 14px 0;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: box-shadow 180ms ease;
}

.sidebar.is-expanded {
  width: 246px;
  box-shadow: 18px 0 34px rgba(0, 0, 0, 0.28), inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 246px;
  min-height: 72px;
  margin-bottom: 6px;
  padding: 2px 12px 12px;
}

.brand-stack {
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand-stack > span {
  display: none;
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
}

.brand-logo {
  display: inline-block;
  font-family: var(--font-brand);
  font-weight: 850;
  line-height: 1.16;
  letter-spacing: 0;
  padding: 0.04em 0 0.36em;
  overflow: visible;
  min-width: 128px;
}

.brand-gum {
  display: inline-block;
  font-weight: 900;
  line-height: 1.16;
  padding-bottom: 0.08em;
  background: linear-gradient(180deg, #f6cf63 0%, #b47a12 68%, #7f530c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-logo .brand-gum {
  font-size: 39px;
  letter-spacing: -1.25px;
}

.brand-logo .brand-performance {
  display: block;
  width: max-content;
  margin-top: -10px;
  margin-left: 28px;
  font-size: 10.5px;
  color: #f2f4f7;
  letter-spacing: 0;
  line-height: 1;
  text-transform: none;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.sidebar.is-expanded .brand-logo .brand-performance {
  opacity: 1;
  transform: translateY(0);
}

.sidebar:not(.is-expanded) .brand-logo {
  width: 48px;
  min-width: 48px;
  text-align: center;
  transform: translateX(-2px);
}

.sidebar:not(.is-expanded) .brand-logo .brand-gum {
  font-size: 18px;
  letter-spacing: -0.65px;
  line-height: 1.18;
  padding-bottom: 0.08em;
}

.sidebar:not(.is-expanded) .brand-logo .brand-performance {
  display: none;
}

.brand-logo.large {
  margin-bottom: 12px;
  padding: 0.04em 0 0.48em;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.24));
}

.brand-logo.large .brand-gum {
  font-size: clamp(72px, 10vw, 122px);
  letter-spacing: -3px;
}

.brand-logo.large .brand-performance {
  margin-top: -24px;
  margin-left: clamp(50px, 6.8vw, 82px);
  font-size: clamp(18px, 2.25vw, 30px);
  color: #f7f8fa;
}

.nav {
  display: grid;
  gap: 4px;
  width: 246px;
  padding: 8px 0;
}

.sidebar-footer {
  margin-top: auto;
  width: 246px;
  padding: 12px 10px 0;
}

.sidebar-footer .secondary {
  width: 44px;
  justify-content: flex-start;
  overflow: hidden;
  padding-inline: 11px;
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
  border-color: rgba(245, 199, 107, 0.12);
  transition: width 160ms ease, background 160ms ease, box-shadow 160ms ease, color 160ms ease, border-color 160ms ease;
}

.sidebar.is-expanded .sidebar-footer .secondary {
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-footer .secondary:hover {
  color: #ffe7a3;
  border-color: rgba(245, 199, 107, 0.46);
  background: linear-gradient(90deg, rgba(245, 199, 107, 0.2), rgba(245, 199, 107, 0.05));
  box-shadow: inset 3px 0 0 rgba(245, 199, 107, 0.72), 0 0 18px rgba(245, 199, 107, 0.16);
}

.nav button {
  display: flex;
  align-items: center;
  position: relative;
  width: 246px;
  min-height: 40px;
  justify-content: flex-start;
  gap: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
  border: 1px solid transparent;
  border-radius: 0;
  padding: 0 18px;
  overflow: hidden;
  white-space: nowrap;
}

.nav-icon {
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.nav-label {
  display: inline-block;
  margin-left: 14px;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 150ms ease, transform 150ms ease;
}

.sidebar.is-expanded .nav-label {
  opacity: 1;
  transform: translateX(0);
}

.nav button.active {
  background: linear-gradient(90deg, rgba(245, 199, 107, 0.2), rgba(112, 231, 255, 0.06));
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent), 0 0 18px rgba(245, 199, 107, 0.12);
}

.nav button:hover {
  color: #fff;
  background: linear-gradient(90deg, rgba(245, 199, 107, 0.18), rgba(245, 199, 107, 0.04));
  box-shadow: inset 3px 0 0 rgba(245, 199, 107, 0.8), 0 0 18px rgba(245, 199, 107, 0.14);
}

.main {
  position: relative;
  min-width: 0;
  padding: 24px;
  grid-column: 2;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: -4px 0 24px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, var(--accent));
  border-radius: 16px;
  background:
    radial-gradient(circle at 8% 0%, rgba(245, 199, 107, 0.15), transparent 28%),
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 94%, #0b1020 6%), var(--surface-2));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.topbar .actions {
  align-items: center;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1;
  letter-spacing: -0.01em;
}

.active-department-title {
  margin-top: 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-shadow: 0 0 14px rgba(245, 199, 107, 0.22);
}

.sticky-note {
  position: fixed;
  top: calc(102px + var(--note-y));
  left: calc(100vw - var(--note-w) - 24px + var(--note-x));
  z-index: 18;
  width: var(--note-w);
  height: var(--note-h);
  min-width: 210px;
  min-height: 150px;
  border: 1px solid rgba(139, 94, 22, 0.26);
  border-radius: 4px 14px 10px 14px;
  background:
    linear-gradient(145deg, rgba(255, 244, 161, 0.98), rgba(255, 214, 84, 0.96)),
    #ffe37a;
  color: #1d1a12;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.42);
  transform: rotate(-0.8deg);
  touch-action: none;
}

.sticky-note.is-unpinned {
  position: absolute;
  top: calc(102px + var(--note-y));
  left: calc(100% - var(--note-w) - 24px + var(--note-x));
}

.sticky-note.is-moving {
  z-index: 40;
  transition: none;
  opacity: 0.96;
}

.sticky-note.has-update {
  border-color: rgba(220, 38, 38, 0.42);
  box-shadow:
    0 18px 32px rgba(0, 0, 0, 0.22),
    0 0 0 3px rgba(255, 83, 83, 0.18),
    0 0 28px rgba(255, 83, 83, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.42);
  animation: sticky-update-pulse 1.7s ease-in-out infinite;
}

.sticky-note.is-collapsed {
  height: 48px;
  min-height: 48px;
  overflow: hidden;
}

.sticky-note.is-docked {
  position: fixed;
  top: auto;
  left: auto;
  right: calc(18px + (var(--dock-index) * 218px));
  bottom: 16px;
  width: 200px;
  height: 44px;
  min-width: 190px;
  min-height: 44px;
  overflow: hidden;
  transform: rotate(0deg);
  z-index: 32;
}

.sticky-note.is-docked .sticky-note-header {
  height: 44px;
  padding: 8px 9px 7px 12px;
}

.sticky-note.is-docked textarea,
.sticky-note.is-docked .sticky-resize,
.sticky-note.is-docked .sticky-alert {
  display: none;
}

.sticky-note-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 42px;
  padding: 8px 10px 4px 14px;
  cursor: grab;
  user-select: none;
}

.sticky-note-header:active {
  cursor: grabbing;
}

.sticky-note-header strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: "Segoe Print", "Comic Sans MS", "Bradley Hand ITC", cursive;
  font-size: 20px;
  line-height: 1;
}

.sticky-alert {
  margin-left: auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.16);
  color: #8f1010;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  box-shadow: 0 0 14px rgba(220, 38, 38, 0.12);
}

.sticky-note-header button {
  min-width: 28px;
  min-height: 28px;
  padding: 0;
  color: #4b3510;
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(139, 94, 22, 0.18);
  box-shadow: none;
}

.sticky-note-tools {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: auto;
}

.sticky-mini-button {
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
}

.sticky-pin-button {
  display: inline-grid;
  place-items: center;
}

.sticky-pin-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform: rotate(-22deg);
}

.sticky-pin-button.is-active {
  color: #8f1010;
  background: rgba(220, 38, 38, 0.12);
  border-color: rgba(220, 38, 38, 0.22);
}

.sticky-dock-button.is-active {
  color: #1b3a7a;
  background: rgba(255, 255, 255, 0.34);
}

.sticky-note textarea {
  width: calc(100% - 24px);
  height: calc(100% - 58px);
  margin: 0 12px 12px;
  padding: 4px 2px;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: #1d1a12;
  font-family: "Segoe Print", "Comic Sans MS", "Bradley Hand ITC", cursive;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.42;
}

body[data-theme="light"] .sticky-note textarea {
  background: transparent;
  border: 0;
  color: #1d1a12;
}

.sticky-note textarea[readonly] {
  cursor: default;
}

.sticky-note textarea::placeholder {
  color: rgba(29, 26, 18, 0.5);
}

.sticky-resize {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 18px;
  height: 18px;
  border-right: 3px solid rgba(75, 53, 16, 0.32);
  border-bottom: 3px solid rgba(75, 53, 16, 0.32);
  cursor: nwse-resize;
  touch-action: none;
}

.sticky-note.is-collapsed textarea,
.sticky-note.is-collapsed .sticky-resize {
  display: none;
}

body[data-theme="light"] .sticky-note {
  box-shadow: 0 18px 32px rgba(2, 6, 23, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

@keyframes sticky-update-pulse {
  0%,
  100% {
    transform: rotate(-0.8deg) translateY(0);
  }

  50% {
    transform: rotate(-0.8deg) translateY(-2px);
  }
}

.sticky-admin-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--accent));
  border-radius: 12px;
  background:
    radial-gradient(circle at 12% 0, rgba(245, 199, 107, 0.12), transparent 34%),
    var(--surface-2);
}

.sticky-admin-card h3 {
  margin: 0;
}

.sticky-admin-list,
.sticky-admin-person {
  display: grid;
  gap: 16px;
}

.sticky-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sticky-card-heading strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticky-admin-card textarea {
  min-height: 150px;
  font-family: "Segoe Print", "Comic Sans MS", "Bradley Hand ITC", cursive;
  font-size: 16px;
  line-height: 1.45;
  background: rgba(255, 226, 116, 0.12);
}

body[data-theme="light"] .sticky-admin-card {
  background:
    radial-gradient(circle at 12% 0, rgba(245, 199, 107, 0.16), transparent 34%),
    #fffdf5;
}

.grid {
  display: grid;
  gap: 16px;
}

.date-nav {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: 8px;
  align-items: center;
}

.date-nav button {
  min-height: 44px;
  padding: 0;
  font-size: 18px;
  font-weight: 950;
}

.segmented-control {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--accent));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
}

.segmented-control button {
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 999px;
  color: var(--muted);
}

.segmented-control button.active {
  color: #14100a;
  background: var(--gold-gradient, linear-gradient(135deg, #9d7320, #ffd66f 55%, #fff0b3));
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(245, 199, 107, 0.2);
}

.calendar-board {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.calendar-board-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--accent));
  border-radius: 14px;
  background:
    radial-gradient(circle at 8% 0, rgba(245, 199, 107, 0.13), transparent 34%),
    color-mix(in srgb, var(--surface-2) 92%, var(--accent));
}

.calendar-board-header strong {
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.calendar-week-labels,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-week-labels {
  gap: 8px;
}

.calendar-week-labels span {
  padding: 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.calendar-grid {
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--line) 84%, var(--accent));
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}

.calendar-day {
  min-height: 170px;
  padding: 12px;
  border-right: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 45%),
    color-mix(in srgb, var(--surface-2) 72%, transparent);
}

.calendar-board.is-month .calendar-grid,
.calendar-board.is-custom .calendar-grid {
  grid-auto-rows: minmax(150px, 1fr);
}

.calendar-board.is-custom .calendar-day {
  min-height: 150px;
}

.calendar-board.is-week .calendar-day {
  min-height: 420px;
}

.calendar-day.is-today {
  box-shadow: inset 0 0 0 2px rgba(245, 199, 107, 0.58), inset 0 0 26px rgba(245, 199, 107, 0.08);
}

.calendar-day.is-outside {
  opacity: 0.48;
}

.calendar-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.calendar-day-button {
  width: 100%;
  min-height: 38px;
  padding: 6px 8px;
  border-radius: 10px;
  text-align: left;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  cursor: pointer;
}

.calendar-day-button:hover {
  background:
    radial-gradient(circle at 12% 0, rgba(245, 199, 107, 0.22), transparent 44%),
    rgba(245, 199, 107, 0.08);
  border-color: rgba(245, 199, 107, 0.38);
  box-shadow: 0 0 18px rgba(245, 199, 107, 0.14);
}

.calendar-day-head strong {
  color: var(--accent);
  font-size: 22px;
}

.calendar-day-head span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.calendar-day-events {
  display: grid;
  gap: 8px;
  align-content: start;
}

.calendar-day-events small,
.calendar-day-events em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.calendar-event {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid rgba(54, 211, 255, 0.28);
  border-radius: 10px;
  background: rgba(54, 211, 255, 0.08);
  box-shadow: 0 0 18px rgba(54, 211, 255, 0.08);
  min-width: 0;
}

button.calendar-event {
  width: 100%;
  min-height: 0;
  text-align: left;
  cursor: pointer;
}

button.calendar-event:hover {
  border-color: rgba(245, 199, 107, 0.62);
  background:
    radial-gradient(circle at 8% 0, rgba(245, 199, 107, 0.18), transparent 46%),
    rgba(54, 211, 255, 0.08);
  box-shadow: 0 0 22px rgba(245, 199, 107, 0.14);
  transform: translateY(-1px);
}

.calendar-event b {
  color: var(--accent);
  font-size: 12px;
}

.calendar-event span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event small {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 950;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.calendar-event.is-late {
  border-color: rgba(255, 83, 83, 0.56);
  background: rgba(255, 83, 83, 0.13);
  box-shadow: 0 0 20px rgba(255, 83, 83, 0.13);
}

.calendar-event.is-done {
  border-color: rgba(29, 255, 168, 0.42);
  background: rgba(29, 255, 168, 0.1);
}

.card-calendar-event {
  border-left-width: 4px;
}

.period-field.is-hidden {
  display: none;
}

.compact-filter:has(.period-field:not(.is-hidden)) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

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

.form-row.full {
  grid-column: 1 / -1;
}

.panel,
.card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 0%, rgba(245, 199, 107, 0.08), transparent 28%),
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 94%, var(--accent) 6%), var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--accent));
  border-radius: 8px;
  box-shadow: var(--shadow);
  contain: layout paint;
}

.panel::before,
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(245, 199, 107, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 24%);
  opacity: 0.48;
}

.panel > *,
.card > * {
  position: relative;
}

.panel {
  padding: 18px;
}

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

.section-title > div {
  min-width: 0;
}

.collapse-toggle-button {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 999px;
  color: var(--accent);
  font-size: 22px;
  font-weight: 950;
  line-height: 1;
  background:
    radial-gradient(circle at 30% 18%, rgba(255, 255, 255, 0.16), transparent 34%),
    color-mix(in srgb, var(--surface-2) 86%, var(--accent));
  border-color: color-mix(in srgb, var(--line) 58%, var(--accent));
  box-shadow: 0 0 18px rgba(245, 199, 107, 0.12);
}

.collapse-toggle-button:hover {
  color: #111827;
  background: linear-gradient(135deg, #9d7320, #ffd66f 55%, #fff0b3);
  border-color: transparent;
  box-shadow: 0 0 24px rgba(245, 199, 107, 0.28);
}

.collapsible-panel.is-collapsed {
  padding-bottom: 12px;
}

.collapsible-panel.is-collapsed .section-title {
  margin-bottom: 0;
}

.metric {
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.metric::after {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent), var(--violet));
  border-radius: 999px 999px 0 0;
}

.metric span {
  color: var(--muted);
  font-weight: 700;
  font-size: 13px;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 32px;
}

.progress {
  height: 10px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.progress b {
  display: block;
  height: 100%;
  width: var(--value);
  background: linear-gradient(90deg, var(--accent), var(--violet));
}

.progress.neon b {
  box-shadow: 0 0 10px rgba(245, 199, 107, 0.42);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

body[data-theme="light"] th {
  color: #39506a;
}

body[data-theme="light"] td {
  color: #122033;
}

body[data-theme="light"] .panel,
body[data-theme="light"] .card,
body[data-theme="light"] .goal-tile,
body[data-theme="light"] .due-card,
body[data-theme="light"] .response-card,
body[data-theme="light"] .goal-admin-card {
  background:
    radial-gradient(circle at 8% 0%, rgba(199, 154, 53, 0.11), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 245, 248, 0.96));
  border-color: rgba(157, 181, 202, 0.72);
}

body[data-theme="light"] .muted {
  color: #536578;
}

body[data-theme="light"] .pill {
  background:
    linear-gradient(135deg, rgba(199, 154, 53, 0.14), rgba(8, 145, 178, 0.06)),
    #f4f8fa;
  color: #4a6176;
}

body[data-theme="light"] input,
body[data-theme="light"] textarea {
  background: #ffffff;
  border-color: #cbd8e3;
  color: #101820;
}

body[data-theme="light"] select {
  border-color: #cbd8e3;
  color: #101820;
  background-image:
    linear-gradient(45deg, transparent 50%, #9a6407 50%),
    linear-gradient(135deg, #9a6407 50%, transparent 50%),
    linear-gradient(180deg, #ffffff, #ffffff);
}

body[data-theme="light"] .pill.status-done,
body[data-theme="light"] .pill.ok {
  background: rgba(22, 163, 74, 0.12);
  color: #087334;
  border-color: rgba(22, 163, 74, 0.24);
}

body[data-theme="light"] .pill.status-pending {
  background: rgba(8, 145, 178, 0.12);
  color: #075f72;
  border-color: rgba(8, 145, 178, 0.22);
}

body[data-theme="light"] .pill.status-late-done,
body[data-theme="light"] .pill.warn {
  background: rgba(199, 154, 53, 0.15);
  color: #8a5c08;
  border-color: rgba(199, 154, 53, 0.3);
}

body[data-theme="light"] .pill.status-overdue,
body[data-theme="light"] .pill.danger {
  background: rgba(220, 38, 38, 0.12);
  color: #b42318;
  border-color: rgba(220, 38, 38, 0.28);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 26px;
  border-radius: 999px;
  padding: 0 10px;
  border: 1px solid rgba(245, 199, 107, 0.14);
  background:
    linear-gradient(135deg, rgba(245, 199, 107, 0.08), rgba(112, 231, 255, 0.04)),
    var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.025);
}

.pill.status-done::before,
.pill.status-late-done::before,
.pill.status-overdue::before,
.pill.status-pending::before,
.pill.ok::before,
.pill.warn::before,
.pill.danger::before,
.pill.neon::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.pill.ok {
  background: rgba(39, 193, 54, 0.14);
  color: #4dff83;
  border-color: rgba(77, 255, 131, 0.24);
  box-shadow: 0 0 14px rgba(77, 255, 131, 0.1);
}

.pill.warn {
  background: rgba(245, 199, 107, 0.14);
  color: #ffd66f;
  border-color: rgba(245, 199, 107, 0.28);
  box-shadow: 0 0 14px rgba(245, 199, 107, 0.12);
}

.pill.neon {
  background: rgba(245, 199, 107, 0.12);
  color: var(--accent);
  border: 1px solid rgba(245, 199, 107, 0.24);
  box-shadow: 0 0 10px rgba(245, 199, 107, 0.12);
}

.pill.danger {
  background: rgba(255, 68, 68, 0.14);
  color: #ff8b84;
  border-color: rgba(255, 100, 100, 0.3);
  box-shadow: 0 0 14px rgba(255, 80, 80, 0.12);
}

.pill.status-done {
  background: rgba(39, 193, 54, 0.14);
  color: #55ff8a;
  border-color: rgba(85, 255, 138, 0.28);
  box-shadow: 0 0 16px rgba(39, 193, 54, 0.14);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pill.status-late-done {
  background: rgba(255, 179, 71, 0.14);
  color: #ffc46b;
  border-color: rgba(255, 196, 107, 0.3);
  box-shadow: 0 0 16px rgba(255, 178, 72, 0.14);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pill.status-overdue {
  background: rgba(255, 60, 60, 0.16);
  color: #ff8f89;
  border-color: rgba(255, 100, 100, 0.34);
  box-shadow: 0 0 18px rgba(255, 74, 74, 0.18);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.pill.status-pending {
  background: rgba(112, 231, 255, 0.1);
  color: #8eeeff;
  border-color: rgba(112, 231, 255, 0.24);
  box-shadow: 0 0 14px rgba(112, 231, 255, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.wa-card {
  padding: 14px;
}

.qr {
  aspect-ratio: 1;
  width: 128px;
  margin: 12px 0;
  display: grid;
  place-items: center;
  border: 8px solid #fff;
  outline: 1px solid var(--line);
  background:
    repeating-linear-gradient(90deg, #10201d 0 8px, #fff 8px 16px),
    repeating-linear-gradient(#10201d 0 8px, #fff 8px 16px);
  background-blend-mode: difference;
  color: #10201d;
  font-weight: 900;
}

.qr.pending {
  width: 180px;
  border: 1px solid rgba(245, 199, 107, 0.32);
  outline: 0;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(245, 199, 107, 0.12), rgba(46, 230, 255, 0.08));
  color: var(--text);
  box-shadow: inset 0 0 18px rgba(245, 199, 107, 0.08);
}

.qr.pending span {
  max-width: 120px;
  text-align: center;
  line-height: 1.35;
}

.qr-img {
  width: 180px;
  max-width: 100%;
  border: 8px solid #fff;
  border-radius: 8px;
  margin: 12px 0;
}

.connected-number {
  display: inline-grid;
  gap: 3px;
  margin: 6px 0 10px;
  padding: 9px 12px;
  border: 1px solid rgba(245, 199, 107, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(245, 199, 107, 0.16), rgba(46, 230, 255, 0.08)),
    var(--surface-2);
  box-shadow: 0 0 18px rgba(245, 199, 107, 0.08);
}

.connected-number span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.connected-number strong {
  color: var(--accent);
  font-size: 15px;
  letter-spacing: 0;
}

.conversation-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  max-height: 260px;
  overflow: auto;
}

.conversation-list button {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
}

.conversation-list button.active {
  border-color: var(--brand);
  background: var(--surface-2);
}

.conversation-list span {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-list {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow: auto;
}

.message {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.message.mine {
  background: rgba(45, 212, 191, 0.12);
  border-color: #bfe7db;
}

.message small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.task {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.task:last-child {
  border-bottom: 0;
}

.task:hover {
  border-color: rgba(245, 199, 107, 0.36);
  border-radius: 8px;
  background:
    radial-gradient(circle at 0 50%, rgba(245, 199, 107, 0.12), transparent 26%),
    linear-gradient(90deg, rgba(245, 199, 107, 0.09), rgba(112, 231, 255, 0.025)),
    var(--surface);
  box-shadow: inset 4px 0 0 rgba(245, 199, 107, 0.8), 0 0 22px rgba(245, 199, 107, 0.08);
}

.task.task-late {
  margin-inline: -8px;
  padding: 14px 14px;
  border: 1px solid rgba(255, 90, 90, 0.48);
  border-radius: 8px;
  background:
    radial-gradient(circle at 0 50%, rgba(255, 95, 95, 0.2), transparent 26%),
    linear-gradient(90deg, rgba(255, 40, 40, 0.16), rgba(245, 199, 107, 0.035)),
    var(--surface);
  box-shadow: inset 4px 0 0 #ff5f59, 0 0 28px rgba(255, 80, 80, 0.16);
}

.task.task-late:hover {
  border-color: rgba(255, 90, 90, 0.52);
}

.task.task-late b {
  color: #ffd6d2;
  text-shadow: 0 0 12px rgba(255, 80, 80, 0.18);
}

.task.task-late .pill.status-overdue,
.task.task-late .pill.danger {
  background: rgba(255, 65, 65, 0.22);
  border: 1px solid rgba(255, 105, 105, 0.34);
  color: #ffb3ad;
  box-shadow: 0 0 16px rgba(255, 80, 80, 0.18);
}

body[data-theme="light"] .task.task-late {
  background:
    radial-gradient(circle at 0 50%, rgba(255, 89, 89, 0.22), transparent 24%),
    linear-gradient(90deg, rgba(255, 70, 70, 0.16), rgba(255, 255, 255, 0.9) 54%),
    #fff8f7;
  border-color: rgba(220, 38, 38, 0.5);
  box-shadow: inset 4px 0 0 #ef4444, 0 14px 28px rgba(220, 38, 38, 0.08);
}

body[data-theme="light"] .task.task-late b {
  color: #7f1d1d;
  text-shadow: none;
}

body[data-theme="light"] .task.task-late .muted {
  color: #344e6b;
}

body[data-theme="light"] .task.task-late .pill.status-overdue,
body[data-theme="light"] .task.task-late .pill.danger {
  background:
    radial-gradient(circle at 18% 50%, rgba(255, 255, 255, 0.38), transparent 28%),
    linear-gradient(135deg, rgba(255, 88, 88, 0.28), rgba(255, 196, 196, 0.88));
  color: #8f1010;
  border-color: rgba(220, 38, 38, 0.44);
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.08), 0 0 18px rgba(220, 38, 38, 0.16);
  text-shadow: none;
}

body[data-theme="light"] .task.task-late .pill.status-late-done {
  background: rgba(199, 154, 53, 0.18);
  color: #7a4f05;
  border-color: rgba(199, 154, 53, 0.36);
}

body[data-theme="light"] .task-time-block,
body[data-theme="light"] .task > strong {
  color: #172033;
  text-shadow: none;
}

body[data-theme="light"] .task-time-block small,
body[data-theme="light"] .task > strong small {
  color: #2563a8;
}

body[data-theme="light"] .task-linked-card-warning {
  background: rgba(199, 154, 53, 0.14);
  color: #7a4f05;
  border-color: rgba(199, 154, 53, 0.32);
  box-shadow: none;
}

body[data-theme="light"] .linked-task-note {
  background: rgba(199, 154, 53, 0.08);
  border-color: rgba(199, 154, 53, 0.24);
}

.task > strong,
.task-time-block {
  display: grid;
  gap: 4px;
  align-content: start;
  color: #fff7db;
  font-size: 20px;
  font-weight: 950;
  line-height: 1;
  text-shadow: 0 0 14px rgba(245, 199, 107, 0.18);
}

.task > strong small,
.task-time-block small {
  color: #8ebaff;
  font-size: 13px;
  font-weight: 900;
}

.task-duration {
  display: inline-block;
  margin: 4px 0 2px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.task-id-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  margin: 6px 8px 4px 0;
  padding: 0 9px;
  border: 1px solid rgba(245, 199, 107, 0.32);
  border-radius: 999px;
  background: rgba(245, 199, 107, 0.12);
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.04em;
}

.task-linked-card-warning {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin: 10px 0 0;
  padding: 8px 11px;
  border: 1px solid rgba(245, 199, 107, 0.36);
  border-radius: 999px;
  background: rgba(245, 199, 107, 0.12);
  color: #ffe7a3;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.03em;
  box-shadow: 0 0 16px rgba(245, 199, 107, 0.12);
  cursor: pointer;
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease, background 150ms ease;
}

.task-linked-card-warning:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 199, 107, 0.62);
  background: rgba(245, 199, 107, 0.18);
  box-shadow: 0 0 22px rgba(245, 199, 107, 0.18);
}

.linked-task-note {
  display: grid;
  gap: 4px;
  margin: 12px 0 0;
  padding: 11px 12px;
  border: 1px solid rgba(245, 199, 107, 0.26);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(245, 199, 107, 0.1), rgba(112, 231, 255, 0.035)),
    var(--surface-2);
}

.linked-task-note span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.linked-task-note strong {
  color: var(--ink);
}

.linked-task-note small {
  color: var(--muted);
  font-weight: 850;
}

.task-notes-content {
  display: grid;
  gap: 8px;
  width: min(100%, 1180px);
  margin: 10px 0 8px;
  padding: 12px 14px;
  border: 1px solid rgba(112, 231, 255, 0.18);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(112, 231, 255, 0.065), rgba(245, 199, 107, 0.045)),
    rgba(9, 18, 33, 0.56);
  color: var(--ink);
  box-shadow: inset 3px 0 0 rgba(245, 199, 107, 0.7), 0 12px 28px rgba(0, 0, 0, 0.12);
}

.task-notes-content span {
  color: var(--accent);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.task-notes-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

body[data-theme="light"] .task-notes-content {
  background:
    linear-gradient(135deg, rgba(255, 248, 225, 0.92), rgba(240, 249, 255, 0.74)),
    #ffffff;
  border-color: rgba(199, 154, 53, 0.22);
  color: #172033;
  box-shadow: inset 3px 0 0 rgba(199, 154, 53, 0.72), 0 10px 24px rgba(2, 6, 23, 0.08);
}

body[data-theme="light"] .task-notes-content p {
  color: #334155;
}

.focus-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  justify-content: space-between;
  margin: 12px 0 4px;
  padding: 12px 14px;
  border: 1px solid rgba(245, 199, 107, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(245, 199, 107, 0.13), rgba(112, 231, 255, 0.055)),
    var(--surface-2);
  box-shadow: 0 0 26px rgba(245, 199, 107, 0.11);
}

.focus-strip strong {
  color: #ffe7a3;
  font-weight: 950;
}

.focus-strip span {
  color: var(--muted);
  font-weight: 800;
}

body[data-theme="light"] .focus-strip strong {
  color: #8a5b09;
}

.slim-button {
  min-height: 34px;
  padding: 0 14px;
}

.card-template-bank {
  margin-top: 16px;
}

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

.template-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(112, 231, 255, 0.16);
  border-radius: 14px;
  background:
    radial-gradient(circle at 12% 0, rgba(245, 199, 107, 0.12), transparent 34%),
    var(--surface-2);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.14);
}

.template-card h3 {
  margin: 0;
  padding-right: 72px;
  font-size: 16px;
}

.template-number {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 7px 9px;
  border: 1px solid rgba(245, 199, 107, 0.28);
  border-radius: 999px;
  background: rgba(245, 199, 107, 0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 950;
  box-shadow: 0 0 18px rgba(245, 199, 107, 0.12);
}

body[data-theme="light"] .template-card {
  background:
    radial-gradient(circle at 12% 0, rgba(245, 199, 107, 0.16), transparent 34%),
    #ffffff;
  box-shadow: 0 12px 30px rgba(2, 6, 23, 0.08);
}

.due-card.focus-card {
  border-color: rgba(245, 199, 107, 0.72);
  box-shadow: 0 0 0 1px rgba(245, 199, 107, 0.28), 0 0 42px rgba(245, 199, 107, 0.26);
  animation: card-focus-lift 900ms ease-in-out 2;
}

.due-card.focus-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 231, 163, 0.38), transparent 34%),
    linear-gradient(90deg, rgba(245, 199, 107, 0.26), rgba(112, 231, 255, 0.08), rgba(245, 199, 107, 0.18));
  box-shadow: inset 0 0 0 2px rgba(245, 199, 107, 0.72), inset 0 0 42px rgba(245, 199, 107, 0.22);
  animation: card-focus-wash 1.8s ease-in-out forwards;
}

.due-card.focus-card > * {
  position: relative;
  z-index: 1;
}

@keyframes card-focus-lift {
  50% {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(245, 199, 107, 0.48), 0 0 52px rgba(245, 199, 107, 0.34);
  }
}

@keyframes card-focus-wash {
  0% {
    opacity: 0;
    transform: scale(0.98);
  }

  18%,
  70% {
    opacity: 1;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.01);
  }
}

.task-time-stack {
  display: grid;
  gap: 8px;
}

.assignee-pill,
.task-tag-pill,
.schedule-pill,
.task-completion {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  min-height: 26px;
  margin-top: 0;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
}

.assignee-pill {
  padding: 0 9px;
  border: 1px solid rgba(245, 199, 107, 0.18);
  background: rgba(245, 199, 107, 0.08);
  color: #f2c96b;
  box-shadow: 0 0 12px rgba(245, 199, 107, 0.08);
}

.task-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
}

.task-tag-pill {
  padding: 0 8px;
  border: 1px solid rgba(112, 231, 255, 0.22);
  background: rgba(112, 231, 255, 0.08);
  color: #8eeeff;
  box-shadow: 0 0 12px rgba(112, 231, 255, 0.08);
}

.schedule-pill {
  padding: 0 9px;
  border: 1px solid rgba(245, 199, 107, 0.16);
  background: rgba(245, 199, 107, 0.07);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.task-badges .pill {
  min-height: 26px;
  margin-top: 0;
  font-size: 11px;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin: 10px 0 0;
}

.card-meta br {
  display: none;
}

.task-completion {
  color: var(--muted);
}

body[data-theme="light"] .assignee-pill {
  background: rgba(199, 154, 53, 0.12);
  border-color: rgba(199, 154, 53, 0.28);
  color: #9a6407;
  box-shadow: none;
}

body[data-theme="light"] .task-tag-pill {
  background: rgba(8, 145, 178, 0.1);
  border-color: rgba(8, 145, 178, 0.22);
  color: #075f72;
  box-shadow: none;
}

body[data-theme="light"] .schedule-pill {
  background: rgba(199, 154, 53, 0.09);
  border-color: rgba(199, 154, 53, 0.2);
  color: #536578;
}

body[data-theme="light"] .task-completion {
  color: #334155;
}

.task-edit-grid {
  display: grid;
  grid-template-columns: minmax(150px, 0.9fr) minmax(140px, 0.7fr) minmax(180px, 1fr);
  gap: 8px;
  min-width: 0;
}

.task-edit-grid textarea {
  grid-column: 1 / -1;
  min-height: 56px;
}

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

.score-card {
  position: relative;
  padding: 16px;
  border: 1px solid rgba(245, 199, 107, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(245, 199, 107, 0.1), rgba(112, 231, 255, 0.04)),
    var(--surface);
}

.score-card.attention,
.late-task-card {
  border-color: rgba(255, 90, 90, 0.42);
  background:
    linear-gradient(135deg, rgba(255, 70, 70, 0.14), rgba(245, 199, 107, 0.05)),
    var(--surface);
}

.score-number {
  margin-top: 8px;
  color: var(--accent);
  font-size: 34px;
  font-weight: 950;
  text-shadow: 0 0 14px rgba(245, 199, 107, 0.18);
}

.due-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(245, 199, 107, 0.075), rgba(112, 231, 255, 0.035)),
    var(--surface);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12), inset 0 0 0 1px rgba(245, 199, 107, 0.045);
}

.due-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--violet), var(--accent));
}

.due-card.card-late {
  border-color: rgba(255, 90, 90, 0.5);
  background:
    radial-gradient(circle at 0 0, rgba(255, 80, 80, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(255, 70, 70, 0.12), rgba(245, 199, 107, 0.04)),
    var(--surface);
  box-shadow: inset 4px 0 0 #ff5f59, 0 14px 28px rgba(255, 80, 80, 0.12);
}

body[data-theme="light"] .due-card.card-late {
  background:
    radial-gradient(circle at 0 0, rgba(255, 70, 70, 0.16), transparent 34%),
    linear-gradient(145deg, rgba(255, 70, 70, 0.1), rgba(255, 255, 255, 0.92)),
    #fff8f7;
  border-color: rgba(220, 38, 38, 0.44);
}

.late-card-warning {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 90, 90, 0.34);
  border-radius: 10px;
  background: rgba(255, 70, 70, 0.12);
  color: #ffb3ad;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

body[data-theme="light"] .late-card-warning {
  background: rgba(220, 38, 38, 0.1);
  color: #991b1b;
}

.weekday-picker {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin: 16px 0 0;
}

.weekday-picker legend {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  padding: 0 8px;
}

.weekday-picker label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  margin: 4px 8px 4px 0;
  padding: 0 10px;
  background: var(--surface-2);
  color: var(--ink);
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--accent));
  user-select: none;
  cursor: pointer;
}

.weekday-picker input {
  flex: 0 0 auto;
  width: 15px;
  height: 15px;
  min-width: 15px;
  min-height: 15px;
  margin: 0;
  appearance: none;
  border: 1px solid rgba(245, 199, 107, 0.42);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 2px transparent;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.weekday-picker input:checked {
  border-color: rgba(245, 199, 107, 0.92);
  background:
    linear-gradient(135deg, #9d7320, #ffd66f 58%, #fff0b3);
  box-shadow: inset 0 0 0 3px color-mix(in srgb, var(--surface-2) 72%, #111827);
}

.weekday-picker input:focus-visible {
  outline: 2px solid rgba(245, 199, 107, 0.55);
  outline-offset: 2px;
}

.goal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  gap: 18px;
  padding: 24px;
  margin-bottom: 16px;
  color: #fff;
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(17, 18, 24, 0.96), rgba(54, 37, 8, 0.90)),
    linear-gradient(90deg, rgba(245, 199, 107, 0.18), transparent);
  box-shadow: var(--shadow);
}

.goal-hero h2 {
  margin: 8px 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
}

.goal-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
}

.eyebrow {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.goal-ring {
  width: 156px;
  height: 156px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(11, 20, 24, 0.88) 0 52%, transparent 53%),
    conic-gradient(#f2b85b var(--value), rgba(255,255,255,0.18) 0);
}

.goal-duo {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
}

.goal-ring.small {
  width: 136px;
  height: 136px;
}

.goal-ring.small strong {
  font-size: 30px;
}

.goal-ring strong {
  display: block;
  font-size: 34px;
}

.goal-ring span {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.goal-grid {
  margin-bottom: 16px;
}

.goal-tile {
  padding: 16px;
  background:
    radial-gradient(circle at 0 0, rgba(112, 231, 255, 0.08), transparent 32%),
    linear-gradient(145deg, rgba(245, 199, 107, 0.075), rgba(112, 231, 255, 0.035)),
    var(--surface);
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--accent));
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.goal-tile span,
.goal-tile small {
  color: var(--muted);
  font-weight: 800;
}

.goal-tile strong {
  display: block;
  margin: 8px 0 12px;
  font-size: 28px;
}

.revenue-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  padding: 24px;
  color: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(120deg, rgba(7, 11, 19, 0.94), rgba(34, 39, 52, 0.88)),
    linear-gradient(90deg, rgba(245, 199, 107, 0.13), rgba(112, 231, 255, 0.08));
  box-shadow: var(--shadow);
}

.revenue-command h2 {
  margin: 8px 0;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 0.95;
}

.revenue-command p {
  color: rgba(255,255,255,0.72);
}

.revenue-mini {
  display: grid;
  gap: 12px;
}

.revenue-mini article {
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
}

.revenue-mini span,
.metric-line span {
  color: var(--muted);
  font-weight: 900;
}

.revenue-mini strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.metric-toggle-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(146px, max-content));
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.metric-toggle-row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--ink);
}

.metric-toggle-row input {
  width: auto;
}

.stats-filter-form {
  align-items: end;
}

.stats-filter-form .form-row {
  margin-top: 0;
}

.stats-filter-form button {
  grid-column: 1 / -1;
  justify-self: start;
  width: min(360px, 100%);
  margin-top: 10px;
}

.stats-metric-row {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  grid-template-columns: repeat(auto-fit, minmax(150px, max-content));
}

.stats-metric-row button,
.metric-toggle-row button {
  min-height: 36px;
  align-self: center;
}

.live-clock {
  min-width: 118px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.live-clock span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.live-clock strong {
  display: block;
  color: var(--accent);
  font-size: 18px;
}

.user-menu {
  position: relative;
  padding-bottom: 12px;
  margin-bottom: -12px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 5px 12px 5px 5px;
  border: 1px solid rgba(112, 231, 255, 0.22);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(13, 20, 34, 0.96), rgba(8, 13, 23, 0.92));
  color: #eef6ff;
  box-shadow: 0 0 0 1px rgba(245, 199, 107, 0.06);
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.user-chip:hover {
  border-color: rgba(245, 199, 107, 0.58);
  box-shadow: 0 0 0 1px rgba(245, 199, 107, 0.18), 0 0 22px rgba(245, 199, 107, 0.16);
  transform: translateY(-1px);
}

.user-chip span {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #00f0b5, #00c797);
  color: #03110e;
  font-size: 13px;
  font-weight: 900;
}

.user-chip strong {
  max-width: 148px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

body[data-theme="light"] .user-chip {
  border-color: rgba(199, 154, 53, 0.36);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 245, 248, 0.98));
  color: #101820;
  box-shadow: 0 12px 24px rgba(19, 31, 45, 0.09), 0 0 0 1px rgba(199, 154, 53, 0.06);
}

body[data-theme="light"] .user-chip span {
  background: linear-gradient(135deg, var(--accent), #00e3b0);
  color: #111006;
}

body[data-theme="light"] .user-chip:hover {
  border-color: rgba(199, 154, 53, 0.7);
  box-shadow: 0 14px 30px rgba(199, 154, 53, 0.14), 0 0 18px rgba(199, 154, 53, 0.12);
}

.user-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 10;
  width: 220px;
  display: none;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.user-menu-popover::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 14px;
}

body[data-theme="light"] .user-menu-popover {
  background: #ffffff;
  color: #101820;
  border-color: rgba(199, 154, 53, 0.24);
  box-shadow: 0 16px 34px rgba(19, 31, 45, 0.14);
}

.user-menu:focus-within .user-menu-popover,
.user-menu:hover .user-menu-popover {
  display: grid;
}

.user-menu-popover small {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-menu-popover button {
  width: 100%;
}

.table-input {
  min-width: 150px;
  padding: 8px 9px;
}

.table-input.compact {
  min-width: 118px;
}

.tag-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 170px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border: 1px solid rgba(245, 199, 107, 0.26);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(245, 199, 107, 0.16), rgba(112, 231, 255, 0.06)),
    var(--surface-2);
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 0 12px rgba(245, 199, 107, 0.1);
}

.department-switcher {
  display: flex;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.department-switcher button {
  min-width: 54px;
  padding: 7px 8px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.department-switcher button:hover {
  color: var(--accent);
  background: rgba(245, 199, 107, 0.11);
  box-shadow: 0 0 16px rgba(245, 199, 107, 0.12);
  transform: translateY(-1px);
}

.department-switcher button.active {
  color: #161006;
  background: linear-gradient(135deg, #fff4c4, #d6a13b);
  box-shadow: 0 0 10px rgba(245, 199, 107, 0.18);
}

.department-switcher span {
  display: none;
}

.compact-filter {
  align-items: end;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.compact-filter .form-row {
  margin-top: 0;
}

.toggle-row,
.switch-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  min-height: 42px;
  line-height: 1.25;
}

.toggle-row {
  align-self: end;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-weight: 900;
}

.metric-visibility {
  justify-content: flex-start;
  min-width: 112px;
  font-size: 12px;
  font-weight: 950;
}

.toggle-row input,
.switch-line input {
  width: auto;
}

.inline-input {
  width: 112px;
}

.goal-field-list,
.login-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.goal-field-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px 8px 12px;
  border: 1px solid rgba(245, 199, 107, 0.28);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(245, 199, 107, 0.12), rgba(112, 231, 255, 0.06));
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.goal-field-chip .link-button {
  color: var(--danger);
  font-weight: 900;
}

.goal-form-card .primary {
  width: fit-content;
  margin-top: 16px;
  align-self: start;
}

form.grid > button,
.card-entry-form button,
.compact-filter button,
.reply-box button {
  align-self: end;
  margin-top: 8px;
}

[data-task-form] > button,
[data-card-form] > button {
  grid-column: 1 / -1;
  justify-self: stretch;
  width: 100%;
  margin-top: 2px;
}

.compact-filter button {
  justify-self: stretch;
  width: 100%;
}

.form-row + .actions,
.task-edit-grid + .actions {
  margin-top: 10px;
}

.login-grid article {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.login-grid span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-weight: 800;
}

.lunch-lock {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 5, 10, 0.72);
  backdrop-filter: blur(5px);
}

.lunch-lock > div {
  width: min(560px, 100%);
  padding: 28px;
  border: 1px solid rgba(245, 199, 107, 0.35);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(13, 20, 34, 0.96), rgba(45, 31, 9, 0.94));
  color: #fff;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.34);
}

.stats-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin: 16px 0;
  padding: 24px;
  border: 1px solid rgba(245, 199, 107, 0.28);
  border-radius: 8px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(8, 12, 22, 0.98), rgba(48, 33, 7, 0.92));
}

.stats-hero h2 {
  margin: 6px 0;
  font-size: clamp(30px, 4vw, 56px);
}

.stats-hero strong {
  font-size: clamp(26px, 4vw, 46px);
  color: var(--accent);
}

.score-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
}

.score-hero-visual {
  display: grid;
  grid-template-columns: 138px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.score-orbit {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(7, 11, 19, 0.94) 0 57%, transparent 58%),
    conic-gradient(var(--accent) var(--value), rgba(255, 255, 255, 0.16) 0);
  box-shadow: 0 0 22px rgba(245, 199, 107, 0.22);
}

.score-orbit strong,
.score-orbit span {
  grid-area: 1 / 1;
}

.score-orbit strong {
  transform: translateY(-6px);
  font-size: 34px;
  line-height: 1;
}

.score-orbit span {
  transform: translateY(22px);
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.score-bars {
  display: grid;
  gap: 10px;
}

.score-bars span {
  display: grid;
  grid-template-columns: 86px minmax(90px, 1fr) 34px;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  font-weight: 900;
}

.score-bars b {
  display: block;
  height: 8px;
  width: var(--value);
  min-width: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--violet));
  box-shadow: 0 0 12px rgba(245, 199, 107, 0.2);
}

.score-bars em {
  color: var(--accent);
  font-style: normal;
  text-align: right;
}

.score-task-badges {
  margin-bottom: 12px;
}

.response-card .score-task-badges + h3 {
  margin-top: 4px;
}

.ranking-grid,
.goal-dashboard {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ranking-card {
  position: relative;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.rank-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  color: var(--accent);
  font-weight: 900;
}

.goal-orbit {
  width: 176px;
  height: 176px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(7, 11, 19, 0.92) 0 56%, transparent 57%),
    conic-gradient(#f5c76b var(--value), rgba(255,255,255,0.16) 0);
  box-shadow: 0 0 18px rgba(245, 199, 107, 0.18);
}

.goal-orbit > div {
  display: grid;
  place-items: center;
  gap: 4px;
  transform: translateY(-2px);
}

.goal-orbit strong {
  display: block;
  font-size: 36px;
  line-height: 1;
}

.goal-orbit span {
  display: block;
  padding: 0 26px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  line-height: 1.15;
  text-align: center;
}

.goal-hero.celebration {
  border: 1px solid rgba(245, 199, 107, 0.35);
  box-shadow: 0 0 20px rgba(245, 199, 107, 0.16);
}

.confetti-burst {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 40;
  overflow: hidden;
}

.confetti-burst i {
  position: absolute;
  left: 50%;
  top: 32%;
  width: 8px;
  height: 14px;
  background: linear-gradient(#fff4c4, #d6a13b);
  animation: confetti 1.35s ease-out forwards;
  transform: translate(-50%, -50%);
}

@keyframes task-done-pop {
  0% {
    opacity: 0;
    transform: scale(0.78) translateY(10px);
  }

  18%,
  78% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  100% {
    opacity: 0;
    transform: scale(0.92) translateY(-8px);
  }
}

@keyframes check-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.task-done-burst {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  pointer-events: none;
  background: rgba(3, 8, 12, 0.18);
  backdrop-filter: blur(2px);
}

.task-done-check {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 18px 22px;
  border: 1px solid rgba(80, 255, 130, 0.35);
  border-radius: 8px;
  background: rgba(7, 13, 22, 0.86);
  color: #eafff0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.36), 0 0 30px rgba(39, 193, 54, 0.28);
  animation: task-done-pop 1.25s ease forwards;
}

.task-done-check svg {
  width: 118px;
  height: 118px;
  filter: drop-shadow(0 0 24px rgba(38, 193, 54, 0.32));
}

.task-done-check circle {
  fill: #28bf37;
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 2;
}

.task-done-check path {
  fill: none;
  stroke: #fff;
  stroke-width: 13;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 92;
  stroke-dashoffset: 92;
  animation: check-draw 420ms ease 180ms forwards;
}

.task-done-check strong {
  font-size: 18px;
  font-weight: 950;
}

@keyframes confetti {
  to {
    transform: translate(calc(var(--x) * 28px), calc(260px + var(--d) * 44px)) rotate(540deg);
    opacity: 0;
  }
}

.seller-production {
  display: grid;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.seller-production:last-child {
  border-bottom: 0;
}

.metric-line {
  display: grid;
  grid-template-columns: minmax(170px, 210px) minmax(160px, 1fr) minmax(132px, auto);
  gap: 12px;
  align-items: center;
}

.metric-line em {
  color: var(--ink);
  font-style: normal;
  font-weight: 900;
  text-align: right;
}

.goal-admin-card,
.response-card {
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.goal-admin-card h3,
.response-card h3 {
  margin: 0 0 10px;
}

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

.productivity-log {
  display: grid;
  gap: 12px;
}

.response-value {
  margin-top: 12px;
  padding: 14px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  white-space: pre-wrap;
  font-size: 18px;
  font-weight: 800;
}

.qr span {
  max-width: 92px;
  overflow-wrap: anywhere;
  text-align: center;
  font-size: 11px;
  line-height: 1.25;
}

body[data-theme="dark"] .qr {
  border-color: #263631;
  color: #edf5f2;
  outline-color: var(--line);
}

.bar-row {
  display: grid;
  grid-template-columns: 140px minmax(120px, 1fr) 64px;
  gap: 10px;
  align-items: center;
  margin: 10px 0;
}

.hidden {
  display: none !important;
}

.conversations-panel {
  padding: 0;
}

.conversation-toolbar,
.conversation-channel-row {
  margin: 0;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.conversation-channel-row {
  display: grid;
  gap: 8px;
}

.channel-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: fit-content;
  max-width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.channel-switcher button {
  display: grid;
  gap: 2px;
  min-width: 120px;
  max-width: 220px;
  padding: 8px 12px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  text-align: left;
}

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

.channel-switcher strong {
  color: inherit;
  font-size: 13px;
}

.channel-switcher span {
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.channel-switcher span.ok {
  color: var(--ok);
}

.channel-switcher button.active {
  color: #161006;
  background: linear-gradient(135deg, #fff4c4, #d6a13b);
  box-shadow: 0 0 10px rgba(245, 199, 107, 0.18);
}

.channel-switcher button.active span,
.channel-switcher button.active span.ok,
.channel-switcher button.active strong {
  color: #161006;
}

.chat-shell {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  height: min(720px, calc(100vh - 245px));
  min-height: 520px;
  overflow: hidden;
}

.chat-list {
  display: grid;
  align-content: start;
  gap: 8px;
  max-height: 100%;
  overflow: auto;
  padding: 12px;
  border-right: 1px solid var(--line);
}

.chat-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.chat-row:hover,
.chat-row.active {
  border-color: var(--accent);
  background: rgba(0, 245, 168, 0.12);
}

.chat-row.has-unread {
  box-shadow: inset 3px 0 0 var(--accent);
}

.chat-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pin-button,
.pin-badge {
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 10px;
  font-weight: 900;
}

.pin-button {
  border: 1px solid rgba(245, 199, 107, 0.28);
  color: var(--accent);
  background: rgba(245, 199, 107, 0.08);
}

.pin-badge {
  color: #161006;
  background: linear-gradient(135deg, #fff4c4, #d6a13b);
  font-style: normal;
}

.chat-row-meta {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-avatar,
.conversation-avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  color: #06110e;
  font-weight: 950;
}

img.chat-avatar,
img.conversation-avatar {
  object-fit: cover;
}

.chat-avatar-fallback {
  background: linear-gradient(135deg, var(--accent), #38bdf8);
}

.chat-row-content,
.chat-row-head {
  display: grid;
  min-width: 0;
}

.chat-row-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.chat-row strong,
.chat-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-row small {
  color: var(--muted);
}

.unread-badge {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #06110e;
  font-style: normal;
  font-weight: 950;
}

.chat-window {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  background:
    linear-gradient(rgba(0, 245, 168, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.025) 1px, transparent 1px);
  background-size: 28px 28px;
}

.conversation-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.conversation-header strong,
.conversation-header span {
  display: block;
}

.conversation-header span {
  color: var(--muted);
  font-size: 13px;
}

.chat-window .messages {
  display: grid;
  gap: 10px;
  align-content: end;
  overflow: auto;
  min-height: 0;
  max-height: none;
  padding: 18px;
}

.bubble {
  width: fit-content;
  max-width: min(680px, 82%);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.bubble.mine {
  justify-self: end;
  background: rgba(0, 245, 168, 0.13);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
}

.bubble p {
  margin: 4px 0;
  white-space: pre-wrap;
}

.message-sender,
.message-meta {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.message-ack {
  margin-left: 4px;
}

.message-ack.read {
  color: #38bdf8;
}

.message-ack.delivered,
.message-ack.sent {
  color: var(--accent);
}

.message-action {
  margin-top: 6px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-size: 12px;
}

.media-image {
  display: block;
  max-width: min(320px, 70vw);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
}

.media-image img,
.bubble video {
  display: block;
  max-width: 100%;
}

.bubble audio {
  max-width: min(320px, 70vw);
}

.media-file {
  display: inline-flex;
  color: var(--accent);
  font-weight: 800;
}

.conversation-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.conversation-filters button {
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--surface-2);
  color: var(--muted);
}

.conversation-filters button.active {
  background: linear-gradient(135deg, #fff4c4, #d6a13b);
  color: #161006;
}

.due-card,
.goal-tile,
.goal-admin-card,
.response-card,
.ranking-card,
.score-card,
.wa-card,
.conversation-list button,
.chat-row,
.channel-switcher button,
.conversation-filters button,
.metric-toggle-row label,
.goal-field-chip,
.tag-chip,
.live-clock,
.reply-box button,
.link-button {
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.goal-tile:hover,
.goal-admin-card:hover,
.response-card:hover,
.ranking-card:hover,
.score-card:hover,
.wa-card:hover,
.conversation-list button:hover,
.channel-switcher button:hover,
.conversation-filters button:hover,
.metric-toggle-row label:hover,
.goal-field-chip:hover,
.tag-chip:hover,
.live-clock:hover {
  border-color: rgba(245, 199, 107, 0.48);
  box-shadow: 0 16px 34px rgba(245, 199, 107, 0.11), var(--shadow);
  transform: translateY(-1px);
}

.weekday-picker label {
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.weekday-picker label:hover {
  border-color: rgba(245, 199, 107, 0.48);
  background:
    linear-gradient(135deg, rgba(245, 199, 107, 0.14), rgba(112, 231, 255, 0.05)),
    var(--surface-2);
  box-shadow: 0 0 18px rgba(245, 199, 107, 0.11);
}

.due-card:hover {
  background:
    radial-gradient(circle at 8% 0%, rgba(245, 199, 107, 0.08), transparent 30%),
    linear-gradient(145deg, rgba(245, 199, 107, 0.055), rgba(112, 231, 255, 0.025)),
    var(--surface);
  box-shadow: 0 10px 22px rgba(245, 199, 107, 0.075), inset 0 0 0 1px rgba(245, 199, 107, 0.08);
}

.due-card.card-late:hover {
  border-color: rgba(255, 90, 90, 0.62);
  box-shadow: inset 4px 0 0 #ff5f59, 0 14px 30px rgba(255, 80, 80, 0.13);
}

.chat-row:hover {
  border-color: rgba(245, 199, 107, 0.52);
  background:
    linear-gradient(135deg, rgba(245, 199, 107, 0.12), rgba(112, 231, 255, 0.05)),
    var(--surface-2);
  box-shadow: 0 12px 26px rgba(245, 199, 107, 0.1);
  transform: translateY(-1px);
}

.link-button:hover,
.pin-button:hover {
  color: #ffe7a3;
  text-shadow: 0 0 10px rgba(245, 199, 107, 0.28);
}

body[data-theme="light"] .link-button:hover,
body[data-theme="light"] .pin-button:hover {
  color: #9a6407;
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 6px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff4c4, #d6a13b);
  color: #161006;
  font-size: 11px;
  font-weight: 950;
  box-shadow: 0 0 14px rgba(245, 199, 107, 0.24);
}

.nav .nav-badge {
  position: absolute;
  left: 34px;
  top: 7px;
}

.sidebar.is-expanded .nav .nav-badge {
  position: static;
  margin-left: auto;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: var(--toast-offset, 18px);
  width: min(430px, calc(100vw - 36px));
  min-height: 74px;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(245, 199, 107, 0.36);
  border-radius: 8px;
  background:
    radial-gradient(circle at 88% 20%, rgba(46, 230, 255, 0.16), transparent 36%),
    linear-gradient(135deg, rgba(18, 23, 35, 0.98), rgba(7, 10, 18, 0.98));
  color: #f8fbff;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.48), 0 0 24px rgba(245, 199, 107, 0.12);
  z-index: 100;
  animation: toast-slide 220ms ease-out;
}

.toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(var(--accent), #2ee6ff);
  box-shadow: 0 0 22px var(--accent);
}

.toast-art {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(245, 199, 107, 0.18), rgba(46, 230, 255, 0.1)),
    rgba(4, 8, 16, 0.58);
}

.toast-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fff4c4, #d6a13b);
  color: #161006;
  font-size: 13px;
  font-weight: 950;
  box-shadow: 0 0 22px rgba(245, 199, 107, 0.28);
}

.toast-avatar {
  object-fit: cover;
  background: rgba(255, 255, 255, 0.08);
}

.toast-copy {
  min-width: 0;
  padding: 10px 14px 10px 12px;
}

.toast small,
.toast strong,
.toast span {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #f8fbff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.toast small {
  margin-bottom: 2px;
  color: #7fc7ff;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.toast span {
  margin-top: 3px;
  color: #aebcd0;
}

body[data-theme="light"] .toast {
  color: #07111f;
  background:
    radial-gradient(circle at 88% 20%, rgba(46, 230, 255, 0.12), transparent 36%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(232, 241, 251, 0.98));
  border-color: rgba(182, 132, 32, 0.24);
  box-shadow: 0 18px 42px rgba(15, 35, 70, 0.2), 0 0 24px rgba(245, 199, 107, 0.12);
}

body[data-theme="light"] .toast small {
  color: #006c91;
}

body[data-theme="light"] .toast strong {
  color: #07111f;
}

body[data-theme="light"] .toast span {
  color: #52657d;
}

@keyframes toast-slide {
  from {
    opacity: 0;
    transform: translateX(18px) translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateX(0) translateY(0);
  }
}

.load-more-button {
  margin-left: auto;
  white-space: nowrap;
}

.reply-box {
  display: grid;
  grid-template-columns: 150px auto auto auto auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.reply-name {
  min-width: 0;
}

.reply-box textarea {
  min-height: 46px;
  max-height: 160px;
  resize: none;
}

.emoji-button {
  min-width: 42px;
  padding-inline: 0;
}

.empty {
  display: grid;
  place-items: center;
  min-height: 160px;
  padding: 20px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 980px) {
  .login-page,
  .app-shell,
  .grid.cols-2,
  .grid.cols-3,
  .whatsapp-grid,
  .goal-hero,
  .revenue-command,
  .metric-line {
    grid-template-columns: 1fr;
  }

  .metric-line em {
    text-align: left;
  }

  .goal-ring {
    width: 132px;
    height: 132px;
  }

  .login-copy {
    padding: 34px 24px 12px;
  }

  .app-shell {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .sidebar {
    position: fixed;
    top: 0;
    z-index: 5;
    width: 58px;
    padding: 12px 0;
  }

  .sidebar.is-expanded {
    width: min(236px, 82vw);
  }

  .nav {
    grid-template-columns: 1fr;
    width: 236px;
  }

  .nav button {
    width: 236px;
    padding-inline: 18px;
  }

  .brand,
  .sidebar-footer {
    width: 236px;
  }

  .main {
    padding: 16px;
    grid-column: 2;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .chat-shell {
    grid-template-columns: 1fr;
  }

  .chat-list {
    max-height: 320px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .reply-form,
  .reply-box {
    grid-template-columns: 1fr;
  }
}
