/* ==========================================================================
   PREMIUM DARK INDUSTRIAL DESIGN SYSTEM
   B2B Industrial Machine Repair & Business Solutions
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-primary: #07090e;
  --bg-surface-1: #0d121c;
  --bg-surface-2: #141b29;
  --bg-surface-3: #1c2638;
  --bg-surface-glass: rgba(13, 18, 28, 0.85);
  
  /* Borders & Dividers */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-focus: #38bdf8;
  
  /* Brand Accents */
  --blue-primary: #2563eb;
  --blue-vibrant: #38bdf8;
  --blue-glow: rgba(56, 189, 248, 0.25);
  --amber-industrial: #f59e0b;
  --amber-glow: rgba(245, 158, 11, 0.2);
  --emerald-success: #10b981;
  
  /* Typography Colors */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  /* Fonts */
  --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Spacings */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  
  /* Layout */
  --max-width: 1320px;
  --header-height: 76px;
  --mobile-bar-height: 64px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.65);
  --shadow-glow: 0 0 24px var(--blue-glow);
  --shadow-amber-glow: 0 0 24px var(--amber-glow);

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(37, 99, 235, 0.08) 0%, transparent 60%),
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 100% 100%, 48px 48px, 48px 48px;
  overflow-x: hidden;
}

/* Typography Standards */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.2rem, 4vw + 1rem, 3.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(1.75rem, 2.5vw + 0.5rem, 2.6rem);
  letter-spacing: -0.025em;
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.25rem, 1.5vw + 0.2rem, 1.65rem);
  margin-bottom: var(--space-sm);
}

h4 {
  font-size: 1.15rem;
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  font-size: 1.025rem;
}

p.lead {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--text-secondary);
  font-weight: 400;
}

a {
  color: var(--blue-vibrant);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: #7dd3fc;
}

ul, ol {
  list-style: none;
}

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

button, input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
  color: inherit;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-lg);
  padding-right: var(--space-lg);
}

.section {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  position: relative;
}

.section-hero {
  padding-top: calc(var(--header-height) + var(--space-xl));
  padding-bottom: var(--space-2xl);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  margin-bottom: var(--space-xl);
  max-width: 820px;
}

.section-header.text-center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-subtitle {
  text-transform: uppercase;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  color: var(--amber-industrial);
  font-weight: 700;
  margin-bottom: var(--space-xs);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.section-subtitle::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background-color: var(--amber-industrial);
  border-radius: 2px;
}

/* Grid Utilities */
.grid {
  display: grid;
  gap: var(--space-lg);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

@media (max-width: 1080px) {
  .grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  .grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 640px) {
  .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  .section {
    padding-top: var(--space-xl);
    padding-bottom: var(--space-xl);
  }
}

/* Badges & Chips */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  background-color: var(--bg-surface-3);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.badge-blue {
  background-color: rgba(37, 99, 235, 0.15);
  color: var(--blue-vibrant);
  border-color: rgba(56, 189, 248, 0.3);
}

.badge-amber {
  background-color: rgba(245, 158, 11, 0.15);
  color: var(--amber-industrial);
  border-color: rgba(245, 158, 11, 0.3);
}

.badge-green {
  background-color: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

/* Action Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.35rem;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--transition-fast);
  white-space: normal;
  text-align: center;
  line-height: 1.3;
  word-break: normal;
  box-sizing: border-box;
}

.btn-primary {
  background: linear-gradient(135deg, var(--blue-primary) 0%, #1d4ed8 100%);
  color: #ffffff;
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3b82f6 0%, var(--blue-primary) 100%);
  border-color: var(--blue-vibrant);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-secondary {
  background-color: var(--bg-surface-2);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-secondary:hover {
  background-color: var(--bg-surface-3);
  border-color: var(--blue-vibrant);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-amber {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  border-color: rgba(245, 158, 11, 0.4);
}

.btn-amber:hover {
  background: linear-gradient(135deg, var(--amber-industrial) 0%, #d97706 100%);
  box-shadow: var(--shadow-amber-glow);
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: #ffffff;
  border-color: rgba(37, 211, 102, 0.4);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.25);
}

.btn-whatsapp:hover {
  background: linear-gradient(135deg, #2bf075 0%, #16a08f 100%);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  color: #ffffff;
}

.btn-whatsapp svg,
.btn svg.icon-whatsapp,
svg.icon-whatsapp {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.btn-whatsapp.btn-lg svg {
  width: 26px;
  height: 26px;
  min-width: 26px;
  min-height: 26px;
}

.btn-whatsapp.btn-sm svg {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
}

.btn-sm {
  padding: 0.5rem 0.75rem;
  font-size: 0.85rem;
  line-height: 1.25;
  min-height: 38px;
}

.btn-lg {
  padding: 0.95rem 1.85rem;
  font-size: 1.05rem;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.breadcrumbs a {
  color: var(--text-secondary);
}

.breadcrumbs a:hover {
  color: var(--blue-vibrant);
}

.breadcrumbs .sep {
  color: var(--text-dim);
}

.breadcrumbs .current {
  color: var(--blue-vibrant);
  font-weight: 500;
}

/* Editable Placeholder Highlighting */
.placeholder-token {
  display: inline-block;
  background-color: rgba(56, 189, 248, 0.08);
  color: var(--blue-vibrant);
  padding: 0 0.25rem;
  border-radius: 3px;
  border: 1px dashed rgba(56, 189, 248, 0.4);
  font-weight: 500;
}

/* Live Company Settings Banner (top sticky preview tool) */
.config-preview-bar {
  background: #090e17;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text-muted);
  z-index: 1001;
}

.config-preview-bar .config-info {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  overflow-x: auto;
  white-space: nowrap;
}

.config-preview-bar .config-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.config-preview-bar .config-item strong {
  color: var(--text-secondary);
}

.config-preview-bar button {
  background: none;
  border: 1px solid var(--border-medium);
  color: var(--text-secondary);
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  cursor: pointer;
}

.config-preview-bar button:hover {
  background-color: var(--bg-surface-2);
  color: var(--blue-vibrant);
}

/* Micro-animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
  animation: fadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--bg-surface-3);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2a3850;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
