:root {
  --navy: #103858;
  --navy-2: #144067;
  --blue: #3878b0;
  --teal: #1898a8;
  --amber: #d88820;
  --amber-soft: #fff2d8;
  --ink: #17212b;
  --slate: #536574;
  --muted: #78909f;
  --mist: #edf4f7;
  --cloud: #f7fafc;
  --white: #fff;
  --success: #16856a;
  --warning: #c47913;
  --danger: #c23b4a;
  --line: #dce7ec;
  --shadow-sm: 0 2px 10px rgba(16, 56, 88, .08);
  --shadow-md: 0 14px 36px rgba(16, 56, 88, .13);
  --r-control: 8px;
  --r-card: 12px;
  --r-panel: 22px;
  --sidebar: 244px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--cloud);
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, .display { font-family: Manrope, "Avenir Next", system-ui, sans-serif; color: var(--navy); }
h1 { font-size: clamp(2rem, 3vw, 2.25rem); line-height: 1.2; margin-bottom: 8px; }
h2 { font-size: 1.75rem; line-height: 1.25; }
h3 { font-size: 1.25rem; line-height: 1.35; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 1000; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
.icon { width: 1.25rem; height: 1.25rem; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 1.5rem; height: 1.5rem; }
.muted { color: var(--slate); }
.small { font-size: .875rem; }
.eyebrow { color: var(--teal); font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.stack { display: grid; gap: 16px; }
.divider { height: 1px; background: var(--line); margin: 8px 0; }

/* Controls */
.btn { min-height: 42px; border-radius: var(--r-control); border: 1px solid transparent; padding: 9px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 750; color: var(--ink); transition: transform .16s, box-shadow .16s, background .16s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:focus-visible, .input:focus-visible, .nav-link:focus-visible, .icon-button:focus-visible, .tab:focus-visible { outline: 3px solid rgba(56,120,176,.28); outline-offset: 2px; }
.btn-primary { background: var(--amber); color: var(--ink); box-shadow: 0 5px 15px rgba(216,136,32,.2); }
.btn-primary:hover { background: #e59625; }
.btn-secondary { background: var(--white); border-color: var(--navy); color: var(--navy); }
.btn-ghost { background: transparent; color: var(--navy); }
.btn-soft { background: var(--mist); color: var(--navy); }
.btn-danger { background: #fff0f2; color: var(--danger); border-color: #f2c9cf; }
.btn-wide { width: 100%; }
.icon-button { width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 10px; border: 1px solid var(--line); color: var(--navy); background: var(--white); }
.input, .select, .textarea { width: 100%; min-height: 44px; border: 1px solid #cfdde4; border-radius: var(--r-control); background: var(--white); color: var(--ink); padding: 10px 12px; }
.textarea { min-height: 96px; resize: vertical; }
.field { display: grid; gap: 6px; }
.field label { color: var(--navy); font-weight: 700; font-size: .875rem; }
.helper { color: var(--slate); font-size: .78rem; }
.searchbox { position: relative; min-width: min(340px, 52vw); }
.searchbox .icon { position: absolute; left: 12px; top: 12px; color: var(--slate); }
.searchbox input { padding-left: 40px; }
.checkbox { display: flex; align-items: flex-start; gap: 10px; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--teal); margin-top: 3px; }
.pill, .tag { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 9px; font-size: .75rem; font-weight: 750; white-space: nowrap; }
.pill-blue { background: #e8f1fb; color: #245c8e; }
.pill-teal { background: #e1f4f6; color: #116d78; }
.pill-amber { background: var(--amber-soft); color: #81500e; }
.pill-success { background: #e3f4ef; color: #0d6954; }
.pill-slate { background: #eaf0f3; color: var(--slate); }
.badge-count { min-width: 24px; height: 24px; padding: 0 7px; display: inline-grid; place-items: center; background: var(--mist); color: var(--navy); border-radius: 999px; font-size: .75rem; font-weight: 800; }

/* Public screens */
.public-shell { min-height: 100vh; background: linear-gradient(180deg, #fff 0%, var(--cloud) 100%); }
.public-nav { max-width: 1200px; margin: 0 auto; padding: 20px 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand-logo { width: 176px; height: auto; }
.public-links { display: flex; align-items: center; gap: 24px; color: var(--navy); font-weight: 650; }
.hero { max-width: 1200px; margin: 0 auto; min-height: calc(100vh - 88px); padding: 72px 28px 84px; display: grid; grid-template-columns: 1fr 1.02fr; align-items: center; gap: 64px; overflow: hidden; }
.hero-copy { max-width: 580px; }
.hero h1 { font-size: clamp(2.7rem, 5.5vw, 4.7rem); line-height: 1.03; letter-spacing: -.045em; margin-bottom: 24px; }
.hero h1 span { color: var(--teal); }
.hero-copy > p { font-size: 1.2rem; line-height: 1.7; color: var(--slate); max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0; }
.trust-row { display: flex; flex-wrap: wrap; gap: 16px 24px; color: var(--slate); font-size: .875rem; }
.trust-row span { display: inline-flex; align-items: center; gap: 7px; }
.hero-product { position: relative; min-height: 520px; display: grid; place-items: center; }
.route-orbit { position: absolute; inset: 2% 0 0; background: url('../images/illustrations/collaboration.svg') center/contain no-repeat; opacity: .16; transform: rotate(-6deg); }
.mini-board { position: relative; width: min(620px, 100%); padding: 18px; border: 1px solid var(--line); border-radius: 26px; background: rgba(255,255,255,.92); box-shadow: 0 30px 80px rgba(16,56,88,.18); transform: rotate(2deg); }
.mini-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.mini-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.mini-column { min-height: 330px; padding: 11px; background: var(--cloud); border-radius: 14px; }
.mini-column::before { content: ''; display: block; width: 32px; height: 4px; border-radius: 4px; background: var(--teal); margin-bottom: 12px; }
.mini-column:nth-child(2)::before { background: var(--navy); }
.mini-column:nth-child(3)::before { background: var(--amber); }
.mini-card { background: #fff; border: 1px solid var(--line); border-radius: 11px; padding: 10px; box-shadow: var(--shadow-sm); margin-bottom: 10px; }
.mini-cover { height: 72px; border-radius: 8px; margin-bottom: 9px; background: linear-gradient(135deg, var(--blue), var(--teal)); background-size: cover; background-position: center; }
.mini-line { height: 7px; border-radius: 9px; background: var(--mist); margin: 6px 0; }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, .9fr) 1.1fr; background: #fff; }
.auth-panel { padding: 28px clamp(28px, 6vw, 96px); display: flex; flex-direction: column; justify-content: center; }
.auth-panel .brand-logo { margin-bottom: 52px; }
.auth-card { max-width: 460px; width: 100%; margin: 0 auto; }
.auth-card h1 { margin-bottom: 10px; }
.auth-card form { display: grid; gap: 17px; margin-top: 28px; }
.auth-aside { position: relative; overflow: hidden; padding: 64px; display: grid; place-items: center; background: var(--navy); color: white; }
.auth-aside::after { content: ''; position: absolute; width: 430px; height: 430px; right: -130px; bottom: -170px; border-radius: 50%; border: 72px solid rgba(24,152,168,.28); }
.auth-aside-content { max-width: 520px; position: relative; z-index: 1; }
.auth-aside h2 { color: white; font-size: 2.5rem; }
.quote-card { margin-top: 28px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15); padding: 22px; border-radius: 18px; backdrop-filter: blur(8px); }

/* App shell */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 20px 14px; background: var(--navy); color: #fff; display: flex; flex-direction: column; z-index: 30; }
.sidebar .brand-logo { width: 154px; margin: 4px 10px 28px; filter: brightness(0) invert(1); }
.nav-section-label { padding: 12px 12px 7px; color: rgba(255,255,255,.58); font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; font-weight: 800; }
.side-nav { display: grid; gap: 4px; }
.nav-link { min-height: 42px; padding: 9px 12px; display: flex; align-items: center; gap: 11px; border-radius: 9px; color: rgba(255,255,255,.76); font-size: .9rem; font-weight: 650; }
.nav-link:hover { color: #fff; background: rgba(255,255,255,.08); text-decoration: none; }
.nav-link.active { color: #fff; background: rgba(255,255,255,.13); box-shadow: inset 3px 0 var(--amber); }
.sidebar-foot { margin-top: auto; padding: 14px 8px 0; border-top: 1px solid rgba(255,255,255,.13); }
.profile-chip { display: flex; align-items: center; gap: 10px; color: white; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto; background: var(--teal); color: var(--ink); font-weight: 850; }
.avatar-sm { width: 28px; height: 28px; font-size: .72rem; border: 2px solid white; }
.app-area { min-width: 0; }
.topbar { min-height: 72px; position: sticky; top: 0; z-index: 20; padding: 12px 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: rgba(247,250,252,.92); backdrop-filter: blur(12px); }
.mobile-menu { display: none; }
.crumb { color: var(--slate); font-size: .9rem; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.page { padding: 28px; max-width: 1480px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
.page-head p { color: var(--slate); margin: 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* Cards and dashboard */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); padding: 18px; box-shadow: var(--shadow-sm); }
.stat-card .row-between { margin-bottom: 10px; }
.stat-card strong { display: block; font-family: Manrope, system-ui, sans-serif; color: var(--navy); font-size: 1.8rem; line-height: 1; }
.stat-card .icon-wrap { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--mist); color: var(--navy); }
.board-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.board-tile { display: block; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); box-shadow: var(--shadow-sm); transition: transform .16s, box-shadow .16s; }
.board-tile:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.board-cover { height: 148px; padding: 18px; display: flex; align-items: flex-end; background: linear-gradient(135deg,var(--navy),var(--teal)); color: #fff; }
.board-cover.madrid { background: linear-gradient(rgba(16,56,88,.15),rgba(16,56,88,.64)), url('../images/photos/madrid.webp') center/cover; }
.board-cover.lisboa { background: linear-gradient(rgba(16,56,88,.08),rgba(16,56,88,.64)), url('../images/photos/lisboa.webp') center/cover; }
.board-cover.kyoto { background: linear-gradient(rgba(16,56,88,.08),rgba(16,56,88,.64)), url('../images/photos/kyoto.webp') center/cover; }
.board-cover h3 { color: #fff; margin: 0; font-size: 1.45rem; }
.board-body { padding: 16px 18px 18px; }
.progress { height: 8px; border-radius: 8px; background: var(--mist); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--teal); }
.avatar-stack { display: flex; padding-left: 8px; }
.avatar-stack .avatar { margin-left: -8px; }

/* Kanban */
.board-page { max-width: none; padding-right: 0; }
.board-toolbar { margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding-right: 28px; }
.filter-row { display: flex; flex-wrap: wrap; gap: 8px; }
.kanban-scroll { overflow-x: auto; padding: 2px 28px 30px 0; scrollbar-color: var(--blue) var(--mist); }
.kanban { display: grid; grid-template-columns: repeat(9, 286px); gap: 14px; min-width: max-content; align-items: start; }
.kanban-column { min-height: 520px; border-radius: 14px; background: #eef4f6; border: 1px solid #e0eaee; padding: 10px; }
.column-head { padding: 3px 4px 11px; }
.column-accent { width: 34px; height: 4px; background: var(--accent, var(--teal)); border-radius: 4px; margin-bottom: 10px; }
.column-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--navy); font-size: .92rem; font-weight: 800; }
.dropzone { min-height: 438px; }
.dropzone.drag-over { outline: 2px dashed var(--teal); outline-offset: -2px; border-radius: 10px; background: rgba(24,152,168,.06); }
.destination-card { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--r-card); box-shadow: var(--shadow-sm); margin-bottom: 10px; cursor: grab; }
.destination-card:active { cursor: grabbing; }
.destination-card.dragging { opacity: .45; transform: rotate(2deg); }
.card-cover { height: 112px; background: linear-gradient(135deg,var(--blue),var(--teal)); background-size: cover; background-position: center; }
.card-cover.madrid { background-image: linear-gradient(rgba(16,56,88,.02),rgba(16,56,88,.28)), url('../images/photos/madrid.webp'); }
.card-cover.lisboa { background-image: linear-gradient(rgba(16,56,88,.02),rgba(16,56,88,.28)), url('../images/photos/lisboa.webp'); }
.card-cover.kyoto { background-image: linear-gradient(rgba(16,56,88,.02),rgba(16,56,88,.28)), url('../images/photos/kyoto.webp'); }
.card-content { padding: 13px; }
.card-content h4 { color: var(--navy); margin: 0 0 4px; font-size: 1rem; }
.card-content p { margin: 0; font-size: .8rem; color: var(--slate); }
.card-meta { margin-top: 12px; display: grid; gap: 8px; }
.meta-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .75rem; color: var(--slate); }
.card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; }
.card-action { border: 0; background: none; color: var(--blue); padding: 4px 0; font-weight: 750; font-size: .78rem; }
.card-action-edit { color: var(--navy); }
.affiliate-nudge { margin-top: 10px; padding: 9px; border-radius: 9px; background: var(--amber-soft); color: #68420e; font-size: .76rem; font-weight: 750; display: flex; align-items: center; gap: 7px; }

/* Detail, research, reservations */
.detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 22px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-panel); padding: 22px; box-shadow: var(--shadow-sm); }
.panel-tight { padding: 16px; border-radius: var(--r-card); }
.cover-hero { min-height: 260px; border-radius: 18px; padding: 24px; display: flex; align-items: flex-end; background: linear-gradient(rgba(16,56,88,.08),rgba(16,56,88,.72)), url('../images/photos/madrid.webp') center/cover; color: white; }
.cover-hero h1, .cover-hero h2 { color: white; }
.cover-hero h1 { margin-bottom: 6px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-top: 18px; overflow-x: auto; }
.tab { border: 0; background: transparent; color: var(--slate); padding: 12px 14px; font-weight: 700; white-space: nowrap; border-bottom: 3px solid transparent; }
.tab.active { color: var(--navy); border-bottom-color: var(--teal); }
.tab-panel { padding-top: 20px; }
.info-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.info-block { padding: 14px; background: var(--cloud); border-radius: 10px; }
.info-block span { display: block; color: var(--slate); font-size: .78rem; margin-bottom: 4px; }
.info-block strong { color: var(--navy); }
.timeline { display: grid; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 34px 1fr; gap: 12px; }
.timeline-mark { display: flex; flex-direction: column; align-items: center; }
.timeline-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--teal); border: 3px solid #d9f1f3; margin-top: 5px; }
.timeline-line { width: 2px; flex: 1; min-height: 42px; background: var(--line); }
.timeline-item:last-child .timeline-line { display: none; }
.timeline-content { padding-bottom: 19px; }
.timeline-content strong { color: var(--navy); display: block; }
.check-list { display: grid; gap: 4px; }
.check-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border-radius: 9px; }
.check-item:hover { background: var(--cloud); }
.check-item input { width: 18px; height: 18px; accent-color: var(--success); margin-top: 2px; }
.check-item.done span { text-decoration: line-through; color: var(--muted); }
.affiliate-card { border: 1px solid #f1d6ad; background: linear-gradient(145deg,#fff9ed,#fff); border-radius: 14px; padding: 16px; }
.affiliate-card .icon-wrap { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; background: var(--amber-soft); color: #7b4a08; }
.affiliate-card h3 { margin: 12px 0 6px; }
.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 16px 0; }
.price-row strong { color: var(--navy); font-size: 1.35rem; }
.document-row, .member-row, .reservation-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.document-row:last-child, .member-row:last-child, .reservation-row:last-child { border-bottom: 0; }
.file-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 10px; background: var(--mist); color: var(--navy); }

/* Trip and budget */
.countdown-panel { position: relative; overflow: hidden; min-height: 330px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; background: var(--navy); color: white; }
.countdown-panel::after { content: ''; position: absolute; width: 360px; height: 360px; border: 60px solid rgba(24,152,168,.2); border-radius: 50%; right: -120px; top: -120px; }
.countdown-panel h1, .countdown-panel h2 { color: white; }
.countdown { display: flex; gap: 12px; margin-top: 24px; }
.count-box { min-width: 82px; padding: 14px 10px; text-align: center; border-radius: 12px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); }
.count-box strong { display: block; font-size: 1.8rem; }
.count-box span { color: rgba(255,255,255,.7); font-size: .75rem; }
.trip-symbol { position: relative; z-index: 1; width: 230px; margin: auto; }
.metric-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.metric { padding: 18px; background: var(--cloud); border-radius: 12px; }
.metric span { color: var(--slate); font-size: .82rem; }
.metric strong { display: block; color: var(--navy); font-size: 1.6rem; margin-top: 4px; }
.bar-chart { display: grid; grid-template-columns: repeat(6,1fr); align-items: end; gap: 12px; height: 190px; padding-top: 28px; }
.bar-item { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; }
.bar { width: min(50px,80%); height: var(--h); min-height: 8px; border-radius: 7px 7px 2px 2px; background: var(--blue); }
.bar.amber { background: var(--amber); }
.bar-item span { font-size: .72rem; color: var(--slate); }
.budget-table { width: 100%; border-collapse: collapse; }
.budget-table th, .budget-table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--line); }
.budget-table th { color: var(--slate); font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.budget-table td:last-child, .budget-table th:last-child { text-align: right; }

/* Settings, premium and states */
.settings-layout { display: grid; grid-template-columns: 230px minmax(0,720px); gap: 28px; }
.settings-menu { display: grid; align-content: start; gap: 5px; }
.settings-menu a { padding: 10px 12px; border-radius: 8px; color: var(--slate); font-weight: 700; }
.settings-menu a.active { color: var(--navy); background: var(--mist); }
.settings-form { display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.switch { width: 46px; height: 26px; padding: 3px; border: 0; border-radius: 999px; background: #b9c8cf; }
.switch::after { content: ''; display: block; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.18); transition: transform .2s; }
.switch.on { background: var(--teal); }
.switch.on::after { transform: translateX(20px); }
.premium-hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 34px; align-items: center; padding: 40px; border-radius: 26px; background: var(--navy); color: white; overflow: hidden; }
.premium-hero h1, .premium-hero h2 { color: white; }
.price-card { background: white; color: var(--ink); padding: 26px; border-radius: 20px; box-shadow: 0 18px 50px rgba(0,0,0,.22); }
.price-big { color: var(--navy); font-size: 3rem; font-weight: 850; letter-spacing: -.04em; }
.feature-list { display: grid; gap: 12px; margin: 22px 0; }
.feature-list div { display: flex; gap: 10px; align-items: flex-start; }
.feature-list .icon { color: var(--success); }
.empty-state { min-height: calc(100vh - 180px); display: grid; place-items: center; text-align: center; }
.empty-card { max-width: 580px; }
.empty-card img { width: 340px; margin: 0 auto 20px; }
.empty-card p { color: var(--slate); max-width: 46ch; margin: 0 auto 24px; }
.memory-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.memory-card { min-height: 280px; position: relative; overflow: hidden; border-radius: 18px; background: var(--navy); color: white; display: flex; align-items: flex-end; }
.memory-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 25%,rgba(16,56,88,.88)); }
.memory-card.madrid { background: url('../images/photos/madrid.webp') center/cover; }
.memory-card.lisboa { background: url('../images/photos/lisboa.webp') center/cover; }
.memory-card.kyoto { background: url('../images/photos/kyoto.webp') center/cover; }
.memory-content { position: relative; z-index: 1; padding: 20px; width: 100%; }
.memory-content h3 { color: white; margin-bottom: 4px; }
.danger-zone { border: 1px solid #efc4cb; background: #fff9fa; }

/* Card editor */
.edit-page { padding-bottom: 64px; }
.edit-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; align-items: start; }
.form-section { padding: 24px; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.section-head h2 { margin: 0 0 4px; font-size: 1.35rem; }
.section-head p { margin: 0; }
.cover-editor { min-height: 210px; margin-bottom: 22px; padding: 18px; border-radius: 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; background-size: cover; background-position: center; color: #fff; overflow: hidden; }
.cover-editor.madrid { background-image: linear-gradient(rgba(16,56,88,.06),rgba(16,56,88,.74)), url('../images/photos/madrid.webp'); }
.cover-editor-copy { display: grid; gap: 8px; }
.cover-editor-copy strong { font: 750 1.35rem/1.2 Manrope, system-ui, sans-serif; }
.edit-fields { margin-top: 2px; }
.input-suffix, .money-input { position: relative; }
.input-suffix .input { padding-right: 58px; }
.input-suffix span { position: absolute; right: 13px; top: 11px; color: var(--slate); font-size: .875rem; }
.money-input .input { padding-left: 42px; }
.money-input > span { position: absolute; z-index: 1; left: 12px; top: 11px; color: var(--slate); font-weight: 700; }
.choice-fieldset { border: 0; padding: 0; margin: 22px 0 0; }
.choice-fieldset legend { color: var(--navy); font-size: .875rem; font-weight: 700; margin-bottom: 10px; }
.compact-choice-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.radio-card { position: relative; cursor: pointer; }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card span { min-height: 50px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--slate); font-weight: 700; }
.radio-card.selected span, .radio-card:focus-within span { color: var(--navy); border-color: var(--teal); background: #f4fdfe; box-shadow: 0 0 0 3px rgba(24,152,168,.1); }
.notes-large { min-height: 150px; }
.editable-checklist { display: grid; gap: 8px; }
.editable-task { display: grid; grid-template-columns: 28px 22px minmax(0,1fr) 42px; align-items: center; gap: 9px; }
.editable-task > input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--success); }
.drag-handle { color: var(--muted); display: grid; place-items: center; cursor: grab; }
.editable-task:has(input[type="checkbox"]:checked) .input { color: var(--muted); text-decoration: line-through; background: var(--cloud); }
.edit-aside { min-width: 0; }
.sticky-preview { position: sticky; top: 92px; z-index: 2; }
.preview-card { box-shadow: none; }

/* Onboarding */
.onboarding { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; background: #fff; }
.onboarding-copy { padding: 48px clamp(28px,7vw,110px); display: flex; flex-direction: column; justify-content: center; }
.onboarding-visual { padding: 42px; background: var(--navy); display: grid; place-items: center; }
.steps { display: flex; gap: 8px; margin-bottom: 38px; }
.step-dot { height: 6px; width: 42px; border-radius: 6px; background: var(--mist); }
.step-dot.active { background: var(--teal); }
.choice-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin: 24px 0; }
.choice-card { border: 1px solid var(--line); background: #fff; text-align: left; padding: 16px; border-radius: 12px; color: var(--navy); font-weight: 750; }
.choice-card.selected { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(24,152,168,.12); background: #f6feff; }
.onboarding-board { width: min(520px,100%); background: #fff; border-radius: 22px; padding: 20px; transform: rotate(-2deg); box-shadow: 0 24px 80px rgba(0,0,0,.25); }

/* Modal and feedback */
.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; background: rgba(9,31,48,.58); backdrop-filter: blur(5px); }
.modal { width: min(620px,100%); max-height: calc(100vh - 40px); overflow: auto; background: #fff; border-radius: 20px; box-shadow: 0 30px 90px rgba(0,0,0,.28); }
.modal-head, .modal-body, .modal-foot { padding: 20px 24px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); }
.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 10px; }
.toast { width: min(370px,calc(100vw - 40px)); background: var(--navy); color: #fff; padding: 14px 16px; border-radius: 12px; box-shadow: var(--shadow-md); display: flex; gap: 10px; align-items: center; animation: toast-in .25s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; padding-top: 44px; }
  .hero-product { min-height: 430px; }
  .stat-grid { grid-template-columns: repeat(2,1fr); }
  .board-grid, .memory-grid { grid-template-columns: repeat(2,1fr); }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-aside { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
  .premium-hero { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  :root { --sidebar: 272px; }
  .public-links a:not(.btn) { display: none; }
  .auth-shell, .onboarding { grid-template-columns: 1fr; }
  .auth-aside, .onboarding-visual { display: none; }
  .auth-panel { min-height: 100vh; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); transform: translateX(-100%); transition: transform .22s ease; box-shadow: 20px 0 50px rgba(0,0,0,.24); }
  .app-shell.menu-open .sidebar { transform: translateX(0); }
  .mobile-menu { display: inline-grid; }
  .topbar { padding: 10px 16px; }
  .topbar .searchbox { display: none; }
  .page { padding: 22px 16px; }
  .board-page { padding-right: 0; }
  .board-toolbar { padding-right: 16px; }
  .kanban-scroll { padding-right: 16px; }
  .page-head { flex-direction: column; }
  .board-grid, .memory-grid { grid-template-columns: 1fr; }
  .countdown-panel { grid-template-columns: 1fr; }
  .trip-symbol { display: none; }
  .settings-layout { grid-template-columns: 1fr; }
  .edit-layout { grid-template-columns: 1fr; }
  .sticky-preview { position: static; }
  .edit-aside { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  .settings-menu { grid-template-columns: repeat(3,1fr); overflow-x: auto; }
}

@media (max-width: 560px) {
  .public-nav { padding: 15px 16px; }
  .brand-logo { width: 146px; }
  .public-nav .btn { padding-inline: 12px; }
  .hero { padding: 36px 16px 54px; gap: 30px; }
  .hero h1 { font-size: 2.65rem; }
  .hero-product { min-height: 330px; }
  .mini-board { padding: 12px; }
  .mini-columns { gap: 7px; }
  .mini-column { min-height: 245px; padding: 7px; }
  .mini-card { padding: 7px; }
  .mini-cover { height: 48px; }
  .auth-panel { padding: 22px 18px; }
  .auth-panel .brand-logo { margin-bottom: 38px; }
  .stat-grid, .metric-grid, .info-grid, .form-grid { grid-template-columns: 1fr; }
  .detail-aside { grid-template-columns: 1fr; }
  .edit-aside { grid-template-columns: 1fr; }
  .compact-choice-grid { grid-template-columns: repeat(2,1fr); }
  .cover-editor { min-height: 180px; flex-direction: column; align-items: flex-start; justify-content: flex-end; }
  .editable-task { grid-template-columns: 24px 20px minmax(0,1fr) 40px; gap: 6px; }
  .choice-grid { grid-template-columns: 1fr; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .top-actions .btn span { display: none; }
  .countdown { gap: 7px; }
  .count-box { min-width: 0; flex: 1; padding: 10px 5px; }
  .count-box strong { font-size: 1.35rem; }
  .premium-hero { padding: 24px 18px; }
  .budget-table { font-size: .82rem; }
}

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

/* ============================================================
   Kanvel app additions (states, forms, landing, a11y)
   ============================================================ */
.kanvel-body { margin: 0; }
.form-error { background: #fff0f2; color: var(--danger); border: 1px solid #f2c9cf; border-radius: var(--r-control); padding: 10px 12px; font-size: .9rem; margin: 14px 0 0; }
.form-success { background: #e3f4ef; color: #0d6954; border: 1px solid #bfe6d8; border-radius: var(--r-control); padding: 10px 12px; font-size: .9rem; margin: 14px 0 0; }
.field-error { color: var(--danger); font-size: .78rem; }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.auth-footer { text-align: center; margin-top: 22px; }
.auth-aside-text { color: rgba(255,255,255,.75); font-size: 1.08rem; }
.quote-card p { margin: 0; }
.pw-meter { height: 6px; border-radius: 6px; background: var(--mist); overflow: hidden; margin-top: 6px; }
.pw-meter span { display: block; height: 100%; width: 0; background: var(--danger); transition: width .2s, background .2s; }
.pw-meter[data-score="2"] span { background: var(--warning); }
.pw-meter[data-score="3"] span, .pw-meter[data-score="4"] span { background: var(--success); }
.btn[disabled], .btn[aria-busy="true"] { opacity: .6; cursor: progress; transform: none; }
.btn-sm { min-height: 34px; padding: 5px 12px; font-size: .85rem; }
.btn-icon-only { padding: 0; width: 42px; }
.icon-button.small { width: 34px; height: 34px; }
.text-right { text-align: right; }
.mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mb-14 { margin-bottom: 14px; }

/* Skeleton */
.skeleton { position: relative; overflow: hidden; background: var(--mist); border-radius: 8px; min-height: 14px; }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.skeleton-card { height: 180px; border-radius: 14px; }
.skeleton-line { height: 14px; margin: 8px 0; }

/* Dropdown menu */
.menu-wrap { position: relative; display: inline-block; }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); min-width: 210px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md); padding: 6px; z-index: 40; display: grid; }
.dropdown[hidden] { display: none; }
.dropdown button, .dropdown a { text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; color: var(--ink); font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: 8px; }
.dropdown button:hover, .dropdown a:hover, .dropdown button:focus-visible { background: var(--cloud); text-decoration: none; outline: none; }
.dropdown .danger { color: var(--danger); }
.dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }

/* Kanban a11y & states */
.destination-card:focus-visible { outline: 3px solid rgba(56,120,176,.4); outline-offset: 2px; }
.destination-card.saving { opacity: .7; }
.destination-card.conflict { outline: 2px solid var(--warning); }
.card-cover.placeholder { background: linear-gradient(135deg, var(--blue), var(--teal)); }
.card-indicators { display: flex; gap: 8px; color: var(--slate); font-size: .72rem; align-items: center; }
.card-indicators span { display: inline-flex; align-items: center; gap: 3px; }
.column-add { width: 100%; margin-top: 6px; border: 1px dashed #c8d7de; background: transparent; color: var(--slate); border-radius: 10px; padding: 10px; font-weight: 650; }
.column-add:hover { background: rgba(255,255,255,.7); color: var(--navy); }
.column-empty { padding: 20px 10px; text-align: center; color: var(--muted); font-size: .8rem; }
.kanban-column.highlight { outline: 2px solid var(--teal); }
.filter-row select, .filter-row .input { min-height: 36px; padding: 4px 10px; font-size: .85rem; width: auto; }
.pill-button { cursor: pointer; border: 0; }
.pill-button[aria-pressed="true"] { background: var(--navy); color: #fff; }

/* Topbar extras */
.notif-badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--amber); color: var(--ink); font-size: .68rem; font-weight: 800; display: grid; place-items: center; }
.icon-button { position: relative; }
.notif-panel { position: absolute; right: 0; top: calc(100% + 8px); width: min(360px, 90vw); max-height: 70vh; overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-md); padding: 10px; z-index: 45; }
.notif-item { padding: 10px; border-radius: 10px; display: grid; gap: 2px; }
.notif-item.unread { background: var(--cloud); }
.notif-item small { color: var(--slate); }
.online-banner { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--warning); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 120; font-weight: 700; }

/* Detail extras */
.detail-aside .panel + .panel { margin-top: 0; }
.subnav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.subnav a { padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--navy); font-weight: 700; font-size: .85rem; }
.subnav a.active { background: var(--navy); color: #fff; border-color: var(--navy); }
.list-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.list-row .row { align-items: flex-start; }
.list-row strong { color: var(--navy); }
.inline-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.comment { display: grid; grid-template-columns: 38px 1fr; gap: 10px; padding: 10px 0; }
.comment-body { background: var(--cloud); border-radius: 12px; padding: 10px 12px; white-space: pre-wrap; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.suggestion-box { border: 1px dashed var(--teal); background: #f4fdfe; border-radius: 12px; padding: 14px; }
.suggestion-box label { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.rating { display: inline-flex; gap: 2px; }
.rating button { border: 0; background: none; font-size: 1.4rem; color: #c8d7de; padding: 0 2px; }
.rating button.on { color: var(--amber); }
.upload-drop { border: 2px dashed #c8d7de; border-radius: 12px; padding: 18px; text-align: center; color: var(--slate); }
.upload-drop.over { border-color: var(--teal); background: #f4fdfe; }
.thumb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.thumb-grid img { width: 100%; height: 100px; object-fit: cover; border-radius: 10px; }
.day-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; background: #fff; }
.day-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.itin-item { display: grid; grid-template-columns: 70px 1fr auto; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); align-items: start; }
.itin-item time { color: var(--navy); font-weight: 700; font-size: .85rem; }
.warning-text { color: var(--warning); font-size: .8rem; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.status-dot.planned { background: var(--slate); } .status-dot.confirmed { background: var(--blue); } .status-dot.done { background: var(--success); }

/* Modal a11y */
.modal:focus { outline: none; }
.modal-body .stack { gap: 14px; }
.modal-wide { width: min(820px, 100%); }

/* Landing sections */
.landing-section { padding: 64px 28px; }
.landing-alt { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.landing-inner { max-width: 1100px; margin: 0 auto; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.steps-grid { list-style: none; padding: 0; margin: 24px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps-grid li { background: var(--cloud); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: flex; gap: 12px; align-items: center; color: var(--navy); }
.step-num { width: 32px; height: 32px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 800; flex: 0 0 auto; }
.faq-list { display: grid; gap: 10px; margin-top: 18px; }
.faq-item { background: var(--cloud); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; }
.faq-item summary { cursor: pointer; font-weight: 750; color: var(--navy); }
.faq-item p { margin: 10px 0 0; }
.landing-cta { text-align: center; }
.landing-footer { padding: 28px; border-top: 1px solid var(--line); color: var(--slate); }
.footer-links { display: flex; flex-wrap: wrap; gap: 14px; }
.footer-links a { color: var(--slate); font-size: .85rem; }
@media (max-width: 820px) { .two-col { grid-template-columns: 1fr; } .steps-grid { grid-template-columns: 1fr 1fr; } .landing-section { padding: 44px 16px; } }
@media (max-width: 560px) { .steps-grid { grid-template-columns: 1fr; } .itin-item { grid-template-columns: 1fr; } }

/* Public shared board */
.shared-note { margin: 12px 0 18px; }

/* Reduced motion already handled above; ensure focus ring for all interactive */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(56,120,176,.35); outline-offset: 2px; }

/* 1.0.1 fixes */
.toast.toast-error { background: var(--danger); }
.settings-layout { grid-template-columns: 230px minmax(0, 1fr); }
.settings-layout .settings-form, .settings-layout .panel:not(.premium-hero) { max-width: 820px; }
.page-actions .icon-button { flex: 0 0 auto; }
.price-big { line-height: 1.05; }
.destination-card[draggable='true'] { user-select: none; -webkit-user-select: none; }
