/**
 * DRM Policy Admin - Design Tokens
 * CMS Dark Theme Color Palette and Design System Variables
 *
 * Implements FR-050: Unified Visual Design System
 * Version: 1.0.0
 * Last Updated: 2025-10-04
 */

:root {
  /* ========================================
     PRIMARY COLORS
     ======================================== */

  /* Navy Blue - Sidebar background, primary dark surfaces */
  --primary-navy: #1a2332;

  /* Cyan Blue - Primary actions, links, focus states */
  --primary-blue: #00bcd4;
  --primary-blue-hover: #00a5bb;
  --primary-blue-light: #e0f7fa;
  --primary-blue-dark: #008ba3;

  /* ========================================
     SEMANTIC COLORS
     ======================================== */

  /* Danger - Error states, destructive actions */
  --danger-red: #dc3545;
  --danger-red-hover: #c82333;
  --danger-red-light: #f8d7da;

  /* Success - Success states, confirmation messages */
  --success-green: #28a745;
  --success-green-hover: #218838;
  --success-green-light: #d4edda;

  /* Warning - Warning states, cautionary messages */
  --warning-amber: #ffc107;
  --warning-amber-hover: #e0a800;
  --warning-amber-light: #fff3cd;

  /* Info - Informational messages */
  --info-blue: #17a2b8;
  --info-blue-hover: #138496;
  --info-blue-light: #d1ecf1;

  /* ========================================
     NEUTRAL COLORS (DARK THEME)
     ======================================== */

  /* Backgrounds */
  --background-dark: #0d1117; /* Main page background */
  --background-medium: #161b22; /* Card backgrounds, elevated surfaces */
  --background-light: #21262d; /* Input backgrounds, secondary surfaces */
  --background-hover: #30363d; /* Hover states for interactive elements */

  /* Text */
  --text-primary: #c9d1d9; /* Primary text - high contrast */
  --text-secondary: #8b949e; /* Secondary text - labels, metadata */
  --text-muted: #6e7681; /* Muted text - placeholders, disabled */
  --text-inverse: #0d1117; /* Text on light backgrounds */
  --text-white: #ffffff; /* Pure white for high emphasis */

  /* Borders */
  --border-default: #30363d; /* Default borders, dividers */
  --border-muted: #21262d; /* Subtle borders */
  --border-emphasis: #484f58; /* Emphasized borders, focus rings */

  /* ========================================
     STATUS COLORS
     ======================================== */

  --status-active: #28a745; /* Active/enabled indicators */
  --status-inactive: #6e7681; /* Inactive/disabled indicators */
  --status-locked: #dc3545; /* Locked accounts */
  --status-syncing: #ffc107; /* Syncing/processing states */

  /* ========================================
     TYPOGRAPHY
     ======================================== */

  /* Font Families */
  --font-family-base:
    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif,
    'Apple Color Emoji', 'Segoe UI Emoji';
  --font-family-monospace: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;

  /* Font Sizes */
  --font-size-xs: 0.75rem; /* 12px */
  --font-size-sm: 0.875rem; /* 14px */
  --font-size-base: 1rem; /* 16px */
  --font-size-lg: 1.125rem; /* 18px */
  --font-size-xl: 1.25rem; /* 20px */
  --font-size-2xl: 1.5rem; /* 24px */
  --font-size-3xl: 2rem; /* 32px */

  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Line Heights */
  --line-height-tight: 1.25;
  --line-height-base: 1.5;
  --line-height-relaxed: 1.75;

  /* ========================================
     SPACING SYSTEM (Base unit: 4px)
     ======================================== */

  --space-0: 0;
  --space-1: 0.25rem; /* 4px */
  --space-2: 0.5rem; /* 8px */
  --space-3: 0.75rem; /* 12px */
  --space-4: 1rem; /* 16px */
  --space-5: 1.25rem; /* 20px */
  --space-6: 1.5rem; /* 24px */
  --space-8: 2rem; /* 32px */
  --space-10: 2.5rem; /* 40px */
  --space-12: 3rem; /* 48px */
  --space-16: 4rem; /* 64px */

  /* ========================================
     LAYOUT
     ======================================== */

  /* Sidebar */
  --sidebar-width-expanded: 240px;
  --sidebar-width-collapsed: 60px;
  --sidebar-transition: width 0.3s ease;

  /* Container Widths */
  --container-sm: 540px;
  --container-md: 720px;
  --container-lg: 960px;
  --container-xl: 1140px;
  --container-xxl: 1320px;

  /* Z-Index Layers */
  --z-index-dropdown: 1000;
  --z-index-sticky: 1020;
  --z-index-fixed: 1030;
  --z-index-modal-backdrop: 1040;
  --z-index-modal: 1050;
  --z-index-popover: 1060;
  --z-index-tooltip: 1070;

  /* ========================================
     BORDERS & RADIUS
     ======================================== */

  --border-width: 1px;
  --border-width-thick: 2px;

  --border-radius-sm: 4px;
  --border-radius: 6px;
  --border-radius-lg: 8px;
  --border-radius-xl: 12px;
  --border-radius-pill: 50rem;
  --border-radius-circle: 50%;

  /* ========================================
     SHADOWS
     ======================================== */

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.3);

  /* Focus Shadow */
  --shadow-focus: 0 0 0 3px rgba(0, 188, 212, 0.25);
  --shadow-focus-danger: 0 0 0 3px rgba(220, 53, 69, 0.25);

  /* ========================================
     TRANSITIONS
     ======================================== */

  --transition-fast: 0.15s ease-in-out;
  --transition-base: 0.2s ease-in-out;
  --transition-slow: 0.3s ease-in-out;

  /* ========================================
     COMPONENT-SPECIFIC
     ======================================== */

  /* Buttons */
  --btn-padding-y: var(--space-2);
  --btn-padding-x: var(--space-4);
  --btn-font-size: var(--font-size-base);
  --btn-font-weight: var(--font-weight-medium);
  --btn-border-radius: var(--border-radius);

  /* Forms */
  --input-padding-y: var(--space-2);
  --input-padding-x: var(--space-3);
  --input-font-size: var(--font-size-base);
  --input-border-radius: var(--border-radius);
  --input-focus-border-color: var(--primary-blue);

  /* Tables */
  --table-cell-padding-y: var(--space-3);
  --table-cell-padding-x: var(--space-4);
  --table-hover-bg: var(--background-light);

  /* Cards */
  --card-padding: var(--space-4);
  --card-border-radius: var(--border-radius);
  --card-bg: var(--background-medium);

  /* Modals */
  --modal-max-width: 600px;
  --modal-backdrop-bg: rgba(0, 0, 0, 0.7);

  /* ========================================
     RESPONSIVE BREAKPOINTS
     ======================================== */

  --breakpoint-xs: 0;
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
  --breakpoint-xxl: 1400px;
}

/* ========================================
   DARK THEME OVERRIDES FOR SPECIFIC ELEMENTS
   ======================================== */

/* Scrollbar Styling (Webkit browsers) */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

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

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

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

/* Selection */
::selection {
  background-color: var(--primary-blue);
  color: var(--text-white);
}

::-moz-selection {
  background-color: var(--primary-blue);
  color: var(--text-white);
}
