/* ==========================================================================
   MCI Portal — Design Tokens (V2.0)
   Source of truth: Figma "My Car Importer 2025" — variable definitions
   --------------------------------------------------------------------------
   These tokens are for the customer-facing portal at mycarimporter.com.
   The internal ops portal (ops.mycarimporter.com) uses a different palette
   (#003566 + DM Sans + light grays) — do NOT pull these tokens into mci-erp.
   ========================================================================== */

:root {
  /* Brand — blues */
  --blue-darker:        #001324;   /* Deepest navy — auth side panel, footer */
  --blue-dark:          #00284D;   /* Mid navy */
  --blue-normal:        #003566;   /* Primary brand blue (shared with ops) */
  --blue-light-hover:   #D9E1E8;   /* Subtle hover bg */
  --blue-light-active:  #B0C0D0;   /* Pressed state */
  --blue-named:         #192459;

  /* Brand — accents */
  --yellow-normal:      #FDC500;   /* Hero CTA, marketing accents */
  --orange:             #E47F3A;   /* Sunset/glow accent */

  /* Neutrals */
  --black:              #0D0D0D;   /* Body text, secondary CTAs */
  --black-dark:         #0A0A0A;
  --white:              #FFFFFF;
  --white-dark:         #BFBFBF;
  --white-dark-hover:   #999999;

  --gray-900:           #181D27;
  --gray-700:           #414651;
  --gray-500:           #717680;
  --gray-300:           #D5D7DA;
  --gray-100:           #F5F5F5;
  --gray-50:            #FAFAFA;

  /* Functional */
  --color-success:      #12B76A;
  --color-error:        #D92D20;
  --color-warning:      #F79009;

  /* Typography */
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Figtree', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --text-xs:   12px;
  --text-sm:   14px;
  --text-md:   16px;
  --text-lg:   18px;
  --text-xl:   20px;
  --text-2xl:  24px;
  --text-3xl:  30px;
  --text-4xl:  36px;
  --text-5xl:  48px;

  /* Shape */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 999px;

  /* Shadow */
  --shadow-xs:  0 1px 2px rgba(16, 24, 40, 0.05);
  --shadow-sm:  0 1px 3px rgba(16, 24, 40, 0.10), 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md:  0 4px 8px -2px rgba(16, 24, 40, 0.10), 0 2px 4px -2px rgba(16, 24, 40, 0.06);
  --shadow-lg:  0 12px 16px -4px rgba(16, 24, 40, 0.08), 0 4px 6px -2px rgba(16, 24, 40, 0.03);

  /* Layout */
  --container-max: 1200px;
  --gutter:        24px;
}

/* ==========================================================================
   Base reset
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  font-size: var(--text-md);
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
a { color: var(--blue-normal); text-decoration: none; }
a:hover { text-decoration: underline; }
input, select, textarea { font-family: inherit; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-md);
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
  text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: translateY(1px); }

.btn-primary {
  background: var(--black);
  color: var(--white);
}
.btn-primary:hover:not(:disabled) { background: #1a1a1a; }

.btn-yellow {
  background: var(--yellow-normal);
  color: var(--black);
}
.btn-yellow:hover:not(:disabled) { background: #e6b300; }

.btn-blue {
  background: var(--blue-normal);
  color: var(--white);
}
.btn-blue:hover:not(:disabled) { background: var(--blue-dark); }

.btn-outline {
  background: transparent;
  color: var(--black);
  border: 1px solid var(--gray-300);
}
.btn-outline:hover:not(:disabled) { background: var(--gray-50); }

.btn-block { width: 100%; }

/* ==========================================================================
   Form fields
   ========================================================================== */
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.field label {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--black);
  font-size: var(--text-md);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.field textarea { height: auto; padding: 12px 14px; min-height: 96px; resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-normal);
  box-shadow: 0 0 0 3px rgba(0, 53, 102, 0.12);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--gray-500); }

.field-help {
  margin-top: 6px;
  font-size: var(--text-xs);
  color: var(--gray-500);
}
.field-error {
  margin-top: 6px;
  font-size: var(--text-xs);
  color: var(--color-error);
}

/* Checkbox / radio */
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--text-sm);
  color: var(--gray-700);
  cursor: pointer;
  user-select: none;
}
.check input {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--blue-normal);
}

/* ==========================================================================
   Utility
   ========================================================================== */
.text-muted { color: var(--gray-500); }
.text-center { text-align: center; }
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--gray-300);
}
