.view { display: block; height: auto; overflow: visible; visibility: visible; opacity: 1; }
/**
 * VIPER Styles
 * VantagePoint Intake Portal for Execution & Requests
 */

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

:root {
  /* Colors */
  --primary-bg: #0a0a0a;
  --secondary-bg: #141414;
  --tertiary-bg: #0f0f0f;
  --primary-red: #c41e2a;
  --hover-red: #e8343f;
  --text-primary: #ffffff;
  --text-secondary: #9ca3af;
  --text-tertiary: #6b7280;
  --border-color: #2d2d2d;
  
  /* Status Colors */
  --status-new: #3b82f6;
  --status-progress: #f59e0b;
  --status-review: #f97316;
  --status-completed: #22c55e;
  
  /* Priority Colors */
  --priority-urgent: #ef4444;
  --priority-standard: #3b82f6;
  --priority-upcoming: #6b7280;
  
  /* Spacing */
  --sidebar-width: 260px;
  --header-height: 70px;
  
  /* Transitions */
  --transition: all 0.3s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
  background: var(--primary-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== LANDING PAGE ===== */
.landing-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #0a0a0a;
}

.landing-container {
  text-align: center;
  padding: 40px;
  max-width: 600px;
  width: 100%;
}

.landing-logo {
  margin-bottom: 50px;
}

.vp-logo {
  max-width: 180px;
  height: auto;
  mix-blend-mode: lighten;
}

.landing-wordmark {
  margin-bottom: 60px;
}

.viper-title-simple {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: 12px;
  color: #c41e2a;
  text-transform: uppercase;
  line-height: 1;
  margin: 0;
}

.landing-signin {
  margin-bottom: 80px;
}

.google-signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: white;
  color: #333;
  padding: 16px 40px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.google-signin-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.landing-footer {
  color: #666;
  font-size: 13px;
}

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

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--tertiary-bg);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-header {
  padding: 25px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.sidebar-logo-container:hover {
  opacity: 0.8;
}

.sidebar-logo-img {
  height: 40px;
  width: auto;
  mix-blend-mode: lighten;
  background: transparent;
}

.sidebar-logo {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 3px;
  color: var(--primary-red);
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 4px;
}

.sidebar-toggle span {
  width: 20px;
  height: 2px;
  background: var(--text-primary);
  transition: var(--transition);
}

.sidebar-nav {
  flex: 1;
  padding: 20px 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

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

.nav-item.active {
  background: var(--secondary-bg);
  color: var(--text-primary);
  border-left: 3px solid var(--primary-red);
}

.nav-icon {
  font-size: 20px;
}

.nav-text {
  font-weight: 500;
}

.nav-badge {
  margin-left: auto;
  background: var(--primary-red);
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid var(--border-color);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

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

.user-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 12px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.logout-btn {
  width: 100%;
  padding: 10px;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: var(--transition);
}

.logout-btn:hover {
  background: var(--primary-red);
  border-color: var(--primary-red);
}

/* ===== MAIN CONTENT ===== */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 40px;
  min-height: 100vh;
}

.view {
  display: block;
  animation: fadeIn 0.3s ease;
}

.view.hidden {
  display: none;
}

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

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 20px;
}

.view-header h1 {
  font-size: 32px;
  font-weight: 700;
}

.view-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  flex-wrap: wrap;
}

/* ===== BUTTONS ===== */
.btn {
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: var(--primary-red);
  color: white;
}

.btn-primary:hover {
  background: var(--hover-red);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(196, 30, 42, 0.3);
}

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

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

.btn-back {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 16px;
  padding: 8px 0;
  transition: var(--transition);
}

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

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: var(--secondary-bg);
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-value.urgent {
  color: var(--priority-urgent);
  animation: pulse 2s infinite;
}

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

/* ===== TICKETS GRID ===== */
.tickets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.ticket-card {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}

.ticket-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  border-color: var(--primary-red);
}

.ticket-card.unread::before {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: var(--primary-red);
  border-radius: 50%;
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 12px;
}

.ticket-id {
  font-weight: 700;
  font-size: 16px;
  color: var(--primary-red);
}

.ticket-badges {
  display: flex;
  gap: 8px;
}

.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

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

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

.badge-status.needs-review {
  background: var(--status-review);
}

.badge-status.completed {
  background: var(--status-completed);
}

.badge-priority {
  background: var(--priority-standard);
  color: white;
}

.badge-priority.urgent {
  background: var(--priority-urgent);
  animation: pulse 2s infinite;
}

.badge-priority.upcoming {
  background: var(--priority-upcoming);
}

.ticket-type {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.ticket-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ticket-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-tertiary);
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

/* ===== FORMS ===== */
.request-form {
  max-width: 800px;
  background: var(--secondary-bg);
  padding: 40px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.form-label.required::after {
  content: ' *';
  color: var(--primary-red);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--primary-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-red);
  box-shadow: 0 0 0 3px rgba(196, 30, 42, 0.1);
}

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

.form-input[readonly] {
  background: var(--tertiary-bg);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.form-radio-group {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.form-radio-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}

.form-radio-label input[type="radio"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.form-checkbox-label {
  display: flex;
  align-items: start;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
}

.form-checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
}

.file-upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: 8px;
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.file-upload-zone:hover,
.file-upload-zone.drag-over {
  border-color: var(--primary-red);
  background: var(--primary-bg);
}

.file-upload-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.file-list {
  margin-top: 16px;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  background: var(--primary-bg);
  border-radius: 6px;
  margin-bottom: 8px;
}

.file-remove {
  background: none;
  border: none;
  color: var(--primary-red);
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

/* ===== FILTERS ===== */
.filter-group {
  display: flex;
  gap: 12px;
}

.filter-select {
  padding: 10px 16px;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition);
}

.filter-select:focus {
  outline: none;
  border-color: var(--primary-red);
}

.search-input {
  padding: 10px 16px;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  min-width: 250px;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-red);
}

/* ===== TEMPLATES ===== */
.template-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.category-card {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.category-card:hover,
.category-card.active {
  border-color: var(--primary-red);
  transform: translateY(-2px);
}

.category-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.category-name {
  font-weight: 600;
  font-size: 14px;
}

.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
}

.template-card {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.template-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.template-thumbnail {
  width: 100%;
  height: 180px;
  background: var(--tertiary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
}

.template-info {
  padding: 16px;
}

.template-name {
  font-weight: 600;
  margin-bottom: 8px;
}

.template-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}

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

/* ===== LOADING & UTILITIES ===== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(10, 10, 10, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-red);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.hidden {
  display: none !important;
}

.admin-only {
  display: none;
}

.admin-only.show {
  display: block;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px 20px;
  min-width: 300px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
}

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

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

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

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

/* ===== EMPTY STATES ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 18px;
  margin-bottom: 24px;
}

/* ===== RESPONSIVE ===== */

/* Tablet and below (768px) */
@media (max-width: 768px) {
  /* Section 1: Base styles and variables */
  :root {
    --sidebar-width: 280px;
    --header-height: 60px;
  }
  
  /* Section 2: Layout and navigation */
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
  }
  
  .sidebar-toggle {
    display: flex;
  }
  
  .main-content {
    margin-left: 0;
    padding: 20px;
  }
  
  .view-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .view-header h1 {
    font-size: 28px;
  }
  
  .view-actions {
    flex-direction: column;
    width: 100%;
  }
  
  .view-actions .btn {
    width: 100%;
  }
  
  /* Landing page */
  .landing-container {
    padding: 30px 20px;
  }
  
  .viper-title-simple {
    font-size: 48px;
    letter-spacing: 8px;
  }
  
  .vp-logo {
    max-width: 140px;
  }
  
  .google-signin-btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Section 3: Forms and inputs */
  .request-form {
    padding: 24px;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .form-actions .btn {
    width: 100%;
  }
  
  .form-radio-group {
    flex-direction: column;
    gap: 12px;
  }
  
  .file-upload-zone {
    padding: 30px 20px;
  }
  
  .filter-group {
    flex-direction: column;
    width: 100%;
  }
  
  .filter-select {
    width: 100%;
  }
  
  .search-input {
    min-width: 100%;
    width: 100%;
  }
  
  /* Section 4: Cards and containers */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .stat-card {
    padding: 20px;
  }
  
  .stat-value {
    font-size: 32px;
  }
  
  .tickets-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .ticket-card {
    padding: 16px;
  }
  
  .template-categories {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }
  
  .category-card {
    padding: 16px;
  }
  
  .category-icon {
    font-size: 28px;
  }
  
  .templates-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .template-thumbnail {
    height: 200px;
  }
  
  /* Section 5: Modals and overlays */
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
  }
  
  .toast {
    min-width: auto;
    width: 100%;
  }
  
  /* Section 6: Tables and data display */
  .ticket-meta {
    flex-direction: column;
    gap: 8px;
  }
  
  .ticket-badges {
    flex-wrap: wrap;
  }
  
  /* Section 7: Buttons and actions */
  .btn {
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .btn-back {
    font-size: 14px;
  }
  
  /* Section 8: Messages and notifications */
  .empty-state {
    padding: 40px 20px;
  }
  
  .empty-state-icon {
    font-size: 48px;
  }
  
  .empty-state-text {
    font-size: 16px;
  }
  
  /* Section 9: Utility classes and animations */
  .user-profile {
    flex-wrap: wrap;
  }
  
  .sidebar-footer {
    padding: 16px;
  }
}

/* Mobile landscape and small tablets (600px) */
@media (max-width: 600px) {
  /* Section 1: Base styles and variables */
  :root {
    --sidebar-width: 100%;
  }
  
  /* Section 2: Layout and navigation */
  .sidebar {
    width: 100%;
  }
  
  .main-content {
    padding: 16px;
  }
  
  .view-header h1 {
    font-size: 24px;
  }
  
  /* Landing page */
  .viper-title-simple {
    font-size: 40px;
    letter-spacing: 6px;
  }
  
  .landing-logo {
    margin-bottom: 40px;
  }
  
  .landing-wordmark {
    margin-bottom: 50px;
  }
  
  .landing-signin {
    margin-bottom: 60px;
  }
  
  /* Section 3: Forms and inputs */
  .request-form {
    padding: 20px;
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    padding: 10px 14px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .form-textarea {
    min-height: 100px;
  }
  
  .file-upload-zone {
    padding: 24px 16px;
  }
  
  .file-upload-icon {
    font-size: 36px;
  }
  
  /* Section 4: Cards and containers */
  .stat-card {
    padding: 16px;
  }
  
  .stat-value {
    font-size: 28px;
  }
  
  .stat-label {
    font-size: 12px;
  }
  
  .ticket-card {
    padding: 14px;
  }
  
  .ticket-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }
  
  .ticket-badges {
    width: 100%;
  }
  
  .template-categories {
    grid-template-columns: 1fr;
  }
  
  .category-card {
    padding: 14px;
  }
  
  /* Section 5: Modals and overlays */
  .loading-overlay {
    padding: 20px;
  }
  
  .spinner {
    width: 40px;
    height: 40px;
  }
  
  /* Section 6: Tables and data display */
  .template-meta {
    flex-direction: column;
    gap: 4px;
  }
  
  /* Section 7: Buttons and actions */
  .btn {
    padding: 10px 16px;
    font-size: 14px;
  }
  
  .template-actions {
    flex-direction: column;
  }
  
  .template-actions .btn {
    width: 100%;
  }
  
  /* Section 8: Messages and notifications */
  .empty-state {
    padding: 30px 16px;
  }
  
  .empty-state-icon {
    font-size: 40px;
  }
  
  .empty-state-text {
    font-size: 15px;
  }
  
  /* Section 9: Utility classes and animations */
  .sidebar-header {
    padding: 20px 16px;
  }
  
  .sidebar-nav {
    padding: 16px 0;
  }
  
  .nav-item {
    padding: 12px 16px;
  }
}

/* Small mobile devices (480px) */
@media (max-width: 480px) {
  /* Section 1: Base styles and variables */
  body {
    font-size: 14px;
  }
  
  /* Section 2: Layout and navigation */
  .main-content {
    padding: 12px;
  }
  
  .view-header {
    margin-bottom: 20px;
    gap: 12px;
  }
  
  .view-header h1 {
    font-size: 22px;
  }
  
  /* Landing page */
  .landing-container {
    padding: 20px 16px;
  }
  
  .viper-title-simple {
    font-size: 36px;
    letter-spacing: 4px;
  }
  
  .vp-logo {
    max-width: 120px;
  }
  
  .google-signin-btn {
    padding: 14px 32px;
    font-size: 15px;
  }
  
  .landing-footer {
    font-size: 12px;
  }
  
  /* Section 3: Forms and inputs */
  .request-form {
    padding: 16px;
  }
  
  .form-label {
    font-size: 13px;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    padding: 10px 12px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .file-upload-zone {
    padding: 20px 12px;
  }
  
  .file-upload-icon {
    font-size: 32px;
  }
  
  /* Section 4: Cards and containers */
  .stats-grid {
    gap: 12px;
  }
  
  .stat-card {
    padding: 14px;
  }
  
  .stat-value {
    font-size: 24px;
  }
  
  .stat-label {
    font-size: 11px;
  }
  
  .tickets-grid {
    gap: 12px;
  }
  
  .ticket-card {
    padding: 12px;
  }
  
  .ticket-id {
    font-size: 14px;
  }
  
  .ticket-type,
  .ticket-description {
    font-size: 13px;
  }
  
  .badge {
    padding: 3px 8px;
    font-size: 10px;
  }
  
  .template-categories {
    gap: 10px;
  }
  
  .category-card {
    padding: 12px;
  }
  
  .category-icon {
    font-size: 24px;
  }
  
  .category-name {
    font-size: 13px;
  }
  
  .templates-grid {
    gap: 12px;
  }
  
  .template-thumbnail {
    height: 160px;
    font-size: 36px;
  }
  
  .template-info {
    padding: 12px;
  }
  
  .template-name {
    font-size: 14px;
  }
  
  /* Section 5: Modals and overlays */
  .toast-container {
    top: 8px;
    right: 8px;
    left: 8px;
  }
  
  .toast {
    padding: 12px 16px;
    font-size: 13px;
  }
  
  /* Section 6: Tables and data display */
  .ticket-meta {
    font-size: 11px;
    padding-top: 10px;
  }
  
  .template-meta {
    font-size: 11px;
  }
  
  /* Section 7: Buttons and actions */
  .btn {
    padding: 10px 14px;
    font-size: 13px;
  }
  
  .btn-sm {
    padding: 6px 10px;
    font-size: 11px;
  }
  
  /* Section 8: Messages and notifications */
  .empty-state {
    padding: 24px 12px;
  }
  
  .empty-state-icon {
    font-size: 36px;
  }
  
  .empty-state-text {
    font-size: 14px;
    margin-bottom: 16px;
  }
  
  /* Section 9: Utility classes and animations */
  .sidebar-header {
    padding: 16px 12px;
  }
  
  .sidebar-logo {
    font-size: 20px;
    letter-spacing: 2px;
  }
  
  .sidebar-logo-img {
    height: 32px;
  }
  
  .sidebar-nav {
    padding: 12px 0;
  }
  
  .nav-item {
    padding: 10px 12px;
    gap: 10px;
  }
  
  .nav-icon {
    font-size: 18px;
  }
  
  .nav-text {
    font-size: 14px;
  }
  
  .sidebar-footer {
    padding: 12px;
  }
  
  .user-avatar {
    width: 36px;
    height: 36px;
  }
  
  .user-name {
    font-size: 13px;
  }
  
  .user-role {
    font-size: 11px;
  }
  
  .logout-btn {
    padding: 8px;
    font-size: 13px;
  }
}

/* Extra small devices (375px) */
@media (max-width: 375px) {
  /* Section 1: Base styles and variables */
  body {
    font-size: 13px;
  }
  
  /* Section 2: Layout and navigation */
  .main-content {
    padding: 10px;
  }
  
  .view-header h1 {
    font-size: 20px;
  }
  
  /* Landing page */
  .viper-title-simple {
    font-size: 32px;
    letter-spacing: 3px;
  }
  
  .vp-logo {
    max-width: 100px;
  }
  
  .landing-logo {
    margin-bottom: 30px;
  }
  
  .landing-wordmark {
    margin-bottom: 40px;
  }
  
  .landing-signin {
    margin-bottom: 50px;
  }
  
  .google-signin-btn {
    padding: 12px 24px;
    font-size: 14px;
    gap: 10px;
  }
  
  /* Section 3: Forms and inputs */
  .request-form {
    padding: 14px;
  }
  
  .form-group {
    margin-bottom: 18px;
  }
  
  .form-actions {
    margin-top: 24px;
    padding-top: 20px;
  }
  
  /* Section 4: Cards and containers */
  .stat-card {
    padding: 12px;
  }
  
  .stat-value {
    font-size: 22px;
  }
  
  .ticket-card {
    padding: 10px;
  }
  
  .template-thumbnail {
    height: 140px;
  }
  
  /* Section 5: Modals and overlays */
  .toast {
    padding: 10px 12px;
    font-size: 12px;
  }
  
  /* Section 6: Tables and data display */
  .ticket-meta {
    font-size: 10px;
  }
  
  /* Section 7: Buttons and actions */
  .btn {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  /* Section 8: Messages and notifications */
  .empty-state {
    padding: 20px 10px;
  }
  
  .empty-state-icon {
    font-size: 32px;
  }
  
  .empty-state-text {
    font-size: 13px;
  }
  
  /* Section 9: Utility classes and animations */
  .sidebar-logo {
    font-size: 18px;
  }
  
  .sidebar-logo-img {
    height: 28px;
  }
  
  .nav-item {
    padding: 8px 10px;
  }
  
  .user-avatar {
    width: 32px;
    height: 32px;
  }
}

/* ===== AI CHAT WIDGET ===== */
.ai-chat-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 60px;
  height: 60px;
  background: var(--primary-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(196, 30, 42, 0.4);
  transition: var(--transition);
  z-index: 1000;
  animation: pulse-bubble 2s infinite;
}

.ai-chat-bubble:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(196, 30, 42, 0.6);
}

.ai-chat-bubble.hidden {
  display: none;
}

.ai-chat-bubble svg {
  color: white;
}

@keyframes pulse-bubble {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(196, 30, 42, 0.4);
  }
  50% {
    box-shadow: 0 4px 30px rgba(196, 30, 42, 0.7);
  }
}

.ai-chat-panel {
  position: fixed;
  bottom: -100%;
  right: 24px;
  width: 420px;
  height: 600px;
  max-height: 70vh;
  background: var(--tertiary-bg);
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  transition: bottom 0.3s ease;
  z-index: 1001;
  border: 1px solid var(--border-color);
}

.ai-chat-panel.open {
  bottom: 24px;
}

.chat-header {
  padding: 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

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

.chat-avatar-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 20px;
  color: white;
}

.chat-title {
  font-weight: 700;
  font-size: 16px;
}

.chat-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
}

.chat-close-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  transition: var(--transition);
}

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

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-messages.drag-over {
  background: rgba(196, 30, 42, 0.1);
  border: 2px dashed var(--primary-red);
}

.chat-message {
  display: flex;
  gap: 12px;
  animation: fadeIn 0.3s ease;
}

.chat-message.user-message {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ai-avatar {
  width: 32px;
  height: 32px;
  background: var(--primary-red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
  color: white;
  flex-shrink: 0;
}

.message-content {
  flex: 1;
  max-width: 75%;
}

.user-message .message-content {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.message-text {
  background: var(--secondary-bg);
  padding: 12px 16px;
  border-radius: 12px;
  line-height: 1.5;
  word-wrap: break-word;
}

.user-message .message-text {
  background: #2a2a2a;
}

.ai-message .message-text {
  border-left: 3px solid var(--primary-red);
}

.message-time {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.typing-dots {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: var(--secondary-bg);
  border-radius: 12px;
  border-left: 3px solid var(--primary-red);
}

.typing-dots span {
  width: 8px;
  height: 8px;
  background: var(--text-secondary);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-8px);
  }
}

.submit-confirmation {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--primary-red);
  border-radius: 8px;
  padding: 16px;
}

.confirmation-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 12px;
}

.confirmation-divider {
  height: 1px;
  background: var(--border-color);
  margin: 12px 0;
}

.confirmation-details {
  font-size: 14px;
  line-height: 1.8;
}

.confirmation-details p {
  margin: 4px 0;
}

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

.confirmation-actions .btn {
  flex: 1;
  padding: 10px;
  font-size: 14px;
}

.generated-image {
  max-width: 280px;
}

.generated-image img {
  width: 100%;
  border-radius: 8px;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 12px;
}

.generated-image img:hover {
  transform: scale(1.02);
}

.image-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.image-actions .btn {
  flex: 1;
  min-width: 80px;
  padding: 8px 12px;
  font-size: 12px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.image-loading {
  padding: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-attachments {
  padding: 0 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chat-attachment {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.remove-attachment {
  background: none;
  border: none;
  color: var(--primary-red);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
}

.chat-input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
}

.chat-input {
  width: 100%;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  resize: none;
  max-height: 120px;
  margin-bottom: 12px;
  transition: var(--transition);
}

.chat-input:focus {
  outline: none;
  border-color: var(--primary-red);
}

.chat-input-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.chat-action-btn {
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-action-btn:hover {
  background: var(--tertiary-bg);
  color: var(--text-primary);
}

.chat-action-btn.recording {
  background: var(--primary-red);
  color: white;
  animation: pulse 1s infinite;
}

.chat-send-btn {
  background: var(--primary-red);
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  color: white;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-send-btn:hover {
  background: var(--hover-red);
}

/* Mobile responsive for chat widget */
@media (max-width: 768px) {
  .ai-chat-panel {
    right: 0;
    left: 0;
    bottom: -100%;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .ai-chat-panel.open {
    bottom: 0;
  }
  
  .ai-chat-bubble {
    bottom: 16px;
    right: 16px;
    width: 56px;
    height: 56px;
  }
  
  .chat-header {
    padding: 16px;
  }
  
  .chat-messages {
    padding: 16px;
    gap: 12px;
  }
  
  .message-content {
    max-width: 80%;
  }
  
  .message-text {
    padding: 10px 14px;
    font-size: 14px;
  }
  
  .chat-input-area {
    padding: 12px 16px;
  }
  
  .chat-input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .confirmation-actions {
    flex-direction: column;
  }
  
  .confirmation-actions .btn {
    width: 100%;
  }
  
  .generated-image {
    max-width: 100%;
  }
  
  .image-actions {
    flex-direction: column;
  }
  
  .image-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .ai-chat-bubble {
    width: 52px;
    height: 52px;
    bottom: 12px;
    right: 12px;
  }
  
  .chat-header {
    padding: 14px 12px;
  }
  
  .chat-avatar-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  
  .chat-title {
    font-size: 15px;
  }
  
  .chat-subtitle {
    font-size: 11px;
  }
  
  .chat-messages {
    padding: 12px;
    gap: 10px;
  }
  
  .message-avatar,
  .ai-avatar {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  
  .message-content {
    max-width: 85%;
  }
  
  .message-text {
    padding: 8px 12px;
    font-size: 13px;
  }
  
  .message-time {
    font-size: 10px;
  }
  
  .chat-attachments {
    padding: 0 12px;
    gap: 6px;
  }
  
  .chat-attachment {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  .chat-input-area {
    padding: 10px 12px;
  }
  
  .chat-input {
    padding: 10px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .chat-input-actions {
    gap: 6px;
  }
  
  .chat-action-btn {
    padding: 6px 10px;
  }
  
  .chat-send-btn {
    padding: 6px 12px;
  }
  
  .submit-confirmation {
    padding: 12px;
  }
  
  .confirmation-title {
    font-size: 14px;
  }
  
  .confirmation-details {
    font-size: 13px;
  }
}

@media (max-width: 375px) {
  .ai-chat-bubble {
    width: 48px;
    height: 48px;
  }
  
  .chat-header {
    padding: 12px 10px;
  }
  
  .chat-avatar-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  
  .chat-title {
    font-size: 14px;
  }
  
  .chat-messages {
    padding: 10px;
  }
  
  .message-avatar,
  .ai-avatar {
    width: 26px;
    height: 26px;
    font-size: 13px;
  }
  
  .message-text {
    padding: 8px 10px;
    font-size: 13px;
  }
  
  .chat-input-area {
    padding: 8px 10px;
  }
  
  .submit-confirmation {
    padding: 10px;
  }
}

/* ===== FULL PAGE AI CHAT ===== */
.ai-chat-fullpage {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--primary-bg);
}

.ai-chat-header {
  padding: 20px 40px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--tertiary-bg);
}

.ai-chat-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-chat-messages-container {
  flex: 1;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  padding: 40px 20px;
}

.ai-chat-messages-wrapper {
  width: 100%;
  max-width: 800px;
}

.ai-chat-input-container {
  border-top: 1px solid var(--border-color);
  background: var(--tertiary-bg);
  padding: 20px;
}

.ai-chat-input-wrapper {
  max-width: 800px;
  margin: 0 auto;
}

.chat-input-area-fullpage {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-input-area-fullpage .chat-input {
  width: 100%;
  background: var(--secondary-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 14px;
  resize: none;
  min-height: 60px;
  max-height: 200px;
  transition: var(--transition);
}

.chat-input-area-fullpage .chat-input:focus {
  outline: none;
  border-color: var(--primary-red);
}

/* Mobile responsive for full-page AI chat */
@media (max-width: 768px) {
  .ai-chat-header {
    padding: 16px 20px;
  }
  
  .ai-chat-header-title h1 {
    font-size: 20px;
  }
  
  .ai-chat-messages-container {
    padding: 20px 16px;
  }
  
  .ai-chat-input-container {
    padding: 16px;
  }
  
  .chat-input-area-fullpage .chat-input {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

@media (max-width: 600px) {
  .ai-chat-header {
    padding: 14px 16px;
  }
  
  .ai-chat-header-title h1 {
    font-size: 18px;
  }
  
  .ai-chat-header-title .chat-avatar-icon {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }
  
  .ai-chat-messages-container {
    padding: 16px 12px;
  }
  
  .ai-chat-input-container {
    padding: 12px;
  }
  
  .chat-input-area-fullpage {
    gap: 10px;
  }
  
  .chat-input-area-fullpage .chat-input {
    min-height: 50px;
    padding: 10px 14px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

@media (max-width: 480px) {
  .ai-chat-header {
    padding: 12px 14px;
  }
  
  .ai-chat-header-title h1 {
    font-size: 16px;
  }
  
  .ai-chat-header-title .chat-avatar-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  
  .ai-chat-messages-container {
    padding: 12px 10px;
  }
  
  .ai-chat-input-container {
    padding: 10px;
  }
  
  .chat-input-area-fullpage {
    gap: 8px;
  }
  
  .chat-input-area-fullpage .chat-input {
    min-height: 48px;
    padding: 10px 12px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .chat-input-area-fullpage .chat-input-actions {
    gap: 6px;
  }
  
  .chat-input-area-fullpage .chat-action-btn {
    padding: 6px 10px;
  }
  
  .chat-input-area-fullpage .chat-send-btn {
    padding: 6px 12px;
  }
}

@media (max-width: 375px) {
  .ai-chat-header {
    padding: 10px 12px;
  }
  
  .ai-chat-header-title h1 {
    font-size: 15px;
  }
  
  .ai-chat-header-title .chat-avatar-icon {
    width: 30px;
    height: 30px;
    font-size: 15px;
  }
  
  .ai-chat-messages-container {
    padding: 10px 8px;
  }
  
  .ai-chat-input-container {
    padding: 8px;
  }
  
  .chat-input-area-fullpage .chat-input {
    min-height: 44px;
    padding: 8px 10px;
  }
}
