/**
 * smartfactory-my.com
 * Global Stylesheet & Design System Tokens (DESIGN.md Spec)
 */

:root {
  /* Brand Primary Accents */
  --primary: #6B4EFF;
  --primary-hover: #583CE6;
  --primary-subtle: #F0EDFF;
  --primary-glow: rgba(107, 78, 255, 0.12);

  /* Surface & Theme */
  --canvas: #FFFFFF;
  --surface-light: #F8F9FC;
  --surface-border: #E2E8F0;

  /* Typography Colors */
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-muted: #94A3B8;

  /* Status Accents */
  --accent-success: #10B981;
  --accent-error: #EF4444;

  /* Font Families */
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* Base resets & typography */
html {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, .font-display {
  font-family: var(--font-display);
}

.font-mono {
  font-family: var(--font-mono);
}

/* ========================================================================= */
/* DESIGN.MD ANCHOR TEXT & LINK SPECIFICATION                                 */
/* ========================================================================= */
.sf-link {
  color: var(--primary);
  font-weight: 500;
  text-decoration-line: underline;
  text-decoration-color: rgba(107, 78, 255, 0.35);
  text-underline-offset: 4px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sf-link:hover {
  color: var(--primary-hover);
  text-decoration-color: var(--primary-hover);
}

/* ========================================================================= */
/* GLOBAL CTA BUTTON COMPONENTS                                              */
/* ========================================================================= */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--primary);
  color: #FFFFFF;
  font-weight: 600;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(107, 78, 255, 0.15);
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 10px 25px -5px rgba(107, 78, 255, 0.3);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--canvas);
  color: var(--text-primary);
  border: 1px solid var(--surface-border);
  font-weight: 500;
  border-radius: var(--radius-md);
  padding: 10px 20px;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-ghost:hover {
  background-color: var(--surface-light);
  border-color: #CBD5E1;
}

/* ========================================================================= */
/* BADGES & STATUS PILLS                                                     */
/* ========================================================================= */
.badge-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background-color: var(--primary-subtle);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.75rem;
  line-height: 1rem;
  padding: 4px 12px;
  border-radius: 9999px;
  border: 1px solid rgba(107, 78, 255, 0.18);
}

.badge-success {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background-color: #ECFDF5;
  color: #065F46;
  font-weight: 600;
  font-size: 0.75rem;
  line-height: 1rem;
  padding: 4px 10px;
  border-radius: 9999px;
}

/* ========================================================================= */
/* GLOBAL FORM INPUTS, SELECTS & LABELS                                      */
/* ========================================================================= */
.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background-color: var(--surface-light);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-input::placeholder {
  color: #94A3B8;
}

.form-input:focus {
  outline: none;
  background-color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.375rem;
}
