/* SpareSync — Workshop Spare Parts Sourcing & Procurement OS */
/* Design System: Tournament7 Dark Mode Aesthetic */

:root {
  --ss-bg: #09090B;
  --ss-bg-secondary: #0E131F;
  --ss-card-bg: rgba(15, 23, 42, 0.75);
  --ss-card-border: rgba(255, 255, 255, 0.08);
  --ss-emerald: #10B981;
  --ss-emerald-glow: rgba(16, 185, 129, 0.35);
  --ss-amber: #F59E0B;
  --ss-amber-glow: rgba(245, 158, 11, 0.35);
  --ss-cyan: #06B6D4;
  --ss-blue: #3B82F6;
  --ss-red: #EF4444;
}

/* Base Reset & Smooth Scroll */
* {
  -webkit-tap-highlight-color: transparent;
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #F8FAFC;
  background-color: #09090B;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Tournament7 Ambient Background Gradients */
.tournament7-canvas {
  background: 
    radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.12), transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(245, 158, 11, 0.08), transparent 35%),
    radial-gradient(circle at 15% 70%, rgba(6, 182, 212, 0.06), transparent 40%),
    #09090B;
}

/* Section Title Vertical Accent Bars (Tournament7 Signature) */
.section-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-accent-bar {
  width: 4px;
  height: 18px;
  border-radius: 9999px;
  display: inline-block;
  flex-shrink: 0;
}

.bar-emerald { background: #10B981; box-shadow: 0 0 10px rgba(16, 185, 129, 0.6); }
.bar-amber { background: #F59E0B; box-shadow: 0 0 10px rgba(245, 158, 11, 0.6); }
.bar-cyan { background: #06B6D4; box-shadow: 0 0 10px rgba(6, 182, 212, 0.6); }
.bar-red { background: #EF4444; box-shadow: 0 0 10px rgba(239, 68, 68, 0.6); }
.bar-purple { background: #A855F7; box-shadow: 0 0 10px rgba(168, 85, 247, 0.6); }

/* Tournament7 Horizontal Left-Bordered Cards */
.t7-card {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.t7-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.6);
}

.t7-card-left-emerald {
  border-left: 3px solid #10B981;
}

.t7-card-left-amber {
  border-left: 3px solid #F59E0B;
}

.t7-card-left-red {
  border-left: 3px solid #EF4444;
}

.t7-card-left-cyan {
  border-left: 3px solid #06B6D4;
}

.t7-card-left-purple {
  border-left: 3px solid #A855F7;
}

/* Number Badges (Tournament7 Numeric Counters 01, 02) */
.t7-badge-num {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 0.375rem;
  flex-shrink: 0;
  letter-spacing: 0.05em;
}

.badge-num-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #34D399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-num-amber {
  background: rgba(245, 158, 11, 0.15);
  color: #FBBF24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-num-red {
  background: rgba(239, 68, 68, 0.15);
  color: #F87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-num-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #38BDF8;
  border: 1px solid rgba(6, 182, 212, 0.3);
}

/* Tournament7 Action Glow Buttons */
.btn-emerald-glow {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: #FFFFFF;
  font-weight: 700;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px -2px rgba(16, 185, 129, 0.45);
}

.btn-emerald-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px 0px rgba(16, 185, 129, 0.6);
  filter: brightness(1.08);
}

.btn-amber-glow {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: #FFFFFF;
  font-weight: 700;
  transition: all 0.25s ease;
  box-shadow: 0 4px 20px -2px rgba(245, 158, 11, 0.45);
}

.btn-amber-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px 0px rgba(245, 158, 11, 0.6);
  filter: brightness(1.08);
}

/* Role Badges */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.role-store { background: rgba(245, 158, 11, 0.15); color: #FBBF24; border: 1px solid rgba(245, 158, 11, 0.3); }
.role-mechanic { background: rgba(16, 185, 129, 0.15); color: #34D399; border: 1px solid rgba(16, 185, 129, 0.3); }
.role-advisor { background: rgba(59, 130, 246, 0.15); color: #60A5FA; border: 1px solid rgba(59, 130, 246, 0.3); }
.role-accountant { background: rgba(168, 85, 247, 0.15); color: #C084FC; border: 1px solid rgba(168, 85, 247, 0.3); }
.role-admin { background: rgba(239, 68, 68, 0.15); color: #F87171; border: 1px solid rgba(239, 68, 68, 0.3); }

/* macOS Window Mockup */
.mac-window {
  border-radius: 1rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.mac-traffic-lights {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.traffic-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 9999px;
}
.dot-red { background: #FF5F56; }
.dot-yellow { background: #FFBD2E; }
.dot-green { background: #27C93F; }

/* Sticky Mobile Bottom Bar */
.mobile-bottom-bar {
  display: none;
}

@media (max-width: 640px) {
  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 0.75rem 1rem;
    background: rgba(9, 9, 11, 0.95);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
}

/* Custom Range Slider for Margin Calculator */
input[type=range] {
  -webkit-appearance: none;
  background: #1E293B;
  border-radius: 9999px;
  height: 6px;
  outline: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #10B981;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
  border: 2px solid #FFFFFF;
}

/* Toast Notifications */
#toast-notification {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  transform: translate(-50%, 100%);
  opacity: 0;
  pointer-events: none;
}

#toast-notification.show {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

/* FAQ Accordion */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.2s ease-out;
  opacity: 0;
}

.faq-item.active .faq-answer {
  max-height: 320px;
  opacity: 1;
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

/* Flow Pulse Indicator */
@keyframes flowPulseSS {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
.ss-pulse-indicator {
  animation: flowPulseSS 2s infinite ease-in-out;
}
