/* ═══════════════════════════════════════════════════════════════
   VK CREATIVES — DESIGN SYSTEM
   Brand colors extracted from logo: Green, Navy, Coral, Amber, Purple
   ═══════════════════════════════════════════════════════════════ */

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

/* ── CSS Reset ───────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }

/* ── Light Mode (Default) ────────────────────────────────────── */
:root {
  /* Brand Colors */
  --vk-green: #78B833;
  --vk-green-light: #9DD45E;
  --vk-green-dark: #5A8F1F;
  --vk-navy: #2B2D7B;
  --vk-navy-light: #3D3FA8;
  --vk-navy-dark: #1E1F55;
  --vk-coral: #E8734A;
  --vk-coral-light: #F09272;
  --vk-coral-dark: #C75A33;
  --vk-amber: #F5A623;
  --vk-amber-light: #FFBE4D;
  --vk-amber-dark: #D48C10;
  --vk-purple: #5B2D8E;
  --vk-purple-light: #7B4DB0;
  --vk-purple-dark: #3F1D63;

  /* Semantic Colors */
  --color-success: #22C55E;
  --color-success-bg: rgba(34, 197, 94, 0.1);
  --color-warning: #F5A623;
  --color-warning-bg: rgba(245, 166, 35, 0.1);
  --color-danger: #EF4444;
  --color-danger-bg: rgba(239, 68, 68, 0.1);
  --color-info: #3B82F6;
  --color-info-bg: rgba(59, 130, 246, 0.1);

  /* Backgrounds */
  --bg-body: #F4F6FA;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --bg-sidebar: #FFFFFF;
  --bg-header: rgba(255, 255, 255, 0.85);
  --bg-input: #F1F5F9;
  --bg-input-focus: #FFFFFF;
  --bg-modal-overlay: rgba(15, 17, 23, 0.5);
  --bg-tooltip: #1E293B;

  /* Text */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #94A3B8;
  --text-inverse: #FFFFFF;
  --text-link: #5B2D8E;

  /* Borders */
  --border-color: #E2E8F0;
  --border-color-light: #F1F5F9;
  --border-color-focus: var(--vk-navy);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.06);
  --shadow-glow-green: 0 0 20px rgba(120, 184, 51, 0.3);
  --shadow-glow-coral: 0 0 20px rgba(232, 115, 74, 0.3);
  --shadow-glow-navy: 0 0 20px rgba(43, 45, 123, 0.3);

  /* Glass */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-blur: blur(20px);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Typography */
  --font-xs: 0.75rem;
  --font-sm: 0.8125rem;
  --font-base: 0.9375rem;
  --font-md: 1rem;
  --font-lg: 1.125rem;
  --font-xl: 1.25rem;
  --font-2xl: 1.5rem;
  --font-3xl: 1.875rem;
  --font-4xl: 2.25rem;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
  --transition-spring: 300ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Z-index */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 300;
  --z-toast: 400;
  --z-tooltip: 500;

  /* Sidebar */
  --sidebar-width: 260px;
  --header-height: 64px;
}

/* ── Dark Mode ───────────────────────────────────────────────── */
[data-theme="dark"] {
  --vk-green: #8FCC4A;
  --vk-green-light: #A8E066;
  --vk-green-dark: #6DA032;
  --vk-navy: #6466C8;
  --vk-navy-light: #8284E0;
  --vk-navy-dark: #4A4CC4;
  --vk-coral: #F08A66;
  --vk-coral-light: #F5A88E;
  --vk-coral-dark: #E06A42;
  --vk-amber: #FFB940;
  --vk-amber-light: #FFCC66;
  --vk-amber-dark: #E09E20;
  --vk-purple: #9B6FD0;
  --vk-purple-light: #B48DE0;
  --vk-purple-dark: #7B4DB0;

  --color-success: #4ADE80;
  --color-success-bg: rgba(74, 222, 128, 0.12);
  --color-warning: #FBBF24;
  --color-warning-bg: rgba(251, 191, 36, 0.12);
  --color-danger: #F87171;
  --color-danger-bg: rgba(248, 113, 113, 0.12);
  --color-info: #60A5FA;
  --color-info-bg: rgba(96, 165, 250, 0.12);

  --bg-body: #0B0E14;
  --bg-card: #141720;
  --bg-card-hover: #1A1E2E;
  --bg-sidebar: #0F1218;
  --bg-header: rgba(11, 14, 20, 0.85);
  --bg-input: #1A1E2E;
  --bg-input-focus: #1E2336;
  --bg-modal-overlay: rgba(0, 0, 0, 0.7);
  --bg-tooltip: #2D3348;

  --text-primary: #E8ECF4;
  --text-secondary: #94A3C0;
  --text-tertiary: #5E6B85;
  --text-inverse: #0F172A;
  --text-link: #9B6FD0;

  --border-color: #1E2336;
  --border-color-light: #161A28;
  --border-color-focus: var(--vk-navy);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.35), 0 4px 10px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.4), 0 8px 16px rgba(0, 0, 0, 0.25);
  --shadow-glow-green: 0 0 25px rgba(143, 204, 74, 0.25);
  --shadow-glow-coral: 0 0 25px rgba(240, 138, 102, 0.25);
  --shadow-glow-navy: 0 0 25px rgba(100, 102, 200, 0.25);

  --glass-bg: rgba(20, 23, 32, 0.75);
  --glass-border: rgba(30, 35, 54, 0.6);
}

/* ── Base Styles ─────────────────────────────────────────────── */
body {
  background-color: var(--bg-body);
  color: var(--text-primary);
  min-height: 100vh;
}

::selection {
  background-color: var(--vk-navy);
  color: var(--text-inverse);
}

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

::-webkit-scrollbar-track {
  background: transparent;
}

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

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

/* Focus Visible */
:focus-visible {
  outline: 2px solid var(--vk-navy);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

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

h1 { font-size: var(--font-3xl); }
h2 { font-size: var(--font-2xl); }
h3 { font-size: var(--font-xl); }
h4 { font-size: var(--font-lg); }
h5 { font-size: var(--font-md); }
h6 { font-size: var(--font-base); }

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

.text-xs { font-size: var(--font-xs); }
.text-sm { font-size: var(--font-sm); }
.text-base { font-size: var(--font-base); }
.text-lg { font-size: var(--font-lg); }
.text-xl { font-size: var(--font-xl); }
.text-2xl { font-size: var(--font-2xl); }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

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

.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-tertiary { color: var(--text-tertiary); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-danger { color: var(--color-danger); }

/* ── Layout Utilities ────────────────────────────────────────── */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

.grid { display: grid; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 0px;
    --header-height: 56px;
  }
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  .hide-mobile { display: none !important; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

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