/* Shared between admin.html and platform.html — the base component kit
   (nav user widget, layout shell, buttons, tables, modals, forms). Both
   files carried byte-identical copies of these rules; extracted for the
   same drift reason as admin-shared.js. Page-specific styling (Insights'
   bento grid, the trip builder, platform.html's members-filters bar)
   stays in each page's own <style> block. */

.hidden { display: none !important; }

/* ── NAV USER WIDGET ── */
.nav__user { position: relative; }
.nav__user-btn {
  background: none; border: none; display: flex; align-items: center;
  gap: 8px; padding: 6px 10px; border-radius: 8px; cursor: pointer;
}
.nav__user-btn:hover { background: rgba(0,0,0,0.05); }
.nav__user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--terracotta); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem; font-weight: 700; font-family: var(--ff-sans);
}
.nav__user-name { font-size: 0.85rem; font-weight: 500; color: var(--charcoal); }
.nav__user-caret { font-size: 0.6rem; color: #aaa; margin-left: 2px; }
.nav__user-menu {
  position: absolute; right: 0; top: calc(100% + 8px);
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1); min-width: 160px; z-index: 200;
}
.nav__user-item {
  display: block; padding: 11px 18px; font-size: 0.85rem;
  color: var(--charcoal); text-decoration: none; background: none;
  border: none; width: 100%; text-align: left; cursor: pointer; font-family: inherit;
}
.nav__user-item:hover { background: #f5f0e8; }
.nav__user-item--signout { color: #b33; border-top: 1px solid #f0ece4; }

/* ── LAYOUT ── */
.admin-wrap { max-width: 1100px; margin: 0 auto; padding: 40px 24px 80px; }
.admin-page-header { margin-bottom: 36px; }
.admin-page-header h1 { font-family: var(--ff-serif); font-size: 2rem; margin: 0 0 4px; }
.admin-page-header p { color: var(--muted); font-size: 0.88rem; margin: 0; }
.admin-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.admin-section-head h2 { font-family: var(--ff-serif); font-size: 1.25rem; margin: 0; }

/* ── BUTTONS ── */
.a-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: 8px; font-family: inherit; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.05em; cursor: pointer; border: none; transition: all 0.15s; text-transform: none; }
.a-btn--primary { background: var(--terracotta); color: #fff; }
.a-btn--primary:hover { background: #a34d2e; }
.a-btn--ghost { background: transparent; border: 1px solid var(--border); color: var(--charcoal); }
.a-btn--ghost:hover { background: rgba(0,0,0,0.04); }
.a-btn--danger { background: transparent; border: 1px solid #d94f46; color: #d94f46; }
.a-btn--danger:hover { background: #d94f46; color: #fff; }
.a-btn--sm { padding: 5px 11px; font-size: 0.73rem; }

/* ── TABLE ── */
.a-table-wrap { background: #fff; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.a-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.a-table th { text-align: left; padding: 11px 16px; font-size: 0.69rem; font-weight: 600; letter-spacing: 0.08em; text-transform: none; color: var(--muted); background: var(--cream-dark); border-bottom: 1px solid var(--border); }
.a-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.a-table tbody tr:last-child td { border-bottom: none; }
.a-table tbody tr:hover td { background: #fafaf8; }
.a-table .trip-name { font-weight: 600; font-size: 0.9rem; }
.a-table .table-actions { display: flex; gap: 8px; }

/* ── MODAL ── */
.a-modal-overlay { position: fixed; inset: 0; z-index: 500; overflow-y: auto; padding: 40px 20px; display: flex; justify-content: center; align-items: flex-start; }
.a-modal-overlay.hidden { display: none; }
.a-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.4); }
.a-modal-panel { position: relative; z-index: 1; background: #fff; border-radius: 16px; width: 100%; max-width: 640px; padding: 32px; box-shadow: 0 24px 64px rgba(0,0,0,0.18); }
.a-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.a-modal-header h2 { font-family: var(--ff-serif); font-size: 1.4rem; margin: 0; }
.a-modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #aaa; line-height: 1; padding: 2px 6px; }
.a-modal-close:hover { color: #333; }
.a-modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); }

/* ── FORM ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fg { display: flex; flex-direction: column; gap: 6px; }
.fg--full { grid-column: 1 / -1; }
.f-label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.07em; text-transform: none; color: var(--muted); }
.f-input, .f-select, .f-textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit; font-size: 0.875rem; color: var(--charcoal);
  background: var(--cream-dark); transition: border-color 0.15s; box-sizing: border-box;
}
.f-input:focus, .f-select:focus, .f-textarea:focus { outline: none; border-color: var(--terracotta); background: #fff; }
.f-textarea { resize: vertical; min-height: 78px; }
.f-hint { font-size: 0.71rem; color: var(--muted); }
.f-error { font-size: 0.75rem; color: #c0392b; min-height: 18px; margin-top: 4px; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .fg--full { grid-column: 1; }
}

.plan-card__badge { font-size:0.62rem; font-weight:700; letter-spacing:0.08em; text-transform:uppercase; color:#fff; background:var(--terracotta); padding:3px 8px; border-radius:999px; }
