/* ═══════════════════════════════════════════════════════════════════════════
   SyncraNode — Global Styles
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --df-primary:   #1F4E79;
  --df-accent:    #2E75B6;
  --df-light-bg:  #EBF4FB;
  --df-header-bg: #D6E4F0;
  --df-success:   #198754;
  --df-warning:   #c97a00;
  --df-body-bg:   #f4f7fb;
}

body {
  background: var(--df-body-bg);
  font-family: 'Segoe UI', system-ui, Arial, sans-serif;
}

/* ── Navbar ─────────────────────────────────────────────────────────────── */
.df-navbar {
  background: var(--df-primary) !important;
}
.df-navbar .navbar-brand {
  font-size: 1.2rem;
  letter-spacing: .5px;
}
.df-navbar .nav-link {
  font-weight: 500;
  font-size: .92rem;
}
.df-navbar .nav-link:hover {
  color: #90caf9 !important;
}
.df-navbar .nav-divider {
  border-left: 1px solid rgba(255,255,255,.25);
  margin: 6px 6px;
  padding: 0;
}

/* ── Landing page tool cards ────────────────────────────────────────────── */
.tool-card {
  border-radius: 14px;
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}
.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(31,78,121,.12) !important;
}
.tool-card-link:hover {
  text-decoration: none;
}
.tool-icon-sq {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--df-light-bg);
  color: var(--df-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.btn-tool-unified {
  background: var(--df-accent);
  color: #fff !important;
  border: none;
  border-radius: 7px;
  font-weight: 600;
  font-size: .82rem;
  padding: 5px 16px;
  transition: background .2s;
}
.tool-card:hover .btn-tool-unified {
  background: var(--df-primary);
}
/* Legacy .btn-tool kept for any other pages using it */
.btn-tool {
  border: none;
  border-radius: 8px;
  font-weight: 600;
  padding: 8px 22px;
  transition: filter .2s;
}
.btn-tool:hover {
  filter: brightness(.88);
  color: #fff;
}
/* Legacy circle icon (kept for compatibility) */
.tool-icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── How It Works (landing page) ────────────────────────────────────────── */
.how-it-works {
  background: #fff;
  border-radius: 14px;
  padding: 28px 24px;
  box-shadow: 0 2px 10px rgba(31,78,121,.06);
}
.hiw-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--df-light-bg);
  color: var(--df-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}

/* ── Common card styles ─────────────────────────────────────────────────── */
.df-card {
  border: 1px solid #d0e4f5;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(30,78,121,.08);
}
.df-card-header {
  background: var(--df-primary);
  color: #fff;
  border-radius: 9px 9px 0 0 !important;
  font-weight: 600;
  font-size: .95rem;
}

/* ── Step badges ────────────────────────────────────────────────────────── */
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,.3);
  font-size: .8rem;
  margin-right: 6px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn-primary-custom {
  background: var(--df-accent);
  border: none;
  color: #fff;
  border-radius: 7px;
  font-weight: 600;
}
.btn-primary-custom:hover {
  background: var(--df-primary);
  color: #fff;
}

/* ── Drop zones ─────────────────────────────────────────────────────────── */
.df-drop-zone {
  border: 2.5px dashed var(--df-accent);
  border-radius: 10px;
  background: var(--df-light-bg);
  cursor: pointer;
  transition: background .2s, border-color .2s;
  min-height: 130px;
}
.df-drop-zone.drag-over {
  background: #cde4f8;
  border-color: var(--df-primary);
}
.df-drop-zone .icon {
  font-size: 2.5rem;
  color: var(--df-accent);
}

/* ── Score gauge ────────────────────────────────────────────────────────── */
.score-gauge {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  border: 8px solid #e0e0e0;
  position: relative;
}
.score-gauge.excellent { border-color: #198754; }
.score-gauge.good      { border-color: #2E75B6; }
.score-gauge.fair      { border-color: #ffc107; }
.score-gauge.poor      { border-color: #dc3545; }

.score-value {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}
.score-label {
  font-size: .85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Dimension cards (DQC) ──────────────────────────────────────────────── */
.dim-card {
  border-radius: 10px;
  border: 1px solid #dee2e6;
  transition: box-shadow .2s;
}
.dim-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.08);
}
.dim-card .dim-score {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
}
.dim-bar {
  height: 6px;
  border-radius: 3px;
  background: #e9ecef;
  overflow: hidden;
}
.dim-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .6s ease;
}

/* ── Issue table ────────────────────────────────────────────────────────── */
.issue-table th {
  background: var(--df-header-bg);
  color: var(--df-primary);
  font-weight: 600;
  white-space: nowrap;
  font-size: .87rem;
}
.issue-table td {
  vertical-align: middle;
  font-size: .87rem;
}
.severity-high     { color: #dc3545; font-weight: 600; }
.severity-medium   { color: #c97a00; font-weight: 600; }
.severity-low      { color: #198754; font-weight: 600; }
.severity-info     { color: #0d6efd; font-weight: 600; }

/* ── Progress (SSE) ─────────────────────────────────────────────────────── */
.sse-progress .progress {
  height: 18px;
  border-radius: 9px;
}

/* ── Download cards ─────────────────────────────────────────────────────── */
.dl-card {
  background: #fff;
  border: 1px solid #b7ddb0;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dl-card.combined {
  border-color: var(--df-accent);
  background: var(--df-light-bg);
}
.dl-card .dl-name {
  font-weight: 600;
  color: var(--df-primary);
}
.dl-card .dl-meta {
  font-size: .82rem;
  color: #666;
}
.btn-download {
  background: var(--df-success);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: .87rem;
  text-decoration: none;
}
.btn-download:hover {
  background: #157347;
  color: #fff;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .score-gauge { width: 140px; height: 140px; }
  .score-value { font-size: 2.2rem; }
}
