/* somiroaitool.com — Main Stylesheet */

:root {
  --color-primary: #2563eb;
  --color-success: #16a34a;
  --color-warning: #d97706;
  --color-danger: #dc2626;
  --color-muted: #6b7280;
  --sidebar-width: 220px;
}

/* ── General ──────────────────────────────────────────────── */
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #f8fafc;
  color: #1e293b;
}

.footer {
  position: relative;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.card-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
}

/* ── KPI Cards ────────────────────────────────────────────── */
.kpi-card {
  background: #fff;
  border-radius: 0.75rem;
  padding: 1.5rem;
  border: 1px solid #e2e8f0;
  transition: transform 0.15s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.kpi-card .kpi-value {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1;
}

.kpi-card .kpi-label {
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-top: 0.25rem;
}

.kpi-card .kpi-icon {
  font-size: 2rem;
  opacity: 0.15;
}

/* ── Tables ───────────────────────────────────────────────── */
.table th {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  border-top: none;
}

/* ── Badges ───────────────────────────────────────────────── */
.badge-pending   { background: #fef3c7; color: #92400e; }
.badge-active    { background: #d1fae5; color: #065f46; }
.badge-failed    { background: #fee2e2; color: #991b1b; }
.badge-review    { background: #dbeafe; color: #1e40af; }

/* ── Confidence bar ───────────────────────────────────────── */
.confidence-bar {
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  overflow: hidden;
}

.confidence-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}

.confidence-bar-fill.low   { background: var(--color-danger); }
.confidence-bar-fill.med   { background: var(--color-warning); }
.confidence-bar-fill.high  { background: var(--color-success); }

/* ── Forms ────────────────────────────────────────────────── */
.form-label {
  font-weight: 500;
  font-size: 0.875rem;
}

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

/* ── Auth pages ───────────────────────────────────────────── */
.auth-card {
  width: min(100% - 1.5rem, 440px);
  margin: 4rem auto;
  padding: 2.5rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
}

.auth-card--wide {
  width: min(100% - 1.5rem, 1080px);
}

.auth-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 1.25rem;
}

.auth-grid-span-2 {
  grid-column: 1 / -1;
}

@media (max-width: 575.98px) {
  .auth-card {
    margin: 1rem auto;
    padding: 1.25rem;
  }
}

@media (min-width: 992px) {
  .auth-card--wide {
    margin: 2.5rem auto;
    padding: 2.5rem 2.75rem;
  }

  .auth-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-grid > .row {
    margin-left: 0;
    margin-right: 0;
  }

  .auth-grid > .row > [class*='col-'] {
    padding-left: 0;
    padding-right: 0;
  }
}

/* ── Savings highlight ────────────────────────────────────── */
.savings-highlight {
  color: var(--color-success);
  font-weight: 700;
}

.overprice-highlight {
  color: var(--color-danger);
  font-weight: 600;
}
