/* ==========================================================================
   REGESIT ORGANIZER DASHBOARD - BENTO MINIMALIST SYSTEM
   Consistent with Landing Page Design Language
   Font: DM Sans (Light 300, Regular 400, Medium 500)
   Accents: #1975f9 (Electric Blue), #3bc855 (Vibrant Green), #f43f5e (Alert Rose)
   ========================================================================== */

:root {
  /* Color Tokens */
  --bg-main: #fafafc;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f6f7f9;
  --bg-surface-alt: #f1f3f7;
  
  --color-primary: #1975f9;
  --color-primary-hover: #1263d6;
  --color-primary-subtle: rgba(25, 117, 249, 0.08);
  --color-primary-border: rgba(25, 117, 249, 0.2);
  
  --color-secondary: #3bc855;
  --color-secondary-hover: #32ab48;
  --color-secondary-subtle: rgba(59, 200, 85, 0.1);
  --color-secondary-border: rgba(59, 200, 85, 0.25);
  
  --color-alert: #f43f5e;
  --color-alert-subtle: rgba(244, 63, 94, 0.09);
  --color-alert-border: rgba(244, 63, 94, 0.3);
  
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --text-light: #9ca3af;
  
  --border-subtle: #eaecef;
  --border-default: #e2e5e9;
  --border-focus: #1975f9;
  
  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-subtle: 0 1px 3px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.03), 0 1px 3px rgba(0, 0, 0, 0.02);
  --shadow-card-hover: 0 10px 28px rgba(0, 0, 0, 0.06), 0 2px 6px rgba(0, 0, 0, 0.02);
  --shadow-float: 0 16px 36px -10px rgba(25, 117, 249, 0.18);
  
  /* Sizing */
  --sidebar-width: 250px;
  --topbar-height: 68px;
  
  /* Transitions */
  --transition-smooth: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--bg-main);
  overflow-x: hidden;
}

/* Strict Typography Weights (Light 300, Regular 400, Medium 500) */
h1, h2, h3, h4, h5, h6 {
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

p {
  font-weight: 400;
  color: var(--text-secondary);
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-smooth);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
}

/* ==========================================================================
   BUTTONS & PILL CONTROLS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  font-size: 13.5px;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-smooth);
  user-select: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background-color: var(--color-primary);
  color: #ffffff;
  border: 1px solid var(--color-primary);
  box-shadow: 0 4px 12px rgba(25, 117, 249, 0.22);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  box-shadow: 0 6px 16px rgba(25, 117, 249, 0.32);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-subtle);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 6px 12px;
}

.btn-ghost:hover {
  color: var(--text-primary);
  background-color: var(--bg-surface-subtle);
}

.btn-success {
  background-color: var(--color-secondary);
  color: #ffffff;
  border: 1px solid var(--color-secondary);
  box-shadow: 0 4px 12px rgba(59, 200, 85, 0.22);
}

.btn-success:hover {
  background-color: var(--color-secondary-hover);
  transform: translateY(-1px);
}

/* Pills & Badges */
.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  line-height: 1;
}

.pill-blue {
  background-color: var(--color-primary-subtle);
  color: var(--color-primary);
  border: 1px solid var(--color-primary-border);
}

.pill-green {
  background-color: var(--color-secondary-subtle);
  color: var(--color-secondary);
  border: 1px solid var(--color-secondary-border);
}

.pill-neutral {
  background-color: var(--bg-surface-alt);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.pulse-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--color-secondary);
  box-shadow: 0 0 0 3px rgba(59, 200, 85, 0.25);
  display: inline-block;
}

/* ==========================================================================
   MINIMALIST TOPBAR
   ========================================================================== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  background-color: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 1000;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn-mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-default);
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
  flex-shrink: 0;
}

.btn-mobile-menu-toggle:hover {
  background: var(--bg-surface-alt);
  color: var(--color-primary);
  border-color: var(--color-primary-border);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand-logo-mark {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--color-primary), #0056cc);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-shrink: 0;
}

.topbar-search {
  position: relative;
  width: 320px;
}

.topbar-search-input {
  width: 100%;
  height: 38px;
  padding: 0 14px 0 38px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-size: 13px;
  transition: var(--transition-smooth);
}

.topbar-search-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(25, 117, 249, 0.1);
}

.topbar-search-icon {
  position: absolute;
  left: 14px;
  top: 10px;
  color: var(--text-light);
  pointer-events: none;
}

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

.user-profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.user-profile-pill:hover {
  border-color: var(--color-primary-border);
  box-shadow: var(--shadow-subtle);
}

.user-avatar-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.user-name-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
}

/* ==========================================================================
   SIDEBAR NAVIGATION & MOBILE DRAWER
   ========================================================================== */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  position: fixed;
  top: var(--topbar-height);
  bottom: 0;
  left: 0;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 900;
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease;
}

.sidebar-mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 14px 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-mobile-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.btn-close-sidebar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-close-sidebar:hover {
  background: var(--color-alert-subtle);
  color: var(--color-alert);
  border-color: var(--color-alert-border);
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   TABLE RESPONSIVE CONTAINER
   ========================================================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
}

.table-responsive::-webkit-scrollbar {
  height: 6px;
}

.table-responsive::-webkit-scrollbar-track {
  background: transparent;
}

.table-responsive::-webkit-scrollbar-thumb {
  background-color: var(--border-default);
  border-radius: 9999px;
}

.workspace-badge {
  padding: 12px 14px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.workspace-badge-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
}

.workspace-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.workspace-plan {
  font-size: 11px;
  color: var(--text-muted);
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 10px 14px 4px 14px;
}

.nav-item-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.nav-item-link:hover {
  background-color: var(--bg-surface-subtle);
  color: var(--text-primary);
}

.nav-item-link.active {
  background-color: var(--color-primary-subtle);
  color: var(--color-primary);
  font-weight: 500;
}

.sidebar-bottom {
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   MAIN DASHBOARD CONTENT
   ========================================================================== */
.main-viewport {
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  padding: 32px 36px 80px 36px;
  min-height: calc(100vh - var(--topbar-height));
}

.page-intro-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.page-title {
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 4px;
  letter-spacing: -0.025em;
}

.page-desc {
  font-size: 14.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   BENTO GRID SYSTEM FOR DASHBOARD
   ========================================================================== */
.bento-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.bento-tile {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: var(--transition-smooth);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.bento-tile:hover {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

/* Bento Sizes */
.bento-col-3 { grid-column: span 3; }
.bento-col-4 { grid-column: span 4; }
.bento-col-8 { grid-column: span 8; }
.bento-col-12 { grid-column: span 12; }

/* Bento 1: Live Event Featured Card */
.bento-hero-live {
  background: linear-gradient(145deg, #ffffff 0%, #f6f9ff 100%);
  border-color: rgba(25, 117, 249, 0.2);
}

.bento-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 16px;
}

.live-badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bento-hero-title {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.bento-hero-meta {
  font-size: 12.5px;
  color: var(--text-muted);
}

.live-progress-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 16px 0;
}

.live-progress-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  margin-bottom: 8px;
}

.progress-track {
  width: 100%;
  height: 8px;
  background-color: var(--bg-surface-alt);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill-blue {
  height: 100%;
  background: linear-gradient(90deg, var(--color-primary), #60a5fa);
  border-radius: var(--radius-full);
}

/* Bento Metric Tiles */
.bento-metric-tile {
  background: #ffffff;
  padding: 22px;
}

.bento-metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.bento-metric-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

.bento-metric-value {
  font-size: 30px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.bento-metric-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* ==========================================================================
   ENHANCED EVENT DISTRIBUTION CARD (BENTO TILE 2)
   ========================================================================== */
.event-dist-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.event-distribution-bar-wrap {
  margin: 12px 0 14px 0;
}

.event-distribution-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.event-dist-segmented-bar {
  width: 100%;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--bg-surface-alt);
  display: flex;
  overflow: hidden;
  gap: 2px;
}

.dist-bar-seg-active {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full) 0 0 var(--radius-full);
  transition: width 0.4s ease;
}

.dist-bar-seg-done {
  height: 100%;
  background: #cbd5e1;
  border-radius: 0 var(--radius-full) var(--radius-full) 0;
  transition: width 0.4s ease;
}

.event-mini-status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.event-mini-status-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.event-mini-val {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
}

.event-mini-lbl {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.bento-card-footer-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
}

.bento-action-link {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.bento-action-link:hover {
  color: var(--color-primary-hover);
  transform: translateX(2px);
}

/* ==========================================================================
   BENTO DATA TABLE (EVENT MANAGEMENT)
   ========================================================================== */
.bento-table-card {
  padding: 0;
  overflow: hidden;
}

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

.filter-pills-group {
  display: flex;
  background: var(--bg-surface-subtle);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.filter-pill-btn {
  padding: 6px 16px;
  border-radius: var(--radius-full);
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.filter-pill-btn.active {
  background: #ffffff;
  color: var(--color-primary);
  font-weight: 500;
  box-shadow: var(--shadow-subtle);
}

.table-search-box {
  position: relative;
  width: 240px;
}

.table-search-input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 32px;
  font-size: 12.5px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  background: var(--bg-surface);
}

.table-search-input:focus {
  border-color: var(--color-primary);
}

/* Minimalist Table Styling */
.minimal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.minimal-table th {
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.minimal-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: 13.5px;
  vertical-align: middle;
}

.minimal-table tr:hover td {
  background-color: var(--bg-surface-subtle);
}

.event-cell-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.event-cell-name {
  font-weight: 500;
  color: var(--text-primary);
}

.event-cell-venue {
  font-size: 12px;
  color: var(--text-muted);
}

/* View Switcher & Action Right Controls */
.table-actions-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-switch-toggle-group {
  display: flex;
  align-items: center;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  padding: 3px;
  border-radius: var(--radius-full);
}

.btn-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-smooth);
}

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

.btn-view-toggle.active {
  background: #ffffff;
  color: var(--color-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   BENTO EVENT CARDS GRID VIEW
   ========================================================================== */
.bento-event-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  padding: 20px 24px;
}

.bento-event-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: var(--transition-smooth);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.bento-event-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary-border);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.event-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.event-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.event-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.event-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.event-card-meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-muted);
}

.event-card-meta-row svg {
  flex-shrink: 0;
  color: var(--text-light);
}

.event-card-progress-section {
  margin-top: 6px;
  background: var(--bg-surface-subtle);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.event-card-progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.event-card-progress-label strong {
  color: var(--text-primary);
  font-weight: 500;
}

/* ==========================================================================
   MODULE 2: BENTO ANALYTICS VIEW
   ========================================================================== */
.bento-chart-card {
  padding: 24px;
}

.bento-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.bento-bars-grid {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 200px;
  padding-top: 20px;
  border-bottom: 1px solid var(--border-subtle);
  gap: 16px;
}

.bento-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.bento-bar-pillar {
  width: 100%;
  max-width: 44px;
  height: 160px;
  display: flex;
  align-items: flex-end;
  background: var(--bg-surface-alt);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.bento-bar-fill {
  width: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-bar-fill.green {
  background: var(--color-secondary);
}

.gate-speed-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gate-speed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

/* ==========================================================================
   MODULE 3: BENTO CALENDAR VIEW
   ========================================================================== */
.calendar-card {
  padding: 24px;
  overflow: hidden;
  max-width: 100%;
}

.calendar-top-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  gap: 12px;
}

.calendar-nav-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-mobile-hint {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--color-primary);
  background: var(--color-primary-subtle);
  border: 1px dashed var(--color-primary-border);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
}

.calendar-grid-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  scrollbar-width: thin;
  scrollbar-color: var(--border-default) transparent;
  background: #ffffff;
}

.calendar-grid-wrap::-webkit-scrollbar {
  height: 6px;
}

.calendar-grid-wrap::-webkit-scrollbar-track {
  background: transparent;
}

.calendar-grid-wrap::-webkit-scrollbar-thumb {
  background-color: var(--border-default);
  border-radius: 9999px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 100%;
}

.cal-header-day {
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 500;
  text-align: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  text-transform: uppercase;
}

.cal-header-day:last-child {
  border-right: none;
}

.cal-day-box {
  min-height: 96px;
  padding: 8px;
  background: #ffffff;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.15s ease;
  min-width: 0;
  overflow: hidden;
}

.cal-day-box:nth-child(7n) {
  border-right: none;
}

.cal-day-box:hover {
  background: var(--bg-surface-subtle);
}

.cal-day-box.outside {
  background: #fbfbfc;
  color: var(--text-light);
}

.cal-day-number {
  font-size: 12px;
  font-weight: 400;
  margin-bottom: 4px;
}

.cal-day-box.today .cal-day-number {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: var(--color-primary);
  color: #ffffff;
  border-radius: 50%;
  text-align: center;
  line-height: 20px;
  font-weight: 500;
}

.cal-event-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: block;
  user-select: none;
}

.cal-event-tag:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.tag-blue {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  border: 1px solid var(--color-primary-border);
}

.tag-blue:hover {
  background: rgba(25, 117, 249, 0.16);
}

.tag-green {
  background: var(--color-secondary-subtle);
  color: var(--color-secondary);
  border: 1px solid var(--color-secondary-border);
}

.tag-green:hover {
  background: rgba(59, 200, 85, 0.2);
}

/* Agenda Event Section */
.calendar-agenda-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.calendar-agenda-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

.calendar-agenda-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.calendar-agenda-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  gap: 14px;
  transition: var(--transition-smooth);
}

.calendar-agenda-card:hover {
  border-color: var(--color-primary-border);
  background: #ffffff;
  box-shadow: var(--shadow-subtle);
}

.agenda-card-date {
  width: 44px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
}

.agenda-card-date.past {
  background: var(--bg-surface-alt);
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.agenda-date-day {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 2px;
}

.agenda-date-month {
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.agenda-card-content {
  flex-grow: 1;
  min-width: 0;
}

.agenda-card-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agenda-card-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.agenda-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ==========================================================================
   POPUP MODAL DIALOG WITH BACKDROP BLUR & 4-STEP CHUNKING WIZARD
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(17, 24, 39, 0.52);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 20px;
}

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

.modal-wizard-box {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPopEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

@keyframes modalPopEnter {
  from { opacity: 0; transform: scale(0.95) translateY(-10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-wizard-header {
  padding: 20px 28px 16px 28px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-wizard-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
}

/* Stepper Bar Inside Modal */
.modal-stepper-bar {
  padding: 16px 28px;
  background: var(--bg-surface-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.stepper-track {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  z-index: 2;
  cursor: pointer;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border-default);
  background-color: #ffffff;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.step-node.active .step-circle {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  color: #ffffff;
  box-shadow: 0 0 0 3px rgba(25, 117, 249, 0.15);
}

.step-node.completed .step-circle {
  border-color: var(--color-secondary);
  background-color: var(--color-secondary);
  color: #ffffff;
}

.step-label-text {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  white-space: nowrap;
}

.step-node.active .step-label-text {
  color: var(--color-primary);
}

.step-node.completed .step-label-text {
  color: var(--text-primary);
}

.step-line {
  flex-grow: 1;
  height: 2px;
  background-color: var(--border-default);
  margin: 0 10px 18px 10px;
  position: relative;
  z-index: 1;
  transition: background-color 0.25s ease;
}

.step-line.filled {
  background-color: var(--color-secondary);
}

/* Modal Body Scrollable Content */
.modal-wizard-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex-grow: 1;
}

.step-pane {
  display: none;
  animation: paneSlide 0.22s ease forwards;
}

.step-pane.active {
  display: block;
}

@keyframes paneSlide {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-pane-heading {
  margin-bottom: 20px;
}

.step-pane-heading h3 {
  font-size: 17px;
  font-weight: 500;
  margin-bottom: 4px;
}

.step-pane-heading p {
  font-size: 13px;
  color: var(--text-muted);
}

/* Form Controls Inside Modal */
.form-group {
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.form-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label .required-star {
  color: #ef4444;
}

.form-control {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface);
  font-size: 13px;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(25, 117, 249, 0.1);
}

textarea.form-control {
  height: auto;
  min-height: 72px;
  padding: 10px 12px;
  resize: vertical;
}

.form-help-text {
  font-size: 11.5px;
  color: var(--text-muted);
}

/* Form Section Title */
.form-section-title {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
  display: block;
}

/* System Field Cards Grid */
.system-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.system-field-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.system-field-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

/* ==========================================================================
   PERTANYAAN TAMBAHAN (CUSTOM QUESTIONS BUILDER IN TAB 2)
   ========================================================================== */
.edit-questions-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.edit-question-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--transition-smooth);
  animation: fadeIn 0.22s ease;
}

.edit-question-card:hover {
  border-color: var(--color-primary-border);
  background: #ffffff;
  box-shadow: var(--shadow-subtle);
}

.edit-question-top-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.edit-question-num {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  width: 24px;
  flex-shrink: 0;
}

.edit-question-input {
  flex-grow: 1;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: #ffffff;
  font-size: 13px;
  color: var(--text-primary);
}

.edit-question-input:focus {
  border-color: var(--color-primary);
}

.edit-question-type-select {
  width: 150px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: #ffffff;
  font-size: 12.5px;
  color: var(--text-primary);
  cursor: pointer;
}

.edit-question-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 6px;
  border-top: 1px dashed var(--border-subtle);
}

.edit-question-tools {
  display: flex;
  align-items: center;
  gap: 6px;
}

.reorder-arrow-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition-smooth);
}

.reorder-arrow-btn:hover {
  background: var(--bg-surface-subtle);
  color: var(--color-primary);
  border-color: var(--color-primary-border);
}

.trash-delete-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-xs);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--color-alert);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  transition: var(--transition-smooth);
}

.trash-delete-btn:hover {
  background: var(--color-alert-subtle);
  border-color: var(--color-alert-border);
}

.edit-required-toggle-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   INTERACTIVE INLINE VALIDATION & SHAKE MICRO-ANIMATION
   ========================================================================== */
.form-control.input-error,
.custom-datetime-trigger.input-error {
  border-color: var(--color-alert) !important;
  background-color: #fff9f9 !important;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.18) !important;
  animation: inputShake 0.32s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes inputShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-5px); }
  40%, 80% { transform: translateX(5px); }
}

/* Hover Tooltip for Error Fields */
.field-error-hint {
  font-size: 11.5px;
  color: var(--color-alert);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  animation: fadeIn 0.2s ease;
}

/* ==========================================================================
   CUSTOM INTUITIVE DATE & TIME PICKER (DAY & NIGHT AM/PM)
   ========================================================================== */
.datetime-triggers-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.custom-datetime-trigger {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background-color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.custom-datetime-trigger:hover {
  border-color: var(--color-primary-border);
  background-color: var(--bg-surface-subtle);
}

.custom-datetime-trigger.focused {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(25, 117, 249, 0.12);
}

.trigger-icon-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.trigger-sun {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.trigger-moon {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
}

/* Custom Date-Time Popover Dialog */
.datetime-popover-card {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 580px;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
  z-index: 3000;
  display: none;
  animation: popoverSlide 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  overflow: hidden;
}

.datetime-popover-card.right-aligned {
  left: auto;
  right: 0;
}

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

@keyframes popoverMobileSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.datetime-popover-card.active {
  display: block;
}

.datetime-popover-body {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  border-bottom: 1px solid var(--border-subtle);
}

/* Calendar Panel Left */
.picker-calendar-panel {
  padding: 16px 18px;
  border-right: 1px solid var(--border-subtle);
}

.picker-cal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.picker-cal-month-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
}

.picker-cal-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-secondary);
}

.picker-cal-btn:hover {
  background: var(--bg-surface-subtle);
  color: var(--color-primary);
}

.picker-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.picker-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 3px;
}

.picker-day-cell {
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.picker-day-cell:hover {
  background: var(--bg-surface-subtle);
  color: var(--color-primary);
}

.picker-day-cell.selected {
  background: var(--color-primary);
  color: #ffffff;
  font-weight: 500;
}

.picker-day-cell.today-marker {
  border: 1px solid var(--color-primary-border);
}

.picker-day-cell.disabled {
  color: var(--text-light);
  pointer-events: none;
}

/* Time & Day/Night Panel Right */
.picker-time-panel {
  padding: 16px 18px;
  background: var(--bg-surface-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.picker-section-subtitle {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

/* Day (☀️ AM) and Night (🌙 PM) Toggle */
.day-night-toggle-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 14px;
}

.day-night-pill-btn {
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  background: #ffffff;
  border: 1.5px solid var(--border-default);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.day-night-pill-btn:hover {
  border-color: var(--color-primary-border);
}

.day-night-pill-btn.active.am {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #b45309;
}

.day-night-pill-btn.active.pm {
  background: #eef2ff;
  border-color: #6366f1;
  color: #4338ca;
}

/* Hour & Minute Quick Picker */
.time-digits-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.time-digit-select {
  flex: 1;
  height: 34px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: #ffffff;
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  color: var(--text-primary);
  padding: 0 4px;
}

/* Quick Time Preset Buttons */
.time-preset-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.time-preset-btn {
  padding: 5px 8px;
  border-radius: var(--radius-xs);
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-secondary);
  transition: var(--transition-smooth);
}

.time-preset-btn:hover {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  border-color: var(--color-primary-border);
}

/* Popover Footer */
.datetime-popover-footer {
  padding: 10px 18px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.popover-summary-text {
  font-size: 11.5px;
  color: var(--text-muted);
}

.popover-summary-text strong {
  color: var(--text-primary);
}

/* ==========================================================================
   IN-UI TOAST NOTIFICATION CONTAINER & TOAST CARDS
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}

.toast-card {
  pointer-events: auto;
  width: 360px;
  max-width: 90vw;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  animation: toastSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  position: relative;
  overflow: hidden;
}

.toast-card.dismissing {
  animation: toastSlideOut 0.24s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(40px) scale(0.96); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastSlideOut {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to { opacity: 0; transform: translateX(40px) scale(0.96); }
}

.toast-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.toast-card.warning .toast-icon-wrap {
  background: rgba(244, 63, 94, 0.12);
  color: var(--color-alert);
}

.toast-card.success .toast-icon-wrap {
  background: var(--color-secondary-subtle);
  color: var(--color-secondary);
}

.toast-card.info .toast-icon-wrap {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

.toast-content-wrap {
  flex-grow: 1;
}

.toast-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.toast-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.toast-close-btn {
  background: transparent;
  color: var(--text-light);
  font-size: 14px;
  cursor: pointer;
  padding: 2px;
  line-height: 1;
  transition: var(--transition-smooth);
}

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

.toast-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--color-primary);
  width: 100%;
  animation: toastTimer 3.5s linear forwards;
}

.toast-card.warning .toast-progress-bar {
  background: var(--color-alert);
}

.toast-card.success .toast-progress-bar {
  background: var(--color-secondary);
}

@keyframes toastTimer {
  from { width: 100%; }
  to { width: 0%; }
}

/* ==========================================================================
   CENTERED SUCCESS CELEBRATION MODAL & ANIMATED CHECKMARK
   ========================================================================== */
#confettiCanvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9998;
}

.celebration-modal-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.celebration-modal-overlay.active {
  display: flex;
}

.celebration-modal-card {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-xl);
  padding: 36px 32px 32px 32px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
  animation: popCelebrateCard 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

@keyframes popCelebrateCard {
  from { opacity: 0; transform: scale(0.85) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.success-checkmark-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: var(--color-secondary-subtle);
  border: 2px solid var(--color-secondary-border);
  animation: pulseSuccessRing 1.8s ease-out infinite;
}

@keyframes pulseSuccessRing {
  0% { transform: scale(0.9); opacity: 0.9; }
  50% { transform: scale(1.18); opacity: 0.3; }
  100% { transform: scale(1.35); opacity: 0; }
}

.success-circle-badge {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3bc855, #22c55e);
  box-shadow: 0 10px 24px rgba(59, 200, 85, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popCircle 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes popCircle {
  0% { transform: scale(0); }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

.checkmark-svg {
  width: 36px;
  height: 36px;
}

.checkmark-path {
  stroke: #ffffff;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: checkmarkDraw 0.45s 0.25s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

@keyframes checkmarkDraw {
  to { stroke-dashoffset: 0; }
}

.celebration-title {
  font-size: 22px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.celebration-event-name {
  font-size: 15px;
  font-weight: 500;
  color: var(--color-primary);
  background: var(--color-primary-subtle);
  border: 1px solid var(--color-primary-border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  display: inline-block;
  max-width: 90%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.celebration-desc {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
}

.celebration-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
}

/* ==========================================================================
   EVENT DETAIL MODAL & 4 TABS SYSTEM
   ========================================================================== */
.modal-detail-box {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 820px;
  max-height: 92vh;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalPopEnter 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

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

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

.detail-header-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
}

.detail-tab-nav {
  flex-shrink: 0;
  height: 48px;
  min-height: 48px;
  padding: 0 28px;
  background: var(--bg-surface-subtle);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: stretch;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.detail-tab-nav::-webkit-scrollbar {
  display: none;
}

.detail-tab-btn {
  flex-shrink: 0;
  height: 100%;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
  white-space: nowrap;
}

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

.detail-tab-btn.active {
  color: var(--color-primary);
  font-weight: 500;
  border-bottom-color: var(--color-primary);
  background: rgba(25, 117, 249, 0.04);
}

.tab-label-full {
  display: inline;
}

.tab-label-short {
  display: none;
}

.detail-modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  flex-grow: 1;
  flex-shrink: 1;
  min-height: 0;
}

.detail-tab-pane {
  display: none;
  animation: paneSlide 0.2s ease forwards;
}

.detail-tab-pane.active {
  display: block;
}

.link-card-box {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 18px;
}

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

.url-copy-bar {
  display: flex;
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 6px 6px 6px 14px;
  gap: 10px;
}

.url-copy-text {
  font-family: monospace;
  font-size: 12.5px;
  color: var(--text-primary);
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-preview-row {
  display: flex;
  align-items: center;
  gap: 20px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 14px;
}

.qr-code-graphic-box {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-md);
  background: #ffffff;
  border: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.qr-code-inner-img {
  width: 96px;
  height: 96px;
  object-fit: contain;
}

.qr-center-logo-pill {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--color-primary);
  border: 2px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 11px;
  font-weight: 500;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.attendee-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.attendee-stat-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
}

.attendee-stat-val {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.attendee-stat-lbl {
  font-size: 12px;
  color: var(--text-muted);
}

.scanner-banner-box {
  background: linear-gradient(135deg, rgba(25, 117, 249, 0.06), rgba(59, 200, 85, 0.06));
  border: 1px solid var(--color-primary-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 18px;
}

.scanner-badge-pill {
  background: var(--color-primary);
  color: #ffffff;
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

/* Edit Form Footer Actions */
.edit-form-footer-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   ADD-ON TOGGLE & EXPANDABLE FORMS (TERMS & CONDITIONS TEXTAREA)
   ========================================================================== */
.addon-toggle-box {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-smooth);
}

.addon-toggle-box.expanded {
  border-color: var(--color-primary-border);
  background: #ffffff;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: 0;
}

.addon-info-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.addon-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.addon-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}

.addon-expandable-drawer {
  background: #ffffff;
  border: 1px solid var(--border-default);
  border-top: none;
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 12px;
  display: none;
  animation: expandSlideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.addon-expandable-drawer.active {
  display: block;
}

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

.url-prefix-input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: #ffffff;
  overflow: hidden;
}

.url-prefix-badge {
  background: var(--bg-surface-subtle);
  padding: 0 10px;
  height: 38px;
  display: flex;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  border-right: 1px solid var(--border-subtle);
  user-select: none;
}

.url-slug-control {
  border: none !important;
  box-shadow: none !important;
  height: 38px;
  padding: 0 12px;
  font-size: 13px;
  width: 100%;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--border-default);
  transition: .22s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: var(--radius-full);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .22s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
  background-color: var(--color-primary);
}

input:checked + .toggle-slider:before {
  transform: translateX(18px);
}

.custom-fields-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.field-item-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-item-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}

.field-tag-badge {
  font-size: 10px;
  background: #e2e8f0;
  color: var(--text-secondary);
  padding: 2px 6px;
  border-radius: 4px;
}

.quick-templates-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.template-pill-btn {
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.template-pill-btn:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  background: var(--color-primary-subtle);
}

.modal-wizard-footer {
  padding: 16px 28px;
  background: var(--bg-surface-subtle);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.event-format-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.format-card-option {
  background: var(--bg-surface);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.format-card-option:hover {
  border-color: var(--color-primary-border);
  background: var(--bg-surface-subtle);
}

.format-card-option.selected {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
  color: var(--color-primary);
}

.format-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-alt);
  color: var(--text-primary);
  transition: var(--transition-smooth);
}

.format-card-option.selected .format-icon {
  background: var(--color-primary);
  color: #ffffff;
}

.format-name {
  font-size: 12px;
  font-weight: 500;
}

.upload-dropzone {
  border: 1.5px dashed var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface-subtle);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.upload-dropzone:hover {
  border-color: var(--color-primary);
  background: var(--color-primary-subtle);
}

.dropzone-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   RESPONSIVE DESIGN SYSTEM (MULTI-BREAKPOINT 320PX - 1440PX)
   ========================================================================== */

/* --- TABLET LANDSCAPE & MEDIUM DESKTOP (<= 1200px) --- */
@media (max-width: 1200px) {
  .bento-col-8 { grid-column: span 12; }
  .bento-col-4 { grid-column: span 12; }
  .bento-col-3 { grid-column: span 6; }
  .topbar-search { width: 220px; }
}

/* --- TABLET PORTRAIT (<= 1024px) --- */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 220px;
  }
  .main-viewport {
    padding: 28px 24px 60px 24px;
  }
  .bento-col-8 { grid-column: span 12; }
  .bento-col-4 { grid-column: span 12; }
  .bento-col-3 { grid-column: span 6; }
}

/* --- SMARTPHONES & SMALL TABLETS (<= 768px) --- */
@media (max-width: 768px) {
  /* Topbar Adjustments */
  .topbar {
    height: 60px;
    padding: 0 14px;
  }
  .topbar-left {
    gap: 10px;
  }
  .btn-mobile-menu-toggle {
    display: inline-flex;
  }
  .topbar-brand {
    font-size: 16px;
    gap: 8px;
  }
  .brand-logo-mark {
    width: 28px;
    height: 28px;
    border-radius: 8px;
  }
  .topbar-brand span.pill-badge {
    font-size: 10px;
    padding: 2px 7px;
  }
  .topbar-search {
    display: none;
  }
  .topbar-right {
    gap: 8px;
  }
  .btn-trigger-create-wizard {
    padding: 6px 12px;
    font-size: 12.5px;
    gap: 5px;
  }
  .user-profile-pill {
    padding: 3px 8px 3px 3px;
    gap: 6px;
  }
  .user-avatar-img {
    width: 26px;
    height: 26px;
  }
  .user-name-label {
    font-size: 12px;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .user-profile-pill svg {
    display: none;
  }

  /* Mobile Slide-in Sidebar Drawer */
  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(290px, 86vw);
    height: 100vh;
    background-color: var(--bg-surface);
    z-index: 1200;
    transform: translateX(-100%);
    box-shadow: none;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
  }
  .sidebar-mobile-header {
    display: flex;
  }

  /* Main Viewport */
  .main-viewport {
    margin-left: 0;
    margin-top: 60px;
    padding: 18px 14px 70px 14px;
    min-height: calc(100vh - 60px);
  }

  /* Page Intro Header */
  .page-intro-header {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 20px;
  }
  .page-title {
    font-size: 22px;
  }
  .page-desc {
    font-size: 13.5px;
  }
  .page-intro-header > div:last-child {
    display: flex;
    gap: 8px;
    width: 100%;
  }
  .page-intro-header .btn {
    flex: 1;
    font-size: 12.5px;
    padding: 8px 12px;
  }

  /* Bento Grid & Cards */
  .bento-dashboard-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .bento-tile {
    grid-column: span 1 !important;
    padding: 18px 16px;
    border-radius: var(--radius-md);
  }
  .bento-hero-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
  }
  .bento-hero-title {
    font-size: 18px;
    line-height: 1.35;
  }
  .bento-hero-meta {
    font-size: 12.5px;
  }
  .live-progress-labels {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    font-size: 12px;
  }
  #btnOpenHeroScanner {
    width: 100%;
    margin-top: 6px;
  }
  .event-mini-status-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .event-mini-status-card {
    padding: 10px 12px;
  }
  .bento-metric-value {
    font-size: 24px;
  }

  /* Table Controls & Search */
  .table-controls-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 12px;
  }
  .filter-pills-group {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    gap: 6px;
  }
  .filter-pills-group::-webkit-scrollbar {
    display: none;
  }
  .filter-pill-btn {
    padding: 5px 12px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  .table-search-box {
    width: 100% !important;
  }
  .table-actions-right {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .view-switch-toggle-group {
    width: 100%;
    display: flex;
  }
  .btn-view-toggle {
    flex: 1;
    justify-content: center;
    padding: 6px 12px;
  }
  .bento-event-cards-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 14px 12px;
  }

  /* Module 2: Analytics */
  .bento-bars-grid {
    overflow-x: auto;
    padding-bottom: 10px;
    justify-content: flex-start;
    gap: 14px;
    -webkit-overflow-scrolling: touch;
  }
  .bento-bar-item {
    min-width: 52px;
    flex-shrink: 0;
  }
  .gate-speed-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Module 3: Calendar Mobile Fix */
  .calendar-card {
    padding: 16px 14px;
    overflow: hidden;
    max-width: 100%;
  }
  .calendar-top-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .calendar-nav-btn-group {
    display: flex;
    gap: 8px;
    width: 100%;
  }
  .calendar-nav-btn-group .btn {
    flex: 1;
    font-size: 12px;
    padding: 7px 10px;
    text-align: center;
  }
  .calendar-mobile-hint {
    display: flex;
  }
  .calendar-grid-wrap {
    margin-bottom: 8px;
  }
  .calendar-grid {
    min-width: 580px;
  }
  .cal-day-box {
    min-height: 70px;
    padding: 6px;
  }
  .cal-day-number {
    font-size: 11px;
  }
  .cal-event-tag {
    font-size: 10px;
    padding: 3px 6px;
    max-width: 100%;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
  }
  .cal-header-day {
    font-size: 11px;
    padding: 6px 2px;
    text-align: center;
  }
  .calendar-agenda-card {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 12px;
  }
  .calendar-agenda-card > button {
    width: 100%;
  }

  /* Modals Common Box */
  .modal-wizard-box, .modal-detail-box {
    width: 95vw;
    max-width: 95vw;
    max-height: 94vh;
    border-radius: var(--radius-md);
  }

  /* Stepper Bar */
  .modal-stepper-bar {
    padding: 10px 14px;
  }
  .stepper-track {
    justify-content: space-between;
  }
  .step-circle {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  .step-line {
    height: 2px;
  }
  .step-label-text {
    display: none;
  }

  /* Wizard Body & Forms */
  .modal-wizard-header, .modal-wizard-body, .modal-wizard-footer,
  .detail-modal-header, .detail-modal-body {
    padding-left: 14px;
    padding-right: 14px;
  }
  .modal-wizard-body div[style*="grid-template-columns"],
  .detail-modal-body div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .event-format-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .system-fields-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .modal-wizard-footer {
    padding: 12px 14px;
    gap: 8px;
  }
  .modal-wizard-footer .btn {
    font-size: 12.5px;
    padding: 8px 14px;
  }
  #mBtnNextStep, #mBtnPublishEvent {
    flex-grow: 1;
  }

  .datetime-triggers-row {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Date & Time Popovers Mobile Inline Expandable Card Overhaul */
  .datetime-popover-card {
    position: relative !important;
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 10px !important;
    margin-bottom: 6px !important;
    max-height: none !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    z-index: 10 !important;
    border: 1px solid var(--border-default) !important;
    animation: fadeIn 0.2s ease forwards !important;
    display: none;
    flex-direction: column !important;
    background: #ffffff !important;
    overflow: visible !important;
  }
  .datetime-popover-card.active {
    display: flex !important;
  }
  .datetime-popover-body {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    padding: 16px 14px !important;
    background: #ffffff !important;
    overflow: visible !important;
    max-height: none !important;
    border-bottom: 1px solid var(--border-subtle) !important;
  }
  .picker-calendar-panel {
    padding: 0 !important;
    border-right: none !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    padding-bottom: 14px !important;
  }
  .picker-cal-nav {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 12px !important;
    padding: 0 4px !important;
  }
  .picker-cal-month-title {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--text-primary) !important;
  }
  .picker-weekdays-row {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    font-size: 11px !important;
    font-weight: 500 !important;
    color: var(--text-muted) !important;
    margin-bottom: 8px !important;
    text-align: center !important;
  }
  .picker-days-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 3px !important;
  }
  .picker-day-cell {
    height: 32px !important;
    font-size: 12.5px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .picker-time-panel {
    padding: 0 !important;
    background: transparent !important;
    gap: 10px !important;
  }
  .day-night-toggle-group {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }
  .day-night-pill-btn {
    padding: 8px 10px !important;
    font-size: 12px !important;
    justify-content: center !important;
  }
  .time-digits-picker {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 12px !important;
  }
  .time-digit-select {
    height: 38px !important;
    font-size: 14px !important;
  }
  .time-preset-list {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  .time-preset-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 6px 4px !important;
    gap: 2px !important;
    border-radius: var(--radius-xs) !important;
  }
  .time-preset-btn span:first-child {
    font-size: 10px !important;
    color: var(--text-muted) !important;
  }
  .time-preset-btn span:last-child {
    font-size: 11.5px !important;
    font-weight: 500 !important;
  }
  .datetime-popover-footer {
    position: static !important;
    background: #ffffff !important;
    padding: 12px 14px !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
  }
  .popover-summary-text {
    font-size: 11.5px !important;
    line-height: 1.3 !important;
  }
  .datetime-popover-footer .btn {
    width: auto !important;
    padding: 8px 14px !important;
    font-size: 12.5px !important;
    flex-shrink: 0 !important;
  }

  /* Event Detail Modal Tabs & Panes Mobile UX Overhaul */
  .tab-label-full {
    display: none !important;
  }
  .tab-label-short {
    display: inline !important;
    font-size: 11px;
    font-weight: 500;
  }
  .detail-modal-header {
    padding: 14px 16px;
    gap: 10px;
  }
  .detail-header-info {
    gap: 10px;
    min-width: 0;
  }
  .detail-header-title {
    font-size: 15px;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
  }
  .detail-tab-nav {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    height: auto !important;
    min-height: auto !important;
    padding: 6px 8px !important;
    background: var(--bg-surface-subtle) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    gap: 4px !important;
    overflow: visible !important;
  }
  .detail-tab-btn {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 7px 2px !important;
    height: auto !important;
    gap: 4px !important;
    border-radius: var(--radius-sm) !important;
    border-bottom: none !important;
    background: transparent !important;
    color: var(--text-secondary) !important;
    text-align: center !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    transition: var(--transition-smooth) !important;
  }
  .detail-tab-btn svg {
    width: 16px;
    height: 16px;
  }
  .detail-tab-btn.active {
    background: #ffffff !important;
    color: var(--color-primary) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08) !important;
    font-weight: 500 !important;
  }
  .link-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .link-header-badge {
    align-self: flex-start;
  }
  .url-copy-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 8px 10px;
  }
  .url-copy-text {
    font-size: 11.5px;
    width: 100%;
  }
  .url-copy-bar .btn {
    width: 100%;
  }
  .qr-preview-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
  }
  .qr-preview-row > div:last-child > div:last-child {
    justify-content: center;
  }
  .attendee-stats-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .edit-question-top-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .edit-question-type-select {
    width: 100%;
  }
  .edit-form-footer-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .edit-form-footer-actions .btn {
    width: 100%;
  }

  /* Toasts & Celebration */
  .toast-container {
    right: 12px;
    left: 12px;
    bottom: 12px;
    width: auto;
    max-width: 420px;
    margin: 0 auto;
  }
  .celebration-modal-card {
    max-width: 92vw;
    padding: 24px 16px;
  }
  .celebration-title {
    font-size: 19px;
  }
}

/* --- SMALL MOBILE PHONES (<= 480px) --- */
@media (max-width: 480px) {
  .topbar {
    padding: 0 10px;
  }
  .topbar-brand span.pill-badge {
    display: none;
  }
  .btn-trigger-create-wizard {
    padding: 6px 9px;
    font-size: 11.5px;
  }
  .btn-trigger-create-wizard span {
    font-size: 11.5px;
  }
  .user-name-label {
    display: none;
  }
  .user-profile-pill {
    padding: 2px;
    border-radius: 50%;
    border: none;
    background: transparent;
  }
  .user-avatar-img {
    width: 30px;
    height: 30px;
  }
  .event-mini-status-grid {
    grid-template-columns: 1fr;
  }
  .event-dist-header-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .bento-card-footer-action {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .time-preset-list {
    grid-template-columns: 1fr;
  }
  .quick-templates-wrap {
    flex-direction: column;
    align-items: stretch;
  }
  .template-pill-btn {
    text-align: center;
    width: 100%;
  }
  .cal-event-tag {
    font-size: 8.5px;
    padding: 1px 2px;
  }
}

/* --- ULTRA COMPACT MOBILE (<= 360px) --- */
@media (max-width: 360px) {
  .topbar-brand span:not(.brand-logo-mark) {
    display: none;
  }
  .modal-wizard-footer .btn {
    font-size: 11.5px;
    padding: 7px 10px;
  }
  .detail-tab-btn span {
    font-size: 11px;
  }
}
