:root {
  --accent: #7c3aed;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Ensure the HTML hidden attribute always wins */
[hidden] {
  display: none !important;
}

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #fdf6f0;
  color: #333;
  min-height: 100vh;
}

/* ── Loading screen ── */
.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  font-size: 1.2rem;
  color: #888;
}

.loading-screen .error {
  color: #c0392b;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SPLASH / LOGIN SCREEN
   ═══════════════════════════════════════════════════════════════════════════ */
.splash-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #c084fc 100%);
  padding: 1.5rem;
}

.splash-card {
  background: #fff;
  border-radius: 24px;
  padding: 3rem 2.5rem;
  width: 100%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: splashFadeIn 0.4s ease;
}
@keyframes splashFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.splash-logo {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.splash-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: #1f1f1f;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.splash-subtitle {
  font-size: 0.95rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

.splash-btn {
  display: block;
  width: 100%;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
}

.splash-btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 0.85rem 1.5rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}
.splash-btn-primary:hover {
  background: #6d28d9;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.45);
  transform: translateY(-1px);
}
.splash-btn-primary:active {
  transform: translateY(0);
}

.splash-btn-link {
  background: none;
  color: #9ca3af;
  padding: 0.5rem;
  font-size: 0.82rem;
  font-weight: 500;
}
.splash-btn-link:hover {
  color: var(--accent);
  background: none;
}

.splash-advanced {
  margin-top: 1rem;
  text-align: left;
  animation: splashSlideDown 0.2s ease;
}
@keyframes splashSlideDown {
  from { opacity: 0; max-height: 0; }
  to   { opacity: 1; max-height: 400px; }
}

.splash-field {
  margin-bottom: 0.75rem;
}
.splash-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.3rem;
}
.splash-field input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid #d1d5db;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #111;
  outline: none;
  transition: border-color 0.15s;
}
.splash-field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}
.splash-field input::placeholder {
  color: #9ca3af;
}

.splash-error {
  background: #fee2e2;
  color: #991b1b;
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  font-size: 0.82rem;
  margin-bottom: 0.75rem;
  text-align: center;
}

/* ── App shell ── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Two-column layout ── */
.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  flex: 1;
  min-height: 0;
}

/* ── Sidebar ── */
.sidebar {
  background: #f3f0ff;
  border-right: 1px solid #ddd6fe;
  padding: 1.5rem 1rem;
  overflow-y: auto;
}

/* ── Sidebar header with add button ── */
.sidebar h2 {
  font-size: 1rem;
  font-weight: 700;
  color: #7c3aed;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.sidebar-header h2 {
  margin-bottom: 0;
}

.btn-icon-add {
  background: #ede9fe;
  color: #7c3aed;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

.btn-icon-add:hover { background: #c4b5fd; }

.wedding-card {
  background: #fff;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 4px rgba(0 0 0 / 0.07);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  cursor: pointer;
  transition: box-shadow 0.15s;
}

.wedding-card:hover {
  box-shadow: 0 3px 10px rgba(124 58 237 / 0.2);
}

.wedding-card strong {
  color: #1f1f1f;
  font-size: 0.95rem;
}

.wedding-date,
.wedding-venue {
  font-size: 0.8rem;
  color: #777;
}

.muted {
  color: #aaa;
  font-size: 0.85rem;
}

.error {
  color: #c0392b;
  font-size: 0.85rem;
}

/* ── Header ── */
.site-header {
  background: #7c3aed;
  color: #fff;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.user-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-bar span {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* ── Buttons ── */
button {
  background: #7c3aed;
  color: #fff;
  border: none;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s;
}

button:hover {
  background: #6d28d9;
}

#logout-btn {
  background: rgba(255 255 255 / 0.15);
}

#logout-btn:hover {
  background: rgba(255 255 255 / 0.3);
}

/* ── Main content ── */
.content {
  padding: 2rem;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

/* ── Welcome card ── */
.welcome-card {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0 0 0 / 0.08);
  margin-bottom: 1.5rem;
}

.welcome-card h2 {
  margin-bottom: 0.5rem;
  color: #7c3aed;
}

.welcome-card p {
  margin-bottom: 1rem;
  color: #555;
}

/* ── HTMX indicator ── */
.htmx-indicator {
  display: none;
  color: #888;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  display: block;
}

/* ── Dynamic content area ── */
#dynamic-content {
  background: transparent;
  min-height: 100px;
}

#dynamic-content:empty {
  display: none;
}

/* ── Wedding card active state ── */
.wedding-card-chips {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-top: 0.2rem;
}

.wedding-card.archived {
  opacity: 0.55;
  cursor: default;
  border-left-color: #d1d5db;
}

.archived-pill {
  font-size: 0.65rem;
  background: #f3f4f6;
  color: #6b7280;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
}

/* ─────────────────────────────────────────
   DANGER ZONE
───────────────────────────────────────── */
.danger-zone {
  margin-top: 2rem;
  border-top: 1px solid #fee2e2;
  padding-top: 1.5rem;
}

.danger-action {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.danger-action > div strong {
  display: block;
  font-size: 0.9rem;
  color: #111;
  margin-bottom: 0.25rem;
}

.danger-action > div p {
  font-size: 0.8rem;
  color: #6b7280;
  max-width: 340px;
}

.btn-danger {
  background: #fff;
  color: #dc2626;
  border: 1.5px solid #dc2626;
  padding: 0.45rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  flex-shrink: 0;
}

.btn-danger:hover {
  background: #dc2626;
  color: #fff;
}

.status-active   { background: #d1fae5; color: #065f46; }
.status-archived { background: #f3f4f6; color: #6b7280; }

/* ─────────────────────────────────────────
   DASHBOARD
───────────────────────────────────────── */
.dash-loading {
  color: #aaa;
  padding: 2rem;
  text-align: center;
}

.dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Hero */
.dashboard-hero {
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  border-radius: 14px;
  padding: 1.75rem 2rem;
  color: #fff;
  box-shadow: 0 4px 16px rgba(124 58 237 / 0.3);
}

.dashboard-hero h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.dashboard-meta {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Section */
.dash-section {
  background: #fff;
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0 0 0 / 0.07);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #1f1f1f;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.section-header .section-title {
  margin-bottom: 0;
}

.count-badge {
  background: #ede9fe;
  color: #7c3aed;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  padding: 0.1rem 0.55rem;
}

/* ── Vendor grid ── */
.vendor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.vendor-card {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fafafa;
  transition: box-shadow 0.15s;
  position: relative;
}

.vendor-card:hover {
  box-shadow: 0 4px 12px rgba(0 0 0 / 0.1);
}

.vendor-card.vendor-confirmed {
  border-left: 4px solid #10b981;
}

.vendor-card.vendor-pending {
  border-left: 4px solid #f59e0b;
}

.vendor-card.vendor-cancelled {
  border-left: 4px solid #ef4444;
}

.vendor-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.vendor-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}

.vendor-info strong {
  font-size: 0.9rem;
  color: #111;
}

.vendor-category {
  font-size: 0.75rem;
  color: #7c3aed;
  font-weight: 600;
}

.vendor-contact {
  font-size: 0.72rem;
  color: #9ca3af;
  word-break: break-all;
}

/* ── Status badges ── */
.status-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-confirmed { background: #d1fae5; color: #065f46; }
.status-pending   { background: #fef3c7; color: #92400e; }
.status-cancelled { background: #fee2e2; color: #991b1b; }
.status-todo      { background: #f3f4f6; color: #374151; }
.status-in_progress { background: #dbeafe; color: #1e40af; }
.status-done      { background: #d1fae5; color: #065f46; }
.status-blocked   { background: #fee2e2; color: #991b1b; }

/* ── Filter bar ── */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-bar select {
  background: #f9fafb;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  color: #374151;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}

.filter-bar select:focus {
  border-color: #7c3aed;
}

/* ── Tasks list ── */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.task-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fafafa;
  border-left-width: 4px;
  transition: box-shadow 0.15s;
}

.task-row:hover {
  box-shadow: 0 3px 10px rgba(0 0 0 / 0.08);
}

.task-todo       { border-left-color: #9ca3af; }
.task-in_progress { border-left-color: #3b82f6; }
.task-done       { border-left-color: #10b981; }
.task-blocked    { border-left-color: #ef4444; }

.task-left {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
}

.task-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #111;
}

.task-done .task-title {
  text-decoration: line-through;
  color: #9ca3af;
}

.task-desc {
  font-size: 0.78rem;
  color: #6b7280;
}

.task-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.task-chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.chip {
  font-size: 0.72rem;
  background: #f3f4f6;
  color: #6b7280;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
}

.chip-age {
  background: #fef3c7;
  color: #92400e;
}

.no-results {
  text-align: center;
  color: #aaa;
  padding: 2rem;
  font-size: 0.9rem;
}

/* ─────────────────────────────────────────
   TAB BAR
───────────────────────────────────────── */
.tab-bar {
  display: flex;
  gap: 0.25rem;
  background: #fff;
  border-bottom: 2px solid #e5e7eb;
  padding: 0 0.5rem;
  position: sticky;
  top: 0;
  z-index: 10;
}

.tab-btn {
  background: none;
  color: #6b7280;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 0.75rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: color 0.15s, border-color 0.15s;
  margin-bottom: -2px;
}

.tab-btn:hover {
  color: #7c3aed;
  background: #f5f3ff;
}

.tab-btn.active {
  color: #7c3aed;
  border-bottom-color: #7c3aed;
  background: none;
  font-weight: 600;
}

.tab-icon {
  font-size: 0.9rem;
}

.tab-content {
  padding: 1.5rem;
}

/* ── Tab panel ── */
.tab-panel {}

.tab-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  color: #aaa;
  gap: 0.5rem;
}

.placeholder-icon {
  font-size: 3rem;
}

.tab-placeholder h3 {
  color: #555;
}

.tab-placeholder p {
  font-size: 0.9rem;
}

/* ── Panel header ── */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.panel-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.panel-header .section-title {
  margin-bottom: 0;
}

/* ── Role pill ── */
.role-pill {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.role-planner { background: #ede9fe; color: #7c3aed; }
.role-vendor  { background: #dbeafe; color: #1e40af; }

.role-pill-sm {
  font-size: 0.7rem;
  background: #dbeafe;
  color: #1e40af;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
}

/* ── Settings ── */
.settings-grid {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 500px;
}

.setting-row {
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.9rem;
}

.setting-label { color: #6b7280; font-weight: 500; }
.setting-value { color: #111; }

/* Editable setting rows */
.setting-row-edit {
  flex-direction: column;
  gap: 0.3rem;
}
.setting-input {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.88rem;
  color: #111;
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
}
.setting-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.08);
}

/* Settings sections (share link, transfer) */
.settings-section {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid #f3f4f6;
  max-width: 500px;
}
.settings-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1f1f1f;
  margin-bottom: 0.3rem;
}
.settings-section-desc {
  font-size: 0.82rem;
  color: #6b7280;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

/* Share link */
.share-link-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}
.share-link-input {
  flex: 1;
  padding: 0.45rem 0.65rem;
  border: 1.5px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.8rem;
  color: #374151;
  background: #f9fafb;
  outline: none;
  font-family: monospace;
}
.share-copied-msg {
  font-size: 0.78rem;
  color: #059669;
  font-weight: 600;
  margin-top: 0.3rem;
}

/* Transfer form */
.transfer-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */
.btn-primary {
  background: #7c3aed;
  color: #fff;
  border: none;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover { background: #6d28d9; }

.btn-secondary {
  background: #f3f4f6;
  color: #374151;
  border: none;
  padding: 0.5rem 1.1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-secondary:hover { background: #e5e7eb; }

/* ── Follow button ── */
.follow-btn {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s;
}

.follow-btn:hover { background: #ede9fe; color: #7c3aed; border-color: #c4b5fd; }

.follow-btn.following {
  background: #ede9fe;
  color: #7c3aed;
  border-color: #c4b5fd;
}

/* ─────────────────────────────────────────
   MODAL
───────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0 0 0 / 0.45);
  z-index: 100;
  align-items: center;
  justify-content: center;
}

.modal-overlay.open {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 520px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0 0 0 / 0.2);
  animation: modalIn 0.2s ease;
}

@keyframes modalIn {
  from { transform: translateY(-16px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: #9ca3af;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  line-height: 1;
  border-radius: 4px;
}

.modal-close:hover { background: #f3f4f6; color: #374151; }

.modal-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 1.25rem;
}

/* ─────────────────────────────────────────
   FORMS
───────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #374151;
}

.form-group input,
.form-group textarea,
.form-group select {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: #111;
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124 58 237 / 0.1);
}

.form-hint {
  font-size: 0.75rem;
  color: #9ca3af;
}

.required { color: #ef4444; }

.form-error {
  background: #fee2e2;
  color: #991b1b;
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* ─────────────────────────────────────────
   PENDING INVITATIONS
───────────────────────────────────────── */
.invites-section {
  margin-top: 1.5rem;
  border-top: 1px solid #ddd6fe;
  padding-top: 1rem;
}

.invites-heading {
  font-size: 0.85rem;
  font-weight: 700;
  color: #7c3aed;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.invite-card {
  background: #fdf4ff;
  border: 1px solid #e9d5ff;
  border-radius: 10px;
  padding: 0.75rem;
  margin-bottom: 0.6rem;
}

.invite-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.6rem;
}

.invite-info strong {
  font-size: 0.9rem;
  color: #111;
}

.invite-meta {
  font-size: 0.75rem;
  color: #9ca3af;
}

.invite-actions {
  display: flex;
  gap: 0.5rem;
}

.invite-actions form { margin: 0; }

.btn-accept {
  background: #d1fae5;
  color: #065f46;
  border: none;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-accept:hover { background: #a7f3d0; }

.btn-decline {
  background: #fee2e2;
  color: #991b1b;
  border: none;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-decline:hover { background: #fca5a5; }

/* ── Invite pending badge on vendor card ── */
.invite-pending-badge {
  font-size: 0.7rem;
  color: #92400e;
  background: #fef3c7;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  width: fit-content;
}

/* ── Task actions row ── */
.task-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chip-followers {
  background: #ede9fe;
  color: #7c3aed;
}



/* ==========================================================================
   TIMELINE / MILESTONES
   ========================================================================== */
.overview-panel { padding: 1.5rem; }

.tab-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.tab-panel-header h3 { margin: 0; font-size: 1.1rem; font-weight: 600; }

.timeline {
  position: relative;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0.6rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), #e5e7eb);
  border-radius: 2px;
}

.milestone-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  position: relative;
  transition: opacity 0.2s;
}
.milestone-item.milestone-done { opacity: 0.65; }

.milestone-connector { position: relative; flex-shrink: 0; }

.milestone-dot {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: #fff;
  font-weight: 700;
  margin-left: -0.025rem;
}
.milestone-dot.dot-done {
  background: #16a34a;
  box-shadow: 0 0 0 2px #16a34a;
}

.milestone-content {
  flex: 1;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

.milestone-date {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.milestone-title { font-weight: 600; margin-bottom: 0.25rem; }
.milestone-desc { font-size: 0.875rem; color: #6b7280; margin-bottom: 0.5rem; }

.milestone-actions { display: flex; gap: 1rem; align-items: center; }
.btn-link { background: none; border: none; cursor: pointer; font-size: 0.8rem; color: var(--accent); padding: 0; }
.btn-link:hover { text-decoration: underline; }
.btn-link.danger { color: #ef4444; }

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #9ca3af;
}
.empty-icon { font-size: 3rem; margin-bottom: 0.5rem; }

/* ==========================================================================
   TASK DETAIL MODAL
   ========================================================================== */
.task-detail-modal { min-width: 480px; max-width: 640px; }
.task-detail-body { padding: 1rem 1.5rem; }

.task-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}
.task-age-badge {
  background: #f3f4f6;
  color: #6b7280;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
}
.task-due { font-size: 0.85rem; color: #6b7280; }

.task-detail-section { margin-bottom: 1rem; }
.task-detail-section label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin-bottom: 0.25rem;
}
.task-detail-section p { margin: 0; font-size: 0.9rem; }
.task-description { color: #374151; line-height: 1.5; }

.task-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.follower-pill {
  display: inline-block;
  background: #ede9fe;
  color: #7c3aed;
  border-radius: 9999px;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  margin-right: 0.25rem;
}

.status-update-form { display: flex; gap: 0.5rem; align-items: center; }
.status-update-form select { flex: 1; }

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #f3f4f6;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ==========================================================================
   VENDOR CARD ACTIONS
   ========================================================================== */
.vendor-card { position: relative; }
.vendor-card-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
  margin-left: auto;
}

.btn-icon {
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  padding: 0.2rem 0.4rem;
  border-radius: 0.375rem;
  transition: background 0.15s, border-color 0.15s;
  line-height: 1;
}
.btn-icon.danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #ef4444;
}
.btn-icon.danger:hover { background: #fee2e2; border-color: #f87171; color: #dc2626; }

/* ==========================================================================
   CHAT
   ========================================================================== */
.chat-panel { height: 100%; display: flex; flex-direction: column; }

.chat-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  height: calc(100vh - 230px);
  min-height: 400px;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  overflow: hidden;
  margin: 1rem;
  background: #fff;
}

.chat-sidebar {
  background: #f9fafb;
  border-right: 1px solid #e5e7eb;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.chat-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  font-weight: 600;
  font-size: 0.85rem;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  background: #f9fafb;
  z-index: 1;
}
.chat-sidebar-header .btn-icon { font-size: 1.2rem; font-weight: 300; }

.channel-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-size: 0.875rem;
  transition: background 0.12s;
  border-radius: 0;
}
.channel-item:hover { background: #f0f0f5; }
.channel-item.channel-active { background: #ede9fe; color: var(--accent); font-weight: 600; }

.channel-icon { font-size: 0.85rem; opacity: 0.7; }
.channel-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.channel-item:has(.channel-unread-badge) .channel-name { font-weight: 700; }
.participant-role { font-size: 0.7rem; color: #9ca3af; }

/* Unread message badge on channel items */
.channel-unread-badge {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  flex-shrink: 0;
}

/* Unread dot on mobile bottom nav chat icon */
.mobile-nav-chat-wrap {
  position: relative;
  display: inline-flex;
}
.mobile-nav-unread-dot {
  position: absolute;
  top: -2px;
  right: -4px;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  font-size: 0.55rem;
  font-weight: 700;
  min-width: 14px;
  height: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}

/* Unread badge on desktop Chats tab button */
.tab-unread-badge {
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  margin-left: 5px;
  vertical-align: middle;
  line-height: 1;
}

/* Disabled mobile nav items before a wedding is selected */
.mobile-nav-item:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.channel-divider {
  padding: 0.5rem 1rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  margin-top: 0.5rem;
}

.chat-empty-channels { padding: 1rem; font-size: 0.85rem; color: #9ca3af; }

/* Main chat area */
.chat-main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid #e5e7eb;
  font-weight: 600;
  font-size: 0.9rem;
  background: #fff;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #9ca3af;
  text-align: center;
  gap: 0.5rem;
}
.chat-welcome-icon { font-size: 2.5rem; }

.chat-no-messages { color: #9ca3af; font-size: 0.875rem; text-align: center; margin-top: 2rem; }
.chat-loading { color: #9ca3af; font-size: 0.875rem; }

.chat-msg { max-width: 70%; }
.chat-msg-self { align-self: flex-end; }

.chat-msg-header {
  display: flex;
  gap: 0.5rem;
  align-items: baseline;
  margin-bottom: 0.2rem;
}
.chat-msg-self .chat-msg-header { flex-direction: row-reverse; }

.chat-msg-sender { font-size: 0.75rem; font-weight: 600; color: #6b7280; }
.chat-msg-time { font-size: 0.7rem; color: #9ca3af; }

.chat-msg-bubble {
  padding: 0.5rem 0.875rem;
  border-radius: 1rem;
  background: #f3f4f6;
  color: #111827;
  font-size: 0.875rem;
  line-height: 1.5;
  word-break: break-word;
}
.chat-msg-self .chat-msg-bubble {
  background: #7c3aed;
  color: #fff;
}
.chat-msg-sender { color: #374151; }
.chat-msg-self .chat-msg-sender { color: #374151; }

.chat-input-form {
  padding: 0.75rem 1rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  background: #fff;
}
.chat-input-form input {
  flex: 1;
  padding: 0.5rem 0.875rem;
  border: 1px solid #e5e7eb;
  border-radius: 9999px;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.15s;
}
.chat-input-form input:focus { border-color: var(--accent); }

/* ==========================================================================
   SCHEDULE VENDOR FILTER BAR
   ========================================================================== */
.schedule-filter-bar {
  display: flex;
  gap: 0.4rem;
  padding: 0.5rem 0 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.schedule-filter-bar::-webkit-scrollbar { display: none; }

.schedule-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  border: 1.5px solid #e5e7eb;
  background: #fff;
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}
.schedule-filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: #f5f3ff;
}
.schedule-filter-chip.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(124, 58, 237, 0.25);
}

/* ==========================================================================
   MISC ADDITIONS
   ========================================================================== */
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }
.btn-danger { background: #ef4444; color: #fff; border: none; padding: 0.5rem 1rem; border-radius: 0.5rem; cursor: pointer; transition: background 0.15s; }
.btn-danger:hover { background: #dc2626; }

/* ==========================================================================
   MOBILE BOTTOM NAV (hidden on desktop)
   ========================================================================== */
.mobile-bottom-nav {
  display: none;
}

.mobile-weddings-btn {
  display: none;
}

.mobile-chat-back {
  display: none;
}

/* ==========================================================================
   MOBILE RESPONSIVE — Instagram-style layout (≤768px)
   ========================================================================== */
@media (max-width: 768px) {

  /* ── Splash — compact on mobile ── */
  .splash-screen {
    padding: 1rem;
  }
  .splash-card {
    padding: 2rem 1.5rem;
    border-radius: 20px;
  }
  .splash-logo {
    font-size: 2.8rem;
  }
  .splash-title {
    font-size: 1.5rem;
  }
  .splash-subtitle {
    font-size: 0.88rem;
    margin-bottom: 1.5rem;
  }
  .splash-field input {
    font-size: 1rem;
    min-height: 44px;
  }
  .splash-btn-primary {
    min-height: 48px;
    font-size: 1.05rem;
  }

  /* ── Body padding for fixed bottom nav ── */
  body {
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }

  /* ── Header — compact ── */
  .site-header {
    padding: 0.5rem 0.75rem;
  }
  .site-header h1 {
    font-size: 1rem;
    white-space: nowrap;
  }
  .user-bar span {
    display: none;
  }
  #logout-btn {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
  }

  /* ── Show the weddings hamburger button ── */
  .mobile-weddings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 1.1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    margin-right: 0.4rem;
  }
  .mobile-weddings-btn:hover {
    background: rgba(255,255,255,0.25);
  }

  /* ── Layout — single column ── */
  .layout {
    display: block;
  }

  /* ── Sidebar — full-screen slide-over ── */
  .sidebar {
    position: fixed;
    inset: 0;
    z-index: 80;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    padding: 1rem;
    padding-top: 0.75rem;
    background: #f3f0ff;
    overflow-y: auto;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }

  /* ── Main content — edge-to-edge ── */
  .content {
    padding: 0.5rem;
    max-width: 100%;
  }

  /* ── Dashboard hero — very compact on mobile ── */
  .dashboard-hero {
    border-radius: 10px;
    padding: 0.75rem 1rem;
    box-shadow: 0 2px 8px rgba(124 58 237 / 0.2);
  }
  .dashboard-hero h2 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dashboard-meta {
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    font-size: 0.72rem;
  }
  .dashboard-meta .role-pill {
    font-size: 0.65rem;
    padding: 0.1rem 0.4rem;
  }

  /* ── Dashboard gap ── */
  .dashboard {
    gap: 0.75rem;
  }

  /* ── Desktop tab bar — hidden (replaced by bottom nav) ── */
  .tab-bar {
    display: none !important;
  }

  /* ── Tab content — less padding ── */
  .tab-content {
    padding: 0.5rem;
  }

  /* ── Bottom nav — visible ── */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(52px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: #fff;
    border-top: 1px solid #e5e7eb;
    z-index: 90;
    align-items: stretch;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
  }

  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 0.58rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.25rem 0;
    transition: color 0.15s;
    border-radius: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .mobile-nav-item:hover {
    background: none;
    color: #6b7280;
  }
  .mobile-nav-icon {
    font-size: 1.25rem;
    line-height: 1;
  }
  .mobile-nav-item.active {
    color: var(--accent);
  }
  /* Chat center icon — slightly larger to emphasize */
  .mobile-nav-item.mobile-nav-center .mobile-nav-icon {
    font-size: 1.5rem;
  }

  /* ── Chat panel — fixed overlay between header and bottom nav ── */
  /* Using position:fixed removes all dependency on parent heights/padding */
  .tab-panel.chat-panel {
    position: fixed;
    top: var(--header-h, 44px);
    left: 0;
    right: 0;
    bottom: calc(52px + env(safe-area-inset-bottom, 0px));
    z-index: 15;
    background: #fff;
    display: flex;
    flex-direction: column;
    height: auto;
  }
  .chat-layout {
    grid-template-columns: 1fr;
    height: 100% !important;
    min-height: 0;
    border: none;
    border-radius: 0;
    margin: 0;
    width: 100%;
    overflow: hidden;
  }
  .chat-sidebar {
    display: flex;
    border-right: none;
  }
  .chat-main {
    display: none;
  }

  /* When a channel is open, flip visibility */
  .chat-layout.mobile-chat-open .chat-sidebar {
    display: none;
  }
  .chat-layout.mobile-chat-open .chat-main {
    display: flex;
  }

  /* Chat input full width */
  .chat-input-form {
    padding: 0.5rem;
  }
  .chat-input-form input {
    font-size: 1rem;
    padding: 0.6rem 1rem;
  }

  /* Chat messages — full width */
  .chat-messages {
    padding: 0.75rem;
  }
  .chat-msg {
    max-width: 85%;
  }

  /* Chat back button */
  .mobile-chat-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--accent);
    cursor: pointer;
    padding: 0.2rem;
    margin-right: 0.5rem;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }
  .mobile-chat-back:hover {
    background: #f3f0ff;
  }
  .chat-header {
    display: flex;
    align-items: center;
  }

  /* ── Modal — bottom sheet style ── */
  .modal-overlay.open {
    align-items: flex-end;
  }
  .modal-box {
    border-radius: 16px 16px 0 0;
    max-width: 100%;
    width: 100%;
    max-height: 92vh;
    min-height: unset;
    padding: 1.25rem 1rem;
    padding-bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px));
    overflow-y: auto;
    animation: modalSlideUp 0.25s ease;
  }
  @keyframes modalSlideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
  .modal-close {
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f3f4f6;
    font-size: 1rem;
  }

  /* ── Touch-friendly tap targets ── */
  .wedding-card {
    padding: 1rem;
    min-height: 44px;
  }
  .channel-item {
    padding: 0.8rem 1rem;
    min-height: 48px;
  }
  .task-row {
    padding: 0.75rem;
    min-height: 48px;
    flex-wrap: wrap;
  }
  .vendor-card {
    padding: 1rem;
  }
  .btn-primary, .btn-secondary, .btn-danger {
    min-height: 44px;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .btn-sm {
    min-height: 36px;
  }

  /* ── Form improvements ── */
  .form-group input,
  .form-group textarea,
  .form-group select {
    font-size: 1rem;
    padding: 0.6rem 0.75rem;
    min-height: 44px;
  }
  .form-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  .form-actions button {
    width: 100%;
    justify-content: center;
  }

  /* ── Participant picker — bigger tap targets ── */
  .participant-pick-item {
    padding: 0.6rem 0.75rem;
    min-height: 44px;
  }
  .participant-pick-item input {
    width: 20px;
    height: 20px;
    min-height: unset;
  }
  .pick-name {
    font-size: 0.95rem;
  }
  .radio-group {
    flex-direction: column;
    gap: 0.75rem;
  }
  .radio-label {
    min-height: 44px;
    padding: 0.4rem 0;
  }
  .radio-label input {
    width: 20px;
    height: 20px;
    min-height: unset;
  }

  /* ── Task detail — full width ── */
  .task-detail-modal {
    min-width: unset;
    width: 100%;
  }

  /* ── Vendor grid — single column ── */
  .vendor-grid {
    grid-template-columns: 1fr;
  }

  /* ── Danger zone — stack on mobile ── */
  .danger-action {
    flex-direction: column;
    gap: 0.75rem;
  }
  .danger-action > div p {
    max-width: unset;
  }
  .btn-danger {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* ── Schedule adjustments ── */
  .schedule-filter-bar {
    padding: 0.35rem 0 0.75rem;
    gap: 0.3rem;
  }
  .schedule-filter-chip {
    font-size: 0.72rem;
    padding: 0.3rem 0.6rem;
    min-height: 32px;
  }
  .schedule-time-col { width: 56px; padding-right: 6px; }
  .schedule-time { font-size: 0.68rem; }
  .day-schedule-track { left: 68px; }
  .schedule-date-banner { font-size: 0.82rem; padding: 0.5rem 0.75rem; margin-bottom: 1rem; }
  .schedule-content-col { padding-left: 8px; }
  .schedule-title { font-size: 0.82rem; }
  .schedule-inline-detail { padding: 0.75rem; padding-left: 72px; }
  .schedule-detail-title { font-size: 1rem; }
  .schedule-detail-actions {
    flex-direction: column;
  }
  .schedule-detail-actions button,
  .schedule-detail-actions form {
    width: 100%;
  }
  .schedule-detail-actions form button {
    width: 100%;
  }

  /* ── Overview panel ── */
  .overview-panel { padding: 0.5rem; }
  .tab-panel-header h3 { font-size: 0.95rem; }

  /* ── Sidebar close overlay ── */
  .mobile-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 79;
  }
  .mobile-sidebar-overlay.visible {
    display: block;
  }

  /* ── Welcome card on mobile ── */
  .welcome-card {
    margin: 0.5rem 0;
    padding: 1.5rem;
  }
  .welcome-card h2 {
    font-size: 1.1rem;
  }

  /* ── Form row — stack on mobile ── */
  .form-row {
    grid-template-columns: 1fr;
  }

  /* ── Settings — full width ── */
  .settings-grid {
    max-width: 100%;
  }
  .setting-row {
    flex-direction: column;
    gap: 0.2rem;
  }
  .settings-section {
    max-width: 100%;
  }
  .share-link-row {
    flex-direction: column;
  }
  .share-link-input {
    font-size: 0.75rem;
  }
  .transfer-form {
    flex-direction: column;
    align-items: stretch;
  }
  .transfer-form .setting-input {
    min-height: 44px;
  }

  /* ── Invite cards ── */
  .invite-actions {
    flex-direction: row;
  }
  .btn-accept, .btn-decline {
    min-height: 36px;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
  }
}

/* ==========================================================================
   WEDDING DAY SCHEDULE — VERTICAL TIMELINE
   ========================================================================== */

/* Date banner */
.schedule-date-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #92400e;
}
.schedule-date-icon { font-size: 1.1rem; }
.schedule-date-venue { color: #b45309; font-weight: 500; }

/* Schedule container */
.day-schedule {
  position: relative;
  padding: 0.5rem 0 1rem;
}

/* Vertical track line */
.day-schedule-track {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 82px;
  width: 3px;
  background: linear-gradient(to bottom, var(--accent), #e9d5ff);
  border-radius: 2px;
  z-index: 0;
}

/* Each schedule row */
.day-schedule-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0;
  padding: 0.6rem 0;
  cursor: pointer;
  border-radius: 0.75rem;
  transition: background 0.15s;
  z-index: 1;
}
.day-schedule-item:hover {
  background: #f9fafb;
}
.day-schedule-item.schedule-active {
  background: #f3f0ff;
}

/* Time column */
.schedule-time-col {
  width: 70px;
  flex-shrink: 0;
  text-align: right;
  padding-right: 12px;
  padding-top: 2px;
}
.schedule-time {
  font-size: 0.8rem;
  font-weight: 700;
  color: #6b7280;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.schedule-done .schedule-time {
  color: #16a34a;
}

/* Dot column */
.schedule-dot-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 28px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
}
.schedule-dot {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  z-index: 3;
  flex-shrink: 0;
}
.schedule-dot.dot-done {
  background: #dcfce7;
  border-color: #16a34a;
  color: #16a34a;
}
.day-schedule-item:hover .schedule-dot {
  transform: scale(1.15);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}
.day-schedule-item.schedule-active .schedule-dot {
  transform: scale(1.2);
  box-shadow: 0 0 0 5px rgba(139, 92, 246, 0.25);
  border-color: var(--accent);
}

/* Connector line between dots */
.schedule-connector {
  width: 3px;
  flex: 1;
  min-height: 16px;
  background: transparent;
}

/* Content column */
.schedule-content-col {
  flex: 1;
  padding-left: 14px;
  padding-top: 1px;
  min-width: 0;
}
.schedule-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f2937;
  line-height: 1.4;
}
.schedule-done .schedule-title {
  color: #16a34a;
  text-decoration: line-through;
  text-decoration-color: rgba(22, 163, 74, 0.4);
}
.schedule-desc-preview {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-top: 0.15rem;
  line-height: 1.4;
}
.schedule-creator {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.1rem;
}
.schedule-detail-creator {
  font-size: 0.85rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

/* Inline detail — expands below the clicked event */
.schedule-inline-detail {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 0 0 0.75rem 0.75rem;
  padding: 1rem 1.25rem 1rem 96px;
  margin: -0.25rem 0 0.25rem;
  position: relative;
  animation: schedSlideDown 0.18s ease;
}
@keyframes schedSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.schedule-inline-detail .schedule-detail-close {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: none;
  border: none;
  font-size: 1rem;
  cursor: pointer;
  color: #9ca3af;
  line-height: 1;
}
.schedule-inline-detail .schedule-detail-close:hover { color: #374151; }

.schedule-detail-inner { }
.schedule-detail-time {
  font-size: 0.85rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 0.25rem;
}
.schedule-detail-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.35rem;
}
.schedule-detail-desc {
  font-size: 0.875rem;
  color: #374151;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}
.schedule-detail-status {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.schedule-detail-status.status-done {
  background: #dcfce7;
  color: #16a34a;
}
.schedule-detail-status.status-pending {
  background: #ede9fe;
  color: var(--accent);
}
.schedule-detail-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   NEW CHAT MODAL — PARTICIPANT PICKER
   ========================================================================== */
.participant-picker {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  padding: 0.5rem;
}

.participant-pick-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.12s;
}
.participant-pick-item:hover { background: #f3f4f6; }
.participant-pick-item input { cursor: pointer; }
.pick-name { font-size: 0.875rem; }

.radio-group { display: flex; gap: 1.5rem; margin-top: 0.25rem; }
.radio-label { display: flex; align-items: center; gap: 0.4rem; font-size: 0.9rem; cursor: pointer; }

/* Chat sidebar section labels */
.channel-section-label {
  padding: 0.4rem 1rem 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
}

.no-account { color: #d1d5db; font-style: italic; }
.icon-muted { opacity: 0.4; }

/* ── Global chats sidebar button ── */
.sidebar-global-chats {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #ddd6fe;
}

.global-chats-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  background: transparent;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4b5563;
  cursor: pointer;
  transition: background 0.15s;
}

.global-chats-btn:hover {
  background: #ede9fe;
}

.global-chats-btn.active {
  background: #7c3aed;
  color: #fff;
}

.global-chats-icon {
  font-size: 1.1rem;
}

.sidebar-unread-badge {
  margin-left: auto;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  min-width: 1.2rem;
  text-align: center;
}

/* ── Global chat view ── */
.global-chat-view {
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Wedding group headers in global channels list */
.channel-wedding-group {
  margin-bottom: 0.25rem;
}

.channel-wedding-header {
  padding: 0.5rem 1rem 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #7c3aed;
  background: #f5f3ff;
  border-top: 1px solid #ede9fe;
  margin-top: 0.25rem;
}

.channel-wedding-group:first-child .channel-wedding-header {
  border-top: none;
  margin-top: 0;
}

/* Hidden chat input */
.chat-input-hidden { display: none !important; }
.chat-input-form { display: flex; }

/* ─────────────────────────────────────────
   CLIENTS / COUPLE PROFILE
───────────────────────────────────────── */
.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}
.section-header-row .settings-section-title { margin-bottom: 0; }

.field-hint {
  font-size: 0.78rem;
  color: #9ca3af;
  margin: 0 0 0.35rem;
}

/* Two-column partner grid */
.profile-partners-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
@media (max-width: 600px) {
  .profile-partners-grid { grid-template-columns: 1fr; }
}

.profile-partner-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1rem;
}
.profile-partner-heading {
  font-size: 0.9rem;
  font-weight: 700;
  color: #374151;
  margin: 0 0 0.75rem;
}

/* Read-only field rows inside partner card */
.profile-field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.35rem 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 0.88rem;
  gap: 0.5rem;
}
.profile-field-row:last-child { border-bottom: none; }
.profile-field-label { color: #6b7280; font-weight: 500; white-space: nowrap; }
.profile-field-value { color: #111; text-align: right; word-break: break-word; }

/* Story card */
.profile-story-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 0.25rem;
}
.profile-story-text {
  font-size: 0.88rem;
  color: #374151;
  line-height: 1.6;
  white-space: pre-wrap;
  margin: 0;
}

/* Interest chips */
.interests-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}
.interest-chip {
  background: #ede9fe;
  color: #5b21b6;
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Important dates list */
.dates-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.date-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.75rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.88rem;
}
.date-label {
  flex: 1;
  font-weight: 600;
  color: #374151;
}
.date-value {
  color: #6b7280;
  white-space: nowrap;
}

/* Custom fields management list */
.custom-fields-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.custom-field-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.75rem;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.88rem;
}
.custom-field-label {
  flex: 1;
  font-weight: 600;
  color: #374151;
}
.custom-field-type-badge {
  background: #e0e7ff;
  color: #3730a3;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: capitalize;
}

/* Small remove button (X) used on chips and rows */
.btn-chip-remove {
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  line-height: 1;
  transition: color 0.15s, background 0.15s;
}
.btn-chip-remove:hover {
  color: #ef4444;
  background: #fee2e2;
}

/* Clients form max width */
.clients-form {
  max-width: 700px;
}
