:root {
  /* Primitive Color Tokens */
  --color-white: rgba(255, 255, 255, 1);
  --color-black: rgba(0, 0, 0, 1);
  --color-cream-50: rgba(252, 252, 249, 1);
  --color-cream-100: rgba(255, 255, 253, 1);
  --color-gray-200: rgba(245, 245, 245, 1);
  --color-gray-300: rgba(167, 169, 169, 1);
  --color-gray-400: rgba(119, 124, 124, 1);
  --color-slate-500: rgba(98, 108, 113, 1);
  --color-brown-600: rgba(94, 82, 64, 1);
  --color-charcoal-700: rgba(31, 33, 33, 1);
  --color-charcoal-800: rgba(38, 40, 40, 1);
  --color-slate-900: rgba(19, 52, 59, 1);
  --color-teal-300: rgba(50, 184, 198, 1);
  --color-teal-400: rgba(45, 166, 178, 1);
  --color-teal-500: rgba(33, 128, 141, 1);
  --color-teal-600: rgba(29, 116, 128, 1);
  --color-teal-700: rgba(26, 104, 115, 1);
  --color-teal-800: rgba(41, 150, 161, 1);
  --color-red-400: rgba(255, 84, 89, 1);
  --color-red-500: rgba(192, 21, 47, 1);
  --color-orange-400: rgba(230, 129, 97, 1);
  --color-orange-500: rgba(168, 75, 47, 1);

  /* RGB versions for opacity control */
  --color-brown-600-rgb: 94, 82, 64;
  --color-teal-500-rgb: 33, 128, 141;
  --color-slate-900-rgb: 19, 52, 59;
  --color-slate-500-rgb: 98, 108, 113;
  --color-red-500-rgb: 192, 21, 47;
  --color-red-400-rgb: 255, 84, 89;
  --color-orange-500-rgb: 168, 75, 47;
  --color-orange-400-rgb: 230, 129, 97;

  /* Background color tokens (Light Mode) */
  --color-bg-1: rgba(59, 130, 246, 0.08);
  /* Light blue */
  --color-bg-2: rgba(245, 158, 11, 0.08);
  /* Light yellow */
  --color-bg-3: rgba(34, 197, 94, 0.08);
  /* Light green */
  --color-bg-4: rgba(239, 68, 68, 0.08);
  /* Light red */
  --color-bg-5: rgba(147, 51, 234, 0.08);
  /* Light purple */
  --color-bg-6: rgba(249, 115, 22, 0.08);
  /* Light orange */
  --color-bg-7: rgba(236, 72, 153, 0.08);
  /* Light pink */
  --color-bg-8: rgba(6, 182, 212, 0.08);
  /* Light cyan */

  /* Semantic Color Tokens (Light Mode) */
  --color-background: var(--color-cream-50);
  --color-surface: var(--color-cream-100);
  --color-text: var(--color-slate-900);
  --color-text-secondary: var(--color-slate-500);
  --color-primary: var(--color-teal-500);
  --color-primary-hover: var(--color-teal-600);
  --color-primary-active: var(--color-teal-700);
  --color-secondary: rgba(var(--color-brown-600-rgb), 0.12);
  --color-secondary-hover: rgba(var(--color-brown-600-rgb), 0.2);
  --color-secondary-active: rgba(var(--color-brown-600-rgb), 0.25);
  --color-border: rgba(var(--color-brown-600-rgb), 0.2);
  --color-btn-primary-text: var(--color-cream-50);
  --color-card-border: rgba(var(--color-brown-600-rgb), 0.12);
  --color-card-border-inner: rgba(var(--color-brown-600-rgb), 0.12);
  --color-error: var(--color-red-500);
  --color-success: var(--color-teal-500);
  --color-warning: var(--color-orange-500);
  --color-info: var(--color-slate-500);
  --color-focus-ring: rgba(var(--color-teal-500-rgb), 0.4);
  --color-select-caret: rgba(var(--color-slate-900-rgb), 0.8);

  /* RGB versions for opacity control */
  --color-success-rgb: 33, 128, 141;
  --color-error-rgb: 192, 21, 47;
  --color-warning-rgb: 168, 75, 47;
  --color-info-rgb: 98, 108, 113;

  /* Typography */
  --font-family-base: "FKGroteskNeue", "Geist", "Inter", -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-family-mono: "Berkeley Mono", ui-monospace, SFMono-Regular, Menlo,
    Monaco, Consolas, monospace;
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-md: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 20px;
  --font-size-3xl: 24px;
  --font-size-4xl: 30px;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 550;
  --font-weight-bold: 600;
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --letter-spacing-tight: -0.01em;

  /* Spacing */
  --space-0: 0;
  --space-1: 1px;
  --space-2: 2px;
  --space-4: 4px;
  --space-6: 6px;
  --space-8: 8px;
  --space-10: 10px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-base: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04),
    0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04),
    0 4px 6px -2px rgba(0, 0, 0, 0.02);
  --shadow-inset-sm: inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.03);

  /* Animation */
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --ease-standard: cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;

  /* Override design system colors with qrtix brand colors */
  --qrtix-primary: #FF6B6B;
  --qrtix-secondary: #FFA500;
  --qrtix-accent: #FF8E53;
  --qrtix-success: #28A745;
  --qrtix-warning: #FFC107;
  --qrtix-error: #DC3545;
  --qrtix-background: #FFFFFF;
  --qrtix-surface: #F8F9FA;
  --qrtix-text: #2C3E50;
  --qrtix-text-secondary: #6C757D;

  /* Override primary colors */
  --color-primary: var(--qrtix-primary);
  --color-primary-hover: #FF5252;
  --color-primary-active: #FF4444;
  --color-background: var(--qrtix-background);
  --color-surface: var(--qrtix-surface);
  --color-text: var(--qrtix-text);
  --color-text-secondary: var(--qrtix-text-secondary);
  --color-success: var(--qrtix-success);
  --color-warning: var(--qrtix-warning);
  --color-error: var(--qrtix-error);

  /* Ensure light theme always */
  --color-card-border: rgba(255, 107, 107, 0.1);
  --color-border: rgba(255, 107, 107, 0.2);
  --color-secondary: rgba(255, 165, 0, 0.1);
  --color-secondary-hover: rgba(255, 165, 0, 0.2);
}

/* Base Styles */
* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-family-base);
  background-color: var(--color-background);
  color: var(--color-text);
  margin: 0;
  padding: 0;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-background);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--color-secondary);
  border-top: 4px solid var(--color-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: var(--space-16);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* ✅ Loading State Styles */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
}

.loading-state p {
    margin-top: 15px;
    font-size: 16px;
    color: #666;
    font-weight: 500;
}

/* Spinner Animation */
.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #FF6B6B;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: info-spin 1s linear infinite;
}

@keyframes info-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error State Styles */
.error-state {
    padding: 20px;
    text-align: center;
}

.error-message-info {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #f5c6cb;
    font-size: 14px;
    margin: 0;
}

/* Page System */
.loginPage{
    min-height: 100vh;
}

.page {
  display: none;
  min-height: 100vh;
}

.page.active {
  display: block;
}

/* Login Pages */
.login-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: var(--space-24);
  background: linear-gradient(135deg, var(--color-bg-1), var(--color-bg-2));
}

.logo-section {
  text-align: center;
  margin-bottom: var(--space-32);
}

.app-title {
  font-size: var(--font-size-4xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.app-title a {
    color: var(--color-primary);
    text-decoration: none;
}

.app-subtitle {
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
  margin: var(--space-8) 0 0 0;
}

.login-form {
  width: 100%;
  max-width: 400px;
  background: var(--color-surface);
  padding: var(--space-32);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-card-border);
}

.login-form a {
    color: var(--color-primary);
}

/* Header */
.header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-16);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-title {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-12);
}

.header-logo {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-base);
    object-fit: contain;
    vertical-align: middle
}

.company-name {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
}

/* Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-around;
  padding: var(--space-8) 0;
  z-index: 99;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-8);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color var(--duration-fast);
  min-width: 60px;
}

.nav-item.active {
  color: var(--color-primary);
}

.nav-icon {
  font-size: 20px;
  margin-bottom: var(--space-4);
}

.nav-label {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
}

.admin-nav {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-around;
  gap: var(--space-16);
  padding: var(--space-12);
}

.admin-nav .nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-8);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color var(--duration-fast);
  min-width: 60px;
}

.admin-nav .nav-item.active {
  background: var(--color-secondary);
  color: var(--color-primary);
}

/* Main Content */
.main-content {
  padding-bottom: 100px;
  /* Increased padding for bottom nav */
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 140px);
  overflow-y: auto;
}

.section {
  padding: 20px;
  max-height: calc(100vh - 180px);
  overflow-y: auto;
  display: none;
}

.section.active {
  display: block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-24);
  flex-wrap: wrap;
  gap: var(--space-12);
}

.section-header h2 {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: 0;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-16);
  margin-bottom: var(--space-32);
}

.stat-card {
  background: var(--color-surface);
  padding: var(--space-20);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-card-border);
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card h3 {
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  margin: 0 0 var(--space-8) 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-number {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
  margin: 0;
}

/* Quick Actions */
.quick-actions {
  margin-bottom: var(--space-32);
}

.quick-actions h3 {
  font-size: var(--font-size-xl);
  color: var(--color-text);
  margin-bottom: var(--space-16);
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-12);
}

/* Events List */
.events-list,
.companies-list {
  display: grid;
  gap: var(--space-16);
}

.event-card,
.company-card {
  background: var(--color-surface);
  border: 1px solid var(--color-card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-20);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.event-card:hover,
.company-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.event-header,
.company-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-16);
  flex-wrap: wrap;
  gap: var(--space-8);
}

.event-title,
.company-name-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  margin: 0;
}

.event-status,
.company-status {
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  text-transform: uppercase;
}

.status-active {
  background: rgba(var(--color-success-rgb, 40, 167, 69), 0.1);
  color: var(--color-success);
  border: 1px solid rgba(var(--color-success-rgb, 40, 167, 69), 0.2);
}

.status-disabled {
  background: rgba(var(--color-error-rgb, 220, 53, 69), 0.1);
  color: var(--color-error);
  border: 1px solid rgba(var(--color-error-rgb, 220, 53, 69), 0.2);
}

.status-blocked {
  background: rgba(var(--color-error-rgb, 220, 53, 69), 0.1);
  color: var(--color-error);
  border: 1px solid rgba(var(--color-error-rgb, 220, 53, 69), 0.2);
}

.event-details,
.company-details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-12);
  margin-bottom: var(--space-16);
}

.event-detail,
.company-detail {
  text-align: center;
}

.detail-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-value {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-medium);
  color: var(--color-text);
}

.event-actions,
.company-actions {
  display: flex;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.event-limit-info {
  font-size: var(--font-size-sm);
  margin-top: var(--space-8);
  padding: var(--space-8) var(--space-12);
  border-radius: var(--radius-base);
  background-color: var(--color-bg-1);
  border: 1px solid var(--color-border);
}

.event-limit-warning {
  background-color: rgba(var(--color-error-rgb), 0.1);
  border-color: rgba(var(--color-error-rgb), 0.2);
  color: var(--color-error);
}

.event-limit-success {
  background-color: rgba(var(--color-success-rgb), 0.1);
  border-color: rgba(var(--color-success-rgb), 0.2);
  color: var(--color-success);
}

.event-limit-info-icon {
  margin-right: var(--space-4);
  font-weight: bold;
}

/* Filter Section */
.filter-section {
  display: flex;
  gap: var(--space-12);
  margin-bottom: var(--space-24);
  flex-wrap: wrap;
  align-items: center;
}

.filter-section select,
.filter-section input {
  flex: 1;
  min-width: 200px;
}

/* Tables */
.table-container {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-card-border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

/* Ensure tables are readable */
.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.table th,
.table td {
  padding: var(--space-12);
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

.table th {
  background: var(--color-bg-1);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--color-text);
}

.table tbody tr:hover {
  background: var(--color-bg-2);
}

/* QR Scanner */
.scanner-controls {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 20px;
}

.scanner-buttons {
  display: flex;
  gap: 10px;
}

.scanner-video {
  max-width: 420px;
  margin: 1rem auto;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  padding: var(--space-16);
  overflow-y: auto;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-card-border);
}

.modal-header {
  padding: var(--space-20);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  font-size: var(--font-size-xl);
  color: var(--color-text);
}

.modal-close {
  background: none;
  border: none;
  font-size: var(--font-size-2xl);
  color: var(--color-text-secondary);
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-base);
  transition: background-color var(--duration-fast);
}

.modal-close:hover {
  background: var(--color-secondary);
}

.modal form {
  padding: var(--space-20);
}

.modal-actions {
  padding: var(--space-20);
  border-top: 1px solid var(--color-border);
  display: flex;
  gap: var(--space-12);
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Style for existing vs new ticket types */
.existing-ticket-type {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #17a2b8;
}

.new-ticket-type {
    background-color: #fff3cd;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #ffc107;
}

.new-ticket-types-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px dashed #dee2e6;
}

/* Edit Event Modal Styles */
.edit-ticket-type {
  background: var(--color-bg-4);
  padding: var(--space-16);
  border-radius: var(--radius-base);
  margin-bottom: var(--space-12);
  border: 1px solid var(--color-border);
  position: relative;
}

.text-muted {
    color: #6c757d !important;
    font-style: italic;
}

/*.ticket-type-remove {*/
/*  position: absolute;*/
/*  top: 10px;*/
/*  right: 10px;*/
/*  background: #FF6B6B;*/
/*  color: white;*/
/*  border: none;*/
/*  border-radius: 50%;*/
/*  width: 30px;*/
/*  height: 30px;*/
/*  cursor: pointer;*/
/*  display: flex;*/
/*  align-items: center;*/
/*  justify-content: center;*/
/*}*/

.ticket-type-remove {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ticket-type-remove:hover {
    background: #c82333;
}


.ticket-type-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

/*Cover Photos CSS*/
.cover-upload-section {
    position: relative;
}

.upload-area {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.upload-area:hover {
    border-color: #FF6B6B;
    background: #fff5f5;
}

.upload-area.dragover {
    border-color: #FF6B6B;
    background: #fff0f0;
    transform: scale(1.02);
}

.upload-placeholder {
    cursor: pointer;
}

.upload-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.upload-text {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.upload-hint {
    font-size: 12px;
    color: #999;
}

.cover-preview {
    position: relative;
    display: inline-block;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cover-preview img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    display: block;
}

.btn-remove-cover {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(255, 107, 107, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-remove-cover:hover {
    background: rgba(255, 107, 107, 1);
    transform: scale(1.1);
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    border-left: 4px solid #f5c6cb;
}

.success-message {
    color: #2ed573;
    background: #e6f7ed;
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    border-left: 4px solid #2ed573;
}

/* Edit button in event cards */
.event-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.company-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn--edit {
  background-color: #17a2b8;
  color: white;
}

.btn--edit:hover {
  background-color: #138496;
}

/* Form Styles */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-12);
}

.ticket-types-section {
  margin-top: var(--space-24);
}

.ticket-types-section h4 {
  color: var(--color-text);
  margin-bottom: var(--space-16);
}

.ticket-type {
  background: var(--color-bg-4);
  padding: var(--space-16);
  border-radius: var(--radius-base);
  margin-bottom: var(--space-12);
  border: 1px solid var(--color-border);
  position: relative;
}

.ticket-type-remove {
  background: var(--color-error);
  color: white;
  border: none;
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-sm);
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: var(--font-size-xs);
}

/* Message Container */
.message-container {
  position: fixed;
  top: 35px;
  right: var(--space-20);
  z-index: 2000;
  max-width: 330px;
}

.message {
  padding: var(--space-16);
  border-radius: var(--radius-base);
  margin-bottom: var(--space-8);
  box-shadow: var(--shadow-md);
  font-weight: var(--font-weight-medium);
  border: 1px solid;
  animation: slideIn 0.3s ease;
}

.message-success {
  background: rgba(var(--color-success-rgb, 40, 167, 69), 0.1);
  color: var(--color-success);
  border-color: rgba(var(--color-success-rgb, 40, 167, 69), 0.2);
  text-align: right;
}

.message-error {
  background: rgba(var(--color-error-rgb, 220, 53, 69), 0.1);
  color: var(--color-error);
  border-color: rgba(var(--color-error-rgb, 220, 53, 69), 0.2);
  text-align: right;
}

.message-warning {
  background: rgba(var(--color-warning-rgb, 255, 193, 7), 0.1);
  color: var(--color-warning);
  border-color: rgba(var(--color-warning-rgb, 255, 193, 7), 0.2);
  text-align: right;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Scan Result Content */
.scan-result-content {
  padding: var(--space-20);
}

.scan-result-header {
  text-align: center;
  margin-bottom: var(--space-20);
}

.scan-result-valid-icon {
  color: var(--color-success);
  font-size: 48px;
  margin-bottom: var(--space-8);
}

.scan-result-invalid-icon {
  color: var(--color-error);
  font-size: 48px;
  margin-bottom: var(--space-8);
}

.scan-result-details {
  display: grid;
  gap: var(--space-12);
}

.scan-detail {
  display: flex;
  justify-content: space-between;
  padding: var(--space-8) 0;
  border-bottom: 1px solid var(--color-border);
}

.scan-detail:last-child {
  border-bottom: none;
}

.scan-detail-label {
  font-weight: var(--font-weight-medium);
  color: var(--color-text-secondary);
}

.scan-detail-value {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

/*Form Control*/
.form-control {
  display: block;
  width: 100%;
  padding: var(--space-8) var(--space-12);
  font-size: var(--font-size-md);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-base);
  transition: border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

.form-control:focus {
  border-color: var(--color-primary);
  outline: 2px solid var(--color-primary);
}

/* Style for disabled inputs */
.form-control:disabled {
    background-color: #f8f9fa;
    opacity: 0.7;
    cursor: not-allowed;
}

.form-label {
  display: block;
  margin-bottom: var(--space-8);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
}

.form-group {
  margin-bottom: var(--space-16);
}

/*Buttons*/
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-8) var(--space-16);
  border-radius: var(--radius-base);
  font-size: var(--font-size-base);
  font-weight: 500;
  line-height: 1.5;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-standard);
  border: none;
  text-decoration: none;
  position: relative;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--color-teal-500-rgb), 0.4);
}

.btn--primary {
  background: var(--color-primary);
  color: var(--color-btn-primary-text);
}

.btn--primary:hover {
  background: var(--color-primary-hover);
}

.btn--primary:active {
  background: var(--color-primary-active);
}

.btn--secondary {
  background: var(--color-secondary);
  color: var(--color-text);
}

.btn--secondary:hover {
  background: var(--color-secondary-hover);
}

.btn--secondary:active {
  background: var(--color-secondary-active);
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn--outline:hover {
  background: var(--color-secondary);
}

.btn--sm {
  padding: var(--space-4) var(--space-12);
  font-size: var(--font-size-sm);
  border-radius: var(--radius-sm);
}

.btn--lg {
  padding: var(--space-10) var(--space-20);
  font-size: var(--font-size-lg);
  border-radius: var(--radius-md);
}

.btn--full-width {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn--danger {
  background: var(--color-error);
  color: white;
}

.btn--danger:hover {
  background: #c82333;
}

.btn--success {
  background: var(--color-success);
  color: white;
}

.btn--success:hover {
  background: #218838;
}

/*Payment*/
.payment-completed {
  background: rgba(var(--color-success-rgb, 40, 167, 69), 0.1);
  color: var(--color-success);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  border: 1px solid rgba(var(--color-success-rgb, 40, 167, 69), 0.2);
}

.payment-pending {
  background: rgba(var(--color-warning-rgb, 255, 193, 7), 0.1);
  color: var(--color-warning);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  border: 1px solid rgba(var(--color-warning-rgb, 255, 193, 7), 0.2);
}

/*Staff Status*/
.staff-status-active {
  background: rgba(var(--color-success-rgb, 40, 167, 69), 0.1);
  color: var(--color-success);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  border: 1px solid rgba(var(--color-success-rgb, 40, 167, 69), 0.2);
}

.staff-status-disabled {
  background: rgba(var(--color-warning-rgb, 255, 193, 7), 0.1);
  color: var(--color-warning);
  padding: var(--space-4) var(--space-8);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  border: 1px solid rgba(var(--color-warning-rgb, 255, 193, 7), 0.2);
}

.text-center {
  text-align: center;
}

.text-success {
  color: var(--color-success);
}

.text-error {
  color: var(--color-error);
}

.text-warning {
  color: var(--color-warning);
}

.hidden {
  display: none !important;
}

.disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* Event Details Modal Styles */
.modal-wide {
    max-width: 900px;
}

.event-details-content {
    padding: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    justify-content: between;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 5px;
}

.info-label {
    font-weight: bold;
    color: #555;
    min-width: 120px;
}

.info-value {
    color: #333;
}

.sales-table-container,
.fees-table-container {
    overflow-x: auto;
    margin-bottom: 30px;
}

.sales-table,
.fees-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.sales-table th,
.sales-table td,
.fees-table th,
.fees-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.sales-table th,
.fees-table th {
    background: #f8f9fa;
    font-weight: bold;
    color: #555;
}

.sales-table tbody tr:hover,
.fees-table tbody tr:hover {
    background: #f8f9fa;
}

.total-row {
    background: #e9ecef !important;
    font-weight: bold;
}

.total-row td {
    border-top: 2px solid #dee2e6;
}

.event-info-section,
.ticket-sales-section,
.fees-section {
    margin-bottom: 30px;
}

.event-info-section h4,
.ticket-sales-section h4,
.fees-section h4 {
    margin-bottom: 15px;
    color: #333;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 5px;
}

.text-center {
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-content {
    padding-bottom: 120px;
    /* Extra space for mobile */
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .filter-section {
    flex-direction: column;
    gap: 10px;
  }

  .filter-section select,
  .filter-section input,
  .filter-section button {
    width: 100%;
  }

  .event-actions,
  .company-actions {
    flex-direction: column;
  }

  .modal {
    padding: var(--space-8);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .action-buttons {
    grid-template-columns: 1fr;
  }

  /* Mobile-specific table adjustments
  .table th:nth-child(3),
  Hide Event column on mobile
  .table td:nth-child(3) {
    display: none;
  } */

  .scanner-video {
    width: 100%;
  }

}

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .login-container {
    padding: var(--space-16);
  }

  .login-form {
    padding: var(--space-24);
  }
}