/* ==========================================================================
   PLG CMMS - Core Design System & Tokens
   Matches Flutter Theme (lib/constants/responsive_design_constants.dart & LC tokens)
   ========================================================================== */

:root {
  /* Brand Colors */
  --color-primary-dark: #0F2E4E;
  --color-primary: #1E4D78;
  --color-primary-mid: #2A6BAD;
  --color-primary-light: #4A8FD6;
  --color-accent: #2276BA;

  /* Neutrals & Surfaces */
  --color-bg: #F3F8FD;
  --color-surface: #FFFFFF;
  --color-surface-hover: #F8FAFC;
  --color-surface-active: #E8F1FA;
  
  /* Text */
  --color-text-primary: #1A2E45;
  --color-text-secondary: #5A7A9A;
  --color-text-muted: #8EA0B4;
  --color-text-inverse: #FFFFFF;

  /* Borders & Inputs */
  --color-border: #CCDDEE;
  --color-border-light: #E2ECF5;
  --color-input-bg: #F0F5FB;
  --color-input-focus-border: #1E4D78;

  /* Status Accents */
  --color-success: #10B981;
  --color-success-bg: #ECFDF5;
  --color-warning: #F59E0B;
  --color-warning-bg: #FFFBEB;
  --color-danger: #E53935;
  --color-danger-bg: #FFF0F0;
  --color-info: #3B82F6;
  --color-info-bg: #EFF6FF;
  --color-purple: #8B5CF6;
  --color-purple-bg: #F5F3FF;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(15, 46, 78, 0.05);
  --shadow-md: 0 4px 12px rgba(15, 46, 78, 0.08);
  --shadow-lg: 0 10px 25px rgba(15, 46, 78, 0.12);
  --shadow-xl: 0 20px 40px rgba(15, 46, 78, 0.16);

  /* Gradients */
  --grad-brand: linear-gradient(135deg, #0F2E4E 0%, #1E4D78 50%, #2A6BAD 100%);
  --grad-card-welcome: linear-gradient(135deg, #2276BA 0%, #1E4D78 100%);
  --grad-button: linear-gradient(90deg, #1E4D78 0%, #2A6BAD 100%);
  --grad-success: linear-gradient(135deg, #059669 0%, #10B981 100%);
  --grad-warning: linear-gradient(135deg, #D97706 0%, #F59E0B 100%);
  --grad-danger: linear-gradient(135deg, #DC2626 0%, #EF4444 100%);

  /* Dimensions & Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', 'Inter', sans-serif;

  /* Sidebar & Header Dimensions */
  --sidebar-width: 280px;
  --topbar-height: 68px;
  --demo-bar-height: 42px;
}

/* Base Reset & Smoothness */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(30, 77, 120, 0.2);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(30, 77, 120, 0.4);
}

/* Typography Utilities */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-text-primary);
  font-weight: 700;
  line-height: 1.25;
}

.text-muted { color: var(--color-text-secondary); }
.text-primary-mid { color: var(--color-primary-mid); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }

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

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

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