/* ============================================================================
   BLAKE-MFG DESIGN SYSTEM — CYBERPUNK 2077 EDITION
   Design tokens, reset, typography, and shared utilities
   ============================================================================ */

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

/* ── Design Tokens ──────────────────────────────────────────────────────────── */
:root {
  /* Admin Portal — Cyberpunk 2077 Theme */
  --admin-bg:           #070709; /* Immersive cyber black */
  --admin-surface:      #0b0b0f; /* Dark background cards */
  --admin-surface-2:    #121319; /* Secondary darker gray */
  --admin-border:       #2e323d; /* Default tech gray border */
  
  /* Cyber Colors */
  --cyber-red:          #ff0055; /* Tech neon red / magenta */
  --cyber-red-dim:      rgba(255, 0, 85, 0.15);
  --cyber-red-glow:     0 0 15px rgba(255, 0, 85, 0.45);
  
  --cyber-cyan:         #00f0ff; /* Electric cyan */
  --cyber-cyan-dim:     rgba(0, 240, 255, 0.15);
  --cyber-cyan-glow:    0 0 15px rgba(0, 240, 255, 0.45);
  
  --cyber-yellow:       #fcee0a; /* Cyberpunk primary yellow */
  --cyber-yellow-dim:   rgba(252, 238, 10, 0.12);
  --cyber-yellow-glow:  0 0 15px rgba(252, 238, 10, 0.4);

  --cyber-green:        #00ff66; /* Level / OK green */
  --cyber-green-dim:    rgba(0, 255, 102, 0.15);
  
  --admin-accent:       var(--cyber-cyan);
  --admin-accent-hover: #55f7ff;
  --admin-accent-dim:   var(--cyber-cyan-dim);
  --admin-text:         #f1f5f9;
  --admin-text-muted:   #8a95a5;
  --admin-text-dim:     #4a5260;

  /* Customer Portal — Clean Professional (Remains Unchanged) */
  --customer-bg:      #fafafa;
  --customer-hero:    #111827;
  --customer-accent:  #1e40af;
  --customer-text:    #1f2937;
  --customer-muted:   #6b7280;

  /* Status Colors (Mapped to Cyber Theme) */
  --color-success:     var(--cyber-green);
  --color-success-dim: var(--cyber-green-dim);
  --color-warning:     var(--cyber-yellow);
  --color-warning-dim: var(--cyber-yellow-dim);
  --color-danger:      var(--cyber-red);
  --color-danger-dim:  var(--cyber-red-dim);
  --color-info:        var(--cyber-cyan);
  --color-info-dim:    var(--cyber-cyan-dim);

  /* Typography */
  --font-ui:   'Rajdhani', 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Share Tech Mono', 'JetBrains Mono', 'Courier New', monospace;

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

  /* Border Radius (Cyberpunk has sharp, techy lines, very minimal radius) */
  --radius-sm:   0rem;
  --radius-md:   0rem;
  --radius-lg:   0rem;
  --radius-xl:   0rem;
  --radius-full: 0rem;

  /* Shadows */
  --shadow-sm:   0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-md:   0 4px 8px rgba(0, 0, 0, 0.6);
  --shadow-lg:   0 10px 25px rgba(0, 0, 0, 0.8);
  --shadow-glow: var(--cyber-cyan-glow);

  /* Transitions */
  --t-fast: 80ms cubic-bezier(0.16, 1, 0.3, 1);
  --t-base: 150ms cubic-bezier(0.16, 1, 0.3, 1);
  --t-slow: 250ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Layout */
  --sidebar-width:      260px;
  --sidebar-collapsed:  72px;
  --header-height:      64px;
  --content-max-width:  1440px;
}

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

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

body {
  font-family: var(--font-ui);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* ── Typography Scale ───────────────────────────────────────────────────────── */
.text-xs   { font-size: 0.75rem;  line-height: 1.4; }
.text-sm   { font-size: 0.875rem; line-height: 1.5; }
.text-base { font-size: 1rem;     line-height: 1.6; }
.text-lg   { font-size: 1.125rem; line-height: 1.5; }
.text-xl   { font-size: 1.25rem;  line-height: 1.4; }
.text-2xl  { font-size: 1.5rem;   line-height: 1.3; }
.text-3xl  { font-size: 1.875rem; line-height: 1.2; }

.font-mono { font-family: var(--font-mono); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* ── Status Badges ──────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 2px var(--sp-2);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid currentColor;
}

.badge--success { background: var(--color-success-dim); color: var(--color-success); }
.badge--warning { background: var(--color-warning-dim); color: var(--color-warning); }
.badge--danger  { background: var(--color-danger-dim);  color: var(--color-danger);  }
.badge--info    { background: var(--color-info-dim);    color: var(--color-info);    }
.badge--neutral { background: rgba(148, 163, 184, 0.05); color: var(--admin-text-muted); border-color: rgba(148, 163, 184, 0.3); }

/* Stage-to-badge mappings */
.badge--new        { background: var(--color-info-dim);    color: var(--color-info); }
.badge--reviewing  { background: var(--color-warning-dim); color: var(--color-warning); }
.badge--complete   { background: var(--color-success-dim); color: var(--color-success); }
.badge--critical   { background: var(--color-danger-dim);  color: var(--color-danger); }

/* ── Accessibility ──────────────────────────────────────────────────────────── */
.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;
}

:focus-visible {
  outline: 2px solid var(--admin-accent);
  outline-offset: 2px;
}
