/* ============================================================
   1Gesture Design System
   CSS Custom Properties, Typography, Components, Layout,
   Responsive, Animations
   ============================================================ */

/* ----------------------------------------------------------
   1. Design Tokens (CSS Custom Properties)
   ---------------------------------------------------------- */
:root {
  /* Brand Colors */
  --primary: #22C55E;
  --primary-light: #86EFAC;
  --primary-dark: #16A34A;

  /* Secondary & Accents */
  --secondary: #1E293B;
  --accent-warm: #F59E0B;
  --accent-blue: #3B82F6;
  --accent-purple: #8B5CF6;
  --accent-earth: #65A30D;

  /* Surfaces */
  --surface: #FFFFFF;
  --surface-muted: #F8FAFC;
  --surface-elevated: #FFFFFF;

  /* Borders & Text */
  --border: #E2E8F0;
  --text-primary: #0F172A;
  --text-secondary: #64748B;
  --text-muted: #94A3B8;

  /* Status */
  --success: #22C55E;
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #3B82F6;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);

  /* Transitions */
  --transition: 200ms ease;
  --transition-slow: 400ms ease;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Layout */
  --sidebar-width: 260px;
  --header-height: 64px;
  --bottom-nav-height: 64px;
  --container-max: 1200px;
}


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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--surface-muted);
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: color var(--transition);
}

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

a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

ul,
ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}


/* ----------------------------------------------------------
   3. Typography
   ---------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-primary);
}

h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
}

h2 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

h4 {
  font-size: 1.1rem;
  font-weight: 600;
}

h5 {
  font-size: 1rem;
  font-weight: 600;
}

h6 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

p {
  margin-bottom: var(--space-4);
}

.text-sm {
  font-size: 0.875rem;
}

.text-xs {
  font-size: 0.75rem;
}

.text-lg {
  font-size: 1.125rem;
}

.text-xl {
  font-size: 1.25rem;
}

.text-2xl {
  font-size: 1.5rem;
}

.text-3xl {
  font-size: 2rem;
}

.text-muted {
  color: var(--text-secondary);
}

.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-left {
  text-align: left;
}

.font-heading {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

.font-extrabold {
  font-weight: 800;
}


/* ----------------------------------------------------------
   4. Layout
   ---------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
  width: 100%;
}

.app-layout {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.app-main {
  margin-left: var(--sidebar-width);
  flex: 1;
  min-height: 100vh;
  padding: var(--space-8);
  width: calc(100% - var(--sidebar-width));
}

#app-root {
  animation: fadeIn 200ms ease;
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-center {
  align-items: center;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.justify-end {
  justify-content: flex-end;
}

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

.flex-1 {
  flex: 1;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}


/* ----------------------------------------------------------
   5. Buttons
   ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 20px;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--radius-md);
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: var(--shadow-md);
}

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

.btn-secondary {
  background: var(--secondary);
  color: #FFFFFF;
  border-color: var(--secondary);
}

.btn-secondary:hover {
  background: #334155;
  border-color: #334155;
  box-shadow: var(--shadow-md);
}

.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-ghost:hover {
  background: var(--surface-muted);
  border-color: #CBD5E1;
}

.btn-danger {
  background: var(--error);
  color: #FFFFFF;
  border-color: var(--error);
}

.btn-danger:hover {
  background: #DC2626;
  border-color: #DC2626;
  box-shadow: var(--shadow-md);
}

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

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

.btn-sm {
  padding: 6px 14px;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.0625rem;
  border-radius: var(--radius-lg);
}

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

.btn-full {
  width: 100%;
}

.btn .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}


/* ----------------------------------------------------------
   6. Cards
   ---------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition);
}

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

.card-flat {
  box-shadow: none;
}

.card-flat:hover {
  box-shadow: none;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.card-body {
  padding: 0;
}

.card-footer {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}


/* ----------------------------------------------------------
   7. Forms & Inputs
   ---------------------------------------------------------- */
.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover {
  border-color: #CBD5E1;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
  outline: none;
}

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

.form-input.is-error,
.form-select.is-error,
.form-textarea.is-error {
  border-color: var(--error);
}

.form-input.is-error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-error {
  font-size: 0.8125rem;
  color: var(--error);
  margin-top: var(--space-1);
}

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2364748B' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6l3.5 4 3.5-4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.form-row {
  display: flex;
  gap: var(--space-4);
}

.form-row .form-group {
  flex: 1;
}


/* ----------------------------------------------------------
   8. Tables
   ---------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

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

.table th {
  text-align: left;
  padding: 12px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

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

.table tbody tr:hover {
  background: var(--surface-muted);
}

.table-empty {
  padding: var(--space-10);
  text-align: center;
  color: var(--text-secondary);
}


/* ----------------------------------------------------------
   9. Badges
   ---------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  line-height: 1.4;
  white-space: nowrap;
}

.badge-success {
  background: #DCFCE7;
  color: #166534;
}

.badge-warning {
  background: #FEF3C7;
  color: #92400E;
}

.badge-error {
  background: #FEE2E2;
  color: #991B1B;
}

.badge-info {
  background: #DBEAFE;
  color: #1E40AF;
}

.badge-neutral {
  background: #F1F5F9;
  color: #475569;
}

.badge-purple {
  background: #EDE9FE;
  color: #5B21B6;
}

.badge-coming-soon {
  background: #F1F5F9;
  color: var(--text-secondary);
  font-size: 0.6875rem;
}


/* ----------------------------------------------------------
   10. Navigation - Sidebar (Desktop)
   ---------------------------------------------------------- */
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.sidebar-logo-text span {
  color: var(--primary);
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-4) var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.sidebar-nav-section {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: var(--space-4) var(--space-3) var(--space-2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-3);
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
  position: relative;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

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

.nav-item.active {
  background: #F0FDF4;
  color: var(--primary-dark);
  font-weight: 600;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--primary);
  border-radius: var(--radius-full);
}

.nav-item-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.1rem;
}

.nav-item-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-user {
  padding: var(--space-4) var(--space-4);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.sidebar-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--primary-dark);
  flex-shrink: 0;
  overflow: hidden;
}

.sidebar-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-email {
  font-size: 0.75rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-logout {
  padding: 6px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  background: none;
}

.sidebar-logout:hover {
  background: #FEE2E2;
  color: var(--error);
}


/* ----------------------------------------------------------
   11. Navigation - Bottom Tab Bar (Mobile)
   ---------------------------------------------------------- */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-height);
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 100;
  padding: 0 var(--space-2);
}

.bottom-nav-items {
  display: flex;
  align-items: center;
  justify-content: space-around;
  height: 100%;
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: var(--space-1) var(--space-2);
  font-size: 0.625rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
  border: none;
  background: none;
  cursor: pointer;
  min-width: 56px;
}

.bottom-nav-item:hover {
  color: var(--primary-dark);
}

.bottom-nav-item.active {
  color: var(--primary-dark);
  font-weight: 600;
}

.bottom-nav-item-icon {
  font-size: 1.25rem;
  line-height: 1;
}

.bottom-nav-item-icon svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}


/* ----------------------------------------------------------
   12. Impact Card
   ---------------------------------------------------------- */
.impact-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

.impact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
}

.impact-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.impact-card-accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.impact-card-icon {
  font-size: 1.75rem;
  margin-bottom: var(--space-3);
  line-height: 1;
}

.impact-card-count {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: var(--space-1);
  letter-spacing: -0.02em;
}

.impact-card-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}


/* ----------------------------------------------------------
   13. Event Card
   ---------------------------------------------------------- */
.event-cards {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.event-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  display: flex;
  align-items: center;
  gap: var(--space-4);
  cursor: pointer;
  transition: all var(--transition);
}

.event-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.event-card-time {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 60px;
  flex-shrink: 0;
}

.event-card-info {
  flex: 1;
  min-width: 0;
}

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

.event-card-meta {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.event-card-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}


/* ----------------------------------------------------------
   14. Gesture Toggle
   ---------------------------------------------------------- */
.gesture-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.gesture-toggle-track {
  width: 44px;
  height: 24px;
  background: #CBD5E1;
  border-radius: var(--radius-full);
  position: relative;
  transition: background var(--transition);
}

.gesture-toggle-track.active {
  background: var(--primary);
}

.gesture-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition);
}

.gesture-toggle-track.active .gesture-toggle-thumb {
  transform: translateX(20px);
}

.gesture-toggle.loading .gesture-toggle-track {
  opacity: 0.6;
}

.gesture-toggle.loading .gesture-toggle-thumb {
  animation: pulse 1s ease-in-out infinite;
}

.gesture-toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}


/* ----------------------------------------------------------
   15. Budget Bar
   ---------------------------------------------------------- */
.budget-bar-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

.budget-bar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-3);
}

.budget-bar-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.budget-bar-amount {
  font-size: 0.875rem;
  font-weight: 600;
}

.budget-bar-track {
  height: 10px;
  background: var(--surface-muted);
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 1px solid var(--border);
}

.budget-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 800ms ease-out;
  min-width: 0;
}

.budget-bar-fill.green {
  background: var(--primary);
}

.budget-bar-fill.amber {
  background: var(--accent-warm);
}

.budget-bar-fill.red {
  background: var(--error);
  animation: pulse 2s ease-in-out infinite;
}

.budget-bar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-2);
  font-size: 0.75rem;
  color: var(--text-secondary);
}


/* ----------------------------------------------------------
   16. Toast Notifications
   ---------------------------------------------------------- */
.toast-container {
  position: fixed;
  top: var(--space-5);
  right: var(--space-5);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.9375rem;
  font-weight: 500;
  max-width: 380px;
  pointer-events: auto;
  animation: slideIn 300ms ease;
}

.toast-success {
  border-left: 4px solid var(--success);
}

.toast-error {
  border-left: 4px solid var(--error);
}

.toast-info {
  border-left: 4px solid var(--info);
}

.toast-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
}

.toast-message {
  flex: 1;
  min-width: 0;
}

.toast-close {
  padding: 4px;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  font-size: 1rem;
  line-height: 1;
  transition: color var(--transition);
}

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

.toast-exit {
  animation: slideOut 200ms ease forwards;
}


/* ----------------------------------------------------------
   17. Modal
   ---------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9000;
  padding: var(--space-5);
  animation: fadeIn 200ms ease;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-width: 480px;
  width: 100%;
  animation: slideUp 300ms ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6);
  padding-bottom: 0;
}

.modal-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  border: none;
  background: none;
  font-size: 1.25rem;
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--surface-muted);
  color: var(--text-primary);
}

.modal-body {
  padding: var(--space-6);
  color: var(--text-secondary);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: 0 var(--space-6) var(--space-6);
}


/* ----------------------------------------------------------
   18. Login View
   ---------------------------------------------------------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 50%, #F8FAFC 100%);
  padding: var(--space-6);
}

.login-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-10);
  max-width: 440px;
  width: 100%;
  text-align: center;
  animation: slideUp 400ms ease;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.login-logo-icon {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 1.5rem;
}

.login-logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.login-logo-text span {
  color: var(--primary);
}

.login-headline {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  letter-spacing: -0.02em;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: var(--space-8);
}

.login-btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.login-btn-google:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  background: #F0FDF4;
}

.login-btn-google svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.login-btn-microsoft {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  background: var(--surface-muted);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.65;
  margin-top: var(--space-3);
  position: relative;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin: var(--space-6) 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

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

.login-footer {
  margin-top: var(--space-8);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.login-footer a {
  color: var(--primary-dark);
  font-weight: 500;
}

.login-proof {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.login-proof strong {
  color: var(--primary-dark);
  font-weight: 700;
}


/* ----------------------------------------------------------
   19. Onboarding View
   ---------------------------------------------------------- */
.onboarding-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 50%, #F8FAFC 100%);
  padding: var(--space-6);
}

.onboarding-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-8);
  max-width: 600px;
  width: 100%;
  animation: slideUp 400ms ease;
}

.onboarding-progress {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}

.onboarding-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  transition: all var(--transition);
}

.onboarding-step-dot.active {
  background: var(--primary);
  width: 12px;
  height: 12px;
}

.onboarding-step-dot.completed {
  background: var(--primary-dark);
}

.onboarding-step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: background var(--transition);
}

.onboarding-step-line.completed {
  background: var(--primary);
}

.onboarding-step-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.onboarding-step-desc {
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.onboarding-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}

/* File drop zone */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--surface-muted);
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--primary);
  background: #F0FDF4;
}

.drop-zone-icon {
  font-size: 2rem;
  margin-bottom: var(--space-3);
  color: var(--text-muted);
}

.drop-zone-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.drop-zone-text strong {
  color: var(--primary-dark);
}

.drop-zone-preview {
  max-width: 120px;
  max-height: 120px;
  margin: var(--space-4) auto 0;
  border-radius: var(--radius-md);
  object-fit: contain;
}

/* Color picker */
.color-picker-wrap {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.color-picker-input {
  width: 48px;
  height: 48px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  padding: 2px;
}

.color-picker-preview {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.color-picker-hex {
  font-family: monospace;
  font-size: 0.875rem;
  color: var(--text-secondary);
}


/* ----------------------------------------------------------
   20. Dashboard View
   ---------------------------------------------------------- */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-8);
}

.dashboard-greeting {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.dashboard-date {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: var(--space-1);
}

.dashboard-section {
  margin-bottom: var(--space-8);
}

.dashboard-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
}

.dashboard-section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
}

.day-group {
  margin-bottom: var(--space-6);
}

.day-group-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
  padding-left: var(--space-1);
}


/* ----------------------------------------------------------
   21. Event Detail View
   ---------------------------------------------------------- */
.event-detail-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.event-detail-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-3);
}

.event-detail-meta {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.event-detail-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.event-detail-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}

.timeline-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  padding: var(--space-3) 0;
  position: relative;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
  margin-top: 6px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.timeline-dot.sent {
  background: var(--primary);
}

.timeline-dot.pending {
  background: var(--accent-warm);
}

.timeline-dot.scheduled {
  background: var(--border);
}

.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 20px;
  bottom: -4px;
  width: 2px;
  background: var(--border);
}

.timeline-content {
  flex: 1;
}

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

.timeline-time {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}


/* ----------------------------------------------------------
   22. Attendees View
   ---------------------------------------------------------- */
.search-bar {
  position: relative;
  margin-bottom: var(--space-6);
}

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

.search-bar-input {
  width: 100%;
  padding: 10px 14px 10px 40px;
  font-size: 0.9375rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-bar-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
  outline: none;
}

.attendee-stats {
  display: flex;
  gap: var(--space-2);
}

.attendee-stat {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}


/* ----------------------------------------------------------
   23. Analytics View
   ---------------------------------------------------------- */
.period-selector {
  display: inline-flex;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}

.period-btn {
  padding: 6px 16px;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  border: none;
  background: none;
  cursor: pointer;
  transition: all var(--transition);
}

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

.period-btn.active {
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

.funnel-bar-wrap {
  margin-bottom: var(--space-4);
}

.funnel-bar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-2);
  font-size: 0.875rem;
}

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

.funnel-bar-value {
  font-weight: 600;
  color: var(--text-secondary);
}

.funnel-bar-track {
  height: 28px;
  background: var(--surface-muted);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.funnel-bar-fill {
  height: 100%;
  border-radius: var(--radius-sm);
  transition: width 800ms ease-out;
  display: flex;
  align-items: center;
  padding-left: var(--space-3);
  font-size: 0.75rem;
  font-weight: 600;
  color: #FFFFFF;
}

.chart-canvas-wrap {
  position: relative;
  width: 100%;
  height: 260px;
}

.chart-canvas-wrap canvas {
  width: 100%;
  height: 100%;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
}

.category-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.category-icon {
  font-size: 1.5rem;
}

.category-info {
  flex: 1;
}

.category-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
}

.category-count {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}


/* ----------------------------------------------------------
   24. Settings View
   ---------------------------------------------------------- */
.settings-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-6);
  overflow-x: auto;
  gap: 0;
}

.settings-tab {
  padding: var(--space-3) var(--space-5);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: none;
  background: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

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

.settings-tab.active {
  color: var(--primary-dark);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.settings-section {
  max-width: 640px;
}

.settings-section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.settings-section-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: var(--space-6);
}

.danger-zone {
  border: 2px solid var(--error);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.danger-zone-title {
  color: var(--error);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.danger-zone-desc {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-bottom: var(--space-5);
}

.plan-card {
  background: linear-gradient(135deg, #F0FDF4, #ECFDF5);
  border: 1px solid var(--primary-light);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-6);
}

.plan-card-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: var(--space-2);
}

.plan-card-price {
  font-size: 2rem;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-primary);
}

.plan-card-price span {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.plan-card-features {
  margin-top: var(--space-4);
}

.plan-card-feature {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.875rem;
  padding: var(--space-1) 0;
  color: var(--text-secondary);
}

.plan-card-feature::before {
  content: '';
  width: 16px;
  height: 16px;
  background: var(--primary);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E");
  flex-shrink: 0;
}


/* ----------------------------------------------------------
   25. Cookie Consent
   ---------------------------------------------------------- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--space-4) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  z-index: 9999;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
  animation: slideUpBanner 400ms ease;
}

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex: 1;
}

.cookie-banner-text a {
  color: var(--primary-dark);
  font-weight: 500;
}

.cookie-banner-actions {
  display: flex;
  gap: var(--space-3);
  flex-shrink: 0;
}


/* ----------------------------------------------------------
   26. Loading States
   ---------------------------------------------------------- */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-10);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-muted) 25%, #E2E8F0 50%, var(--surface-muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

.skeleton-line {
  height: 14px;
  margin-bottom: var(--space-2);
}

.skeleton-title {
  height: 24px;
  width: 60%;
  margin-bottom: var(--space-3);
}

.skeleton-card {
  height: 80px;
  margin-bottom: var(--space-3);
}

.page-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  gap: var(--space-4);
  color: var(--text-secondary);
}


/* ----------------------------------------------------------
   27. Empty States
   ---------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  opacity: 0.5;
}

.empty-state-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.empty-state-desc {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: var(--space-6);
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}


/* ----------------------------------------------------------
   28. Utility Classes
   ---------------------------------------------------------- */
.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.truncate {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.w-full { width: 100%; }
.h-full { height: 100%; }

/* Margin top */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mt-12 { margin-top: var(--space-12); }

/* Margin bottom */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-10 { margin-bottom: var(--space-10); }

/* Padding */
.p-0 { padding: 0; }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-5 { padding: var(--space-5); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.px-6 { padding-left: var(--space-6); padding-right: var(--space-6); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.py-6 { padding-top: var(--space-6); padding-bottom: var(--space-6); }

.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

.relative { position: relative; }
.absolute { position: absolute; }

.cursor-pointer { cursor: pointer; }
.select-none { user-select: none; }


/* ----------------------------------------------------------
   29. Animations
   ---------------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

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

@keyframes slideUpBanner {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

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

@keyframes confetti {
  0% { transform: translateY(0) rotate(0deg); opacity: 1; }
  100% { transform: translateY(-200px) rotate(720deg); opacity: 0; }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

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

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ----------------------------------------------------------
   30. Responsive: Tablet (768px)
   ---------------------------------------------------------- */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 0px;
  }

  .app-sidebar {
    display: none;
  }

  .bottom-nav {
    display: block;
  }

  .app-main {
    margin-left: 0;
    width: 100%;
    padding: var(--space-5) var(--space-4);
    padding-bottom: calc(var(--bottom-nav-height) + var(--space-5));
  }

  .impact-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-row {
    flex-direction: column;
  }

  .event-card {
    flex-wrap: wrap;
  }

  .event-detail-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-2);
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .settings-tabs {
    gap: 0;
  }

  .cookie-banner {
    flex-direction: column;
    text-align: center;
    padding-bottom: calc(var(--space-4) + var(--bottom-nav-height));
  }

  h1 { font-size: 1.625rem; }
  h2 { font-size: 1.25rem; }
}


/* ----------------------------------------------------------
   31. Responsive: Mobile (480px)
   ---------------------------------------------------------- */
@media (max-width: 480px) {
  .app-main {
    padding: var(--space-4) var(--space-3);
    padding-bottom: calc(var(--bottom-nav-height) + var(--space-4));
  }

  .impact-cards {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
  }

  .impact-card {
    padding: var(--space-4);
  }

  .impact-card-count {
    font-size: 1.5rem;
  }

  .impact-card-icon {
    font-size: 1.5rem;
  }

  .grid-4,
  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .login-card {
    padding: var(--space-6);
  }

  .onboarding-card {
    padding: var(--space-5);
  }

  .modal {
    margin: var(--space-3);
    max-height: calc(100vh - var(--space-6));
  }

  .card {
    padding: var(--space-4);
  }

  .toast {
    max-width: calc(100vw - 40px);
    right: var(--space-3);
  }

  h1 { font-size: 1.375rem; }
  h2 { font-size: 1.125rem; }
  h3 { font-size: 1.0625rem; }

  .container {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .table th,
  .table td {
    padding: 8px 12px;
    font-size: 0.8125rem;
  }
}


/* ----------------------------------------------------------
   32. Print
   ---------------------------------------------------------- */
@media print {
  .app-sidebar,
  .bottom-nav,
  .toast-container,
  .cookie-banner {
    display: none !important;
  }

  .app-main {
    margin-left: 0;
    padding: 0;
  }
}
