/* ===================================================================
   SideHustle AI — Design System & Stylesheet
   Modern Glassmorphism • Dark Mode • Ultra-Premium Aesthetics
   =================================================================== */

:root {
  /* Color Palette */
  --bg-dark: #0a0c10;
  --bg-card: rgba(18, 22, 31, 0.75);
  --bg-card-hover: rgba(25, 32, 46, 0.85);
  --bg-input: #0f141c;
  --bg-surface: #141a24;

  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(139, 92, 246, 0.6);
  --border-card: rgba(255, 255, 255, 0.06);

  /* Primary Accent: Electric Violet to Cyan */
  --accent-primary: #8b5cf6;
  --accent-primary-hover: #7c3aed;
  --accent-secondary: #06b6d4;
  --accent-secondary-hover: #0891b2;

  /* State Colors */
  --color-success: #10b981;
  --color-success-bg: rgba(16, 185, 129, 0.15);
  --color-warning: #f59e0b;
  --color-danger: #ef4444;
  --color-danger-bg: rgba(239, 68, 68, 0.15);

  /* Text Colors */
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  /* Typography */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Shadows & Glassmorphism */
  --glass-blur: blur(14px);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.6);
  --glow-primary: 0 0 24px rgba(139, 92, 246, 0.3);
  --glow-cyan: 0 0 24px rgba(6, 182, 212, 0.25);

  /* Layout */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.55;
  background-image: 
    radial-gradient(at 10% 15%, rgba(139, 92, 246, 0.12) 0px, transparent 40%),
    radial-gradient(at 90% 85%, rgba(6, 182, 212, 0.08) 0px, transparent 40%),
    radial-gradient(at 50% 50%, rgba(16, 185, 129, 0.04) 0px, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ===================================================================
   Typography & Helper Utilities
   =================================================================== */
h1, h2, h3, h4 {
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }

p {
  color: var(--text-muted);
}

.text-muted { color: var(--text-muted) !important; }
.text-xs { font-size: 0.75rem !important; }
.text-sm { font-size: 0.85rem !important; }
.text-lg { font-size: 1.25rem !important; }
.font-semibold { font-weight: 600 !important; }
.code-font { font-family: var(--font-mono) !important; }

.text-success { color: var(--color-success) !important; }
.text-accent { color: var(--accent-secondary) !important; }
.text-highlight { color: #a855f7 !important; }
.text-danger { color: var(--color-danger) !important; }
.text-uppercase { text-transform: uppercase; letter-spacing: 0.05em; }

.gradient-text {
  background: linear-gradient(135deg, #a855f7 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.ml-2 { margin-left: 0.5rem; }
.text-right { text-align: right; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.hidden { display: none !important; }

/* ===================================================================
   Glassmorphism Cards
   =================================================================== */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.glass-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
}

/* ===================================================================
   Header & Engine Status Bar
   =================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.25), rgba(6, 182, 212, 0.25));
  border: 1px solid rgba(139, 92, 246, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c084fc;
  box-shadow: var(--glow-primary);
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.engine-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.engine-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}

.engine-pill:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(139, 92, 246, 0.4);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.engine-name {
  font-weight: 600;
  color: var(--text-main);
}

.model-badge {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  background: rgba(139, 92, 246, 0.2);
  color: #c084fc;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.chip-save {
  padding: 0.15rem 0.45rem;
  background: var(--color-success-bg);
  color: var(--color-success);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}

/* ===================================================================
   Navigation Tabs
   =================================================================== */
.tabs-nav {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(15, 20, 28, 0.6);
}

.tabs-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  gap: 0.5rem;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.tab-btn.active {
  color: #fff;
  border-bottom-color: var(--accent-primary);
  background: rgba(139, 92, 246, 0.05);
}

.tab-tag {
  font-size: 0.68rem;
  padding: 0.1rem 0.45rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-dim);
  font-weight: 500;
}

.tab-btn.active .tab-tag {
  background: rgba(139, 92, 246, 0.2);
  color: #d8b4fe;
}

/* ===================================================================
   Main Content Layout
   =================================================================== */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 4rem;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease forwards;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.view-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.quick-samples {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ===================================================================
   Metrics Grid
   =================================================================== */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.metric-card {
  background: var(--bg-card);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: var(--shadow-md);
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.metric-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.metric-icon {
  font-size: 1.1rem;
}

.metric-value {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-family: var(--font-mono);
  color: #fff;
}

.metric-sub {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
}

/* ===================================================================
   Studio Grids (Panels)
   =================================================================== */
.studio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

@media (max-width: 992px) {
  .studio-grid {
    grid-template-columns: 1fr;
  }
}

.panel {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.header-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.panel-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

/* ===================================================================
   Badges
   =================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge-open-source {
  background: rgba(139, 92, 246, 0.18);
  color: #c084fc;
  border: 1px solid rgba(139, 92, 246, 0.35);
}

.badge-success {
  background: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-privacy {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-secondary);
  border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-accent {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.badge-subtle {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* ===================================================================
   Buttons
   =================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 1.15rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary) 0%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #9d6fff 0%, #8b5cf6 100%);
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.45);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.15);
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-outline-danger {
  background: transparent;
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.btn-outline-danger:hover {
  background: var(--color-danger-bg);
  border-color: var(--color-danger);
}

.btn-chip {
  padding: 0.3rem 0.65rem;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.75rem;
}

.btn-chip:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #fff;
  border-color: rgba(139, 92, 246, 0.4);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 0.75rem 1.4rem;
  font-size: 0.95rem;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.btn-link {
  background: none;
  border: none;
  color: #a855f7;
  cursor: pointer;
  font-weight: 600;
  text-decoration: underline;
  padding: 0;
}

.btn-link:hover {
  color: #c084fc;
}

/* ===================================================================
   Forms & Inputs
   =================================================================== */
.form-group {
  margin-bottom: 0.85rem;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.form-row {
  display: flex;
  gap: 0.75rem;
}

.form-control {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
  background: #141b25;
}

.form-control::placeholder {
  color: var(--text-dim);
}

.form-control-sm {
  padding: 0.4rem 0.65rem;
  font-size: 0.8rem;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

select.form-control {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
  -webkit-appearance: none;
  appearance: none;
}

/* Custom Checkbox */
.custom-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-main);
  user-select: none;
}

.custom-checkbox input {
  display: none;
}

.custom-checkbox .checkmark {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  background: var(--bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.custom-checkbox input:checked + .checkmark {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.custom-checkbox input:checked + .checkmark::after {
  content: '✓';
  color: #fff;
  font-size: 0.75rem;
  font-weight: bold;
}

.checkbox-row {
  padding: 0.5rem 0;
}

/* ===================================================================
   Dropzone Component
   =================================================================== */
.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  background: rgba(15, 20, 28, 0.4);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent-primary);
  background: rgba(139, 92, 246, 0.05);
}

.dropzone-inner svg {
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  transition: var(--transition);
}

.dropzone:hover .dropzone-inner svg {
  color: #c084fc;
  transform: translateY(-2px);
}

.dropzone-lead {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.9rem;
}

.dropzone-sub {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

.dropzone-pills {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.dropzone-pills span {
  font-size: 0.68rem;
  padding: 0.15rem 0.45rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
}

.image-preview-container {
  position: relative;
  max-height: 220px;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  justify-content: center;
  background: #000;
}

.image-preview-container img {
  max-height: 220px;
  width: auto;
  object-fit: contain;
}

.remove-preview-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 1.25rem;
  line-height: 1;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===================================================================
   Line Items Box & Attribute Box
   =================================================================== */
.line-items-box {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  min-height: 90px;
  max-height: 150px;
  overflow-y: auto;
}

.line-item-row {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.line-item-row:last-child {
  border-bottom: none;
}

.empty-state-text {
  color: var(--text-dim);
  text-align: center;
  padding: 1rem 0;
  font-style: italic;
}

/* ===================================================================
   Tables & Data Presentation
   =================================================================== */
.table-card {
  padding: 1.25rem;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.table-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.search-box {
  width: 220px;
}

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.data-table th {
  text-align: left;
  padding: 0.65rem 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
}

.data-table td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* ===================================================================
   Listing Studio Specifics
   =================================================================== */
.calc-box {
  background: rgba(16, 185, 129, 0.04);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  margin-top: 0.75rem;
}

.calc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.calc-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px dashed rgba(16, 185, 129, 0.2);
}

.output-sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.char-count {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-dim);
}

.copy-input-row {
  display: flex;
  gap: 0.5rem;
}

.tags-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  min-height: 52px;
  padding: 0.6rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #d8b4fe;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
}

.tag-chip:hover {
  background: rgba(139, 92, 246, 0.3);
  color: #fff;
}

.tag-chip.empty {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: default;
}

.attributes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.5rem;
  padding: 0.6rem;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.attr-item {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  border-left: 2px solid var(--accent-secondary);
}

.attr-key {
  font-weight: 600;
  color: var(--text-muted);
}

.attr-val {
  color: #fff;
  font-family: var(--font-mono);
}

/* ===================================================================
   Why Open Innovation Grid
   =================================================================== */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}

.why-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.why-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.bg-primary { background: rgba(139, 92, 246, 0.15); color: #c084fc; border: 1px solid rgba(139, 92, 246, 0.3); }
.bg-accent { background: rgba(6, 182, 212, 0.15); color: var(--accent-secondary); border: 1px solid rgba(6, 182, 212, 0.3); }
.bg-warning { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.bg-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.why-desc {
  font-size: 0.88rem;
  margin: 0.75rem 0 1.25rem;
}

.why-stat {
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
}

.stat-big {
  font-size: 1.75rem;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* ROI Simulator */
.roi-simulator-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 768px) {
  .roi-simulator-grid {
    grid-template-columns: 1fr;
  }
}

.range-slider {
  width: 100%;
  accent-color: var(--accent-primary);
  cursor: pointer;
}

.roi-results-box {
  background: rgba(15, 20, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.roi-result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.roi-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
}

.roi-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 1rem 0;
}

.roi-result-hero {
  text-align: center;
  padding: 0.5rem 0;
}

.roi-hero-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
}

.roi-hero-val {
  font-size: 2.25rem;
  font-weight: 800;
  font-family: var(--font-mono);
  display: block;
}

/* ===================================================================
   Modals
   =================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-card {
  max-width: 540px;
  width: 100%;
  background: #111622;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.engine-option-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.engine-option {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: var(--transition);
}

.engine-option:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

.engine-option input {
  margin-top: 0.2rem;
  accent-color: var(--accent-primary);
}

.engine-opt-details {
  flex: 1;
}

.engine-opt-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.modal-footer {
  margin-top: 1.25rem;
  display: flex;
  justify-content: flex-end;
}

/* ===================================================================
   Toast Notifications
   =================================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1.15rem;
  background: rgba(18, 22, 31, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  color: #fff;
  font-size: 0.85rem;
  animation: slideInRight 0.25s ease forwards;
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

.toast.toast-success { border-left: 3px solid var(--color-success); }
.toast.toast-info { border-left: 3px solid var(--accent-secondary); }
.toast.toast-danger { border-left: 3px solid var(--color-danger); }

/* ===================================================================
   Print Media Styles (for Invoices & Reports)
   =================================================================== */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  .app-header, .tabs-nav, .quick-samples, .studio-grid, .table-actions, .btn, .dropzone, #configModal, .toast-container {
    display: none !important;
  }
  .glass-card {
    border: none;
    background: transparent;
    box-shadow: none;
  }
  .data-table th, .data-table td {
    color: #000;
    border-color: #ccc;
  }
}
