/* ============================================
   MODERN COLOR PALETTE & DESIGN SYSTEM
   Updated CSS for Cualixis Platform
   ============================================ */

/* 🎯 Color Palette Definition */
:root {
  /* Primary Colors */
  --primary-color: #1e3a8a;      /* Deep Blue */
  --secondary-color: #0f766e;    /* Teal */
  --accent-color: #38bdf8;       /* Light Blue */

  /* Text Colors */
  --text-dark: #0f172a;          /* Dark Text */
  --text-light: #64748b;         /* Light Gray Text */

  /* Background Colors */
  --bg-light: #f8fafc;           /* Light Background */
  --white: #ffffff;              /* Pure White */

  /* Additional Utilities */
  --border-color: #e5e7eb;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
  --shadow-md: 0 10px 30px rgba(0,0,0,0.08);
  --shadow-lg: 0 20px 40px rgba(0,0,0,0.1);
}

/* 🧩 Global CSS (Base Theme) */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', 'Roboto', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* 🟦 Navbar / Header */
.navbar, .header {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  padding: 14px 30px;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 1000;
}

.navbar-brand {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  transform: translateY(-2px);
}

.navbar-brand img {
  height: 40px;
  width: auto;
  transition: transform 0.3s ease;
}

.navbar a {
  color: var(--white);
  margin-left: 20px;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  padding: 8px 12px;
  border-radius: 6px;
}

.navbar a:hover {
  color: var(--accent-color);
  background: rgba(56, 189, 248, 0.1);
  border-radius: 6px;
  padding: 8px 12px;
}

.navbar-nav .nav-link:hover {
  color: #38bdf8 !important;
  transform: translateY(-2px);
  transition: all 0.3s ease;
}

.dropdown-menu {
  background: linear-gradient(135deg, #1e3a8a 0%, #0f766e 100%) !important;
  border: none;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.dropdown-item {
  color: #ffffff !important;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: rgba(56, 189, 248, 0.2) !important;
  color: #38bdf8 !important;
}

.navbar a.active {
  color: var(--accent-color);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: 6px;
}

/* Header scrolling text */
.header {
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  padding: 10px 30px;
}

.scrolling-text {
  display: inline-block;
  animation: scroll-right 20s linear infinite;
  padding-right: 100%;
  color: var(--white);
  font-weight: 500;
}

@keyframes scroll-right {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* 📦 Card Design (Dashboard / Sections) */
.card {
  background: var(--white);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--accent-color);
}

.card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.card h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-color);
  margin-top: 15px;
  margin-bottom: 8px;
}

.card-header {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  padding: 15px 20px;
  border-radius: 12px 12px 0 0;
  margin: -20px -20px 15px -20px;
  font-weight: 600;
}

.card-body {
  padding: 15px 0;
}

.card-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
  margin-top: 15px;
}

/* 🔘 Buttons */
.btn {
  padding: 10px 22px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color)) !important;
  color: #1e3a8a !important;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color)) !important;
  box-shadow: 0 8px 20px rgba(30, 58, 138, 0.4) !important;
  transform: translateY(-3px) !important;
  color: #1e3a8a !important;
}

.btn-primary:active {
  transform: translateY(-1px) !important;
}

.btn-secondary {
  background: var(--secondary-color) !important;
  color: #1e3a8a !important;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--secondary-color), var(--primary-color)) !important;
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.4) !important;
  transform: translateY(-3px) !important;
  color: #1e3a8a !important;
}

.btn-accent {
  background: var(--accent-color) !important;
  color: #1e3a8a !important;
  border: none;
}

.btn-accent:hover {
  background: #06b6d4 !important;
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.4) !important;
  transform: translateY(-3px) !important;
  color: #1e3a8a !important;
}

.btn-outline {
  background: transparent !important;
  border: 2px solid var(--primary-color) !important;
  color: #1e3a8a !important;
}

.btn-outline:hover {
  background: var(--primary-color) !important;
  color: #1e3a8a !important;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3) !important;
}

.btn-ghost {
  background: transparent !important;
  color: #1e3a8a !important;
  border: 1px solid var(--border-color) !important;
}

.btn-ghost:hover {
  background: var(--bg-light) !important;
  border-color: var(--primary-color) !important;
  color: #1e3a8a !important;
}

.btn-success {
  background: #10b981 !important;
  color: #1e3a8a !important;
}

.btn-success:hover {
  background: #059669 !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
  color: #1e3a8a !important;
}

.btn-danger {
  background: #ef4444 !important;
  color: #1e3a8a !important;
}

.btn-danger:hover {
  background: #dc2626 !important;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
  color: #1e3a8a !important;
}

.btn-warning {
  background: #f59e0b !important;
  color: #1e3a8a !important;
}

.btn-warning:hover {
  background: #d97706 !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important;
  color: #1e3a8a !important;
}

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

.btn-lg {
  padding: 12px 28px;
  font-size: 16px;
}

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

/* 📊 Tables */
.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.table th {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  color: var(--white);
  padding: 12px;
  font-weight: 600;
  text-align: left;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table td {
  padding: 12px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
}

.table tbody tr:hover {
  background: var(--bg-light);
  transition: background 0.2s ease;
}

.table tbody tr:last-child td {
  border-bottom: none;
}

/* ✨ Highlight / Badge */
.badge {
  background: var(--accent-color);
  color: var(--white);
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

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

.badge-secondary {
  background: var(--secondary-color);
}

.badge-accent {
  background: var(--accent-color);
}

.badge-success {
  background: #10b981;
  color: var(--white);
}

.badge-warning {
  background: #f59e0b;
  color: var(--white);
}

.badge-danger {
  background: #ef4444;
  color: var(--white);
}

.badge-info {
  background: #3b82f6;
  color: var(--white);
}

/* 📝 Forms */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

label {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
  font-size: 14px;
}

input, textarea, select {
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  background: var(--white);
  color: var(--text-dark);
  transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

input:disabled, textarea:disabled, select:disabled {
  background: var(--bg-light);
  cursor: not-allowed;
  opacity: 0.6;
}

/* 🔐 Input Groups */
.input-group {
  display: flex;
  gap: 8px;
}

.input-group input {
  flex: 1;
}

/* 📋 Headings */
h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 16px;
  line-height: 1.3;
}

h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 14px;
  line-height: 1.3;
}

h3 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 12px;
  line-height: 1.3;
}

h4 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
}

h5 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

h6 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 8px;
}

/* 🔗 Links */
a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* ⚠️ Alerts */
.alert {
  padding: 14px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  border-left: 4px solid;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.alert-success {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.alert-warning {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #92400e;
}

.alert-danger {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

.alert-info {
  background: #eff6ff;
  border-color: #3b82f6;
  color: #0c4a6e;
}

.alert-primary {
  background: rgba(30, 58, 138, 0.05);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

/* 📍 Progress Bar */
.progress {
  height: 8px;
  background: var(--border-color);
  border-radius: 10px;
  overflow: hidden;
  margin: 15px 0;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  border-radius: 10px;
  transition: width 0.3s ease;
}

/* 🎭 Modal / Overlay */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--white);
  border-radius: 14px;
  padding: 30px;
  max-width: 600px;
  width: 90%;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
  margin-bottom: 15px;
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-dark);
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 15px;
  margin-top: 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* 🔄 Utility Classes */
.text-center {
  text-align: center;
}

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

.text-left {
  text-align: left;
}

.text-muted {
  color: var(--text-light);
}

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

.text-secondary {
  color: var(--secondary-color);
}

.text-accent {
  color: var(--accent-color);
}

.bg-primary {
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)) !important;
  color: var(--white) !important;
}

.bg-secondary {
  background: var(--secondary-color) !important;
  color: var(--white) !important;
}

.bg-light {
  background: var(--bg-light) !important;
}

.bg-white {
  background: var(--white) !important;
}

/* Utility class for padding with primary background */
.py-1.bg-primary {
  background: gold !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  color: var(--white) !important;
}

/* Spacing */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.p-1 { padding: 8px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.p-4 { padding: 32px; }

/* 📱 Responsive */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    padding: 10px 15px;
  }

  .navbar-brand {
    margin-bottom: 10px;
  }

  .navbar a {
    margin-left: 0;
    margin-right: 10px;
  }

  h1 { font-size: 28px; }
  h2 { font-size: 24px; }
  h3 { font-size: 20px; }

  .table {
    font-size: 12px;
  }

  .table td, .table th {
    padding: 8px;
  }

  .card {
    padding: 15px;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .navbar {
    padding: 8px 10px;
  }

  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  h3 { font-size: 18px; }

  .btn {
    padding: 8px 16px;
    font-size: 12px;
  }

  .card {
    padding: 12px;
    margin-bottom: 15px;
  }

  .modal-content {
    width: 95%;
    padding: 20px;
  }
}
