/* ============================================================
   Vowi — Component Library
   ============================================================ */

/* ============================================================
   PRINT — hide chrome so only content prints
   ============================================================ */
@media print {
  .sidebar, .sidebar-overlay, .app-header, .mobile-bottom-nav,
  .mobile-sheet, .mobile-sheet-overlay, .drawer, .drawer-overlay,
  .table-actions, .header-actions, .notif-wrap, .toolbar,
  #toastContainer { display: none !important; }

  .main-content { margin-left: 0 !important; }
  .page-body { padding: 0 !important; }
  body { background: #fff !important; }
  .card { box-shadow: none !important; border: 1px solid #ddd !important; }
}

/* ============================================================
   MOBILE BOTTOM NAV + PROFILE SHEET
   ============================================================ */

.mobile-bottom-nav { display: none; }

/* Centered wedding name in the mobile header */
.app-header-wedding { display: none; }
@media (max-width: 768px) {
  .app-header { position: relative; justify-content: flex-end; }
  .app-header .header-title { display: none; }
  .app-header .header-actions { margin-left: auto; }
  #headerWeddingName { display: none; } /* avoid duplicate; centered name is shown instead */
  .app-header-wedding {
    display: block;
    position: absolute;
    left: 50%; top: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-serif);
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    max-width: 56%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
    pointer-events: none;
  }
}

.mbn-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid transparent;
  flex-shrink: 0;
}
.mbn-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Bottom sheet (always in DOM; only triggered on mobile) */
.mobile-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 380;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  backdrop-filter: blur(2px);
}
.mobile-sheet-overlay.open { opacity: 1; pointer-events: auto; }

.mobile-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 381;
  background: var(--bg-card);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.2);
  transform: translateY(110%);
  transition: transform 0.28s ease;
  padding: 10px 16px calc(20px + env(safe-area-inset-bottom));
  max-height: 82vh;
  overflow-y: auto;
}
.mobile-sheet.open { transform: translateY(0); }

.mobile-sheet-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 4px auto 14px;
}

.mobile-sheet-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 4px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.mobile-sheet-user .name  { font-weight: 700; font-size: 1rem; }
.mobile-sheet-user .email { font-size: 0.8rem; color: var(--text-muted); }
.mobile-sheet-user .mbn-avatar { width: 48px; height: 48px; font-size: 1rem; }

.mobile-sheet-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 14px 4px 6px;
}

.mobile-sheet-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: background var(--transition);
}
.mobile-sheet-link:hover, .mobile-sheet-link:active { background: var(--bg-muted); text-decoration: none; }
.mobile-sheet-link .icon { font-size: 18px; width: 24px; text-align: center; }
.mobile-sheet-link.active { background: var(--primary-bg); color: var(--primary-dark); }
.mobile-sheet-link.danger { color: var(--error); }

.mobile-sheet-wedding {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}
.mobile-sheet-wedding.active { border-color: var(--primary); background: var(--primary-bg); }
.mobile-sheet-wedding .wname { font-weight: 600; font-size: 0.875rem; }
.mobile-sheet-wedding .wrole { font-size: 0.68rem; text-transform: uppercase; color: var(--text-muted); }

@media (max-width: 768px) {
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: var(--sidebar-bg);
    border-top: 1px solid var(--sidebar-border);
    z-index: 180;
    align-items: center;
    justify-content: space-around;
    padding: 0 6px calc(env(safe-area-inset-bottom));
  }

  .mbn-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    flex: 1;
    padding: 6px 0;
    color: var(--sidebar-muted);
    font-size: 0.6rem;
    font-weight: 600;
    text-decoration: none;
  }
  .mbn-item .mbn-icon { font-size: 18px; line-height: 1; }
  .mbn-item.active { color: var(--primary-light); }
  .mbn-item:active { opacity: 0.7; }

  .mbn-profile {
    flex-shrink: 0;
    width: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
  }
  .mbn-profile.active .mbn-avatar { border-color: var(--primary-light); }

  /* clear space so content isn't hidden behind the bar */
  .main-content { padding-bottom: 60px; }

  /* the bottom nav replaces the slide-out sidebar + hamburger on mobile */
  .hamburger-btn { display: none !important; }
  .sidebar, .sidebar-overlay { display: none !important; }
}

/* ============================================================
   WEDDING SWITCHER (sidebar)
   ============================================================ */

.sidebar-wedding.switchable {
  cursor: pointer;
  position: relative;
  padding-right: 32px;
  transition: background var(--transition);
}
.sidebar-wedding.switchable:hover { background: #34271c; }

.sidebar-wedding-switch-icon {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--sidebar-muted);
  font-size: 13px;
  pointer-events: none;
}

.wedding-switch-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #2a2018;
  border: 1px solid var(--sidebar-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 250;
  max-height: 280px;
  overflow-y: auto;
  display: none;
}
.wedding-switch-menu.open { display: block; }

.wedding-switch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background var(--transition);
  border-bottom: 1px solid var(--sidebar-border);
}
.wedding-switch-item:last-child { border-bottom: none; }
.wedding-switch-item:hover { background: var(--primary-dark); }
.wedding-switch-item.active { background: var(--sidebar-active-bg); }

.wedding-switch-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wedding-switch-role {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--sidebar-muted);
  flex-shrink: 0;
}
.wedding-switch-item.active .wedding-switch-role { color: var(--primary-light); }

/* ============================================================
   NOTIFICATION BELL
   ============================================================ */

.notif-wrap { position: relative; }

.notif-bell {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text-secondary);
  transition: background var(--transition), color var(--transition);
  cursor: pointer;
}
.notif-bell:hover { background: var(--bg-muted); color: var(--text-primary); }

.notif-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-full);
  background: var(--error);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
}
.notif-badge.hidden { display: none; }

.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 340px;
  max-width: 90vw;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  overflow: hidden;
  display: none;
}
.notif-panel.open { display: block; }

.notif-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.notif-panel-title { font-weight: 600; font-size: 0.9rem; }

.notif-list { max-height: 380px; overflow-y: auto; }

.notif-item {
  display: flex;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
  text-decoration: none;
  color: inherit;
}
.notif-item:hover { background: var(--bg-muted); text-decoration: none; }
.notif-item.unread { background: var(--primary-bg); }
.notif-item.unread:hover { background: var(--primary-light); }

.notif-item-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary); flex-shrink: 0; margin-top: 5px;
}
.notif-item.read .notif-item-dot { background: transparent; }

.notif-item-title { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); line-height: 1.3; }
.notif-item-body  { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.notif-item-time  { font-size: 0.72rem; color: var(--text-muted); margin-top: 3px; }

.notif-empty { padding: 32px 16px; text-align: center; color: var(--text-muted); font-size: 0.85rem; }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: var(--font-sans);
  line-height: 1;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background var(--transition), color var(--transition),
              border-color var(--transition), box-shadow var(--transition),
              transform 0.1s ease;
  white-space: nowrap;
  text-decoration: none !important;
}

.btn:active { transform: scale(0.98); }
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-secondary {
  background: var(--bg-muted);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover:not(:disabled) {
  background: var(--border);
  border-color: var(--border);
}

.btn-danger {
  background: var(--error-bg);
  color: var(--error);
  border-color: var(--error-border);
}
.btn-danger:hover:not(:disabled) {
  background: var(--error);
  color: #fff;
  border-color: var(--error);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-muted);
  color: var(--text-primary);
}

.btn-outline {
  background: transparent;
  color: var(--primary-dark);
  border-color: var(--primary);
}
.btn-outline:hover:not(:disabled) {
  background: var(--primary-bg);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 1rem;
}

.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
}

.btn-loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: 4px;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.form-group:last-child { margin-bottom: 0; }

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.form-label .required {
  color: var(--error);
  margin-left: 2px;
}

.form-control {
  width: 100%;
  padding: 9px 13px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--text-primary);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.15);
}

.form-control::placeholder { color: var(--text-muted); }

.form-control:disabled {
  background: var(--bg-muted);
  color: var(--text-muted);
  cursor: not-allowed;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%239e8e7e' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.form-error {
  font-size: 0.8rem;
  color: var(--error);
}

.input-group {
  display: flex;
  gap: 0;
}

.input-group .form-control {
  border-radius: 0;
  flex: 1;
}
.input-group .form-control:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .form-control:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.input-prefix {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  background: var(--bg-muted);
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}

.card-body {
  padding: 20px 24px;
}

.card-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg-muted);
  border-radius: 0 0 var(--radius) var(--radius);
}

/* ============================================================
   STAT CARDS
   ============================================================ */

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  box-shadow: var(--shadow-xs);
  transition: box-shadow var(--transition);
}

.stat-card:hover { box-shadow: var(--shadow-sm); }

.stat-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-value {
  font-family: 'Roboto', sans-serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  margin-bottom: 6px;
}

.stat-sub {
  font-family: 'Roboto', sans-serif;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 14px;
}

.stat-icon.gold   { background: var(--primary-bg); }
.stat-icon.green  { background: var(--success-bg); }
.stat-icon.red    { background: var(--error-bg); }
.stat-icon.blue   { background: var(--info-bg); }

/* ============================================================
   TABLES
   ============================================================ */

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-meta {
  font-family: 'Roboto', sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

thead th {
  padding: 10px 14px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

thead th:first-child { border-radius: var(--radius-sm) 0 0 0; }
thead th:last-child  { border-radius: 0 var(--radius-sm) 0 0; }

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--primary-bg); }

tbody td {
  padding: 12px 14px;
  color: var(--text-primary);
  vertical-align: middle;
}

.table-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.table-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.table-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.5;
}

.table-empty-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-muted);
  border-radius: 0 0 var(--radius) var(--radius);
  gap: 12px;
}

.pagination-info {
  font-family: 'Roboto', sans-serif;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.page-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-family: 'Roboto', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}

.page-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary-dark);
  background: var(--primary-bg);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================================
   BADGES
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-success { background: var(--success-bg); color: var(--success); border: 1px solid var(--success-border); }
.badge-error   { background: var(--error-bg);   color: var(--error);   border: 1px solid var(--error-border); }
.badge-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid var(--warning-border); }
.badge-info    { background: var(--info-bg);    color: var(--info);    border: 1px solid var(--info-border); }
.badge-gold    { background: var(--primary-bg); color: var(--primary-dark); border: 1px solid var(--primary-light); }
.badge-muted   { background: var(--bg-muted);   color: var(--text-muted);   border: 1px solid var(--border); }

/* ============================================================
   DRAWERS
   ============================================================ */

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 300;
  backdrop-filter: blur(2px);
}
.drawer-overlay.show { display: block; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 480px;
  max-width: 100vw;
  height: 100vh;
  background: var(--bg-card);
  z-index: 301;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  box-shadow: var(--shadow-xl);
}

.drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.drawer-title {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
}

.drawer-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 20px;
  transition: background var(--transition), color var(--transition);
}
.drawer-close:hover {
  background: var(--bg-muted);
  color: var(--text-primary);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.drawer-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-shrink: 0;
  background: var(--bg-card);
}

@media (max-width: 520px) {
  .drawer { width: 100vw; }
}

/* ============================================================
   MODALS
   ============================================================ */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 400;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(3px);
}
.modal-overlay.show { display: flex; }

.modal {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn 0.25s ease;
}

.modal-sm { max-width: 400px; }
.modal-lg { max-width: 640px; }

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 24px 24px 0;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.modal-body {
  padding: 20px 24px;
}

.modal-footer {
  padding: 0 24px 24px;
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

/* Confirm delete modal */
.confirm-modal .modal-body {
  text-align: center;
  padding: 24px;
}
.confirm-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--error-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin: 0 auto 16px;
}
.confirm-message {
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

/* ============================================================
   TOASTS
   ============================================================ */

#toastContainer {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  background: var(--bg-card);
  border-left: 4px solid;
  min-width: 280px;
  max-width: 380px;
  pointer-events: all;
  opacity: 0;
  transform: translateX(120%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast-success { border-color: var(--success); }
.toast-error   { border-color: var(--error); }
.toast-warning { border-color: var(--warning); }
.toast-info    { border-color: var(--info); }

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.toast-message {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  flex: 1;
}

/* ============================================================
   TABS
   ============================================================ */

.tabs {
  display: flex;
  gap: 2px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 24px;
}

.tab-btn {
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color var(--transition), border-color var(--transition);
  cursor: pointer;
}

.tab-btn:hover { color: var(--text-primary); }

.tab-btn.active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   PROGRESS BARS
   ============================================================ */

.progress-bar {
  height: 8px;
  background: var(--bg-muted);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  transition: width 0.5s ease;
}

.progress-fill.success { background: linear-gradient(90deg, #4ade80, var(--success)); }
.progress-fill.warning { background: linear-gradient(90deg, #fbbf24, var(--warning)); }
.progress-fill.danger  { background: linear-gradient(90deg, #f87171, var(--error)); }

/* ============================================================
   SEARCH + FILTER BAR
   ============================================================ */

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

.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
}

.search-box input {
  width: 100%;
  padding: 9px 13px 9px 36px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition);
}
.search-box input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(201,169,110,0.15);
}
.search-box input::placeholder { color: var(--text-muted); }

.search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 14px;
}

/* ============================================================
   SETTINGS LAYOUT
   ============================================================ */

.settings-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  align-items: start;
}

.settings-nav {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: sticky;
  top: calc(var(--header-height) + 16px);
}

.settings-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  border-bottom: 1px solid var(--border);
}
.settings-nav-item:last-child { border-bottom: none; }
.settings-nav-item:hover { background: var(--bg-muted); color: var(--text-primary); }
.settings-nav-item.active {
  background: var(--primary-bg);
  color: var(--primary-dark);
  font-weight: 600;
}

/* Mobile settings: drill-down list → detail screen with back button */
.settings-back-btn { display: none; }

@media (max-width: 768px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }
  /* Nav becomes a vertical list of rows with chevrons */
  .settings-nav {
    position: static;
    display: flex;
    flex-direction: column;
    gap: 0;
  }
  .settings-nav-item {
    justify-content: space-between;
    border-right: none;
    border-bottom: 1px solid var(--border);
    flex: none;
    font-size: 0.95rem;
    padding: 16px;
  }
  .settings-nav-item::after {
    content: '›';
    font-size: 1.3rem;
    color: var(--text-muted);
    line-height: 1;
  }

  /* List mode: hide every panel, show the list */
  .settings-layout:not(.detail-open) .settings-panel { display: none !important; }
  /* Detail mode: hide the list, show the back button + active panel */
  .settings-layout.detail-open .settings-nav { display: none; }
  .settings-layout.detail-open .settings-back-btn { display: inline-flex; }

  .settings-back-btn {
    align-items: center;
    gap: 6px;
    margin-bottom: 14px;
    background: var(--bg-muted);
    color: var(--text-secondary);
    font-weight: 600;
    padding: 9px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
  }
}

/* ============================================================
   WELCOME MODAL STEPS
   ============================================================ */

.welcome-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 20px 0;
}

.welcome-step {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color var(--transition), background var(--transition);
}
.welcome-step:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
  text-decoration: none;
}

.welcome-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.welcome-step-content h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.welcome-step-content p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================================
   TASK / MILESTONE ITEMS
   ============================================================ */

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  transition: box-shadow var(--transition);
}
.task-item:hover { box-shadow: var(--shadow-sm); }

.task-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 2px solid var(--border);
  flex-shrink: 0;
  margin-top: 2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition);
}
.task-checkbox.checked {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.task-info { flex: 1; min-width: 0; }
.task-title {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-primary);
}
.task-title.done {
  text-decoration: line-through;
  color: var(--text-muted);
}
.task-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.milestone-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  transition: box-shadow var(--transition);
}
.milestone-item:hover { box-shadow: var(--shadow-sm); }
.milestone-item.completed { opacity: 0.65; }

.milestone-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  flex-shrink: 0;
  margin-top: 3px;
}
.milestone-item.completed .milestone-dot {
  background: var(--success);
  border-color: var(--success);
}

/* ============================================================
   COPY LINK WIDGET
   ============================================================ */

.copy-link-box {
  display: flex;
  align-items: center;
  background: var(--bg-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.copy-link-url {
  flex: 1;
  padding: 10px 14px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  word-break: break-all;
  font-family: 'Courier New', monospace;
}

.copy-link-btn {
  padding: 10px 16px;
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition);
  cursor: pointer;
  flex-shrink: 0;
}
.copy-link-btn:hover { background: var(--primary-dark); }

/* ============================================================
   AUTH PAGES
   ============================================================ */

.auth-page {
  min-height: 100vh;
  display: flex;
  background: var(--bg);
}

.auth-art {
  flex: 1;
  background: linear-gradient(160deg, #1c1410 0%, #2e1f14 50%, #1c1410 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  position: relative;
  overflow: hidden;
}

.auth-art::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 60% 40%, rgba(201,169,110,0.15) 0%, transparent 60%);
}

.auth-art-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.auth-art-logo {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.auth-art-tagline {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.55);
  margin-bottom: 48px;
}

.auth-art-decoration {
  font-size: 5rem;
  opacity: 0.15;
  position: absolute;
  bottom: 40px;
  right: 40px;
}

.auth-form-side {
  width: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px;
  background: var(--bg-card);
}

.auth-form-header {
  margin-bottom: 32px;
}

.auth-form-title {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-form-subtitle {
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.auth-divider {
  text-align: center;
  margin: 20px 0;
  position: relative;
  color: var(--text-muted);
  font-size: 0.875rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }

.auth-link {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-link a {
  color: var(--primary-dark);
  font-weight: 600;
}

@media (max-width: 900px) {
  .auth-art { display: none; }
  .auth-form-side {
    width: 100%;
    padding: 32px 24px;
  }
}

/* ============================================================
   LANDING PAGE
   ============================================================ */

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 48px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-nav-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.landing-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero {
  padding: 80px 48px;
  text-align: center;
  background: linear-gradient(180deg, var(--primary-bg) 0%, var(--bg) 100%);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  color: var(--text-primary);
  max-width: 720px;
  margin: 0 auto 20px;
  line-height: 1.15;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.features-section {
  padding: 80px 48px;
  max-width: 1100px;
  margin: 0 auto;
}

.features-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  text-align: center;
  margin-bottom: 48px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: box-shadow var(--transition), transform var(--transition);
}
.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 16px;
}

.feature-name {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.landing-footer {
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  padding: 40px 48px;
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .landing-nav { padding: 0 20px; }
  .hero { padding: 60px 20px; }
  .features-section { padding: 60px 20px; }
  .features-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   VENDOR STATUS PILLS
   ============================================================ */

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.status-pending   { background: var(--warning-bg);  color: var(--warning); }
.status-confirmed { background: var(--success-bg); color: var(--success); }
.status-cancelled { background: var(--error-bg);   color: var(--error); }
.status-in_progress { background: var(--info-bg);  color: var(--info); }
.status-completed { background: var(--success-bg); color: var(--success); }

/* ============================================================
   SPINNER / LOADER
   ============================================================ */

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.page-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================================
   INLINE ALERT
   ============================================================ */

.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  line-height: 1.5;
  border: 1px solid;
  margin-bottom: 16px;
}

.alert-success { background: var(--success-bg); border-color: var(--success-border); color: var(--success); }
.alert-error   { background: var(--error-bg);   border-color: var(--error-border);   color: var(--error); }
.alert-warning { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning); }
.alert-info    { background: var(--info-bg);    border-color: var(--info-border);    color: var(--info); }

/* ============================================================
   ACCORDION (budget categories)
   ============================================================ */

.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 12px;
  background: var(--bg-card);
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  cursor: pointer;
  transition: background var(--transition);
  user-select: none;
}
.accordion-header:hover { background: var(--primary-bg); }

.accordion-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.accordion-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.accordion-chevron {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform var(--transition);
  flex-shrink: 0;
}
.accordion-item.open .accordion-chevron { transform: rotate(180deg); }

.accordion-body {
  display: none;
  padding: 0 20px 16px;
  border-top: 1px solid var(--border);
}
.accordion-item.open .accordion-body { display: block; }

/* ============================================================
   PLEDGE PUBLIC PAGE
   ============================================================ */

.pledge-page {
  min-height: 100vh;
  background: linear-gradient(180deg, #1c1410 0%, #2e1f14 40%, #f9f7f4 40%);
  padding-top: 48px;
}

.pledge-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 520px;
  margin: 0 auto 40px;
  overflow: hidden;
}

.pledge-card-hero {
  background: linear-gradient(135deg, #1c1410, #3a2a1e);
  padding: 40px 36px;
  text-align: center;
  position: relative;
}

.pledge-couple-names {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.pledge-wedding-info {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}

.pledge-form-body {
  padding: 32px 36px;
}

.pledge-success {
  text-align: center;
  padding: 48px 36px;
}

.pledge-success-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
}

.pledge-success-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.pledge-success-message {
  color: var(--text-muted);
  line-height: 1.6;
}
