/* ===================================================================
   Gift & Craft Order Manager - Mobile-First Stylesheet
   Theme:
     Background: Warm Ivory #F3EEE8
     Primary: Deep Teal Green #17645F
     Accent: Coral Orange #FF6845 (sparingly: nearest-order, overdue, reminders)
     Text: Dark Charcoal #2B2D2F
     Cards: White #FFFFFF with rounded corners (12px) & soft borders
=================================================================== */

:root {
  --bg-ivory: #F3EEE8;
  --bg-card: #FFFFFF;
  --primary-teal: #17645F;
  --primary-teal-dark: #104945;
  --primary-teal-light: #E7F0EE;
  --accent-coral: #FF6845;
  --accent-coral-light: #FFF0ED;
  --text-charcoal: #2B2D2F;
  --text-muted: #6B7280;
  --border-soft: #E5DED5;
  --border-focus: #17645F;
  
  --status-new-bg: #E0F2FE;
  --status-new-text: #0369A1;
  --status-progress-bg: #FEF3C7;
  --status-progress-text: #92400E;
  --status-ready-bg: #E0E7FF;
  --status-ready-text: #3730A3;
  --status-delivered-bg: #DCFCE7;
  --status-delivered-text: #166534;

  --radius-sm: 8px;
  --radius-card: 12px;
  --radius-pill: 9999px;

  --shadow-sm: 0 1px 3px rgba(43, 45, 47, 0.05);
  --shadow-md: 0 4px 12px rgba(43, 45, 47, 0.07);
  --shadow-coral: 0 6px 16px rgba(255, 104, 69, 0.15);

  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  font-family: var(--font-main);
  background-color: var(--bg-ivory);
  color: var(--text-charcoal);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--primary-teal);
  font-weight: 700;
  line-height: 1.25;
}

a {
  color: var(--primary-teal);
  text-decoration: none;
  transition: opacity 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

/* ===================================================================
   Header & Navigation
=================================================================== */
.site-header {
  background-color: var(--primary-teal);
  color: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.15rem;
}

.brand:hover {
  text-decoration: none;
}

.brand-icon {
  background-color: rgba(255, 255, 255, 0.15);
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.nav-links {
  display: none; /* hidden on small phones, visible in desktop or bottom bar */
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  color: #FFFFFF;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.9;
}

.nav-link:hover, .nav-link.active {
  background-color: var(--primary-teal-dark);
  opacity: 1;
  text-decoration: none;
}

/* Header Action Buttons (+ New Order and + Event) */
.header-cta-group {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.4rem;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  height: 34px;
  padding: 0 0.75rem;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.header-btn-order {
  background-color: var(--accent-coral);
  color: #FFFFFF !important;
  border: 1px solid var(--accent-coral);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.header-btn-order:hover {
  background-color: #D44C2E;
  border-color: #D44C2E;
  text-decoration: none;
}

.header-btn-event {
  background-color: rgba(255, 255, 255, 0.16);
  color: #FFFFFF !important;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.header-btn-event:hover {
  background-color: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
}

/* Page Toolbar Action Button Group (cleanly aligns + New Order & + Add Event) */
.action-btn-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
}

.action-btn-group .btn {
  margin: 0;
  white-space: nowrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.user-tag {
  font-size: 0.85rem;
  background-color: rgba(255, 255, 255, 0.15);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
}

/* Bottom Tab Bar for Mobile */
.bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-color: #FFFFFF;
  border-top: 1px solid var(--border-soft);
  z-index: 100;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  justify-content: space-around;
  align-items: center;
}

.bottom-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  height: 100%;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  min-width: 48px;
}

.bottom-tab svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  margin-bottom: 2px;
}

.bottom-tab.active {
  color: var(--primary-teal);
  font-weight: 700;
}

.bottom-tab.active svg {
  stroke: var(--primary-teal);
}

/* Floating Action Button (New Order CTA) */
.fab-new-order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--accent-coral);
  color: #FFFFFF;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(255, 104, 69, 0.35);
  margin-top: -24px;
  border: 3px solid var(--bg-ivory);
  transition: transform 0.2s ease;
}

.fab-new-order:hover {
  transform: scale(1.06);
  text-decoration: none;
  color: #FFFFFF;
}

/* ===================================================================
   Main Content Layout
=================================================================== */
.main-wrapper {
  flex: 1;
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem;
  padding-bottom: 80px; /* Space for mobile bottom bar */
}

/* Alert Banners */
.alert-banner-container {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.alert-banner {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.95rem;
}

.alert-banner-coral {
  background-color: var(--accent-coral-light);
  border: 1px solid var(--accent-coral);
  color: #8C240E;
}

.alert-banner-teal {
  background-color: var(--primary-teal-light);
  border: 1px solid var(--primary-teal);
  color: var(--primary-teal-dark);
}

.alert-banner-success {
  background-color: #DCFCE7;
  border: 1px solid #86EFAC;
  color: #14532D;
}

.alert-link {
  font-weight: 700;
  text-decoration: underline;
  margin-left: 0.5rem;
  color: inherit;
}

/* ===================================================================
   Cards & Containers
=================================================================== */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 1.15rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

/* Highlighted Nearest Order Card (Coral Accent) */
.nearest-order-card {
  background-color: #FFFFFF;
  border: 2px solid var(--accent-coral);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-coral);
  position: relative;
  overflow: hidden;
}

.nearest-badge-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge-urgent {
  background-color: var(--accent-coral);
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

/* Dashboard Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--primary-teal);
  line-height: 1.1;
  margin-bottom: 0.25rem;
}

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

/* ===================================================================
   Badges & Pills
=================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-overdue {
  background-color: var(--accent-coral);
  color: #FFFFFF;
}

.badge-reminder-due {
  background-color: var(--accent-coral-light);
  color: #A3280B;
  border: 1px solid var(--accent-coral);
  font-weight: 700;
}

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

.badge-status-in-progress {
  background-color: var(--status-progress-bg);
  color: var(--status-progress-text);
}

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

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

.badge-counter {
  background-color: var(--accent-coral);
  color: #FFFFFF;
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  margin-left: 0.3rem;
}

/* ===================================================================
   Buttons & Interactive Elements (Large Tap Targets)
=================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  min-height: 46px; /* 46-48px touch friendly */
  transition: all 0.2s ease;
  user-select: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary-teal);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--primary-teal-dark);
  color: #FFFFFF;
}

.btn-accent {
  background-color: var(--accent-coral);
  color: #FFFFFF;
  box-shadow: 0 2px 6px rgba(255, 104, 69, 0.25);
}

.btn-accent:hover {
  background-color: #E6512F;
  color: #FFFFFF;
}

.btn-outline {
  background-color: transparent;
  border-color: var(--primary-teal);
  color: var(--primary-teal);
}

.btn-outline:hover {
  background-color: var(--primary-teal-light);
}

.btn-whatsapp {
  background-color: #25D366;
  color: #FFFFFF;
}

.btn-whatsapp:hover {
  background-color: #1EBE5D;
  color: #FFFFFF;
}

.btn-danger {
  background-color: #DC2626;
  color: #FFFFFF;
}

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

.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  min-height: 38px;
}

.btn-block {
  width: 100%;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* ===================================================================
   Forms & Inputs
=================================================================== */
.form-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  max-width: 640px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.15rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
  color: var(--text-charcoal);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  background-color: #FAF8F5;
  color: var(--text-charcoal);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-height: 46px;
}

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

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary-teal);
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(23, 100, 95, 0.15);
}

.form-checkbox {
  width: 22px;
  height: 22px;
  accent-color: var(--primary-teal);
  cursor: pointer;
}

.checkbox-label-container {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
}

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

.form-help {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.form-error {
  color: #DC2626;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  font-weight: 500;
}

/* ===================================================================
   Filter & Search Bars
=================================================================== */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-input {
  flex: 1;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  background-color: #FFFFFF;
}

.tabs-scroll {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tabs-scroll::-webkit-scrollbar {
  display: none;
}

.tab-pill {
  white-space: nowrap;
  padding: 0.45rem 0.85rem;
  background-color: #FFFFFF;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-charcoal);
  text-decoration: none;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
}

.tab-pill:hover {
  text-decoration: none;
  background-color: var(--primary-teal-light);
}

.tab-pill.active {
  background-color: var(--primary-teal);
  color: #FFFFFF;
  border-color: var(--primary-teal);
}

/* ===================================================================
   Order Detail & Presentation
=================================================================== */
.detail-header-card {
  background-color: #FFFFFF;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.65rem 0;
  border-bottom: 1px solid #F3EEE8;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.detail-value {
  font-weight: 600;
  text-align: right;
  max-width: 65%;
}

.financial-summary {
  background-color: #FAF8F5;
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-top: 0.5rem;
}

.balance-highlight {
  font-size: 1.15rem;
  color: var(--accent-coral);
  font-weight: 800;
}

/* ===================================================================
   Enhanced Presentable Reminder Module UI
=================================================================== */
.reminder-stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: 0.9rem 1.15rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
  color: var(--text-charcoal);
  cursor: pointer;
  flex: 1;
  min-width: 220px;
}

.reminder-stat-card:hover {
  text-decoration: none;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.reminder-stat-card.active-due {
  border-color: var(--accent-coral);
  background-color: #FFF9F7;
  box-shadow: 0 4px 12px rgba(232, 93, 63, 0.15);
}

.reminder-stat-card.active-all {
  border-color: var(--primary-teal);
  background-color: #F4F9F8;
  box-shadow: 0 4px 12px rgba(23, 100, 95, 0.15);
}

.date-tile {
  width: 68px;
  min-width: 68px;
  background-color: #FFFFFF;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  align-self: flex-start;
}

.date-tile-month {
  width: 100%;
  background-color: var(--primary-teal);
  color: #FFFFFF;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.2rem 0;
}

.date-tile-day {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-charcoal);
  line-height: 1.1;
  padding-top: 0.25rem;
}

.date-tile-year {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
  padding-bottom: 0.35rem;
}

.date-tile-due .date-tile-month {
  background-color: var(--accent-coral);
}

.date-tile-due .date-tile-day {
  color: var(--accent-coral);
}

.date-tile-nearby .date-tile-month {
  background-color: #D97706;
}

.date-tile-nearby .date-tile-day {
  color: #D97706;
}

/* ===================================================================
   Nearby Date Highlighting for Cards & Columns
=================================================================== */
/* High Urgency: Today, Tomorrow, or Overdue */
.card-urgent {
  background: linear-gradient(180deg, #FFF6F3 0%, #FFFFFF 100%) !important;
  border: 1.5px solid #FCA5A5 !important;
  border-left: 6px solid var(--accent-coral) !important;
  box-shadow: 0 4px 14px rgba(232, 93, 63, 0.16) !important;
}

/* Nearby: In the next 2-7 days or within reminder outreach window */
.card-nearby {
  background: linear-gradient(180deg, #FFFDF2 0%, #FFFFFF 100%) !important;
  border: 1.5px solid #FDE68A !important;
  border-left: 6px solid #D97706 !important;
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.14) !important;
}

/* Standard: Scheduled further in the future */
.card-standard {
  background-color: #FFFFFF !important;
  border: 1px solid var(--border-soft) !important;
  border-left: 5px solid var(--primary-teal) !important;
}

/* Badge for nearby dates */
.badge-nearby {
  background-color: #FEF3C7;
  color: #92400E;
  border: 1px solid #FCD34D;
  font-weight: 700;
}

/* Color Legend Bar */
.color-legend-bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background-color: #FAF8F5;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.85rem;
  margin-bottom: 1rem;
  font-size: 0.82rem;
  flex-wrap: wrap;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-charcoal);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot-urgent {
  background-color: var(--accent-coral);
  box-shadow: 0 0 0 2px rgba(232, 93, 63, 0.25);
}

.legend-dot-nearby {
  background-color: #D97706;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.25);
}

.legend-dot-standard {
  background-color: var(--primary-teal);
  box-shadow: 0 0 0 2px rgba(23, 100, 95, 0.25);
}

.whatsapp-bubble {
  background-color: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 8px;
  padding: 0.6rem 0.85rem;
  font-size: 0.86rem;
  color: #14532D;
  margin-top: 0.5rem;
  line-height: 1.45;
}

.whatsapp-bubble strong {
  color: #15803D;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  display: block;
  margin-bottom: 0.2rem;
}

.reminder-entry {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

@media (max-width: 540px) {
  .reminder-entry {
    flex-direction: column;
    gap: 0.65rem;
  }
  .date-tile {
    flex-direction: row;
    width: auto;
    min-width: unset;
    padding: 0.35rem 0.65rem;
    gap: 0.5rem;
  }
  .date-tile-month {
    width: auto;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
  }
  .date-tile-day {
    font-size: 1.1rem;
    padding: 0;
  }
  .date-tile-year {
    font-size: 0.8rem;
    padding: 0;
  }
}

/* ===================================================================
   Desktop & Tablet Media Queries (min-width: 768px)
=================================================================== */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
  
  .bottom-nav {
    display: none; /* Hide bottom tab bar on desktop */
  }

  .main-wrapper {
    padding-bottom: 2rem;
  }

  .filter-bar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .search-form {
    max-width: 380px;
  }

  .orders-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .orders-grid .card {
    margin-bottom: 0;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .nav-link {
    padding: 0.45rem 0.55rem;
    font-size: 0.88rem;
  }
  .header-inner {
    padding: 0.6rem 0.75rem;
  }
  .header-cta-group {
    margin-left: 0.25rem;
    gap: 0.3rem;
  }
  .header-btn {
    padding: 0 0.55rem;
    font-size: 0.8rem;
    height: 32px;
  }
}

@media (min-width: 1024px) {
  .orders-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===================================================================
   Warning & Confirmation Modals
=================================================================== */
.app-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.app-modal-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

.app-modal-card {
  background: #FFFFFF;
  border-radius: 16px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  max-width: 480px;
  width: 100%;
  padding: 1.75rem 1.5rem;
  transform: translateY(12px) scale(0.97);
  transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  border-top: 5px solid var(--accent-coral, #E05638);
}

.app-modal-backdrop.is-active .app-modal-card {
  transform: translateY(0) scale(1);
}

.app-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.app-modal-icon-wrap {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: 50%;
  background: #FEE2E2;
  color: #DC2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.app-modal-icon-wrap.modal-icon-info {
  background: var(--primary-teal-light, #E6F0EF);
  color: var(--primary-teal, #17645F);
}

.app-modal-icon-wrap.modal-icon-warning {
  background: #FEF3C7;
  color: #D97706;
}

.app-modal-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-charcoal, #1E293B);
  margin: 0 0 0.25rem 0;
  line-height: 1.25;
}

.app-modal-subtitle {
  font-size: 0.92rem;
  color: var(--text-muted, #64748B);
  margin: 0;
  line-height: 1.45;
}

.app-modal-details-box {
  background: var(--bg-ivory, #F8FAFC);
  border: 1px solid var(--border-soft, #E2E8F0);
  border-radius: var(--radius-sm, 8px);
  padding: 0.85rem 1rem;
  margin: 1rem 0 1.25rem 0;
  font-size: 0.88rem;
  color: var(--text-charcoal, #334155);
  line-height: 1.5;
}

.app-modal-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.app-modal-actions button,
.app-modal-actions a {
  min-width: 110px;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
}

/* ===================================================================
   Predictive Event Input & Dropdown
=================================================================== */
.predictive-wrapper {
  position: relative;
  width: 100%;
}

.predictive-input {
  width: 100%;
  padding-right: 2.2rem;
}

.predictive-indicator {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.85rem;
  color: var(--text-muted, #94A3B8);
  pointer-events: none;
  transition: transform 0.2s ease;
}

.predictive-wrapper.is-open .predictive-indicator {
  transform: translateY(-50%) rotate(180deg);
}

.predictive-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #FFFFFF;
  border: 1px solid var(--border-soft, #CBD5E1);
  border-radius: 10px;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.12), 0 4px 10px rgba(0, 0, 0, 0.05);
  max-height: 280px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.predictive-wrapper.is-open .predictive-dropdown {
  display: block;
}

.predictive-dropdown-header {
  padding: 0.45rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted, #64748B);
  background: #F8FAFC;
  border-bottom: 1px solid var(--border-soft, #E2E8F0);
  position: sticky;
  top: 0;
}

.predictive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease;
  border-bottom: 1px solid rgba(226, 232, 240, 0.6);
  font-size: 0.92rem;
  color: var(--text-charcoal, #1E293B);
}

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

.predictive-item:hover,
.predictive-item.is-selected {
  background-color: var(--primary-teal-light, #E6F0EF);
  color: var(--primary-teal-dark, #0E423E);
}

.predictive-item-main {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.predictive-item-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.predictive-item-name {
  font-weight: 600;
}

.predictive-item-hint {
  font-size: 0.76rem;
  color: var(--text-muted, #64748B);
  font-style: italic;
}

.predictive-item-custom {
  background-color: #FEF3C7;
  color: #92400E;
}

.predictive-item-custom:hover,
.predictive-item-custom.is-selected {
  background-color: #FDE68A;
  color: #78350F;
}

.predictive-match {
  font-weight: 800;
  color: var(--accent-coral, #E05638);
  text-decoration: underline;
  text-decoration-color: rgba(224, 86, 56, 0.4);
}

/* Quick Event Tags below input */
.quick-tags-container {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
}

.quick-tag-label {
  font-size: 0.75rem;
  color: var(--text-muted, #64748B);
  font-weight: 600;
  margin-right: 0.15rem;
}

.quick-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #F1F5F9;
  border: 1px solid var(--border-soft, #CBD5E1);
  border-radius: 9999px;
  padding: 0.2rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-charcoal, #334155);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.quick-tag-chip:hover {
  background: var(--primary-teal-light, #E6F0EF);
  color: var(--primary-teal-dark, #0E423E);
  border-color: var(--primary-teal, #17645F);
  transform: translateY(-1px);
}

