/* KESLES Color System */
:root {
  --oxford-night: #001D2B;
  --sea-paint: #00517A;
  --pervenche: #009AE8;
  --ganon-blue: #A3E0FF;
  --clear-skies: #E6F7FF;
  --fresh-turquoise: #40E0D0;
  --luminescent-sky: #CCFFFA;
  --bubbles: #E6FFFC;
  --ma-white: #F4F9FF;
  --pico-orange: #FFA200;
}

/* Sidebar */
.sidebar {
  background: linear-gradient(180deg, var(--oxford-night) 0%, var(--sea-paint) 100%);
}
.sidebar-header {
  background: rgba(0, 0, 0, 0.15);
}

/* Nav items */
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.65);
  transition: all 0.15s ease;
  text-decoration: none;
}
.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.nav-item.active {
  color: #fff;
  background: var(--pervenche);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0, 154, 232, 0.3);
}

/* Cards */
.card {
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  overflow: hidden;
}
.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.card-body {
  padding: 1.25rem;
}

/* Stat cards */
.stat-card {
  background: #fff;
  border-radius: 0.75rem;
  border: 1px solid #e5e7eb;
  padding: 1.25rem;
  transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}
.stat-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: all 0.15s;
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--pervenche);
  color: #fff;
}
.btn-primary:hover {
  background: #0088d1;
}
.btn-success {
  background: #059669;
  color: #fff;
}
.btn-success:hover {
  background: #047857;
}
.btn-warning {
  background: var(--pico-orange);
  color: #fff;
}
.btn-warning:hover {
  background: #e69200;
}
.btn-danger {
  background: #dc2626;
  color: #fff;
}
.btn-danger:hover {
  background: #b91c1c;
}
.btn-ghost {
  background: transparent;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}
.btn-ghost:hover {
  background: #f9fafb;
}
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

/* Tables */
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
.tbl thead {
  background: var(--ma-white);
}
.tbl th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}
.tbl td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  color: #4b5563;
}
.tbl tbody tr:hover {
  background: #f9fafb;
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}
.badge-new { background: var(--clear-skies); color: var(--sea-paint); }
.badge-sent { background: #d1fae5; color: #065f46; }
.badge-archived { background: #f3f4f6; color: #6b7280; }
.badge-success { background: #d1fae5; color: #065f46; }
.badge-failed { background: #fee2e2; color: #991b1b; }
.badge-active { background: #d1fae5; color: #065f46; }
.badge-inactive { background: #fee2e2; color: #991b1b; }
.badge-matched { background: var(--bubbles); color: #047857; }
.badge-mismatch { background: #fef3c7; color: #92400e; }

/* Form inputs */
.form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.form-input:focus {
  border-color: var(--pervenche);
  box-shadow: 0 0 0 3px rgba(0, 154, 232, 0.15);
}
.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.375rem;
}

/* Toast */
.toast-success { background: #059669; }
.toast-error { background: #dc2626; }
.toast-info { background: var(--pervenche); }

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
.spinner-dark {
  border-color: rgba(0, 0, 0, 0.1);
  border-top-color: var(--pervenche);
}

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

/* Modal */
.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-body {
  padding: 1.5rem;
}
.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #f3f4f6;
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Disabled button */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Margin helpers */
.mb-6 { margin-bottom: 1.5rem; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #9ca3af;
}
.empty-state svg {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.75rem;
  opacity: 0.4;
}
