/**
 * Global Styles
 * Vocalix Contact Center Platform
 */

:root {
  /* Madlex Color Palette */
  --primary: #009DBD;
  --primary-dark: #055A94;
  --primary-hover: #077D99;
  --secondary: #0FBCCE;
  --accent-cyan: #84DCE6;
  --accent-light: #C4EEF2;

  /* Semantic Colors */
  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;
  --info: #3B82F6;

  /* Dark Theme */
  --dark-primary: #00083C;
  --dark-secondary: #173052;
  --dark-tertiary: #14263D;

  /* Grays & Neutrals */
  --gray-50: #F8F8F8;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #8D96AD;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  /* Spacing & Borders */
  --radius: 20px;
  --radius-sm: 12px;
  --radius-lg: 30px;
  --shadow: 6px 6px 9px rgba(0, 0, 0, 0.2);
  --shadow-sm: 3px 3px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 10px 10px 20px rgba(0, 0, 0, 0.25);

  /* Gradients */
  --gradient-primary: linear-gradient(196deg, #C4EEF2 0%, #84DCE6 89%);
  --gradient-dark: linear-gradient(180deg, #173052 58%, #14263D 100%);
  --gradient-blue: linear-gradient(135deg, #009DBD 0%, #055A94 100%);
}

/* Reset */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.625;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--gray-800);
}

/* Typography - Madlex Style */
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  font-weight: 500;
  line-height: 1.2;
  color: var(--gray-900);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

/* Utilities */
.text-muted {
  color: var(--gray-500) !important;
}

.badge {
  font-weight: 600;
  padding: 0.35em 0.65em;
}

.badge-soft {
  background-color: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

/* Cards - Madlex Style */
.card {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  border: none;
  overflow: hidden;
}

.card-header {
  background-color: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  padding: 1.5rem;
}

/* Buttons - Madlex Style */
.btn {
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 16px;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
  border: none;
}

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

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-outline-secondary {
  background: transparent;
  border: 2px solid var(--gray-300);
  color: var(--gray-700);
}

.btn-outline-secondary:hover {
  background: var(--gray-50);
  border-color: var(--primary);
  color: var(--primary);
}

/* Forms */
.form-control,
.form-select {
  border-radius: var(--radius-sm);
  border-color: var(--gray-300);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Tables */
.table {
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th {
  background-color: var(--gray-50);
  border-bottom: 2px solid var(--gray-300);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.5px;
  color: var(--gray-700);
}

.table tbody tr:hover {
  background-color: var(--gray-50);
}

.table td {
  vertical-align: middle;
}

/* Modals */
.modal-content {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: 1px solid var(--gray-200);
}

.modal-footer {
  border-top: 1px solid var(--gray-200);
}

/* Pills / Tags */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--gray-300);
  background: white;
  font-size: 0.875rem;
  font-weight: 500;
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

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

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

/* Status Badges */
.badge-status {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

.badge-status.activo {
  background-color: #d1fae5;
  color: #065f46;
}

.badge-status.inactivo {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-status.pausado {
  background-color: #fef3c7;
  color: #92400e;
}

/* Responsive */
@media (max-width: 768px) {
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

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

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

  body {
    background: white;
  }

  .card {
    box-shadow: none;
    border: 1px solid var(--gray-300);
  }
}
