/* ========================================
   KanaSG Platform - Professional Design System
   CSS Variables & Design Tokens
   ======================================== */

:root {
  /* ===== COLORS - PRIMARY PALETTE ===== */
  --primary-50: #f0f9fd;
  --primary-100: #e1f2fa; 
  --primary-200: #c2e6f5;
  --primary-300: #94d3ed;
  --primary-400: #5eb8e0;
  --primary-500: #278aaf;  /* Main brand color - KanaSG Blue */
  --primary-600: #237a9f;
  --primary-700: #1e6885;
  --primary-800: #1a566e;
  --primary-900: #16475c;
  --primary-950: #0d2d3d;

  /* ===== COLORS - SECONDARY PALETTE ===== */
  --secondary-50: #f8fafc;
  --secondary-100: #f1f5f9;
  --secondary-200: #e2e8f0;
  --secondary-300: #cbd5e1;
  --secondary-400: #94a3b8;
  --secondary-500: #64748b;  /* Slate - Modern secondary */
  --secondary-600: #475569;
  --secondary-700: #334155;
  --secondary-800: #1e293b;
  --secondary-900: #0f172a;

  /* ===== COLORS - SEMANTIC ===== */
  --success: #aa1616;      /* KanaSG Custom Red */
  --success-light: #fde2e2;
  --warning: #f59e0b;      /* Amber - Modern warning */
  --warning-light: #fef3c7;
  --error: #ef4444;        /* Red - Modern error */
  --error-light: #fee2e2;
  --info: #06b6d4;         /* Cyan - Modern info */
  --info-light: #cffafe;

  /* ===== COLORS - NEUTRALS ===== */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --black: #000000;

  /* ===== TYPOGRAPHY ===== */
  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-family-heading: 'Inter', sans-serif;
  --font-family-mono: 'Fira Code', 'SF Mono', Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;

  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 0.9rem;     /* 14.4px - Optimized for readability */
  --font-size-lg: 1.125rem;     /* 18px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-2xl: 1.5rem;      /* 24px */
  --font-size-3xl: 1.875rem;    /* 30px */
  --font-size-4xl: 2.25rem;     /* 36px */

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.25;
  --line-height-normal: 1.6;     /* Improved readability */
  --line-height-relaxed: 1.75;

  /* ===== SPACING ===== */
  --space-1: 0.25rem;    /* 4px */
  --space-2: 0.5rem;     /* 8px */
  --space-3: 0.75rem;    /* 12px */
  --space-4: 1rem;       /* 16px */
  --space-5: 1.25rem;    /* 20px */
  --space-6: 1.5rem;     /* 24px */
  --space-8: 2rem;       /* 32px */
  --space-10: 2.5rem;    /* 40px */
  --space-12: 3rem;      /* 48px */
  --space-16: 4rem;      /* 64px */
  --space-20: 5rem;      /* 80px */

  /* ===== BORDER RADIUS ===== */
  --radius-none: 0;
  --radius-sm: 0.5rem;     /* 8px - Modern subtle radius */
  --radius-base: 0.75rem;  /* 12px - Main radius */
  --radius-md: 0.75rem;    /* 12px */
  --radius-lg: 1rem;       /* 16px - Card radius */
  --radius-xl: 1.25rem;    /* 20px */
  --radius-2xl: 1.5rem;    /* 24px */
  --radius-3xl: 2rem;      /* 32px */
  --radius-full: 9999px;

  /* ===== SHADOWS ===== */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-base: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  --shadow-2xl: 0 50px 100px -20px rgb(0 0 0 / 0.25);

  /* ===== GLASSMORPHISM ===== */
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-backdrop: blur(20px);

  /* ===== TRANSITIONS ===== */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* ===== BREAKPOINTS (for reference) ===== */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --glass-bg: rgba(15, 23, 42, 0.85);
    --glass-border: rgba(148, 163, 184, 0.1);
  }
}

/* ===== UTILITY CLASSES ===== */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-backdrop);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
}

.gradient-primary {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
}

.gradient-secondary {
  background: linear-gradient(135deg, var(--secondary-600) 0%, var(--secondary-800) 100%);
}

/* ===== PROFESSIONAL ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.animate-fade-in-up {
  animation: fadeInUp var(--transition-base) ease-out;
}

.animate-slide-in-right {
  animation: slideInRight var(--transition-base) ease-out;
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ===== KANASG BRAND UTILITIES ===== */
.text-kanasg-blue {
  color: var(--primary-500) !important;
}

.bg-kanasg-blue {
  background-color: var(--primary-500) !important;
}

.border-kanasg-blue {
  border-color: var(--primary-500) !important;
}

.btn-kanasg {
  background-color: var(--primary-500);
  border-color: var(--primary-500);
  color: var(--white);
  transition: all var(--transition-fast);
}

.btn-kanasg:hover {
  background-color: var(--primary-600);
  border-color: var(--primary-600);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-kanasg:active,
.btn-kanasg:focus {
  background-color: var(--primary-700);
  border-color: var(--primary-700);
  box-shadow: 0 0 0 0.2rem rgba(39, 138, 175, 0.25);
}

/* ===== BOOTSTRAP COLOR OVERRIDES ===== */
:root {
  /* Override Bootstrap success colors with KanaSG custom red */
  --bs-success: #aa1616 !important;
  --bs-success-rgb: 170, 22, 22 !important;
}

/* Additional success color overrides */
.btn-success {
  --bs-btn-bg: #aa1616 !important;
  --bs-btn-border-color: #aa1616 !important;
  --bs-btn-hover-bg: #941414 !important;
  --bs-btn-hover-border-color: #941414 !important;
  --bs-btn-active-bg: #7e1212 !important;
  --bs-btn-active-border-color: #7e1212 !important;
  --bs-btn-disabled-bg: #aa1616 !important;
  --bs-btn-disabled-border-color: #aa1616 !important;
}

.bg-success {
  background-color: #aa1616 !important;
}

.text-success {
  color: #aa1616 !important;
}

.border-success {
  border-color: #aa1616 !important;
}

.badge.bg-success {
  background-color: #aa1616 !important;
}

.alert-success {
  background-color: rgba(170, 22, 22, 0.1) !important;
  border-color: rgba(170, 22, 22, 0.2) !important;
  color: #7e1212 !important;
}

.toast.bg-success,
.toast .toast-header.bg-success {
  background-color: #aa1616 !important;
}

.text-bg-success {
  background-color: #aa1616 !important;
  color: #ffffff !important;
}

.spinner-border.text-success,
.spinner-grow.text-success {
  color: #aa1616 !important;
}

.progress-bar.bg-success {
  background-color: #aa1616 !important;
}

.card.bg-success {
  background-color: #aa1616 !important;
  border-color: #aa1616 !important;
}

.card-header.bg-success {
  background-color: #aa1616 !important;
  border-color: #aa1616 !important;
}

/* ===== KANASG CUSTOM SUCCESS UTILITIES ===== */
.text-kanasg-red {
  color: #aa1616 !important;
}

.bg-kanasg-red {
  background-color: #aa1616 !important;
}

.border-kanasg-red {
  border-color: #aa1616 !important;
}

.btn-kanasg-red {
  background-color: #aa1616;
  border-color: #aa1616;
  color: var(--white);
  transition: all var(--transition-fast);
}

.btn-kanasg-red:hover {
  background-color: #941414;
  border-color: #941414;
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-kanasg-red:active,
.btn-kanasg-red:focus {
  background-color: #7e1212;
  border-color: #7e1212;
  box-shadow: 0 0 0 0.2rem rgba(170, 22, 22, 0.25);
}

/* ===== RESPONSIVE MOBILE BUTTONS ===== */
@media (max-width: 768px) {
  /* Compact create buttons on mobile - hide text, show only icon */
  .btn-create-mobile .btn-text {
    display: none;
  }
  
  .btn-create-mobile {
    width: 44px !important;
    height: 44px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .btn-create-mobile i {
    margin: 0 !important;
    font-size: 1.25rem !important;
  }
}

@media (min-width: 769px) {
  /* Desktop - show full button with text */
  .btn-create-mobile .btn-text {
    display: inline;
  }
}

/* ===== VERIFICATION/VALIDATION INDICATORS ===== */
/* Keep original green for verification, validation and positive status indicators */
.text-verified,
.text-validation,
.text-status-positive {
  color: #10b981 !important; /* Original emerald green */
}

.bg-verified,
.bg-validation,
.bg-status-positive {
  background-color: #10b981 !important;
}

.border-verified,
.border-validation,
.border-status-positive {
  border-color: #10b981 !important;
}

/* Specific overrides for verification icons and status indicators */
i.bi-check-circle-fill.text-success,
i.bi-check-circle.text-success,
i.bi-patch-check-fill.text-success,
i.bi-shield-check.text-success,
.verification-icon.text-success,
.status-verified.text-success {
  color: #10b981 !important; /* Keep green for verification icons */
}

/* Status badges that should remain green */
.badge.bg-success.status-verified,
.badge.bg-success[title*="verificado"],
.badge.bg-success[title*="Verificado"] {
  background-color: #10b981 !important;
}

/* Status badges that should remain green */
.badge.bg-success.status-active,
.badge.bg-success.status-verified,
span.badge.bg-success.status-active,
span.badge.bg-success.status-verified {
  background-color: #10b981 !important; /* Keep green for active/verified status */
}

/* ===== MODERN PAGINATION STYLES ===== */
.pagination {
  gap: 0.25rem;
}

.pagination .page-link {
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  font-weight: var(--font-weight-medium);
  padding: 0.5rem 0.75rem;
  transition: all var(--transition-fast);
  background: var(--white);
  font-size: var(--font-size-sm);
}

.pagination .page-link:hover {
  background: var(--primary-50);
  border-color: var(--primary-300);
  color: var(--primary-700);
  transform: translateY(-1px);
}

.pagination .page-item.active .page-link {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.pagination .page-item.disabled .page-link {
  background: var(--gray-100);
  border-color: var(--gray-200);
  color: var(--gray-400);
  cursor: not-allowed;
}

.pagination .page-item.disabled .page-link:hover {
  transform: none;
  background: var(--gray-100);
  border-color: var(--gray-200);
}

/* Mobile pagination adjustments */
@media (max-width: 768px) {
  .pagination .page-link {
    padding: 0.375rem 0.5rem;
    font-size: var(--font-size-xs);
  }
}

/* ===== METIS SEARCH INPUT STYLES ===== */
.metis-search-icon {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
  border: 1px solid var(--primary-500);
  color: var(--white);
  transition: all var(--transition-fast);
  font-weight: var(--font-weight-medium);
}

.metis-search-icon i {
  font-size: var(--font-size-base);
  color: var(--white);
}

/* Input group focus state */
.input-group:focus-within .metis-search-icon {
  background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
  border-color: var(--primary-600);
  box-shadow: 0 0 0 0.2rem rgba(39, 138, 175, 0.25);
}

/* Modern search input styling */
.input-group .form-control:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 0.2rem rgba(39, 138, 175, 0.25);
}