/**
 * True Tomato B2B App Theme
 * Mirrors homepage design tokens for visual continuity
 * Source: example/homepage_dump/src/app/theme.tokens.css
 */

:root {
  /* Primary Brand Colors (HSL format) - Professional Theme */
  --ttt-color-primary: hsl(210, 70%, 35%);        /* Professional Navy Blue #2563eb */
  --ttt-color-secondary: hsl(210, 50%, 45%);      /* Lighter Blue #4f46e5 */
  --ttt-color-cream: hsl(45, 35%, 90%);           /* Warm Cream Background #F2EDE4 */
  --ttt-color-earth: hsl(18, 47%, 37%);           /* Earthy Label Brown #8C4B32 */
  --ttt-color-leaf: hsl(89, 30%, 47%);            /* Fresh Leaf Green #759E51 */
  
  /* Base Colors - Updated for cream theme */
  --ttt-bg-page: hsl(45, 35%, 90%);               /* Warm Cream Background */
  --ttt-bg-card: hsl(0, 0%, 100%);                /* Clean White for cards */
  --ttt-text-body: hsl(0, 0%, 15%);               /* Rich Dark Text */
  --ttt-text-muted: hsl(18, 20%, 45%);            /* Muted Brown Text */
  --ttt-border: hsl(45, 25%, 85%);                /* Soft Cream Border */
  
  /* Semantic Colors (Professional Theme) */
  --background: hsl(210, 20%, 98%);                /* Light Gray Background */
  --foreground: hsl(210, 15%, 20%);                /* Dark Blue-Gray Text */
  --primary: hsl(210, 70%, 35%);                   /* Professional Navy Blue */
  --primary-foreground: hsl(0, 0%, 100%);
  --secondary: hsl(210, 20%, 90%);                 /* Light Blue-Gray */
  --secondary-foreground: hsl(210, 15%, 25%);
  --accent: hsl(210, 30%, 85%);                    /* Accent Blue-Gray */
  --accent-foreground: hsl(210, 15%, 25%);
  --muted: hsl(210, 15%, 92%);                     /* Muted Light Gray */
  --muted-foreground: hsl(210, 10%, 50%);          /* Muted Gray Text */
  --destructive: hsl(0, 70%, 50%);                 /* Professional Red for errors */
  --destructive-foreground: hsl(0, 0%, 100%);
  --border: hsl(210, 20%, 88%);                    /* Soft Gray Border */
  --input: hsl(0, 0%, 100%);                       /* White Input Background */
  --ring: hsl(210, 70%, 35%);
  
  /* Typography */
  --ttt-font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --ttt-font-size-base: 16px;
  --ttt-line-height-base: 1.5;
  
  /* Spacing & Layout */
  --ttt-radius-sm: 0.25rem;  /* 4px */
  --ttt-radius-md: 0.5rem;   /* 8px */
  --ttt-radius-lg: 0.75rem;  /* 12px */
  --radius: 0.5rem;
  
  /* Shadows */
  --ttt-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --ttt-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --ttt-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* RGB Equivalents for easier use */
  --ttt-tomato-rgb: 212, 63, 58;
  --ttt-yellow-rgb: 246, 230, 180;
  --ttt-brown-rgb: 140, 75, 50;
  --ttt-green-rgb: 117, 158, 81;
  --ttt-white-rgb: 255, 255, 255;
  --ttt-black-rgb: 30, 30, 30;
}

/* Base Styles - Apply cream theme */
body {
  font-family: var(--ttt-font-sans);
  font-size: var(--ttt-font-size-base);
  line-height: var(--ttt-line-height-base);
  color: var(--ttt-text-body);
  background-color: var(--ttt-bg-page);
  background-image: linear-gradient(135deg, var(--ttt-bg-page) 0%, hsl(45, 30%, 88%) 100%);
  min-height: 100vh;
}

/* Navbar - Professional Theme */
.navbar,
.navbar-expand-lg {
  background-color: var(--ttt-color-primary) !important;
  background-image: none !important;
  border-bottom: 1px solid var(--ttt-border);
  box-shadow: var(--ttt-shadow-sm);
}

.navbar .navbar-brand,
.navbar .nav-link {
  color: white !important;
  text-decoration: none !important;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: #ffd700 !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.navbar .navbar-brand i {
  color: white !important;
}

/* Navbar Dropdown Styles */
.navbar .dropdown-menu {
  border: 1px solid var(--ttt-border);
  border-radius: var(--ttt-radius-md);
  box-shadow: var(--ttt-shadow-lg);
  background-color: white;
}

.navbar .dropdown-item {
  color: var(--foreground);
  transition: all 0.2s ease;
}

.navbar .dropdown-item:hover {
  background-color: var(--ttt-color-primary);
  color: white;
}

/* Navbar Brand Hover */
.navbar .navbar-brand:hover {
  color: #ffd700 !important;
  transition: all 0.3s ease;
}

/* Ensure navbar has solid dark background */
.navbar-dark {
  background-color: hsl(210, 70%, 35%) !important;
  background-image: none !important;
}

/* Navbar Toggler */
.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Buttons - Professional Theme */
.btn-primary {
  background-color: var(--ttt-color-primary);
  border-color: var(--ttt-color-primary);
  color: white;
  border-radius: var(--ttt-radius-md);
  box-shadow: var(--ttt-shadow-sm);
  transition: all 0.2s ease;
}

.btn-primary:hover {
  background-color: hsl(210, 70%, 30%);
  border-color: hsl(210, 70%, 30%);
  box-shadow: var(--ttt-shadow-md);
}

.btn-danger {
  background-color: var(--destructive);
  border-color: var(--destructive);
  color: white;
  border-radius: var(--ttt-radius-md);
  box-shadow: var(--ttt-shadow-sm);
  transition: all 0.2s ease;
}

.btn-danger:hover {
  background-color: hsl(0, 70%, 45%);
  border-color: hsl(0, 70%, 45%);
  box-shadow: var(--ttt-shadow-md);
}

.btn-outline-primary {
  color: var(--ttt-color-primary);
  border-color: var(--ttt-color-primary);
  border-radius: var(--ttt-radius-md);
}

.btn-outline-primary:hover {
  background-color: var(--ttt-color-primary);
  border-color: var(--ttt-color-primary);
  color: white;
}

.btn-success {
  background-color: var(--ttt-color-leaf);
  border-color: var(--ttt-color-leaf);
  border-radius: var(--ttt-radius-md);
}

.btn-sm {
  border-radius: var(--ttt-radius-sm);
}

.btn-lg {
  border-radius: var(--ttt-radius-lg);
}

/* Cards - White cards on cream background */
.card {
  background-color: var(--ttt-bg-card);
  border: 1px solid var(--ttt-border);
  border-radius: var(--ttt-radius-lg);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.card-header {
  background-color: var(--ttt-color-primary);
  color: white !important;
  border-bottom: 1px solid var(--ttt-border);
  border-radius: var(--ttt-radius-md) var(--ttt-radius-md) 0 0;
}

.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6,
.card-header p,
.card-header i {
  color: white !important;
}

.card-header .text-white-50 {
  color: rgba(255, 255, 255, 0.75) !important;
}

/* Tables */
.table {
  border-radius: var(--ttt-radius-md);
  overflow: hidden;
}

.table-light thead th {
  background-color: var(--ttt-color-sun);
  color: var(--ttt-text-body);
  border-color: var(--ttt-border);
}

.table-hover tbody tr:hover {
  background-color: hsl(45, 75%, 96%);
}

/* Forms */
.form-control,
.form-select {
  border-color: var(--ttt-border);
  border-radius: var(--ttt-radius-sm);
}

.form-control:focus,
.form-select:focus {
  border-color: var(--ttt-color-primary);
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Badges */
.badge {
  border-radius: var(--ttt-radius-sm);
  font-weight: 500;
}

/* Alerts */
.alert {
  border-radius: var(--ttt-radius-md);
  border-left: 4px solid;
}

.alert-success {
  background-color: hsl(89, 30%, 95%);
  border-left-color: var(--ttt-color-leaf);
  color: hsl(89, 30%, 30%);
}

.alert-danger {
  background-color: hsl(2, 65%, 95%);
  border-left-color: var(--ttt-color-tomato);
  color: hsl(2, 65%, 30%);
}

.alert-warning {
  background-color: hsl(45, 75%, 95%);
  border-left-color: var(--ttt-color-sun);
  color: var(--ttt-color-earth);
}

/* Utility Classes */
.text-primary {
  color: var(--ttt-color-tomato) !important;
}

.bg-primary {
  background-color: var(--ttt-color-tomato) !important;
}

.text-muted {
  color: var(--ttt-color-earth) !important;
}

.border-primary {
  border-color: var(--ttt-color-tomato) !important;
}

/* Container tweaks for visual consistency */
.container {
  max-width: 1400px;
}

/* Footer alignment */
footer {
  background-color: var(--ttt-bg-card);
  color: var(--ttt-text-body);
  border-top: 1px solid var(--ttt-border);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

/* Feature sections - matching image style */
.feature-section {
  background-color: var(--ttt-bg-page);
  padding: 4rem 0;
}

.feature-card {
  background-color: var(--ttt-bg-card);
  border-radius: var(--ttt-radius-lg);
  padding: 2rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  border: 1px solid var(--ttt-border);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--ttt-color-tomato);
  margin-bottom: 1rem;
}

.feature-title {
  color: var(--ttt-text-body);
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.feature-description {
  color: var(--ttt-text-muted);
  line-height: 1.6;
}

/* Section headers */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  color: var(--ttt-color-tomato);
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--ttt-text-muted);
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

