/* ==========================================================================
   PH1 PANEL - HORIZON UI DESIGN TOKENS & CORE DESIGN SYSTEM (2026 EDITION)
   Inspired by Horizon UI Tailwind React & Modern Tier-1 Product Design
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Poppins:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Brand Horizon Colors */
  --brand-50: #E9E3FF;
  --brand-100: #C0B8FE;
  --brand-200: #A195FD;
  --brand-300: #8171FC;
  --brand-400: #7551FF;
  --brand-500: #422AFB;
  --brand-600: #3311DB;
  --brand-700: #2111A5;
  --brand-800: #190793;
  --brand-900: #11047A;

  --blue-secondary: #4318FF;
  --brand-linear: #868CFF;

  /* Neutrals & Grays (Light Mode) */
  --color-white: #FFFFFF;
  --bg-primary: #F4F7FE;
  --bg-card: #FFFFFF;
  --bg-card-secondary: #F8F9FA;
  --bg-hover: #F4F7FE;
  --border-color: rgba(226, 232, 240, 0.8);
  --border-light: rgba(112, 144, 176, 0.12);

  /* Typography Colors */
  --text-primary: #2B3674;
  --text-secondary: #707EAE;
  --text-muted: #A3AED0;
  --text-inverse: #FFFFFF;

  /* Functional Accents */
  --accent-green: #05CD99;
  --accent-green-bg: rgba(5, 205, 153, 0.1);
  --accent-red: #EE5D50;
  --accent-red-bg: rgba(238, 93, 80, 0.1);
  --accent-amber: #FFB547;
  --accent-amber-bg: rgba(255, 181, 71, 0.1);
  --accent-blue: #3965FF;
  --accent-blue-bg: rgba(57, 101, 255, 0.1);
  --accent-purple: #868CFF;
  --accent-cyan: #01B574;

  /* Shadows (Horizon 3D Signature) */
  --shadow-3xl: 14px 17px 40px 4px rgba(112, 144, 176, 0.08);
  --shadow-card: 0px 18px 40px rgba(112, 144, 176, 0.12);
  --shadow-sm: 0px 4px 12px rgba(112, 144, 176, 0.08);
  --shadow-glow: 0px 10px 25px rgba(67, 24, 255, 0.25);
  --shadow-green-glow: 0px 10px 25px rgba(5, 205, 153, 0.25);

  /* Radii & Metrics */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 30px;
  --radius-full: 9999px;

  /* Typography */
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 250ms cubic-bezier(0.22, 1, 0.36, 1);
  --transition-slow: 400ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   DARK MODE TOKENS (Horizon Dark Navy Palette)
   ========================================================================== */
[data-theme="dark"],
.dark {
  --bg-primary: #0B1437;
  --bg-card: #111C44;
  --bg-card-secondary: #1B254B;
  --bg-hover: rgba(255, 255, 255, 0.05);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.05);

  --text-primary: #FFFFFF;
  --text-secondary: #8F9BBA;
  --text-muted: #707EAE;

  --shadow-3xl: 14px 17px 40px 4px rgba(0, 0, 0, 0.35);
  --shadow-card: 0px 18px 40px rgba(0, 0, 0, 0.45);
  --shadow-sm: 0px 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0px 10px 30px rgba(117, 81, 255, 0.35);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.5;
  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-primary);
  letter-spacing: -0.02em;
}

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

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

button {
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

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

/* Glassmorphism utility */
.glass-panel {
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
}

[data-theme="dark"] .glass-panel,
.dark .glass-panel {
  background: rgba(17, 28, 68, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}
