:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #77726b;
  --line: #e8e6e1;
  --chip: #f4f2ed;
  /* category colors */
  --c-flight: #8b5cf6;
  --c-lodging: #3b82f6;
  --c-transport: #10b981;
  --c-segment: #f97316;
  --c-activity: #eab308;
  --c-placeholder: #b9b4ab;
  --warn: #ef4444;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

/* Keep button labels consistent and optically centered across controls. */
button, .btn { font-family: inherit; font-size: 13px; line-height: 1.2; text-align: center; }
button:not(.home-nav):not(.trip-context-menu button):not(.context-menu button):not(.cat-menu button) { display: inline-flex; align-items: center; justify-content: center; }


html[data-theme="dark"] {
  --bg: #171716;
  --fg: #f1efe9;
  --muted: #aaa69e;
  --line: #393833;
  --chip: #292824;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Top bar */
.inbox-backdrop { z-index: 450; }
.inbox-dialog { width: min(460px, calc(100vw - 40px)); }
.inbox-head { display: flex; align-items: center; justify-content: space-between; }
.inbox-head h2 { margin: 0; font-size: 15px; }
.inbox-close { border: 0; background: transparent; font-size: 18px; cursor: pointer; color: var(--muted); line-height: 1; padding: 2px 6px; }
.inbox-sub { color: var(--muted); font-size: 12px; margin: 6px 0 12px; }
.inbox-list { display: flex; flex-direction: column; gap: 10px; max-height: 46vh; overflow-y: auto; }
.inbox-item { border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.inbox-item-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.inbox-item-head strong { font-size: 13px; line-height: 1.4; }
.inbox-discard { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; padding: 2px 6px; }
.inbox-discard:hover { color: #b33a2f; }
.inbox-item-meta { color: var(--muted); font-size: 12px; margin: 4px 0 8px; }
.inbox-item-actions { display: flex; gap: 8px; align-items: center; }
.inbox-trip-picker { flex: 1; font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; background: #fff; color: var(--fg); }
.inbox-empty { color: var(--muted); font-size: 13px; line-height: 1.5; }
.email-viewer-backdrop { z-index: 500; }
.email-viewer-dialog { display: flex; flex-direction: column; }
.confirm-dialog.email-viewer-dialog { width: min(1100px, calc(100vw - 24px)); max-height: min(88vh, 900px); }
.email-viewer-body { overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 14px; margin: 10px 0 14px; color: var(--fg); min-height: 180px; max-height: 60vh; font-size: 13px; line-height: 1.5; }
.email-viewer-body :is(h1,h2,h3,h4){ margin: 8px 0 6px; }
.email-viewer-body p { margin: 6px 0; }
.email-viewer-body img { max-width: 100%; height: auto; }
.email-viewer-body table { width: 100% !important; max-width: none !important; }
.email-viewer-body td, .email-viewer-body th { word-wrap: break-word; }
.email-viewer-body [style*="width:"] { max-width: 100%; }
.email-viewer-body a { color: var(--blue, #3a86ff); }
.email-viewer-text pre { white-space: pre-wrap; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; margin: 0; }
.drawer-email-link { border: 0; padding: 0; background: transparent; color: var(--blue, #3a86ff); cursor: pointer; font: inherit; text-decoration: underline; }
.inbox-button { position: relative; }
.inbox-badge { position: absolute; top: -6px; right: -8px; background: #b33a2f; color: #fff; font-size: 10px; font-weight: 700; line-height: 1; padding: 3px 5px; border-radius: 8px; min-width: 14px; text-align: center; }
.inbox-button.has-badge { border-color: #b33a2f; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 22px;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}
.brand {
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.2px;
}
main { padding: clamp(14px, 3vw, 34px); max-width: 1180px; margin: 0 auto; }
.view { display: none; }
.home-button { border: 1px solid var(--line); background: var(--chip); color: var(--fg); border-radius: 8px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; }
.home-button:hover { background: #ece9e3; }

/* Home dashboard */
.home-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); min-height: 620px; }
.home-sidebar { border-right: 1px solid var(--line); padding: 14px 18px 14px 0; }
.home-nav { display: flex; width: 100%; align-items: center; justify-content: space-between; border: 0; border-radius: 8px; padding: 10px 10px; margin: 3px 0; background: transparent; color: var(--muted); text-align: left; font: inherit; font-size: 13px; cursor: pointer; }
.home-nav:hover { background: var(--chip); color: var(--fg); }
.home-nav.active { background: #e5e2dc; color: var(--fg); font-weight: 600; }
.home-nav.drop-target, .add-trip-card.drop-target { outline: 2px solid #9ec3ec; outline-offset: 3px; background: #e8f1fb; }
.home-nav span { font-size: 11px; color: var(--muted); }
.home-content { min-width: 0; padding-top: 8px; }
.home-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.home-heading h1 { margin: 2px 0 0; font-size: clamp(27px, 4vw, 38px); letter-spacing: -.5px; }
.eyebrow { margin: 0; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.home-count { color: var(--muted); font-size: 13px; }
.trip-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.trip-card { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.04); transition: transform .15s, box-shadow .15s; }
.trip-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.1); }
.trip-card[draggable="true"] { cursor: grab; }
.trip-card.is-dragging { opacity: .45; cursor: grabbing; }
.add-trip-card { border-style: dashed; box-shadow: none; background: #fffdf9; }
.add-trip-card:hover { transform: none; box-shadow: none; border-color: #a9a299; }
.add-trip-plus { height: 170px; display: grid; place-items: center; font-size: 42px; font-weight: 300; color: var(--muted); background: #faf9f7; }
.add-trip-card .trip-card-body h2 { color: var(--fg); }
.trip-cover { position: relative; height: 170px; background-color: #dedbd4; background-position: center; background-size: cover; }
.trip-card-body { padding: 14px 15px 16px; }
.trip-card-body h2 { margin: 0 0 4px; font-size: 18px; }
.trip-card-body p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.trip-card-body span { color: var(--muted); font-size: 12px; }
.home-empty { border: 1px dashed var(--line); border-radius: 12px; padding: 45px 20px; text-align: center; color: var(--muted); }
.trip-context-menu { position: fixed; z-index: 300; min-width: 190px; padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 7px 24px rgba(0,0,0,.18); }
.trip-context-menu button { display: block; width: 100%; border: 0; border-radius: 6px; padding: 8px 10px; background: transparent; color: var(--fg); text-align: left; font: inherit; font-size: 13px; cursor: pointer; }
.trip-context-menu button:hover { background: var(--chip); }
.trip-context-menu button.danger { color: #b33a2f; }
.trip-context-menu button.danger:hover { background: #fdecea; }
.confirm-backdrop { position: fixed; inset: 0; z-index: 400; background: rgba(30,28,24,.35); display: grid; place-items: center; }
.confirm-dialog { width: min(340px, calc(100vw - 40px)); background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 32px rgba(0,0,0,.22); padding: 16px; font: inherit; font-size: 13px; color: var(--fg); }
.confirm-dialog p { margin: 0 0 14px; line-height: 1.5; }
.confirm-dialog .dialog-message { color: var(--muted); margin: 6px 0 16px; }
.confirm-actions { display: flex; justify-content: flex-end; gap: 8px; }
.confirm-actions button { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 7px 14px; background: #fff; color: var(--fg); cursor: pointer; }
.confirm-actions button:hover { background: var(--chip); }
.confirm-actions .confirm-ok { background: #b33a2f; border-color: #b33a2f; color: #fff; }
.confirm-actions .confirm-ok.restore-ok,
.confirm-actions .confirm-ok.blue-action { background: #3a86ff; border-color: #3a86ff; }
.confirm-actions .confirm-ok.restore-ok:hover,
.confirm-actions .confirm-ok.blue-action:hover { background: #2f75e5; border-color: #2f75e5; }
.confirm-actions .confirm-ok:hover { background: #a03227; }
.cover-dialog .cover-use-url { background: #3a86ff; border-color: #3a86ff; }
.cover-dialog .cover-use-url:hover { background: #2f75e5; border-color: #2f75e5; }
.cover-actions { margin-bottom: 10px; }
.cover-actions .cover-upload { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 6px; padding: 7px 14px; background: var(--chip); color: var(--fg); cursor: pointer; }
.cover-actions .cover-upload:hover { background: #ece9e3; }
.cover-url-input { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; font: inherit; font-size: 13px; color: var(--fg); margin-bottom: 4px; }
.cover-url-input:focus { outline: none; border-color: #8e8880; }

.view.active { display: block; }

/* Trip title (editable) */
.trip-title {
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 700;
  margin: 0 0 14px;
  line-height: 1.15;
  border-radius: 8px;
  padding: 2px 6px;
  margin-left: -6px;
  cursor: text;
  outline: none;
}
.trip-title:hover { background: var(--chip); }
.trip-title:focus {
  background: #fff;
  box-shadow: 0 0 0 2px var(--line);
}
.trip-title-empty:empty::before { content: attr(data-placeholder); color: #aaa59c; }
.trip-title-empty:focus:empty::before { color: #c5c0b8; }

.trip-title::after {
  content: ' ✎';
  font-size: 0.6em;
  color: var(--muted);
  opacity: 0;
  transition: opacity 0.15s;
}
.trip-title:hover::after { opacity: 1; }

/* Month header */
.month-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.month-title { font-size: 22px; font-weight: 650; margin: 0; }
.month-sub { color: var(--muted); font-size: 13.5px; }
.location-input { min-width: 200px; border: 0; border-bottom: 1px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 16px; font-weight: 500; padding: 4px 2px; outline: none; }
.location-input:hover { border-bottom-color: var(--line); }
.location-input:focus { border-bottom-color: #8e8880; color: var(--fg); }
.location-input::placeholder { color: #aaa59c; }

/* active-date range box + popup */
.range-box {
  font-size: 14.5px;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 14px;
  background: #e5e2dc;
  cursor: pointer;
  font-weight: 500;
}
.range-box:hover { background: #dcd8d0; }
.range-popup {
  position: fixed;
  z-index: 200;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
  padding: 12px;
  width: 300px;
}
.range-popup-title { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.range-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.range-nav span { font-weight: 600; font-size: 14px; }
.range-nav button { border: 1px solid var(--line); background: #fff; border-radius: 6px; width: 26px; height: 26px; cursor: pointer; font-size: 15px; line-height: 1; }
.range-nav button:hover { background: var(--chip); }
.rp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.rp-dow { text-align: center; font-size: 11px; color: var(--muted); padding: 3px 0; }
.rp-cell {
  text-align: center;
  font-size: 12.5px;
  padding: 6px 0;
  border-radius: 6px;
  cursor: pointer;
  color: var(--fg);
}
.rp-cell:hover { background: var(--chip); }
.rp-cell.other { background: #faf9f7; color: #c4bfb6; }
.rp-cell.in-range { background: #dbe7ff; }
.rp-cell.start, .rp-cell.end { background: #7aa2f7; color: #fff; font-weight: 600; }
.rp-cell.pending { background: #bcd0ff; font-weight: 600; }

/* Legend */
.legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 16px;
  align-items: center;
}
.legend .swatch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 10px;
}

/* Calendar — week-track layout (continuous bridged bars) */
@keyframes calendarReveal {
  from { opacity: 0; transform: scaleY(.82); transform-origin: top; max-height: 0; }
  to { opacity: 1; transform: scaleY(1); transform-origin: top; max-height: 2000px; }
}
.cal-grid.cal-reveal { overflow: hidden; animation: calendarReveal 360ms ease-out both; }

.cal-grid {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.cal-head {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--line);
}
.cal-head div {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  padding: 6px 4px;
  text-align: center;
}
.cal-week {
  position: relative;
  z-index: 1;
  overflow: visible;
  height: 94px;
}
.cal-week + .cal-week {
  border-top: 1px solid var(--line);
}
.cal-week:has(.bar.dragging) { z-index: 20; }

/* Lower trip-planning sections */
.trip-lower { display: flex; flex-direction: column; gap: 18px; margin-top: 22px; }
.planner-section { border: 0; border-radius: 0; padding: 18px 0; background: transparent; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 18px; font-weight: 650; }
.section-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.notes-editor-wrap { position: relative; width: 100%; min-height: 78px; height: 78px; }
.notes-editor { display: block; width: 100%; height: 100%; min-height: 0; resize: none; border: 1px solid var(--line); border-radius: 12px 12px 3px 12px; padding: 7px 8px; padding-right: 8px; font: inherit; font-size: 13px; line-height: 1.45; color: var(--fg); background: #faf9f7; scrollbar-width: none; -ms-overflow-style: none; }
.notes-editor::-webkit-scrollbar { display: none; width: 0; height: 0; }
.notes-editor-wrap::before { content: ''; position: absolute; right: 1px; bottom: 1px; width: 20px; height: 20px; z-index: 1; background: #faf9f7; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0 0 3px 0; pointer-events: none; }
.notes-resize-handle { position: absolute; right: 4px; bottom: 4px; width: 15px; height: 15px; z-index: 2; cursor: nwse-resize; touch-action: none; background: #aaa59d; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.notes-editor:focus, .sight-card input:focus, .sight-card textarea:focus { outline: none; border-color: #b8b1a5; box-shadow: 0 0 0 2px #f1eee8; }
.sights-list { display: flex; flex-direction: column; gap: 3px; }
.sight-card { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: start; gap: 10px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.sight-bullet { width: 10px; height: 10px; margin-top: 11px; border-radius: 50%; background: var(--c-segment); box-shadow: 0 0 0 2px rgba(249,115,22,.14); }
.sight-fields { min-width: 0; }
.sight-card input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 8px 9px; font: inherit; font-size: 13px; background: #fff; }
.sight-remove { align-self: center; width: 26px; height: 26px; border: 0; border-radius: 50%; padding: 0; color: #9d3d32; background: transparent; font: inherit; font-size: 22px; line-height: 24px; cursor: pointer; }
.sight-remove:hover { background: #f4e5e2; color: #a03227; }
.empty-inline, .section-status { color: var(--muted); font-size: 13px; margin: 4px 0; }
.trip-map { position: relative; z-index: 0; height: 360px; border-radius: 12px; overflow: hidden; background: #f0eee9; }
/* keep Leaflet panes (z-index up to 1000) inside this stacking context so modals/drawers always paint above the map */
.calendar-marker { display:block; width:16px; height:16px; border:2px solid #fff; border-radius:50%; box-shadow:0 1px 4px rgba(0,0,0,.35); }
.calendar-marker-lodging { background:var(--c-lodging); }
.calendar-marker-activity { background:var(--c-activity); }
.calendar-marker-flight { background:var(--c-flight); }
.calendar-marker-transport { background:var(--c-transport); }
.calendar-marker-segment { background:var(--c-segment); }
.calendar-marker-sight { background:#8b5cf6; }
.documents-list { display: flex; flex-direction: column; gap: 10px; }
.document-card { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 0 0 10px; background: transparent; }
.document-card-head { display: flex; align-items: center; gap: 8px; }
.document-open { flex: 1; min-width: 0; border: 0; padding: 6px 0; background: transparent; color: var(--fg); font: inherit; font-size: 13px; font-weight: 550; text-align: left; cursor: pointer; }
.document-open:hover { color: #3a86ff; text-decoration: underline; }
.document-open:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.document-title { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 8px 9px; font: inherit; font-size: 14px; font-weight: 550; }
.document-fields { display: grid; grid-template-columns: 150px 1fr; gap: 8px; margin-top: 8px; }
.document-fields input, .document-fields select, .document-content { min-width: 0; border: 1px solid var(--line); border-radius: 12px; padding: 8px 9px; font: inherit; font-size: 13px; background: #fff; }
.document-content { display: block; width: 100%; min-height: 120px; margin-top: 8px; resize: vertical; line-height: 1.45; }
.document-modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(25, 24, 22, .42); }
.document-modal { width: min(520px, 100%); border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: var(--paper, #fffdf9); box-shadow: 0 16px 50px rgba(0,0,0,.2); }
.document-modal-head, .document-modal-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.document-modal-head { margin-bottom: 16px; }
.document-modal-head h2 { margin: 0; font-size: 19px; }
.document-modal-close { border: 0; background: transparent; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.document-modal-label { display: grid; gap: 6px; color: var(--muted); font-size: 13px; }
.document-modal-label input, .document-modal-url { width: 100%; border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; font: inherit; color: var(--fg); background: #fff; }
.document-drop { display: grid; gap: 8px; justify-items: center; margin-top: 16px; padding: 24px 16px; border: 1px dashed #aaa59d; border-radius: 12px; color: var(--muted); text-align: center; }
.document-drop strong { color: var(--fg); font-size: 14px; font-weight: 600; }
.document-drop.dragging { border-color: #3a86ff; background: #eef4ff; }
.document-or { display: flex; align-items: center; gap: 10px; margin: 16px 0 8px; color: var(--muted); font-size: 12px; }
.document-or::before, .document-or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
.document-modal-error { min-height: 18px; margin: 8px 0 0; color: #a03227; font-size: 13px; }
.document-modal-actions { justify-content: flex-end; margin-top: 10px; }
.document-title:focus, .document-fields input:focus, .document-fields select:focus, .document-content:focus { outline: none; border-color: #b8b1a5; box-shadow: 0 0 0 2px #f1eee8; }
.packing-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 18px; }
.pack-item { display: flex; align-items: center; gap: 7px; padding: 2px 0; font-size: 13px; line-height: 1.25; cursor: default; }
.pack-item span { flex: 1; }
.pack-item input { width: 14px; height: 14px; margin: 0; accent-color: #555; }
.btn.is-working { display: inline-flex; align-items: center; gap: 2px; }
.btn.is-working[disabled] { opacity: .85; cursor: default; }
.working-dots { display: inline-flex; align-items: flex-end; gap: 2px; height: 1em; }
.working-dots i { width: 3px; height: 3px; border-radius: 50%; background: currentColor; animation: working-dots 1.05s infinite ease-in-out; }
.working-dots i:nth-child(2) { animation-delay: .18s; }
.working-dots i:nth-child(3) { animation-delay: .36s; }
@keyframes working-dots { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-3px); opacity: 1; } }

.packing-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.packing-status { color: var(--muted); font-size: 12px; white-space: nowrap; }
.packing-add-dialog { width: min(360px, calc(100vw - 40px)); }
.packing-add-input { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; margin: 2px 0 16px; font: inherit; font-size: 13px; color: var(--fg); background: #fff; }
.packing-add-input:focus { outline: 2px solid rgba(58,134,255,.2); border-color: #3a86ff; }

.document-card-head .document-extract { flex: none; }

/* AI extraction review */
.extract-backdrop { position: fixed; inset: 0; z-index: 600; display: grid; place-items: center; padding: 20px; background: rgba(25,24,22,.42); }
.extract-dialog { width: min(520px, 100%); max-height: 86vh; overflow: auto; border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: #fff; box-shadow: 0 16px 50px rgba(0,0,0,.2); }
.extract-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.extract-head h2 { margin: 0; font-size: 19px; }
.extract-close { border: 0; background: transparent; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; }
.extract-source { margin: 10px 0 4px; color: var(--muted); font-size: 12px; }
.extract-hint { margin: 6px 0 12px; color: var(--muted); font-size: 13px; }
.extract-status { margin: 14px 0; color: var(--muted); font-size: 13px; }
.extract-status.error { color: #b33a2f; }
.extract-item { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; }
.extract-item input { margin-top: 2px; }
.extract-item-body { display: grid; gap: 3px; min-width: 0; }
.extract-item-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.extract-kind { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; padding: 2px 7px; border-radius: 20px; color: #fff; }
.extract-meta { color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.extract-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.drawer-doc-link { border: 0; background: transparent; color: #3a86ff; font: inherit; font-size: 13px; cursor: pointer; padding: 0; text-decoration: underline; }

.btn.blue-action { background: #3a86ff !important; color: #fff; border-color: #3a86ff; }
.btn.blue-action:hover { background: #2f75e5 !important; border-color: #2f75e5; }
@media (max-width: 700px) {
  .sight-card { grid-template-columns: 1fr; }
  .sight-card textarea { grid-column: auto; }
  .packing-list { grid-template-columns: 1fr; }
  .document-card-head, .document-fields { grid-template-columns: 1fr; }
  .document-card-head { align-items: stretch; flex-direction: column; }
  .document-fields { display: grid; grid-template-columns: 1fr; }
}
.cal-week .cal-days {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.cal-days .day-cell {
  border-left: 1px solid var(--line);
  padding: 4px 6px 0;
  font-size: 12px;
  color: var(--muted);
  position: relative;
  cursor: crosshair;
  overflow: visible;
}
.cal-days .day-cell:first-child { border-left: none; }
.cal-days .day-cell.other { background: #faf9f7; color: #b9b4ab; }
.cal-days .day-cell.today { background: transparent; }
.cal-days .day-cell.active { background: transparent; box-shadow: none; }
.cal-days .day-cell.add-target { background: transparent; }
.cal-week .cal-bars {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.cal-bars .bar-track {
  position: absolute;
  width: 100%;
}
/* continuous bar: positioned in day-column units via left/width % */
.bar.bridge {
  position: absolute;
  border-radius: 7px;
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 22px;
  padding: 0 9px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
  pointer-events: auto;
  cursor: grab;
  user-select: none;
  touch-action: none;
  z-index: 2;
  display: flex;
  align-items: center;
}
.bar.bridge:active { cursor: grabbing; }
.bar.bridge.lodging { justify-content: flex-start; text-align: left; }
.bar.bridge.placeholder {
  opacity: 0.92;
}
.bar.bridge.dragging { box-shadow: 0 2px 8px rgba(0,0,0,0.18); z-index: 5; }
.bar.bridge.snapping { transition: left 0.18s ease, width 0.18s ease, top 0.18s ease; }
.bar-handle {
  position: absolute;
  top: 0; bottom: 0;
  width: 20px;
  cursor: ew-resize;
  background: rgba(255,255,255,0.0);
  border: none;
  box-sizing: border-box;
  opacity: 0;
  transition: opacity 0.12s, background 0.12s;
  z-index: 3;
}
/* Handles are invisible hit areas only — resize by grabbing the very edge. */
.bar-handle.left { left: 0; border-radius: 7px 0 0 7px; }
.bar-handle.right { right: 0; border-radius: 0 7px 7px 0; }
.bar-handle.left::after, .bar-handle.right::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  width: 3px; height: 15px;
  border-radius: 3px;
  background: rgba(255,255,255,0.95);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.3);
}

/* quick-add + editing hints */
.cal-actions { display: flex; gap: 8px; align-items: center; }
.btn {
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--fg);
  border-radius: 8px;
  padding: 6px 13px;
  font-size: 13px;
  cursor: pointer;
}
.btn:hover { background: #ece9e3; }
.btn.primary { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.cat-menu {
  position: absolute;
  top: 46px;
  z-index: 30;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cat-menu button {
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
}
.cat-menu button:hover { background: var(--chip); }
.cat-menu .dot { width: 11px; height: 11px; border-radius: 11px; }
.hint {
  font-size: 12.5px;
  color: var(--muted);
  background: #fffbe6;
  border: 1px solid #f0e5b0;
  padding: 7px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.hint b { color: var(--fg); }
.bar.bridge .bar-fade { position:absolute; right:4px; }

/* right-click add menu on a day cell */
.context-menu {
  position: fixed;
  z-index: 100;
  min-width: 165px;
  padding: 5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 9px;
  box-shadow: 0 7px 24px rgba(0,0,0,.18);
}
.context-menu .context-label {
  padding: 6px 10px 4px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.context-menu button {
  display: flex;
  width: 100%;
  gap: 8px;
  align-items: center;
  border: 0;
  border-radius: 6px;
  padding: 7px 10px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 13px;
}
.context-menu button:hover { background: var(--chip); }
.context-menu button.danger { color: #c0392b; }
.context-menu button.danger:hover { background: #fdecea; }
.context-menu .dot { width: 10px; height: 10px; border-radius: 50%; }

/* inline category picker on a day cell */
.cell-menu {
  position: absolute;
  left: 4px; top: 26px;
  z-index: 40;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.14);
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 150px;
}
.cell-menu button {
  border: none;
  background: transparent;
  text-align: left;
  padding: 7px 11px;
  font-size: 13px;
  border-radius: 7px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
}
.cell-menu button:hover { background: var(--chip); }
.cell-menu .dot { width: 11px; height: 11px; border-radius: 11px; }

/* Timeline (Gantt) */
.tl-head {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.tl-title { font-size: 22px; font-weight: 650; margin: 0; }
.tl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.tl {
  position: relative;
  min-width: 100%;
}
.tl-row {
  display: flex;
  border-bottom: 1px solid var(--line);
  align-items: stretch;
}
.tl-row:last-child { border-bottom: none; }
.tl-label {
  flex: 0 0 190px;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  border-right: 1px solid var(--line);
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tl-label small {
  color: var(--muted);
  font-weight: 400;
  font-size: 11.5px;
}
.tl-cat {
  flex: 0 0 150px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  border-right: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 9px 12px;
  background: #faf9f7;
  position: sticky;
  left: 190px;
  z-index: 2;
}
.tl-body {
  position: relative;
  flex: 1 1 auto;
  min-height: 44px;
}
.tl-grid-lines { position: absolute; top: 0; bottom: 0; left: 0; right: 0; display: flex; }
.tl-grid-lines div { flex: 1 1 0; border-left: 1px solid #f0eeea; }
/*
 bars are positioned with inline left/width %
*/
.tl-bar {
  position: absolute;
  height: 26px;
  top: 9px;
  border-radius: 6px;
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
  padding: 0 9px;
  line-height: 26px;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
  min-width: 10px;
  z-index: 1;
}
.tl-bar.placeholder {
  background: repeating-linear-gradient(45deg, var(--c-placeholder), var(--c-placeholder) 6px, #a9a299 6px, #a9a299 12px);
}
.tl-bar.flagged { box-shadow: 0 0 0 2px var(--warn); }

/* headers */
.tl-days {
  display: flex;
  background: #faf9f7;
  border-bottom: 1px solid var(--line);
}
.tl-days .tl-cat2 { flex: 0 0 190px; }
.tl-days .tl-cat3 { flex: 0 0 150px; }
.tl-day-labels {
  flex: 1 1 auto;
  display: flex;
  position: sticky;
  left: 340px;
}
.tl-day-labels div {
  flex: 1 1 0;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  padding: 8px 0;
  border-left: 1px solid #f0eeea;
}

/* Checklist */
.check-list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.check-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
}
.check-badge {
  flex: 0 0 auto;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 9px;
  border-radius: 20px;
  font-weight: 600;
}
.check-badge.b-error { background: #fee2e2; color: #b91c1c; }
.check-badge.b-warn { background: #fef3c7; color: #92400e; }
.check-badge.b-ok { background: #d1fae5; color: #065f46; }
.check-badge.b-info { background: #e0e7ff; color: #3730a3; }
.check-text { font-size: 14px; line-height: 1.4; }
.check-text small { color: var(--muted); display: block; margin-top: 2px; }

/* Drawer */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 40;
}
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(420px, 92vw);
  background: #fff;
  z-index: 50;
  transform: translateX(100%);
  transition: transform 0.24s ease;
  box-shadow: -6px 0 24px rgba(0,0,0,0.12);
  padding: 24px 26px;
  overflow-y: auto;
}
.drawer.open { transform: translateX(0); }
.drawer-close {
  position: absolute;
  top: 16px; right: 18px;
  border: none; background: var(--chip);
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  color: var(--muted);
}
.drawer h2 { margin: 4px 0 2px; font-size: 21px; font-weight: 650; }
.drawer .cat-chip {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 3px 9px;
  border-radius: 20px;
  color: #fff;
  margin-bottom: 12px;
}
.drawer-edit-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:12px 0; }
.drawer-edit-grid label, .drawer-notes-label { display:flex; flex-direction:column; gap:4px; color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.35px; }
.drawer-edit-grid input, .drawer-notes-label textarea { width:100%; box-sizing:border-box; border:1px solid var(--line); border-radius:12px; padding:7px 8px; font:inherit; font-size:13px; color:var(--fg); background:var(--bg); text-transform:none; letter-spacing:normal; }
.drawer-notes-label { margin:10px 0 14px; }
.drawer-notes-wrap { position:relative; width:100%; min-height:78px; height:78px; }
.drawer-notes-label textarea { display:block; width:100%; height:100%; min-height:0; resize:none; border-radius:12px 12px 3px 12px; padding-right:8px; background:#faf9f7; scrollbar-width:none; -ms-overflow-style:none; }
.drawer-notes-label textarea::-webkit-scrollbar { display:none; width:0; height:0; }
.drawer-notes-wrap::before { content:''; position:absolute; right:1px; bottom:1px; width:20px; height:20px; z-index:1; background:#faf9f7; border-right:1px solid var(--line); border-bottom:1px solid var(--line); border-radius:0 0 3px 0; pointer-events:none; }
.drawer-notes-resize-handle { position:absolute; right:4px; bottom:4px; width:15px; height:15px; z-index:2; cursor:nwse-resize; touch-action:none; background:#aaa59d; clip-path:polygon(100% 0,100% 100%,0 100%); }
.drawer-edit-grid input:focus, .drawer-notes-label textarea:focus { outline:none; border-color:#1769d1; box-shadow:0 0 0 2px rgba(23,105,209,.12); }
.drawer .kv {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13.5px;
}
.drawer .kv .k { color: var(--muted); }
.drawer .kv .v { text-align: right; font-weight: 500; }
.drawer .notes { margin-top: 16px; font-size: 13.5px; color: var(--fg); line-height: 1.5; }
.drawer .notes .nl { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.drawer .flag {
  margin-top: 16px;
  background: #fef3c7;
  color: #92400e;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 10px;
}
.drawer .flag.err { background: #fee2e2; color: #b91c1c; }

.empty { color: var(--muted); text-align: center; padding: 60px 20px; font-size: 15px; }

@media (max-width: 700px) {
  .topbar { gap: 12px; padding: 12px 14px; }
  .home-layout { grid-template-columns: 1fr; gap: 18px; }
  .home-sidebar { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 12px; display: flex; gap: 4px; overflow-x: auto; }
  .home-nav { flex: 0 0 auto; width: auto; gap: 12px; }
  .home-heading { align-items: flex-start; }
  .trip-card-grid { grid-template-columns: 1fr; }

  .cal td { height: 92px; }
  .tl-label { flex-basis: 120px; }
  .tl-cat { flex-basis: 110px; left: 120px; }
  .tl-days .tl-cat2 { flex-basis: 120px; }
  .tl-days .tl-cat3 { flex-basis: 110px; }
  .tl-day-labels { left: 230px; }
}
/* rename input in drawer */
.rename-input {
  width: 100%;
  box-sizing: border-box;
  font-size: 19px;
  font-weight: 600;
  color: var(--fg);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 5px 8px;
  margin: 2px 0 8px;
}
.rename-input:hover { border-color: var(--line); }
.rename-input:focus { border-color: var(--line); outline: none; background: #fff; }

/* Account gate */
.auth-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #faf9f7; }
.auth-card { width: min(760px, 100%); display: grid; grid-template-columns: 1fr 1fr; background: var(--bg); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; box-shadow: 0 12px 40px rgba(30,25,15,.08); }
.auth-pane, .auth-form { padding: clamp(28px, 6vw, 64px); }
.auth-pane { display:flex; flex-direction:column; justify-content:center; border-right:1px solid var(--line); }
.auth-pane h1 { font-size:clamp(28px,4vw,42px); line-height:1.05; margin:10px 0; letter-spacing:-1px; }
.auth-copy { color:var(--muted); line-height:1.5; }
.auth-form { display:flex; flex-direction:column; justify-content:center; gap:12px; }
.name-fields { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.auth-form label, .profile-dialog label { font-size:12px; color:var(--muted); display:grid; gap:6px; }
.profile-dialog input[readonly] { opacity: .7; }
.profile-picture-row { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.profile-picture-row > label { order:1; flex:1; align-items:start; text-align:left; }
.profile-preview { order:2; width:58px; height:58px; flex:0 0 58px; border-radius:50%; display:grid; place-items:center; background:#e5e2dc center/cover no-repeat; color:var(--muted); font-size:20px; }
.theme-toggle { display:flex !important; grid-template-columns:none !important; align-items:center; gap:8px !important; cursor:pointer; }
.theme-toggle input { width:auto; }
.auth-form input, .profile-dialog input { border:1px solid var(--line); border-radius:8px; padding:11px 12px; font:inherit; color:var(--fg); }
.auth-submit { border:0; border-radius:8px; padding:11px; background:var(--fg); color:#fff; font:inherit; cursor:pointer; margin-top:8px; }
.auth-alt { margin:10px 0 0; text-align:center; font-size:13px; }
.auth-link { border:0; background:transparent; color:#3a86ff; font:inherit; font-size:13px; cursor:pointer; padding:0; text-decoration:underline; }
.auth-link:hover { color:#2563eb; }
.auth-submit:disabled { opacity:.7; cursor:default; }
.auth-switch, .profile-logout { border:0; background:transparent; color:var(--muted); font:inherit; font-size:12px; cursor:pointer; }
.pw-wrap { position:relative; display:block; }
.pw-wrap input { width:100%; padding-right:36px; }
.pw-toggle { position:absolute; top:0; right:0; height:100%; width:34px; display:flex; align-items:center; justify-content:center; border:0; background:transparent; cursor:pointer; padding:0; color:var(--muted); }
.pw-toggle:hover { color:var(--fg); }
.pw-toggle::before { content:""; width:15px; height:15px; background:currentColor; -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center/contain no-repeat; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center/contain no-repeat; }
.pw-toggle.on::before { -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E") center/contain no-repeat; mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'/%3E%3Cline x1='1' y1='1' x2='23' y2='23'/%3E%3C/svg%3E") center/contain no-repeat; }
.auth-error { color:#b33a2f; font-size:12px; min-height:16px; margin:0; }
.account-menu { margin-left:auto; }
.account-button { display:flex; align-items:center; gap:8px; border:0; background:transparent; font:inherit; color:var(--fg); cursor:pointer; }
.avatar { width:28px; height:28px; border-radius:50%; display:grid; place-items:center; background-color:#e5e2dc; background-size:cover; background-position:center; font-size:12px; color:var(--muted); }
.profile-backdrop { position:fixed; inset:0; z-index:500; background:rgba(30,28,24,.22); }
.profile-dialog { position:absolute; top:0; right:0; width:min(390px,100vw); height:100%; overflow:auto; display:grid; align-content:start; gap:14px; padding:76px 28px 28px; background:var(--bg); border-left:1px solid var(--line); box-shadow:-12px 0 35px rgba(0,0,0,.16); animation:profile-slide-in .2s ease-out; }
@keyframes profile-slide-in { from { transform:translateX(100%); } to { transform:translateX(0); } }
.profile-dialog h2 { margin:0; }.profile-close { position:absolute; right:14px; top:10px; border:0; background:transparent; font-size:24px; cursor:pointer; color:var(--muted); }.profile-head { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }.profile-actions { display:flex; align-items:center; gap:16px; }
.profile-save { border:0; border-radius:8px; padding:6px 14px; background:#3a86ff; color:#fff; font:inherit; font-size:13px; cursor:pointer; margin-top:4px; justify-self:start; }
.profile-save:hover { background:#2f75e5; }
.profile-delete { width:60%; border:0; border-radius:6px; background:transparent; color:#c0392b; font:inherit; font-size:13px; cursor:pointer; margin-top:-8px; padding:8px 14px; text-align:left; justify-content:flex-start; justify-self:start; }
.profile-delete { justify-content:flex-start !important; text-align:left; }
.profile-delete:hover { background:#fdecea; }
.profile-delete-confirm .profile-delete { border:1px solid #c0392b; border-radius:8px; background:#c0392b; color:#fff; padding:8px 14px; text-align:center; justify-content:center; justify-self:start; }
.profile-delete-confirm .profile-delete:hover { background:#a93226; border-color:#a93226; }
.profile-delete-cancel { border:0; background:transparent; color:var(--muted); font:inherit; font-size:13px; cursor:pointer; text-align:center; }
.profile-admin-link { width:60%; border:0; border-radius:6px; background:transparent; color:var(--fg); font:inherit; font-size:13px; cursor:pointer; text-align:left; justify-content:flex-start; padding:8px 14px; margin-top:-8px; justify-self:start; }
.profile-admin-link { justify-content:flex-start !important; text-align:left; }
.profile-admin-link:hover { background:var(--chip); }
.profile-delete-confirm { display:grid; gap:10px; margin-top:8px; }
.profile-delete-confirm label { display:grid; gap:6px; font-size:12px; color:var(--muted); }
.profile-delete-confirm input { border:1px solid var(--line); border-radius:8px; padding:11px 12px; font:inherit; color:var(--fg); background:var(--bg); }
.profile-delete-actions { display:flex; align-items:center; gap:14px; }
.profile-admin-back { border:0; background:transparent; color:var(--muted); font:inherit; font-size:13px; cursor:pointer; justify-self:start; padding:0; }
.admin-accounts-list { display:grid; gap:10px; }
.admin-account-row { display:flex; align-items:center; gap:12px; border:1px solid var(--line); border-radius:8px; padding:10px 12px; }
.admin-account-avatar { width:36px; height:36px; border-radius:50%; flex:none; background-color:#e5e2dc; background-size:cover; background-position:center; display:grid; place-items:center; font-size:14px; color:var(--muted); }
.admin-account-info { flex:1; min-width:0; font-size:13px; line-height:1.35; }
.admin-account-email { color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.admin-badge { font-style:normal; font-size:11px; color:#8eaaa8; border:1px solid #8eaaa8; border-radius:999px; padding:1px 7px; margin-left:6px; vertical-align:1px; }
.admin-account-delete { border:0; border-radius:8px; padding:8px 12px; background:transparent; color:#c0392b; border:1px solid rgba(192,57,43,.45); font:inherit; font-size:12px; cursor:pointer; flex:none; }
.admin-account-delete:disabled { opacity:.6; cursor:default; }
.admin-invite-row { display:flex; gap:8px; align-items:center; margin:6px 0 10px; }
.admin-invite-row input { flex:1; min-width:0; border:1px solid var(--line); border-radius:8px; padding:9px 12px; font:inherit; color:var(--fg); background:var(--bg); }
.admin-invite-add { border:0; border-radius:8px; padding:9px 14px; background:#3a86ff; color:#fff; font:inherit; font-size:13px; cursor:pointer; flex:none; }
.admin-invite-add:hover { background:#2f75e5; }
@media(max-width:640px){.auth-card{grid-template-columns:1fr}.auth-pane{border-right:0;border-bottom:1px solid var(--line);padding-bottom:26px}.auth-form{padding-top:28px}.auth-pane h1{font-size:30px}.name-fields{grid-template-columns:1fr}}
.cover-dialog { width:min(720px,calc(100vw - 32px)); max-height:calc(100vh - 40px); overflow:auto; }
.cover-suggestions { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:10px; margin:12px 0 16px; }
.cover-candidate { border:1px solid var(--line); border-radius:8px; padding:0; overflow:hidden; background:var(--bg); color:var(--fg); cursor:pointer; text-align:left; }
.cover-candidate:hover { outline:2px solid #8eaaa8; }
.cover-candidate img { display:block; width:100%; height:105px; object-fit:cover; }
.cover-candidate span { display:block; padding:8px; font-size:11px; line-height:1.25; }
.cover-loading-toast { position:fixed; right:22px; bottom:22px; z-index:600; padding:10px 14px; border:1px solid var(--line); border-radius:8px; background:var(--bg); color:var(--fg); box-shadow:0 6px 20px rgba(0,0,0,.14); font-size:13px; }
.cover-url-error { margin:8px 0 0; color:#b54a4a; font-size:12px; }
.rename-dialog-input { width:100%; box-sizing:border-box; border:1px solid var(--line); border-radius:6px; padding:8px 10px; margin:4px 0 14px; font:inherit; color:var(--fg); background:var(--bg); }
.rename-dialog-input:focus { outline:none; border-color:#1769d1; box-shadow:0 0 0 2px rgba(23,105,209,.15); }
