:root {
  color-scheme: light;
  --bg: #fff7ed;
  --panel: rgba(255, 255, 255, 0.76);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --glass: rgba(255, 255, 255, 0.68);
  --glass-dark: rgba(43, 32, 42, 0.58);
  --text: #101426;
  --muted: #647086;
  --line: rgba(32, 39, 71, 0.12);
  --line-strong: rgba(32, 39, 71, 0.24);
  --ink: #101426;
  --blue: #f97316;
  --blue-soft: #fff3e6;
  --cyan: #fb923c;
  --gold: #facc15;
  --pink: #f43f5e;
  --silver: #f5f7fb;
  --green: #12a56f;
  --amber: #e99b14;
  --red: #f43f5e;
  --soft-blue: rgba(249, 115, 22, 0.12);
  --soft-cyan: rgba(251, 146, 60, 0.16);
  --soft-green: rgba(25, 137, 95, 0.11);
  --soft-amber: rgba(214, 166, 74, 0.16);
  --soft-red: rgba(200, 36, 50, 0.12);
  --soft-line: rgba(20, 45, 72, 0.1);
  --shadow: 0 24px 80px rgba(154, 52, 18, 0.18);
  --shadow-soft: 0 10px 28px rgba(15, 23, 42, 0.09);
  --blur: blur(18px) saturate(160%);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 8% 10%, rgba(249, 115, 22, 0.2), transparent 340px),
    radial-gradient(circle at 88% 16%, rgba(251, 146, 60, 0.3), transparent 420px),
    radial-gradient(circle at 52% 104%, rgba(244, 63, 94, 0.1), transparent 460px),
    linear-gradient(180deg, rgba(255, 250, 244, 0.98), rgba(239, 244, 250, 0.98)),
    var(--bg);
  color: var(--text);
  font-family:
    "Plus Jakarta Sans", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  min-height: 100vh;
}

.auth-view {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 100vh;
  padding: 18px;
  place-items: center;
}

.auth-card {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(320px, 0.8fr);
  width: min(920px, 100%);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 30px;
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.auth-copy {
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 34px;
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 247, 237, 0.26), transparent 180px),
    radial-gradient(circle at 86% 12%, rgba(251, 146, 60, 0.48), transparent 250px),
    linear-gradient(155deg, rgba(249, 115, 22, 0.78), rgba(124, 45, 18, 0.68) 45%, rgba(32, 28, 44, 0.74)),
    rgba(249, 115, 22, 0.44);
  border-right: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), inset -22px 0 80px rgba(255, 255, 255, 0.08);
}

.auth-copy::after {
  content: "";
  position: absolute;
  inset: 18px;
  pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
}

.auth-copy .brand-mark {
  color: #081223;
}

.auth-copy h1,
.auth-copy p,
.auth-form h2,
.auth-message {
  margin: 0;
}

.auth-copy h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1;
}

.auth-copy p {
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.5;
}

.auth-panels {
  display: grid;
  padding: 22px;
}

.auth-form {
  display: grid;
  align-content: start;
  gap: 13px;
  min-width: 0;
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(255, 247, 237, 0.62)),
    rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 22px;
  box-shadow: 0 20px 54px rgba(154, 52, 18, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.auth-card[data-auth-mode="login"] .register-panel,
.auth-card[data-auth-mode="register"] .login-panel {
  display: none;
}

.auth-heading {
  display: grid;
  gap: 4px;
}

.auth-form h2 {
  color: var(--blue);
  font-size: 28px;
  font-weight: 760;
  line-height: 1;
}

.auth-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 550;
}

.auth-message {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.auth-message[data-tone="error"] {
  color: var(--red);
}

.auth-message[data-tone="success"] {
  color: var(--green);
}

.auth-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 520;
}

.auth-switch .plain-button {
  min-height: 30px;
  background: rgba(249, 115, 22, 0.1);
  border-color: rgba(249, 115, 22, 0.2);
  color: var(--blue);
  padding: 5px 10px;
}

.particle-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0.65;
}

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

button {
  cursor: pointer;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  min-height: 100vh;
  padding: 16px;
  gap: 16px;
  width: min(1720px, 100%);
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 16px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-content: start;
  height: calc(100vh - 32px);
  overflow: auto;
  background:
    radial-gradient(circle at 78% 4%, rgba(251, 146, 60, 0.36), transparent 190px),
    radial-gradient(circle at 16% 18%, rgba(249, 115, 22, 0.32), transparent 240px),
    linear-gradient(165deg, rgba(124, 45, 18, 0.88), rgba(49, 33, 42, 0.9) 42%, rgba(18, 22, 36, 0.96)),
    #171b2c;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  color: #fffaf4;
  padding: 20px;
  border: 1px solid rgba(255, 237, 213, 0.18);
  border-radius: 24px;
  box-shadow: 0 28px 90px rgba(17, 24, 39, 0.2), inset 0 1px 0 rgba(255, 237, 213, 0.18);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, #fff7ed, #fdba74 45%, #fb6a1b);
  color: #080b19;
  font-weight: 760;
  box-shadow: 0 14px 30px rgba(249, 115, 22, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.brand h1,
.brand p,
.topbar h2,
.topbar p {
  margin: 0;
}

.brand h1 {
  font-size: 18px;
  color: #fffaf4;
  letter-spacing: 0;
}

.brand p {
  color: rgba(255, 237, 213, 0.7);
  font-weight: 550;
}

.field-label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 560;
  text-transform: uppercase;
}

.sidebar > .field-label,
.user-row,
label[for="userRole"],
#userRole,
.team-nav {
  display: none !important;
}

.sidebar .field-label {
  color: rgba(255, 237, 213, 0.72);
}

.user-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-bottom: 14px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 36px;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(249, 115, 22, 0.52);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.13);
}

textarea {
  resize: vertical;
}

.access-panel {
  display: grid;
  gap: 8px;
  margin-bottom: 0;
  padding: 14px;
  border: 1px solid rgba(255, 237, 213, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 237, 213, 0.13), rgba(255, 255, 255, 0.045)),
    rgba(24, 24, 37, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 237, 213, 0.14);
}

.access-panel select {
  min-height: 44px;
  border: 1px solid rgba(255, 237, 213, 0.44);
  border-radius: 16px;
  background-color: rgba(255, 247, 237, 0.92);
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(67, 20, 7, 0.9) 50%),
    linear-gradient(135deg, rgba(67, 20, 7, 0.9) 50%, transparent 50%),
    linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(251, 146, 60, 0.16));
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 13px) 50%,
    right 8px center;
  background-size:
    7px 7px,
    7px 7px,
    34px 28px;
  background-repeat: no-repeat;
  color: #2a1f2a;
  font-size: 14px;
  font-weight: 560;
  padding: 9px 48px 9px 12px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.access-panel select:focus {
  border-color: rgba(251, 146, 60, 0.72);
  background-color: rgba(255, 247, 237, 0.98);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.2), 0 10px 26px rgba(0, 0, 0, 0.08);
}

.access-panel select option {
  color: #111827;
  background: #fff7ed;
  font-weight: 550;
}

.account-panel {
  display: grid;
  gap: 5px;
  margin-bottom: 0;
  padding: 15px;
  border: 1px solid rgba(255, 237, 213, 0.22);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 237, 213, 0.14), rgba(255, 255, 255, 0.05)),
    rgba(24, 24, 37, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 237, 213, 0.16);
}

.account-panel span {
  color: rgba(255, 237, 213, 0.7);
  font-size: 11px;
  text-transform: uppercase;
}

.account-panel strong {
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
}

.account-panel small {
  color: rgba(255, 237, 213, 0.74);
}

.account-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.account-actions .secondary-button,
.account-actions .plain-button {
  min-height: 30px;
  padding: 5px 10px;
}

.account-actions .secondary-button {
  background: #fff7ed;
  border-color: rgba(255, 237, 213, 0.78);
  color: #251f2b;
}

.account-actions .plain-button {
  background: rgba(255, 237, 213, 0.1);
  border-color: rgba(255, 237, 213, 0.14);
  color: #fff7ed;
}

.team-nav {
  display: grid;
  gap: 6px;
}

.team-tab {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
  color: #edf2f7;
  padding: 9px 10px;
  text-align: left;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease;
}

.team-tab:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
}

.team-tab.active {
  background: linear-gradient(135deg, rgba(255, 249, 223, 0.95), rgba(231, 245, 255, 0.96));
  color: #081223;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.18);
}

.team-tab span {
  color: inherit;
  opacity: 0.76;
  font-size: 12px;
}

.sidebar-actions {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.sidebar-actions .secondary-button {
  background: #fff7ed;
  border-color: rgba(255, 237, 213, 0.72);
  color: #2a1f2a;
}

.sidebar-actions .danger-button {
  background: rgba(244, 63, 94, 0.13);
  border-color: rgba(244, 63, 94, 0.28);
  color: #ff5c79;
}

.main {
  min-width: 0;
  padding: 0;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 18px 22px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 247, 237, 0.58)),
    var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.eyebrow {
  color: var(--muted);
  font-weight: 560;
  text-transform: uppercase;
  font-size: 12px;
}

.topbar h2 {
  font-size: 33px;
  font-weight: 800;
  letter-spacing: 0;
  background: linear-gradient(135deg, #ea580c, #f97316 72%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

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

.view-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 40px;
  padding: 4px;
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84), 0 10px 24px rgba(249, 115, 22, 0.1);
}

.view-button {
  min-height: 30px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  padding: 5px 13px;
  font-size: 12px;
  font-weight: 560;
}

.view-button.active {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.98), rgba(251, 146, 60, 0.96));
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.28);
}

.add-icon-button {
  display: inline-grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
}

.primary-button,
.secondary-button,
.danger-button,
.icon-button,
.plain-button {
  min-height: 38px;
  border-radius: 999px;
  padding: 8px 14px;
  border: 1px solid transparent;
  font-weight: 560;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}

button:hover {
  transform: translateY(-1px);
}

button:active {
  transform: translateY(0);
}

.primary-button {
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(249, 115, 22, 0.3);
}

.secondary-button {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(249, 115, 22, 0.2);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.danger-button {
  background: var(--soft-red);
  border-color: rgba(200, 36, 50, 0.24);
  color: var(--red);
}

.icon-button {
  background: linear-gradient(135deg, #fff5d6, #eef7fb);
  color: #081223;
}

.plain-button {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line);
}

.metrics {
  display: none;
}

.metrics.is-visible {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.metric::after {
  content: "";
  position: absolute;
  inset: auto 12px 0 12px;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.55), rgba(251, 146, 60, 0.5), transparent);
}

.metric span {
  display: block;
  color: var(--muted);
  margin-bottom: 8px;
}

.metric strong {
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.controls {
  position: sticky;
  top: 116px;
  z-index: 9;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px 220px;
  gap: 10px;
  background: var(--glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 22px;
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: 0 14px 38px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.task-board {
  display: grid;
  gap: 8px;
  overflow: visible;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.timeline-board {
  gap: 0;
  overflow: visible;
  padding: 0;
}

.itinerary-board {
  gap: 0;
  overflow: hidden;
}

.itinerary-hero {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  background:
    radial-gradient(circle at 96% 0, rgba(255, 45, 111, 0.14), transparent 170px),
    linear-gradient(135deg, rgba(249, 115, 22, 0.12), rgba(251, 146, 60, 0.11)),
    rgba(255, 255, 255, 0.58);
}

.itinerary-hero span,
.itinerary-time span {
  display: block;
  color: var(--blue);
  font-size: 11px;
  font-weight: 560;
  line-height: 1;
  text-transform: uppercase;
}

.itinerary-hero strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.12;
}

.itinerary-hero small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-weight: 520;
}

.itinerary-day-label {
  min-width: 150px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  text-align: right;
}

.itinerary-row {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.38);
}

.itinerary-row:last-child {
  border-bottom: 0;
}

.itinerary-row::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 45px;
  width: 2px;
  background: linear-gradient(180deg, rgba(249, 115, 22, 0.86), rgba(251, 146, 60, 0.78));
}

.itinerary-row.done::before {
  background: var(--green);
}

.itinerary-row.blocked::before {
  background: var(--red);
}

.itinerary-time {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 7px;
  padding: 16px 8px;
  text-align: center;
}

.itinerary-time strong {
  display: inline-grid;
  place-items: center;
  min-width: 62px;
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  box-shadow: 0 8px 22px rgba(8, 18, 35, 0.08);
}

.itinerary-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 10px 10px 10px 0;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.56)),
    rgba(255, 255, 255, 0.72);
}

.itinerary-main strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  font-weight: 560;
  line-height: 1.2;
}

.itinerary-main p {
  margin: 6px 0 0;
  color: #425168;
  line-height: 1.38;
}

.itinerary-meta,
.itinerary-linked {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.itinerary-linked {
  padding-top: 2px;
}

.itinerary-task-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(248, 250, 252, 0.74);
  color: #334155;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 520;
  text-align: left;
}

.itinerary-task-link span {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--cyan);
}

.itinerary-task-link span.done {
  background: var(--green);
}

.itinerary-task-link span.blocked {
  background: var(--red);
}

.itinerary-linked small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 520;
}

.timeline-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  background: rgba(255, 255, 255, 0.34);
}

.timeline-summary > div {
  padding: 13px 14px;
  background:
    radial-gradient(circle at 100% 0, rgba(249, 115, 22, 0.16), transparent 90px),
    rgba(255, 255, 255, 0.54);
}

.timeline-summary span,
.timeline-day-header span,
.timeline-item-main small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 520;
}

.timeline-summary strong {
  display: block;
  margin-top: 3px;
  color: var(--blue);
  font-size: 18px;
  line-height: 1.1;
}

.timeline-day {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 0;
  min-height: 86px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.42);
}

.timeline-day:last-child {
  border-bottom: 0;
  border-radius: 0 0 18px 18px;
}

.timeline-date {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 2px;
  padding: 13px 8px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(249, 115, 22, 0.1), rgba(251, 146, 60, 0.09)),
    rgba(255, 255, 255, 0.4);
  text-align: center;
}

.timeline-date span,
.timeline-date small {
  color: var(--blue);
  font-size: 10px;
  font-weight: 560;
  line-height: 1;
  text-transform: uppercase;
}

.timeline-date strong {
  color: var(--ink);
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  line-height: 0.98;
}

.timeline-day.unscheduled .timeline-date {
  background:
    linear-gradient(180deg, rgba(255, 45, 111, 0.08), rgba(249, 115, 22, 0.09)),
    rgba(255, 255, 255, 0.36);
}

.timeline-stack {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px;
}

.timeline-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px 2px;
}

.timeline-day-header strong {
  color: var(--ink);
  font-size: 14px;
}

.timeline-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58)),
    rgba(255, 255, 255, 0.7);
  box-shadow: inset 3px 0 0 rgba(249, 115, 22, 0.72);
  cursor: pointer;
}

.timeline-item.done {
  box-shadow: inset 3px 0 0 var(--green);
}

.timeline-item.blocked {
  box-shadow: inset 3px 0 0 var(--red);
}

.timeline-item:hover {
  background: rgba(255, 255, 255, 0.88);
}

.timeline-item-main {
  min-width: 0;
}

.timeline-item-main strong {
  display: block;
  color: var(--ink);
  font-size: 13px;
  font-weight: 540;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.timeline-item-main small {
  margin-top: 4px;
}

.timeline-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.task-board-header {
  display: grid;
  grid-template-columns: 34px minmax(360px, 1fr) 106px 190px 92px 76px;
  gap: 12px;
  align-items: center;
  padding: 0 18px 2px;
  background: transparent;
  border-bottom: 0;
  color: #718095;
  font-size: 10px;
  font-weight: 560;
  text-transform: uppercase;
}

.task-row {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(360px, 1fr) 106px 190px 92px 76px;
  gap: 12px;
  align-items: center;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.7)),
    rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 18px;
  min-height: 64px;
  padding: 11px 18px;
  box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.84);
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
}

.task-row::before {
  content: "";
  position: absolute;
  inset: 10px auto 10px 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), #fb923c);
  opacity: 0.82;
}

.task-row:hover {
  transform: translateY(-1px);
  border-color: rgba(249, 115, 22, 0.24);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.task-row.done {
  background: linear-gradient(90deg, rgba(18, 165, 111, 0.1), rgba(255, 255, 255, 0.78) 28%);
}

.task-row.done::before {
  background: var(--green);
}

.task-row.blocked {
  background: linear-gradient(90deg, rgba(244, 63, 94, 0.11), rgba(255, 255, 255, 0.78) 28%);
}

.task-row.blocked::before {
  background: var(--red);
}

.task-check {
  width: 22px;
  height: 22px;
  accent-color: var(--green);
}

.task-title {
  min-width: 0;
  overflow: hidden;
}

.task-kicker {
  color: #ea580c;
  font-size: 10px;
  font-weight: 560;
  letter-spacing: 0;
  margin-bottom: 1px;
  text-transform: uppercase;
}

.task-title strong {
  display: block;
  color: #111827;
  font-weight: 540;
  line-height: 1.22;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.task-title span {
  color: var(--muted);
  font-size: 12px;
}

.task-notes {
  display: block;
  margin-top: 6px;
  color: #48515c;
  font-size: 12px;
  line-height: 1.35;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 560;
}

.status-pill,
.owner-pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 560;
  line-height: 1.1;
}

.status-pill.open {
  background: rgba(249, 115, 22, 0.16);
  color: #c2410c;
}

.status-pill.done {
  background: var(--soft-green);
  color: var(--green);
}

.status-pill.blocked {
  background: var(--soft-red);
  color: var(--red);
}

.owner-pill {
  justify-content: center;
  background: rgba(248, 250, 252, 0.72);
  color: #334155;
  border: 1px solid var(--line);
  text-align: center;
  white-space: nowrap;
}

.badge.high {
  background: rgba(255, 45, 111, 0.12);
  color: #db174f;
}

.badge.medium {
  background: var(--soft-amber);
  color: var(--amber);
}

.badge.low {
  background: var(--soft-blue);
  color: var(--blue);
}

.task-meta {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.25;
}

.visibility-line {
  color: var(--blue);
  font-weight: 520;
}

.task-actions {
  display: flex;
  justify-content: flex-end;
}

.edit-button {
  min-height: 30px;
  min-width: 60px;
  border: 1px solid rgba(249, 115, 22, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #ea580c;
  padding: 5px 11px;
  font-weight: 560;
}

.edit-button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.92);
}

.detail-drawer {
  width: min(720px, calc(100vw - 18px));
  max-height: min(76vh, 620px);
  margin: auto auto 10px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px 22px 18px 18px;
  background: rgba(247, 250, 255, 0.9);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  box-shadow: 0 28px 90px rgba(8, 18, 35, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.detail-drawer[open] {
  animation: drawer-in 160ms ease-out;
}

@keyframes drawer-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
}

.detail-drawer::backdrop {
  background: rgba(8, 18, 35, 0.36);
  backdrop-filter: blur(7px);
}

.drawer-header,
.drawer-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.drawer-header h3 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
}

.drawer-body {
  display: grid;
  gap: 14px;
  max-height: calc(76vh - 144px);
  overflow: auto;
  padding: 16px;
}

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

.drawer-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.drawer-meta div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.drawer-meta dt {
  color: var(--muted);
  font-size: 11px;
  font-weight: 560;
  text-transform: uppercase;
}

.drawer-meta dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-weight: 540;
  overflow-wrap: anywhere;
}

.drawer-body h4 {
  margin: 0 0 6px;
  color: var(--blue);
}

.drawer-body p {
  margin: 0;
  color: #344256;
  line-height: 1.45;
}

.drawer-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
}

.small-select,
.small-input {
  min-height: 32px;
  padding: 6px 8px;
}

.visibility-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.visibility-box legend {
  color: var(--blue);
  font-weight: 560;
  padding: 0 6px;
}

.visibility-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.visibility-option {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
  font-weight: 520;
}

.visibility-option input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--blue);
}

.readonly .visibility-option {
  opacity: 0.72;
}

.empty-state {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 40px;
  text-align: center;
}

.empty-state h3 {
  margin-top: 0;
}

.modal {
  width: min(720px, calc(100vw - 32px));
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(24px) saturate(170%);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  padding: 0;
  box-shadow: 0 30px 100px rgba(15, 23, 42, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.modal[open] {
  animation: modal-in 120ms ease-out;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.large-modal {
  width: min(980px, calc(100vw - 32px));
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.34);
  backdrop-filter: blur(8px);
}

.modal-header,
.modal-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-footer {
  border-top: 1px solid var(--line);
  border-bottom: 0;
  justify-content: flex-end;
}

.split-footer {
  justify-content: space-between;
}

.split-footer > div {
  display: flex;
  gap: 8px;
}

.modal-header h3 {
  margin: 0;
  color: var(--blue);
}

.modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 16px;
}

.modal-grid label {
  display: grid;
  gap: 7px;
  font-weight: 550;
}

.modal-grid .wide {
  grid-column: 1 / -1;
}

.audit-list {
  max-height: 70vh;
  overflow: auto;
  padding: 16px;
}

.users-list {
  display: grid;
  gap: 10px;
  max-height: 70vh;
  overflow: auto;
  padding: 16px;
}

.user-row-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.user-row-card.pending {
  border-color: rgba(154, 91, 19, 0.24);
  background: rgba(154, 91, 19, 0.08);
}

.user-row-card.rejected {
  opacity: 0.68;
}

.user-row-card strong,
.user-row-card span,
.user-row-card small {
  display: block;
}

.user-row-card strong {
  color: var(--ink);
  font-size: 15px;
}

.user-row-card span,
.user-row-card small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.user-row-card small {
  margin-top: 4px;
  color: var(--blue);
}

.user-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.audit-item {
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.audit-item strong {
  display: block;
  margin-bottom: 4px;
}

.audit-item span {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 980px) {
  .auth-card {
    grid-template-columns: 1fr;
  }

  .auth-copy {
    min-height: 220px;
  }

  .app-shell {
    grid-template-columns: 92px minmax(0, 1fr);
    padding: 10px;
    gap: 10px;
  }

  .sidebar {
    grid-template-columns: 1fr;
    position: sticky;
    top: 10px;
    height: calc(100vh - 20px);
    padding: 10px 8px;
    border-radius: 16px;
  }

  .team-nav {
    display: none;
  }

  .metrics,
  .controls {
    grid-template-columns: 1fr 1fr;
  }

  .topbar {
    top: 10px;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .controls {
    top: 92px;
  }

  .search-wrap {
    grid-column: 1 / -1;
  }

  .task-board-header {
    display: none;
  }

  .task-row {
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: start;
    gap: 5px 8px;
    min-height: 68px;
    padding: 8px 12px;
  }

  .task-title {
    grid-column: 2 / -1;
    grid-row: 1;
  }

  .task-row .task-actions {
    grid-column: 2;
    grid-row: 2;
    justify-content: flex-start;
  }

  .task-row .status-pill {
    grid-column: 2;
    grid-row: 2;
    margin-left: 66px;
  }

  .task-row .badge {
    grid-column: 2;
    grid-row: 2;
    margin-left: 122px;
  }

  .owner-pill,
  .task-meta {
    display: none;
  }

  .timeline-day {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .timeline-date strong {
    font-size: 25px;
  }

  .timeline-item {
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
  }

  .timeline-item-actions {
    justify-content: flex-start;
  }

  .itinerary-row {
    grid-template-columns: 74px minmax(0, 1fr);
  }

  .itinerary-row::before {
    left: 36px;
  }

  .itinerary-card {
    margin: 8px 8px 8px 0;
  }
}

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

  .auth-view {
    padding: 10px;
  }

  .auth-copy {
    min-height: 190px;
    padding: 22px;
  }

  .auth-copy h1 {
    font-size: 30px;
  }

  .auth-panels {
    padding: 10px;
  }

  .auth-form {
    padding: 16px;
  }

  .auth-form h2 {
    font-size: 24px;
  }

  .auth-switch {
    justify-content: flex-start;
  }

  .particle-canvas {
    opacity: 0.42;
  }

  .brand {
    margin-bottom: 0;
  }

  .sidebar {
    order: 0;
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 8px 6px;
    border-radius: 14px;
  }

  .brand {
    display: grid;
    justify-items: center;
    gap: 5px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 11px;
  }

  .brand h1 {
    font-size: 10px;
    text-align: center;
    line-height: 1.05;
  }

  .brand > div:last-child {
    min-width: 0;
  }

  .brand p,
  .account-panel span,
  .account-panel small {
    display: none;
  }

  .account-panel {
    grid-template-columns: 1fr;
    align-items: center;
    justify-items: center;
    padding: 7px 5px;
  }

  .account-panel strong {
    font-size: 10px;
    text-align: center;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 72px;
  }

  .account-actions {
    display: grid;
    margin-top: 0;
    width: 100%;
  }

  .account-actions .secondary-button,
  .account-actions .plain-button,
  .sidebar-actions .secondary-button,
  .sidebar-actions .danger-button {
    min-height: 28px;
    padding: 4px 9px;
    font-size: 11px;
  }

  .main {
    order: 0;
  }

  .user-row {
    grid-template-columns: 1fr;
  }

  .account-actions,
  .user-actions,
  .user-row-card {
    display: flex;
    flex-wrap: wrap;
  }

  .access-panel {
    padding: 8px;
    gap: 5px;
  }

  .access-panel .field-label {
    font-size: 9px;
    text-align: center;
  }

  .access-panel select {
    min-height: 32px;
    border-radius: 10px;
    padding: 5px 28px 5px 7px;
    font-size: 10px;
    background-position:
      calc(100% - 14px) 50%,
      calc(100% - 9px) 50%,
      right 4px center;
    background-size:
      5px 5px,
      5px 5px,
      22px 22px;
  }

  .sidebar-actions {
    display: none;
  }

  .team-nav {
    display: none;
  }

  .main {
    padding: 0;
  }

  .topbar,
  .topbar-actions {
    width: 100%;
  }

  .topbar {
    position: relative;
    top: 0;
    flex-direction: column;
    padding: 10px;
    border-radius: 16px;
    margin-bottom: 8px;
  }

  .topbar h2 {
    font-size: 22px;
  }

  .topbar-actions {
    display: flex;
    justify-content: flex-start;
    gap: 7px;
    width: 100%;
  }

  .view-switch {
    order: 3;
    width: 100%;
  }

  .view-button {
    flex: 1;
  }

  .topbar-actions .secondary-button,
  .topbar-actions .primary-button {
    min-height: 32px;
    padding: 6px 9px;
    font-size: 12px;
  }

  .add-icon-button {
    width: 34px;
    min-width: 34px;
    font-size: 20px;
  }

  .metrics,
  .controls {
    grid-template-columns: 1fr;
  }

  .modal-grid {
    grid-template-columns: 1fr 1fr;
    gap: 11px;
  }

  .controls {
    position: relative;
    top: 0;
    border-radius: 14px;
    padding: 8px;
    margin-bottom: 8px;
  }

  .metric {
    padding: 12px;
  }

  .metric strong {
    font-size: 22px;
  }

  .task-row {
    grid-template-columns: 20px minmax(0, 1fr);
    gap: 4px 8px;
    min-height: 66px;
    padding: 8px 10px;
    border-radius: 0;
  }

  .task-check {
    width: 16px;
    height: 16px;
    margin-top: 5px;
  }

  .task-title {
    grid-column: 2 / -1;
    grid-row: 1;
    padding-right: 0;
  }

  .task-title strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1.18;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .task-kicker {
    margin-bottom: 1px;
    font-size: 9px;
  }

  .task-notes,
  .owner-pill,
  .task-meta {
    display: none;
  }

  .status-pill,
  .owner-pill,
  .badge {
    min-height: 22px;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
  }

  .task-row .status-pill {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    margin-left: 56px;
  }

  .task-row .badge {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    margin-left: 106px;
  }

  .task-row .task-actions {
    grid-column: 2;
    grid-row: 2;
    justify-content: flex-start;
    align-self: center;
  }

  .edit-button {
    min-height: 22px;
    min-width: 48px;
    padding: 3px 9px;
    font-size: 11px;
    width: auto;
  }

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

  .timeline-summary > div {
    padding: 10px;
  }

  .timeline-summary strong {
    font-size: 15px;
  }

  .timeline-day {
    grid-template-columns: 56px minmax(0, 1fr);
    min-height: 74px;
  }

  .timeline-date {
    padding: 10px 5px;
  }

  .timeline-date strong {
    font-size: 21px;
  }

  .timeline-date span,
  .timeline-date small {
    font-size: 8px;
  }

  .timeline-stack {
    gap: 6px;
    padding: 8px;
  }

  .timeline-day-header strong {
    font-size: 12px;
  }

  .timeline-day-header span {
    font-size: 10px;
  }

  .timeline-item {
    padding: 8px;
    border-radius: 12px;
  }

  .timeline-item-main strong {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.18;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .timeline-item-main small {
    font-size: 10px;
  }

  .timeline-item-actions {
    overflow-x: auto;
    padding-bottom: 1px;
  }

  .timeline-item-actions .status-pill,
  .timeline-item-actions .badge,
  .timeline-item-actions .edit-button {
    flex: 0 0 auto;
  }

  .itinerary-hero {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  .itinerary-hero strong {
    font-size: 16px;
  }

  .itinerary-day-label {
    min-width: 0;
    text-align: left;
  }

  .itinerary-row {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .itinerary-row::before {
    left: 26px;
  }

  .itinerary-time {
    padding: 12px 4px;
  }

  .itinerary-time span {
    font-size: 8px;
  }

  .itinerary-time strong {
    min-width: 46px;
    min-height: 25px;
    font-size: 10px;
  }

  .itinerary-card {
    gap: 8px;
    margin: 7px 7px 7px 0;
    padding: 10px;
    border-radius: 13px;
  }

  .itinerary-main strong {
    font-size: 12.5px;
  }

  .itinerary-main p {
    display: -webkit-box;
    overflow: hidden;
    font-size: 11px;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .itinerary-meta,
  .itinerary-linked {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 1px;
  }

  .itinerary-meta > *,
  .itinerary-linked > * {
    flex: 0 0 auto;
  }

  .itinerary-task-link {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .drawer-meta {
    grid-template-columns: 1fr;
  }

  .small-select,
  .small-input {
    width: 100%;
  }

  .modal {
    width: calc(100vw - 18px);
    max-height: calc(100vh - 18px);
  }

  .modal-header,
  .modal-footer {
    padding: 12px;
  }

  .modal-grid,
  .audit-list {
    max-height: 64vh;
    overflow: auto;
  }

  .split-footer {
    display: flex;
    flex-wrap: nowrap;
    justify-content: space-between;
    gap: 8px;
  }

  .split-footer > div {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    gap: 8px;
    min-width: 0;
  }

  .split-footer .danger-button,
  .split-footer .secondary-button,
  .split-footer .primary-button {
    flex: 0 1 auto;
    min-width: 0;
    padding: 7px 10px;
    font-size: 12px;
    white-space: nowrap;
  }

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

@media (min-resolution: 2dppx) {
  :root {
    --line: rgba(32, 39, 71, 0.1);
    --line-strong: rgba(32, 39, 71, 0.2);
    --blur: blur(22px) saturate(168%);
  }

  body {
    letter-spacing: 0;
  }

  .auth-card,
  .auth-form,
  .sidebar,
  .topbar,
  .controls,
  .task-row,
  .detail-drawer,
  .modal,
  .access-panel,
  .account-panel,
  .itinerary-card,
  .timeline-item {
    border-width: 0.5px;
  }

  input,
  select,
  textarea,
  .secondary-button,
  .plain-button,
  .danger-button,
  .edit-button,
  .status-pill,
  .owner-pill,
  .badge,
  .itinerary-task-link {
    border-width: 0.5px;
  }

  .brand-mark,
  .add-icon-button,
  .primary-button {
    transform: translateZ(0);
  }

  .task-row {
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.052), inset 0 0.5px 0 rgba(255, 255, 255, 0.92);
  }

  .task-row::before,
  .itinerary-row::before {
    width: 3px;
  }

  .particle-canvas {
    opacity: 0.52;
  }
}

@media print {
  @page {
    size: A4;
    margin: 12mm;
  }

  :root {
    --text: #111827;
    --muted: #4b5563;
    --line: #d1d5db;
    --line-strong: #9ca3af;
    --blue: #c2410c;
    --cyan: #ea580c;
    --pink: #be123c;
  }

  * {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  body {
    min-height: auto;
    background: #ffffff !important;
    color: #111827;
    font-size: 11px;
  }

  body::before {
    content: attr(data-print-title);
    display: block;
    margin: 0 0 8mm;
    padding-bottom: 4mm;
    border-bottom: 1px solid #111827;
    color: #111827;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.2;
  }

  .particle-canvas,
  .auth-view,
  .sidebar,
  .controls,
  .metrics,
  .view-switch,
  .topbar-actions,
  .task-actions,
  .edit-button,
  .itinerary-task-link,
  dialog {
    display: none !important;
  }

  .app-shell {
    display: block !important;
    width: 100%;
    min-height: auto;
    margin: 0;
    padding: 0;
  }

  .main,
  .topbar,
  .task-board,
  .timeline-board,
  .itinerary-board {
    display: block;
    overflow: visible !important;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .topbar {
    position: static;
    margin-bottom: 5mm;
  }

  .topbar .eyebrow {
    color: #4b5563;
    font-size: 9px;
  }

  .topbar h2 {
    color: #111827;
    font-size: 20px;
  }

  .task-board-header,
  .task-row {
    display: grid;
    grid-template-columns: 16px minmax(0, 1fr) 54px 88px 48px;
    gap: 5px;
    align-items: start;
    break-inside: avoid;
    page-break-inside: avoid;
    padding: 5px 0;
    border-bottom: 1px solid #d1d5db;
    background: transparent !important;
  }

  .task-board-header {
    font-size: 8px;
    color: #4b5563;
  }

  .task-board-header span:last-child,
  .task-row .task-actions {
    display: none;
  }

  .task-row::before {
    display: none;
  }

  .task-check {
    width: 12px;
    height: 12px;
    margin-top: 2px;
  }

  .task-kicker {
    color: #1d4ed8;
    font-size: 8px;
  }

  .task-title strong,
  .timeline-item-main strong,
  .itinerary-main strong {
    color: #111827;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
  }

  .status-pill,
  .owner-pill,
  .badge {
    min-height: 0;
    border: 1px solid #d1d5db;
    background: #ffffff !important;
    color: #111827 !important;
    padding: 2px 5px;
    font-size: 8px;
  }

  .timeline-summary,
  .itinerary-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 5mm;
    padding: 0;
    border: 0;
    background: transparent !important;
  }

  .timeline-summary > div,
  .itinerary-day-label {
    border: 1px solid #d1d5db;
    border-radius: 0;
    background: #ffffff !important;
    padding: 6px;
    text-align: left;
  }

  .timeline-day,
  .itinerary-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #d1d5db;
    border-bottom: 0;
    background: transparent !important;
  }

  .timeline-day:last-child,
  .itinerary-row:last-child {
    border-bottom: 1px solid #d1d5db;
  }

  .timeline-date,
  .itinerary-time {
    border-right: 1px solid #d1d5db;
    background: #f9fafb !important;
    padding: 6px;
  }

  .timeline-date strong {
    color: #111827;
    font-size: 18px;
  }

  .timeline-stack,
  .itinerary-card {
    display: grid;
    gap: 4px;
    margin: 0;
    padding: 6px;
    border: 0;
    border-radius: 0;
    background: transparent !important;
  }

  .timeline-item,
  .itinerary-card {
    break-inside: avoid;
    page-break-inside: avoid;
    box-shadow: none;
  }

  .timeline-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    padding: 5px 0;
    border: 0;
    border-top: 1px solid #e5e7eb;
    border-radius: 0;
    background: transparent !important;
  }

  .timeline-item-actions,
  .itinerary-meta,
  .itinerary-linked {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    overflow: visible;
  }

  .itinerary-row::before {
    display: none;
  }

  .itinerary-time strong {
    min-width: 0;
    min-height: 0;
    border: 0;
    background: transparent !important;
    box-shadow: none;
    font-size: 11px;
  }

  .itinerary-main p {
    display: block;
    margin: 3px 0 0;
    color: #374151;
    font-size: 9px;
    line-height: 1.25;
  }
}
