@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

a {
  color: var(--gp-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--gp-primary-hover);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
  background: var(--border-card);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gp-primary);
}

/* ==========================================================================
   APP LAYOUT
   ========================================================================== */
.app-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-left: 270px;
  transition: margin-left var(--transition-normal);
  background-color: var(--bg-body);
}

@media (max-width: 1024px) {
  .main-content {
    margin-left: 0;
  }
}

.content-body {
  flex: 1;
  padding: 1.75rem 2rem 3rem 2rem;
  max-width: 1600px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 768px) {
  .content-body {
    padding: 1rem 1rem 2rem 1rem;
  }
}

/* Utility Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 15px var(--gp-primary-glow); }
  50% { box-shadow: 0 0 30px var(--gp-primary-glow), 0 0 45px rgba(255, 107, 0, 0.2); }
}

@keyframes livePulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

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

.animate-fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   GLOBAL LIGHT THEME ACCESSIBILITY & CONTRAST OVERRIDES
   ========================================================================== */
[data-theme="light"] {
  color: var(--text-main);
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
  color: #0F172A !important;
}

[data-theme="light"] p,
[data-theme="light"] label {
  color: inherit;
}

/* Fix inline hardcoded light colors in light mode */
[data-theme="light"] h1[style*="color"],
[data-theme="light"] h2[style*="color"],
[data-theme="light"] h3[style*="color"],
[data-theme="light"] h4[style*="color"] {
  color: #0F172A !important;
}

/* Form inputs & controls in Light Mode */
[data-theme="light"] input[type="text"],
[data-theme="light"] input[type="password"],
[data-theme="light"] input[type="number"],
[data-theme="light"] select,
[data-theme="light"] textarea,
[data-theme="light"] .form-control {
  background-color: #FFFFFF !important;
  color: #0F172A !important;
  border-color: #CBD5E1 !important;
}

[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
  color: #64748B !important;
}

/* Modals & Cards in Light Mode */
[data-theme="light"] .card,
[data-theme="light"] .modal-content,
[data-theme="light"] .table-responsive,
[data-theme="light"] .module-wrapper {
  background-color: #FFFFFF;
  color: #0F172A;
  border-color: #CBD5E1;
}

/* Data Tables in Light Mode */
[data-theme="light"] .data-table th,
[data-theme="light"] .table th {
  background-color: #F1F5F9 !important;
  color: #334155 !important;
  border-bottom-color: #CBD5E1 !important;
}

[data-theme="light"] .data-table td,
[data-theme="light"] .table td {
  color: #0F172A !important;
  border-bottom-color: #E2E8F0 !important;
}

[data-theme="light"] .data-table tr:hover td,
[data-theme="light"] .table tr:hover td {
  background-color: #F8FAFC !important;
}
