/* G1Besoin - Carnet Numerique du Logement - POC Styles */

/* ============================================
   Custom Properties (Design Tokens)
   ============================================ */
:root {
  /* Primary Colors */
  --primary-50: #EFF6FF;
  --primary-100: #DBEAFE;
  --primary-500: #3B82F6;
  --primary-600: #2563EB;
  --primary-700: #1D4ED8;

  /* Secondary Colors (Green) */
  --secondary-50: #ECFDF5;
  --secondary-500: #10B981;
  --secondary-600: #059669;

  /* DPE Colors */
  --dpe-a: #059669;
  --dpe-b: #10B981;
  --dpe-c: #84CC16;
  --dpe-d: #EAB308;
  --dpe-e: #F97316;
  --dpe-f: #EA580C;
  --dpe-g: #DC2626;

  /* Animations */
  --transition-fast: 150ms;
  --transition-normal: 200ms;
  --transition-slow: 300ms;
}

/* ============================================
   Base Styles
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #F9FAFB;
  color: #111827;
  line-height: 1.5;
}

/* ============================================
   Component: Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal) ease-out;
  text-decoration: none;
}

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

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

.btn-primary:hover:not(:disabled) {
  background-color: var(--primary-700);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background-color: var(--secondary-500);
  color: white;
}

.btn-secondary:hover:not(:disabled) {
  background-color: var(--secondary-600);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid #D1D5DB;
  color: #374151;
}

.btn-outline:hover:not(:disabled) {
  background-color: #F3F4F6;
  border-color: #9CA3AF;
}

.btn-ghost {
  background-color: transparent;
  color: #6B7280;
}

.btn-ghost:hover:not(:disabled) {
  background-color: #F3F4F6;
  color: #374151;
}

.btn-danger {
  background-color: #EF4444;
  color: white;
}

.btn-danger:hover:not(:disabled) {
  background-color: #DC2626;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.btn-icon {
  padding: 0.5rem;
  width: 2.5rem;
  height: 2.5rem;
}

/* Button Loading State */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-primary.btn-loading::after {
  border-color: white;
  border-top-color: transparent;
}

/* ============================================
   Component: Cards
   ============================================ */
.card {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.card-interactive {
  transition: all var(--transition-normal) ease-out;
  cursor: pointer;
}

.card-interactive:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.card-body {
  padding: 1.5rem;
}

.card-header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #E5E7EB;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #E5E7EB;
  background-color: #F9FAFB;
}

/* ============================================
   Component: Forms
   ============================================ */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.375rem;
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  border: 1px solid #D1D5DB;
  border-radius: 0.5rem;
  background-color: white;
  transition: all var(--transition-fast) ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-600);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input::placeholder {
  color: #9CA3AF;
}

.form-input-error {
  border-color: #EF4444;
}

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

.form-error {
  font-size: 0.75rem;
  color: #EF4444;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.form-helper {
  font-size: 0.75rem;
  color: #6B7280;
  margin-top: 0.25rem;
}

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.form-checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--primary-600);
}

/* ============================================
   Component: Navigation
   ============================================ */
.navbar {
  background-color: white;
  border-bottom: 1px solid #E5E7EB;
  padding: 0 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-600);
  text-decoration: none;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #6B7280;
  text-decoration: none;
  border-radius: 0.375rem;
  transition: all var(--transition-fast) ease;
}

.nav-link:hover {
  color: #111827;
  background-color: #F3F4F6;
}

.nav-link.active {
  color: var(--primary-600);
  background-color: var(--primary-50);
}

/* Sidebar */
.sidebar {
  width: 16rem;
  min-width: 16rem;
  background-color: white;
  border-right: 1px solid #E5E7EB;
  height: 100vh;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-slow) ease;
  position: relative;
  z-index: 40;
  overflow: hidden;
}

.sidebar-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #E5E7EB;
  flex-shrink: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

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

.sidebar-section {
  padding: 0.5rem 1rem;
  margin-top: 1rem;
}

.sidebar-section-title {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9CA3AF;
  margin-bottom: 0.5rem;
}

.sidebar-divider {
  height: 1px;
  background-color: #E5E7EB;
  margin: 0.75rem 1rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  color: #6B7280;
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 0.5rem;
  margin: 0.125rem 0.75rem;
  transition: all var(--transition-fast) ease;
}

.sidebar-link:hover {
  background-color: #F3F4F6;
  color: #111827;
}

.sidebar-link.active {
  background-color: var(--primary-50);
  color: var(--primary-600);
  font-weight: 500;
}

.sidebar-link svg {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid #E5E7EB;
  flex-shrink: 0;
}

/* Dashboard Layout */
.dashboard-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Main Content */
.main-content {
  flex: 1;
  padding: 2rem;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
}

/* Content Header */
.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.content-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin: 0;
}

.content-header p {
  color: #6B7280;
  font-size: 0.875rem;
  margin: 0.25rem 0 0 0;
}

/* ============================================
   Component: Badges
   ============================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
}

.badge-primary {
  background-color: var(--primary-100);
  color: var(--primary-700);
}

.badge-success {
  background-color: #D1FAE5;
  color: #065F46;
}

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

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

.badge-gray {
  background-color: #F3F4F6;
  color: #4B5563;
}

.badge-info {
  background-color: var(--primary-100);
  color: var(--primary-700);
}

/* DPE Badges */
.dpe-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  border-radius: 0.5rem;
}

.dpe-badge-sm {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.875rem;
}

.dpe-a { background-color: var(--dpe-a); }
.dpe-b { background-color: var(--dpe-b); }
.dpe-c { background-color: var(--dpe-c); }
.dpe-d { background-color: var(--dpe-d); }
.dpe-e { background-color: var(--dpe-e); }
.dpe-f { background-color: var(--dpe-f); }
.dpe-g { background-color: var(--dpe-g); }

/* ============================================
   Component: Alerts / Toasts
   ============================================ */
.alert {
  padding: 1rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.alert-info {
  background-color: var(--primary-50);
  color: var(--primary-700);
  border: 1px solid var(--primary-100);
}

.alert-success {
  background-color: #ECFDF5;
  color: #065F46;
  border: 1px solid #A7F3D0;
}

.alert-warning {
  background-color: #FFFBEB;
  color: #92400E;
  border: 1px solid #FDE68A;
}

.alert-error {
  background-color: #FEF2F2;
  color: #991B1B;
  border: 1px solid #FECACA;
}

/* Toast Container */
.toast-container {
  position: fixed;
  top: 5rem;
  right: 1.5rem;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  padding: 1rem 1.25rem;
  min-width: 20rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: toastSlideIn var(--transition-slow) ease-out;
}

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

.toast-error {
  border-left: 4px solid #EF4444;
}

.toast-warning {
  border-left: 4px solid #F59E0B;
}

/* ============================================
   Component: Modal
   ============================================ */
/* Modal as container (new structure) */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal.hidden {
  display: none;
}

.modal .modal-overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal .modal-container {
  position: relative;
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  max-width: 32rem;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  z-index: 1;
}

/* Legacy modal structure support */
.modal-overlay:not(.modal .modal-overlay) {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal) ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-overlay.active > .modal-content {
  transform: translateY(0) scale(1);
}

.modal-content {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
  max-width: 32rem;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  transform: translateY(20px) scale(0.95);
  transition: transform var(--transition-slow) ease-out;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
}

.modal-close {
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: #6B7280;
  border-radius: 0.25rem;
  transition: all var(--transition-fast) ease;
}

.modal-close:hover {
  background-color: #F3F4F6;
  color: #111827;
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: 60vh;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #E5E7EB;
  background-color: #F9FAFB;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* ============================================
   Component: Tables
   ============================================ */
.table-container {
  overflow-x: auto;
}

.table,
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td,
.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid #E5E7EB;
}

.table th,
.data-table th {
  font-size: 0.75rem;
  font-weight: 600;
  color: #6B7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: #F9FAFB;
}

.table tr:hover,
.data-table tr:hover {
  background-color: #F9FAFB;
}

/* ============================================
   Component: Progress
   ============================================ */
.progress-bar {
  height: 0.5rem;
  background-color: #E5E7EB;
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--primary-600);
  border-radius: 9999px;
  transition: width var(--transition-slow) ease-out;
}

.progress-bar-success .progress-bar-fill {
  background-color: var(--secondary-500);
}

/* Circular Progress */
.progress-circle {
  position: relative;
  width: 120px;
  height: 120px;
}

.progress-circle svg {
  transform: rotate(-90deg);
}

.progress-circle-bg {
  fill: none;
  stroke: #E5E7EB;
  stroke-width: 8;
}

.progress-circle-fill {
  fill: none;
  stroke: var(--primary-600);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 314;
  stroke-dashoffset: 314;
  transition: stroke-dashoffset 1s ease-out;
}

.progress-circle-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
}

/* ============================================
   Component: Dropdown
   ============================================ */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  min-width: 12rem;
  z-index: 40;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-fast) ease;
}

.dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  color: #374151;
  text-decoration: none;
  transition: background-color var(--transition-fast) ease;
}

.dropdown-item:hover {
  background-color: #F3F4F6;
}

.dropdown-item:first-child {
  border-radius: 0.5rem 0.5rem 0 0;
}

.dropdown-item:last-child {
  border-radius: 0 0 0.5rem 0.5rem;
}

.dropdown-divider {
  height: 1px;
  background-color: #E5E7EB;
  margin: 0.25rem 0;
}

/* ============================================
   Component: Tabs
   ============================================ */
.tabs {
  display: flex;
  border-bottom: 1px solid #E5E7EB;
  gap: 0.5rem;
}

.tab {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6B7280;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
  transition: color var(--transition-fast) ease;
}

.tab:hover {
  color: #111827;
}

.tab.active {
  color: var(--primary-600);
}

.tab.active::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--primary-600);
}

.tab-content {
  display: none;
  padding: 1.5rem 0;
}

.tab-content.active {
  display: block;
}

/* ============================================
   Component: Avatar
   ============================================ */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  background-color: var(--primary-100);
  color: var(--primary-700);
  font-weight: 600;
  font-size: 0.875rem;
}

.avatar-sm {
  width: 2rem;
  height: 2rem;
  font-size: 0.75rem;
}

.avatar-lg {
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.125rem;
}

/* ============================================
   Component: Empty State
   ============================================ */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
}

.empty-state-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  color: #D1D5DB;
}

.empty-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.5rem;
}

.empty-state-description {
  font-size: 0.875rem;
  color: #6B7280;
  margin-bottom: 1.5rem;
}

/* ============================================
   Component: Skeleton Loading
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, #E5E7EB 0%, #F3F4F6 50%, #E5E7EB 100%);
  background-size: 200% 100%;
  animation: skeleton 1.5s ease infinite;
  border-radius: 0.375rem;
}

.skeleton-text {
  height: 1rem;
  width: 100%;
}

.skeleton-title {
  height: 1.5rem;
  width: 60%;
}

.skeleton-avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
}

.skeleton-card {
  height: 8rem;
  width: 100%;
}

/* ============================================
   Utility Classes
   ============================================ */
.text-primary { color: var(--primary-600); }
.text-secondary { color: var(--secondary-500); }
.text-gray-500 { color: #6B7280; }
.text-gray-600 { color: #4B5563; }
.text-gray-900 { color: #111827; }
.text-success { color: #059669; }
.text-warning { color: #D97706; }
.text-error { color: #DC2626; }

.bg-gray-50 { background-color: #F9FAFB; }
.bg-gray-100 { background-color: #F3F4F6; }
.bg-white { background-color: white; }
.bg-primary-50 { background-color: var(--primary-50); }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }

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

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }

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

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }

.m-0 { margin: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mr-2 { margin-right: 0.5rem; }
.ml-2 { margin-left: 0.5rem; }
.ml-auto { margin-left: auto; }

.w-full { width: 100%; }
.max-w-md { max-width: 28rem; }
.max-w-lg { max-width: 32rem; }
.max-w-xl { max-width: 36rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-6xl { max-width: 72rem; }

.min-h-screen { min-height: 100vh; }

.rounded { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-full { border-radius: 9999px; }

.border { border: 1px solid #E5E7EB; }
.border-t { border-top: 1px solid #E5E7EB; }
.border-b { border-bottom: 1px solid #E5E7EB; }

.shadow-sm { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.shadow { box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); }

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

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

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

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

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

/* ============================================
   Animations
   ============================================ */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes bounce {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.animate-fadeIn { animation: fadeIn var(--transition-normal) ease-out; }
.animate-slideUp { animation: slideUp var(--transition-slow) ease-out; }
.animate-bounce { animation: bounce 0.5s ease; }

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    transform: translateX(-100%);
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  }

  .main-content {
    margin-left: 0;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 0 1rem;
  }

  .main-content {
    padding: 1rem;
  }

  .card-body {
    padding: 1rem;
  }

  .hidden-mobile {
    display: none !important;
  }
}

@media (max-width: 640px) {
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .modal {
    width: 95%;
    max-height: 95vh;
  }
}

/* ============================================
   Page Specific: Landing
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--primary-50) 0%, white 100%);
  min-height: 600px;
  display: flex;
  align-items: center;
}

.hero-content {
  max-width: 600px;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: #111827;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: #6B7280;
  margin-bottom: 2rem;
}

.feature-card {
  text-align: center;
  padding: 2rem;
}

.feature-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  color: var(--primary-600);
}

.pricing-card {
  padding: 2rem;
  border: 2px solid #E5E7EB;
  border-radius: 1rem;
  transition: all var(--transition-normal) ease;
}

.pricing-card:hover {
  border-color: var(--primary-600);
  transform: translateY(-4px);
}

.pricing-card.featured {
  border-color: var(--primary-600);
  position: relative;
}

.pricing-badge {
  position: absolute;
  top: -0.75rem;
  right: 1rem;
}

.pricing-price {
  font-size: 2.5rem;
  font-weight: 800;
  color: #111827;
}

.pricing-period {
  font-size: 1rem;
  color: #6B7280;
}

/* ============================================
   Page Specific: Auth
   ============================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-header {
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-card {
  width: 100%;
  max-width: 26rem;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 2rem;
  color: #111827;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0;
  color: #9CA3AF;
  font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: #E5E7EB;
}

/* ============================================
   Page Specific: Dashboard
   ============================================ */
.stat-card {
  padding: 1.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #111827;
}

.stat-label {
  font-size: 0.875rem;
  color: #6B7280;
}

.stat-change {
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.stat-change.positive { color: #059669; }
.stat-change.negative { color: #DC2626; }

.activity-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid #E5E7EB;
}

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

.activity-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-content {
  flex: 1;
}

.activity-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
}

.activity-time {
  font-size: 0.75rem;
  color: #9CA3AF;
}

/* ============================================
   File Upload
   ============================================ */
.upload-zone {
  border: 2px dashed #D1D5DB;
  border-radius: 0.75rem;
  padding: 2rem;
  text-align: center;
  transition: all var(--transition-normal) ease;
  cursor: pointer;
}

.upload-zone:hover {
  border-color: var(--primary-600);
  background-color: var(--primary-50);
}

.upload-zone.dragging {
  border-color: var(--primary-600);
  background-color: var(--primary-100);
}

.upload-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  color: #9CA3AF;
}

.upload-text {
  font-size: 0.875rem;
  color: #6B7280;
}

.upload-text strong {
  color: var(--primary-600);
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background-color: #F9FAFB;
  border-radius: 0.5rem;
  margin-top: 0.75rem;
}

.file-icon {
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary-100);
  color: var(--primary-600);
  border-radius: 0.375rem;
}

.file-info {
  flex: 1;
}

.file-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #111827;
}

.file-size {
  font-size: 0.75rem;
  color: #9CA3AF;
}

/* ============================================
   Pro Portal Theme (Emerald)
   ============================================ */
.sidebar.bg-emerald-900 {
  background: linear-gradient(180deg, #064e3b 0%, #065f46 100%);
  border-right-color: rgba(255, 255, 255, 0.1);
}

.sidebar.bg-emerald-900 .sidebar-header {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.sidebar.bg-emerald-900 .sidebar-link {
  color: rgba(255, 255, 255, 0.75);
}

.sidebar.bg-emerald-900 .sidebar-link:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar.bg-emerald-900 .sidebar-link.active {
  background-color: rgba(255, 255, 255, 0.15);
  color: white;
}

.sidebar.bg-emerald-900 .sidebar-footer {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.sidebar.bg-emerald-900 .sidebar-divider {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Print Styles */
@media print {
  .sidebar,
  .navbar,
  .btn,
  .no-print {
    display: none !important;
  }

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