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

:root {
  --color-bg-primary: #f0f2f5;
  --color-bg-secondary: #ffffff;
  --color-bg-tertiary: #f8f9fb;
  --color-bg-glass: rgba(255, 255, 255, 0.65);
  --color-bg-glass-hover: rgba(255, 255, 255, 0.85);
  --color-bg-overlay: rgba(0, 0, 0, 0.5);

  --color-text-primary: #0f172a;
  --color-text-secondary: #475569;
  --color-text-tertiary: #94a3b8;
  --color-text-inverse: #ffffff;

  --color-border: rgba(0, 0, 0, 0.08);
  --color-border-hover: rgba(0, 0, 0, 0.15);

  --gradient-personal: linear-gradient(135deg, #6366f1, #8b5cf6, #a855f7);
  --gradient-official: linear-gradient(135deg, #0ea5e9, #06b6d4, #14b8a6);
  --gradient-accent: linear-gradient(135deg, #6366f1, #06b6d4);
  --gradient-danger: linear-gradient(135deg, #ef4444, #f97316);
  --gradient-success: linear-gradient(135deg, #10b981, #34d399);

  --color-accent-primary: #6366f1;
  --color-accent-secondary: #06b6d4;
  --color-accent-success: #10b981;
  --color-accent-warning: #f59e0b;
  --color-accent-danger: #ef4444;

  --color-cat-identity: #6366f1;
  --color-cat-financial: #10b981;
  --color-cat-education: #f59e0b;
  --color-cat-insurance: #ec4899;
  --color-cat-property: #8b5cf6;
  --color-cat-employment: #0ea5e9;
  --color-cat-salary: #14b8a6;
  --color-cat-appraisal: #f97316;
  --color-cat-company-id: #6366f1;
  --color-cat-certificate: #06b6d4;
  --color-cat-agreements: #ef4444;
  --color-cat-other: #94a3b8;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.8125rem;
  --font-size-base: 0.9375rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.375rem;
  --font-size-2xl: 1.75rem;
  --font-size-3xl: 2.25rem;
  --font-size-4xl: 3rem;

  --font-weight-light: 300;
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  --line-height-tight: 1.2;
  --line-height-base: 1.5;
  --line-height-relaxed: 1.75;

  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.625rem;
  --radius-lg: 1rem;
  --radius-xl: 1.25rem;
  --radius-2xl: 1.5rem;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.08);
  --shadow-glow-personal: 0 8px 32px rgba(99, 102, 241, 0.25);
  --shadow-glow-official: 0 8px 32px rgba(6, 182, 212, 0.25);
  --shadow-glow-accent: 0 8px 32px rgba(99, 102, 241, 0.2);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 500;
  --z-toast: 700;
  --z-tooltip: 900;

  --glass-blur: blur(16px);
  --glass-saturate: saturate(180%);
}

[data-theme="dark"] {
  --color-bg-primary: #0b0f1a;
  --color-bg-secondary: #141927;
  --color-bg-tertiary: #1a2035;
  --color-bg-glass: rgba(20, 25, 39, 0.7);
  --color-bg-glass-hover: rgba(26, 32, 53, 0.85);
  --color-bg-overlay: rgba(0, 0, 0, 0.7);

  --color-text-primary: #f1f5f9;
  --color-text-secondary: #94a3b8;
  --color-text-tertiary: #475569;
  --color-text-inverse: #0f172a;

  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-hover: rgba(255, 255, 255, 0.15);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.25);
  --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.5), 0 8px 16px rgba(0, 0, 0, 0.3);
  --shadow-glow-personal: 0 8px 32px rgba(99, 102, 241, 0.3);
  --shadow-glow-official: 0 8px 32px rgba(6, 182, 212, 0.3);
  --shadow-glow-accent: 0 8px 32px rgba(99, 102, 241, 0.25);
}

*,
*::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: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-base);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--transition-base), color var(--transition-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  z-index: -1;
  filter: blur(100px);
  opacity: 0.15;
  pointer-events: none;
}

body::before {
  width: 500px;
  height: 500px;
  background: var(--gradient-personal);
  top: -150px;
  right: -100px;
}

body::after {
  width: 400px;
  height: 400px;
  background: var(--gradient-official);
  bottom: -100px;
  left: -100px;
}

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  font-size: inherit;
}

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

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

ul, ol {
  list-style: none;
}

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

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

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

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

::selection {
  background: rgba(99, 102, 241, 0.3);
  color: var(--color-text-primary);
}
