/* =====================================================================
   RALEIGH PICKLEBALL COMMUNITY PORTAL — STYLESHEET
   Watercolor / soft-pastel design system
   Includes: WCAG AA contrast, larger touch targets, 100dvh, scrollable modals
   ===================================================================== */

/* ---------------------------------------------------------------
   DESIGN TOKENS
   --------------------------------------------------------------- */
:root {
  --brand-primary: #795548;
  --brand-primary-d: #5D4037;
  --brand-accent: #E8537A;
  --brand-accent-2: #36B5A8;

  --bg-app: #F4F6FB;
  --bg-card: #FFFFFF;
  --bg-inset: #F1F5F9;
  --bg-sidebar: #FFFFFF;

  --text-strong: #16203A;
  --text-body: #2B3654;
  --text-muted: #5B6472;
  /* ~4.6:1 on white — WCAG AA */

  --border-soft: #E3E8F2;
  --border-mid: #CBD4E6;

  --success-bg: #E5F6F0;
  --success-text: #11806A;
  --warn-bg: #FFF4E0;
  --warn-text: #9A6400;
  --danger-bg: #FDE7EC;
  --danger-text: #B0234A;

  --shadow-sm: 0 1px 3px rgba(22, 32, 58, .07);
  --shadow-md: 0 6px 20px rgba(22, 32, 58, .09);
  --shadow-lg: 0 16px 44px rgba(22, 32, 58, .16);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;

  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-head: "Manrope", system-ui, -apple-system, sans-serif;

  --sidebar-w: 248px;
  --header-h: 64px;
}

/* ---------------------------------------------------------------
   RESET & BASE
   --------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-body);
  background:
    radial-gradient(1200px 600px at 100% -5%, rgba(54, 181, 168, .10), transparent 60%),
    radial-gradient(1000px 600px at -5% 110%, rgba(232, 83, 122, .10), transparent 60%),
    var(--bg-app);
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  color: var(--text-strong);
  line-height: 1.2;
}

a {
  color: var(--brand-primary);
}

.hidden {
  display: none !important;
}

img {
  max-width: 100%;
  display: block;
}

/* ---------------------------------------------------------------
   APP LAYOUT
   --------------------------------------------------------------- */
.app-container {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

.main-panel-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------------------------------------------------------------
   SIDEBAR
   --------------------------------------------------------------- */
.app-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-soft);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  z-index: 50;
}

.sidebar-brand {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.35rem;
  margin-bottom: 26px;
  padding: 0 8px;
  letter-spacing: -.02em;
}

.brand-raleigh {
  color: var(--text-strong);
}

.brand-pb {
  color: var(--brand-primary);
}

.nav-bar {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin: 16px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
  min-height: 44px;
}

.nav-item:hover {
  background: var(--bg-inset);
}

.nav-item.active {
  background: var(--brand-primary);
  color: #fff;
}

.nav-item.active .nav-icon {
  stroke: #fff;
}

.nav-icon {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  flex-shrink: 0;
}

.nav-item:hover .nav-icon {
  stroke: var(--brand-primary);
}

.app-sidebar a.nav-item {
  text-decoration: none;
}

/* ---------------------------------------------------------------
   HEADER
   --------------------------------------------------------------- */
.app-header {
  height: var(--header-h);
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-view-title {
  font-size: 1.2rem;
  font-weight: 800;
}

.btn-toggle-sidebar {
  display: none;
  border: none;
  background: transparent;
  color: var(--text-strong);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
}

.btn-toggle-sidebar:hover {
  background: var(--bg-inset);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-date-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-inset);
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.date-icon {
  stroke: var(--brand-primary);
}

.header-auth {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-display {
  font-weight: 700;
  color: var(--text-strong);
  font-size: 0.9rem;
}

/* ---------------------------------------------------------------
   CONTENT CONTAINER
   --------------------------------------------------------------- */
.content-container {
  flex: 1;
  padding: 30px 32px 90px;
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

.spa-view {
  animation: fadeUp .35s ease;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.section-title {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 4px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.clean-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.shadow-inset {
  box-shadow: inset 0 2px 8px rgba(22, 32, 58, .06);
}

.loader-watercolor {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
}

/* ---------------------------------------------------------------
   BUTTONS
   --------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 11px 18px;
  cursor: pointer;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease;
  min-height: 44px;
  line-height: 1;
}

.btn:active {
  transform: translateY(1px);
}

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

.btn-sm {
  font-size: 0.8rem;
  padding: 8px 13px;
  min-height: 36px;
}

.btn-block {
  width: 100%;
  display: flex;
}

.btn-primary {
  background: var(--brand-primary);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--brand-primary-d);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-strong);
  border-color: var(--border-mid);
}

.btn-secondary:hover {
  background: var(--bg-inset);
}

.btn-danger {
  background: var(--danger-text);
  color: #fff;
}

.btn-danger:hover {
  filter: brightness(1.05);
}

.btn-google-auth {
  background: #fff;
  color: var(--text-strong);
  border-color: var(--border-mid);
}

.btn-google-auth:hover {
  background: var(--bg-inset);
}

.btn-checkin {
  min-height: 40px;
}

.btn-checkin.perfect.active {
  background: var(--success-bg);
  color: var(--success-text);
  border-color: var(--success-text);
}

.btn-checkin.wet.active {
  background: var(--warn-bg);
  color: var(--warn-text);
  border-color: var(--warn-text);
}

/* ---------------------------------------------------------------
   NOTIFICATION TOAST
   --------------------------------------------------------------- */
.notification-toast {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-strong);
  color: #fff;
  padding: 13px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  max-width: 90vw;
  text-align: center;
  animation: toastIn .3s ease;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translate(-50%, 12px);
  }

  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

/* ---------------------------------------------------------------
   GUEST NOTICES
   --------------------------------------------------------------- */
.guest-notice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-inset);
  color: var(--text-muted);
  border: 1px dashed var(--border-mid);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
}

.notice-icon {
  color: var(--brand-primary);
  font-weight: 800;
}

.auth-block-notice {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 40px 28px;
  max-width: 460px;
  margin: 20px auto;
  box-shadow: var(--shadow-sm);
}

.auth-block-notice h3 {
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.auth-block-notice p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ---------------------------------------------------------------
   FACILITIES
   --------------------------------------------------------------- */
.vertical-facilities-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.facility-item-card {
  overflow: hidden;
}

.facility-image-banner {
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-inset);
}

.facility-info {
  padding: 18px 22px 6px;
}

.facility-title {
  font-size: 1.3rem;
  font-weight: 800;
}

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

.facility-details-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 22px;
}

.facility-detail-box {
  flex: 1;
  min-width: 120px;
  background: var(--bg-inset);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.facility-detail-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}

.facility-detail-val {
  font-weight: 700;
  color: var(--text-strong);
  font-size: 0.95rem;
}

.facility-notes-box {
  margin: 0 22px 14px;
  background: var(--warn-bg);
  color: var(--warn-text);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.88rem;
}

.facility-status-area {
  border-top: 1px solid var(--border-soft);
  padding: 18px 22px 22px;
}

.fac-status-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.fac-status-label {
  font-weight: 700;
  color: var(--text-strong);
}

.status-badge {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.status-badge.perfect {
  background: var(--success-bg);
  color: var(--success-text);
}

.status-badge.busy {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.status-badge.wet {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.status-reporter-info {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.fac-checkin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.checkin-btn-group {
  display: flex;
  gap: 8px;
}

.busy-selector-wrapper {
  flex: 1;
  min-width: 200px;
}

.busy-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-body);
  background: var(--bg-card);
  min-height: 40px;
}

.busy-select.active {
  border-color: var(--warn-text);
  background: var(--warn-bg);
  color: var(--warn-text);
}

.fac-status-history-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fac-history-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  color: var(--text-body);
  background: var(--bg-inset);
  padding: 7px 11px;
  border-radius: var(--radius-sm);
}

/* ---------------------------------------------------------------
   SCHEDULE
   --------------------------------------------------------------- */
.schedule-header-row,
.matchmaker-header-row,
.marketplace-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.schedule-actions-area,
.matchmaker-actions-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.weekly-schedule-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 8px;
}

.weekly-day-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.weekly-day-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 20px;
  background: var(--bg-inset);
  border-bottom: 1px solid var(--border-soft);
  flex-wrap: wrap;
  gap: 10px;
}

.weekly-day-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-family: var(--font-head);
  color: var(--text-strong);
}

.weekly-day-badge {
  background: var(--brand-primary);
  color: #fff;
  font-size: 0.68rem;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 700;
}

.weekly-day-date {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.weekly-events-list {
  padding: 6px 20px 14px;
}

.weekly-empty-day {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.86rem;
  padding: 12px 0;
}

.weekly-event-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border-soft);
}

.weekly-event-item:last-child {
  border-bottom: none;
}

.weekly-event-main {
  flex: 1;
  min-width: 0;
}

.weekly-event-meta {
  text-align: right;
  flex-shrink: 0;
}

.weekly-event-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.weekly-event-name {
  font-weight: 700;
  color: var(--text-strong);
}

.weekly-event-facility {
  color: var(--text-muted);
  font-size: 0.84rem;
  margin-top: 3px;
}

.weekly-event-time {
  font-weight: 700;
  color: var(--brand-primary);
  font-size: 0.88rem;
  white-space: nowrap;
}

@media (max-width: 576px) {
  .weekly-event-item {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .weekly-event-meta {
    text-align: left;
    margin-top: 2px;
  }
}

.sched-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.sched-badge.tournament {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.sched-badge.league {
  background: #E8EBFF;
  color: var(--brand-primary);
}

.sched-badge.clinic {
  background: var(--success-bg);
  color: var(--success-text);
}

.sched-badge.open_play {
  background: var(--warn-bg);
  color: var(--warn-text);
}

/* ---------------------------------------------------------------
   MATCHMAKER
   --------------------------------------------------------------- */
.matchmaker-posts-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.matchmaker-card {
  padding: 20px 22px;
}

.match-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.match-card-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.match-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.match-user-name {
  font-weight: 700;
  color: var(--text-strong);
}

.match-card-time-ago {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.match-card-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.match-detail-item {
  background: var(--bg-inset);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.match-detail-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
}

.match-detail-value {
  font-weight: 700;
  color: var(--text-strong);
  font-size: 0.92rem;
}

.match-comments-section {
  border-top: 1px solid var(--border-soft);
  padding-top: 14px;
}

.match-comments-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.match-comments-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
}

.match-comment-item {
  background: var(--bg-inset);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
}

.match-comment-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.match-comment-text {
  font-size: 0.88rem;
  color: var(--text-body);
}

.match-comment-form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.match-comment-input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.88rem;
  min-height: 40px;
}

/* ---------------------------------------------------------------
   MARKETPLACE
   --------------------------------------------------------------- */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.store-item {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.store-sold-overlay {
  position: absolute;
  top: 16px;
  right: -32px;
  background: var(--danger-text);
  color: #fff;
  font-weight: 800;
  font-size: 0.8rem;
  padding: 5px 40px;
  transform: rotate(35deg);
  z-index: 3;
  letter-spacing: .08em;
}

.store-reduced-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--brand-accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.72rem;
  padding: 4px 11px;
  border-radius: 999px;
  z-index: 3;
}

.store-item-image {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.store-item-details {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.store-item-details h4 {
  font-size: 1.1rem;
  font-weight: 800;
}

.store-item-desc {
  color: var(--text-muted);
  font-size: 0.86rem;
  margin: 6px 0 12px;
  flex: 1;
}

.store-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.price-box {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--brand-primary);
}

.store-price-original {
  text-decoration: line-through;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.store-seller-tag {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 600;
}

.store-seller-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.store-seller-actions .btn {
  flex: 1;
}

/* ---------------------------------------------------------------
   EVENTS TIMELINE
   --------------------------------------------------------------- */
.events-timeline {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.event-timeline-item {
  display: flex;
  gap: 18px;
  align-items: stretch;
}

.timeline-date-card {
  flex-shrink: 0;
  width: 76px;
  background: var(--brand-primary);
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 0;
}

.timeline-date-card .month {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: .1em;
}

.timeline-date-card .day {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}

.event-info-card {
  flex: 1;
  padding: 18px 22px;
}

.event-info-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
}

.event-loc {
  color: var(--brand-accent);
  font-weight: 700;
  font-size: 0.86rem;
  margin: 4px 0 8px;
}

.event-info-card p {
  color: var(--text-body);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

/* ---------------------------------------------------------------
   CONTACT
   --------------------------------------------------------------- */
.contact-layout {
  max-width: 620px;
  margin: 0 auto;
}

.contact-form-container,
#contact-form-container {
  padding: 26px 28px;
}

/* ---------------------------------------------------------------
   FORMS
   --------------------------------------------------------------- */
.watercolor-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

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

.form-group label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-strong);
}

.watercolor-form input,
.watercolor-form select,
.watercolor-form textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-mid);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text-body);
  background: var(--bg-card);
  transition: border-color .15s ease, box-shadow .15s ease;
}

.watercolor-form input:focus,
.watercolor-form select:focus,
.watercolor-form textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(31, 59, 179, .15);
}

.watercolor-form textarea {
  resize: vertical;
}

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

.auth-buttons-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-buttons-row .btn {
  flex: 1;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

.google-logo {
  flex-shrink: 0;
}

/* ---------------------------------------------------------------
   MODALS
   --------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 24, 46, .55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
  animation: fadeIn .2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 460px;
  padding: 30px 30px 28px;
  position: relative;
  max-height: 90vh;
  max-height: 90dvh;
  overflow-y: auto;
  animation: modalUp .25s ease;
}

@keyframes modalUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 800;
}

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

.btn-close-modal {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: none;
  background: var(--bg-inset);
  color: var(--text-strong);
  border-radius: 50%;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close-modal:hover {
  background: var(--border-mid);
}

/* ---------------------------------------------------------------
   ADMIN PORTAL
   --------------------------------------------------------------- */
.admin-portal-header {
  margin-bottom: 20px;
}

.admin-wrapper {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.admin-sidebar {
  flex-shrink: 0;
  width: 200px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: sticky;
  top: calc(var(--header-h) + 20px);
}

.admin-sidebar-btn {
  text-align: left;
  border: 1px solid var(--border-soft);
  background: var(--bg-card);
  color: var(--text-body);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all .15s ease;
  min-height: 44px;
}

.admin-sidebar-btn:hover {
  background: var(--bg-inset);
}

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

.admin-panel {
  flex: 1;
  padding: 24px;
  min-width: 0;
}

.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.admin-section-header h3 {
  font-size: 1.25rem;
  font-weight: 800;
}

.admin-table-container {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-soft);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

.admin-table th {
  text-align: left;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  background: var(--bg-inset);
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
}

.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.88rem;
  color: var(--text-body);
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-actions-col {
  display: flex;
  gap: 8px;
}

.admin-settings-row {
  max-width: 460px;
}

/* ---------------------------------------------------------------
   FOOTER
   --------------------------------------------------------------- */
.app-footer {
  text-align: center;
  padding: 18px;
  color: var(--text-muted);
  font-size: 0.82rem;
  border-top: 1px solid var(--border-soft);
}

/* ---------------------------------------------------------------
   MOBILE BOTTOM NAV (hidden on desktop)
   --------------------------------------------------------------- */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border-soft);
  z-index: 60;
  padding-bottom: env(safe-area-inset-bottom);
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 8px 4px;
  cursor: pointer;
  min-height: 48px;
}

.mobile-nav-item.active {
  color: var(--brand-primary);
}

.mobile-nav-icon {
  width: 22px;
  height: 22px;
  stroke: currentColor;
}

.mobile-nav-label {
  white-space: nowrap;
}

/* ---------------------------------------------------------------
   SIDEBAR OVERLAY (mobile drawer)
   --------------------------------------------------------------- */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  height: 100vh;
  height: 100dvh;
  background: rgba(16, 24, 46, .5);
  z-index: 45;
}

.sidebar-overlay.active {
  display: block;
}

/* ---------------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------------- */
@media (max-width: 991px) {
  .app-container {
    min-height: 100vh;
    min-height: 100dvh;
  }

  .app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    height: 100dvh;
    transform: translateX(-100%);
    transition: transform .28s ease;
    box-shadow: var(--shadow-lg);
  }

  .app-sidebar.open {
    transform: translateX(0);
  }

  .btn-toggle-sidebar {
    display: flex;
  }

  .content-container {
    padding: 22px 16px 96px;
  }

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

  .admin-wrapper {
    flex-direction: column;
  }

  .admin-sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    position: static;
  }

  .admin-sidebar-btn {
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 40px;
  }

  .btn-sm {
    min-height: 40px;
  }

  .btn-checkin {
    min-height: 44px;
  }

  .btn-close-modal {
    width: 40px;
    height: 40px;
  }

  .header-date-pill {
    display: none;
  }
}

@media (max-width: 560px) {
  .section-title {
    font-size: 1.45rem;
  }

  .store-grid {
    grid-template-columns: 1fr;
  }

  .event-timeline-item {
    flex-direction: column;
  }

  .timeline-date-card {
    width: 100%;
    flex-direction: row;
    gap: 10px;
    padding: 10px;
  }

  .timeline-date-card .day {
    font-size: 1.4rem;
  }

  .modal-card {
    padding: 26px 20px 22px;
  }

  .schedule-header-row,
  .matchmaker-header-row,
  .marketplace-header {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-buttons-row {
    flex-direction: column;
  }
}

/* ---------------------------------------------------------------
   BULK ACTIONS & SELECTIONS (ADMIN)
   --------------------------------------------------------------- */
.admin-bulk-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-inset);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px dashed var(--border-mid);
  margin-right: auto;
  animation: fadeIn .18s ease;
}

.admin-bulk-actions.hidden {
  display: none !important;
}

.admin-bulk-actions .bulk-count {
  font-weight: 800;
  color: var(--brand-accent);
}

.admin-select-all,
.admin-row-select {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--brand-primary);
  display: inline-block;
  vertical-align: middle;
}