/* =========================================================
   shared-dark.css — EstudioArte / Gemini Project
   FlyonUI-inspired design system with dark mode & blueprint
   ========================================================= */

/* ── Google Font ───────────────────────────────────────── */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

/* ── LIGHT THEME (default) ─────────────────────────────── */
:root,
[data-theme="light"] {
  --bg-body: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-2: #f1f5f9;
  --border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --primary: #2563eb;
  --primary-bg: #eff6ff;
  --primary-hover: #1d4ed8;
  --radius-box: 1rem;
  --radius-btn: 0.5rem;
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.07), 0 1px 2px -1px rgb(0 0 0 / 0.07);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg:
    0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --navbar-bg: rgba(255, 255, 255, 0.85);
  --nav-item-hover: #f1f5f9;
  --toggle-bg: #e2e8f0;
  --toggle-color: #64748b;
  --svg-bg: #fafafa;
  --svg-border: #e2e8f0;
  --th-bg: #f8fafc;
  --tr-hover: #f1f5f9;
  --input-bg: #ffffff;
  --input-border: #e2e8f0;
  --step-badge-bg: #2563eb;
  --tools-bg: #f8fafc;
  --tool-item-bg: #ffffff;
}

/* ── DARK THEME ─────────────────────────────────────────── */
/* html[data-theme="dark"] has specificity (0,1,1) which      */
/* beats inline :root {} blocks with specificity (0,1,0).     */
html[data-theme="dark"] {
  --bg-body: #0b1120;
  --bg-surface: #1e293b;
  --bg-surface-2: #0f172a;
  --border: #334155;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --primary: #60a5fa;
  --primary-bg: #172554;
  --primary-hover: #93c5fd;
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.4);
  --shadow-md:
    0 4px 12px -1px rgb(0 0 0 / 0.5), 0 2px 4px -2px rgb(0 0 0 / 0.4);
  --shadow-lg:
    0 10px 25px -3px rgb(0 0 0 / 0.6), 0 4px 8px -4px rgb(0 0 0 / 0.4);
  --navbar-bg: rgba(11, 17, 32, 0.92);
  --nav-item-hover: #1e293b;
  --toggle-bg: #1e293b;
  --toggle-color: #f1c40f;
  --svg-bg: #1e293b;
  --svg-border: #334155;
  --th-bg: #0f172a;
  --tr-hover: #1e293b;
  --input-bg: #0f172a;
  --input-border: #334155;
  --step-badge-bg: #3b82f6;
  --tools-bg: #0f172a;
  --tool-item-bg: #1e293b;
}

/* ── CRITICAL: !important overrides for hardcoded inline CSS ─
   Each HTML page has a <style> block with hardcoded colours.
   These !important rules win over those inline declarations.   */

html[data-theme="dark"] body {
  background-color: #0b1120 !important;
  color: #f1f5f9 !important;
}

/* Navbar */
html[data-theme="dark"] .navbar {
  background: rgba(11, 17, 32, 0.92) !important;
  border-bottom-color: #334155 !important;
}
html[data-theme="dark"] .navbar-brand {
  color: #f1f5f9 !important;
}
html[data-theme="dark"] .nav-item {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .nav-item:hover {
  background: #1e293b !important;
  color: #f1f5f9 !important;
}
html[data-theme="dark"] .nav-item.active {
  background: #172554 !important;
  color: #60a5fa !important;
}
html[data-theme="dark"] .mobile-menu {
  background: #1e293b !important;
  border-bottom-color: #334155 !important;
}
html[data-theme="dark"] .theme-toggle {
  background: #1e293b !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .nav-hamburger {
  background: #1e293b !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .nav-hamburger span {
  background: #f1f5f9 !important;
}

/* Cards & surfaces */
html[data-theme="dark"] .card,
html[data-theme="dark"] .step-card {
  background: #1e293b !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .card-header {
  border-bottom-color: #334155 !important;
}
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] .card-title,
html[data-theme="dark"] .step-title,
html[data-theme="dark"] .card-title-accent {
  color: #f1f5f9 !important;
}
html[data-theme="dark"] .card-desc {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .step-title {
  border-bottom-color: #334155 !important;
}
html[data-theme="dark"] .step-badge {
  box-shadow: 0 0 0 6px #0b1120 !important;
}
html[data-theme="dark"] .tools-box {
  background: #0f172a !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .tool-item {
  background: #1e293b !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}
html[data-theme="dark"] .part-code {
  background: #0f172a !important;
  border-color: #334155 !important;
  color: #60a5fa !important;
}

/* Tables */
html[data-theme="dark"] th {
  background: #0f172a !important;
  color: #94a3b8 !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] td {
  color: #f1f5f9 !important;
  border-color: #334155 !important;
}
html[data-theme="dark"] .table-container {
  border-color: #334155 !important;
}
html[data-theme="dark"] .mat-25 {
  background: rgba(245, 158, 11, 0.07) !important;
}
html[data-theme="dark"] .mat-18 {
  background: rgba(59, 130, 246, 0.07) !important;
}
html[data-theme="dark"] .mat-12 {
  background: rgba(34, 197, 94, 0.07) !important;
}
html[data-theme="dark"] .mat-5 {
  background: rgba(139, 92, 246, 0.07) !important;
}
html[data-theme="dark"] .mat-ins {
  background: rgba(148, 163, 184, 0.05) !important;
}
html[data-theme="dark"] .badge-25 {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fcd34d !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}
html[data-theme="dark"] .badge-18 {
  background: rgba(59, 130, 246, 0.15) !important;
  color: #93c5fd !important;
  border-color: rgba(59, 130, 246, 0.3) !important;
}
html[data-theme="dark"] .badge-12 {
  background: rgba(34, 197, 94, 0.15) !important;
  color: #86efac !important;
  border-color: rgba(34, 197, 94, 0.3) !important;
}
html[data-theme="dark"] .badge-5 {
  background: rgba(139, 92, 246, 0.15) !important;
  color: #c4b5fd !important;
  border-color: rgba(139, 92, 246, 0.3) !important;
}
html[data-theme="dark"] .badge-ins {
  background: rgba(148, 163, 184, 0.15) !important;
  color: #cbd5e1 !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
}

/* Inputs */
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #0f172a !important;
  color: #f1f5f9 !important;
  border-color: #334155 !important;
}

/* Buttons (non-primary) */
html[data-theme="dark"] .btn-outline {
  background: transparent !important;
  border-color: #334155 !important;
  color: #f1f5f9 !important;
}
html[data-theme="dark"] .btn-outline:hover {
  background: #1e293b !important;
}

/* Generic text colours when used with inline styles */
html[data-theme="dark"] p {
  color: #94a3b8;
}
html[data-theme="dark"] li {
  color: #94a3b8;
}
html[data-theme="dark"] .board-label,
html[data-theme="dark"] .material-title {
  color: #94a3b8 !important;
}

/* CNC boards */
html[data-theme="dark"] #output svg,
html[data-theme="dark"] .board-svg {
  background: #07213d !important;
  border-color: #1e4a7a !important;
}

/* ── RESET & BASE ───────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

/* ── NAVBAR ─────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navbar-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  padding: 0.65rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}
.navbar-brand {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  letter-spacing: -0.3px;
}
.navbar-brand svg {
  border: none !important;
  background: transparent !important;
  margin: 0 !important;
  box-shadow: none !important;
  width: 22px !important;
  height: 22px !important;
}
.navbar-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.navbar-menu {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav-item {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.825rem;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-btn);
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-item:hover {
  background: var(--nav-item-hover);
  color: var(--text-main);
}
.nav-item.active {
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 600;
}

/* ── DARK MODE TOGGLE ───────────────────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--toggle-bg);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.theme-toggle:hover {
  background: var(--primary-bg);
  border-color: var(--primary);
  transform: scale(1.08);
}

/* ── HAMBURGER ──────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  gap: 5px;
  background: var(--toggle-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: all 0.2s;
}
.nav-hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition:
    transform 0.3s ease,
    opacity 0.3s ease;
}
.nav-hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-hamburger.open span:nth-child(2) {
  opacity: 0;
}
.nav-hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── MOBILE MENU DRAWER ─────────────────────────────────── */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 1.5rem 1rem;
  gap: 0.35rem;
}
.mobile-menu.open {
  display: flex;
}
.mobile-menu .nav-item {
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  display: block;
}

/* ── CONTAINER ──────────────────────────────────────────── */
.container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 2rem;
}

/* ── CARDS ──────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-box);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  margin-bottom: 2rem;
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}
.card-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: var(--text-main);
}
.card-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
}

/* ── SVG BASE ───────────────────────────────────────────── */
svg {
  width: 100%;
  height: auto;
  border: 1px solid var(--svg-border, var(--border));
  border-radius: var(--radius-btn);
  background-color: var(--svg-bg, #fafafa);
  margin-bottom: 2rem;
  overflow: visible;
  transition:
    background-color 0.3s ease,
    border-color 0.3s ease;
}
.navbar svg,
.theme-toggle svg {
  border: none !important;
  background: transparent !important;
  margin: 0 !important;
  box-shadow: none !important;
}
/* Lucide icons inside buttons */
.theme-toggle svg {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor;
  fill: none;
}
.nav-hamburger svg {
  width: 18px !important;
  height: 18px !important;
  stroke: currentColor;
  fill: none;
}

/* ── SVG DRAW CLASSES ───────────────────────────────────── */
.cut {
  stroke: var(--text-main);
  stroke-width: 4;
  fill: #e2e8f0;
}
.view {
  stroke: var(--text-main);
  stroke-width: 2.5;
  fill: #ffffff;
}
.hidden-line {
  stroke: var(--text-muted);
  stroke-width: 3;
  stroke-dasharray: 12 8;
  fill: none;
}
.proj-line {
  stroke: #94a3b8;
  stroke-width: 1.5;
  stroke-dasharray: 15 10;
  fill: none;
}
.dim-line {
  stroke: #dc2626;
  stroke-width: 2.5;
  fill: none;
}
.dim-tick {
  stroke: #dc2626;
  stroke-width: 3.5;
}
.pointer-line {
  stroke: #dc2626;
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 6 4;
}
.dim-text {
  fill: #dc2626;
  font-size: 32px;
  font-family: monospace;
  font-weight: bold;
  text-anchor: middle;
}
.dim-text-left {
  fill: #dc2626;
  font-size: 32px;
  font-family: monospace;
  font-weight: bold;
  text-anchor: start;
}
.dim-text-right {
  fill: #dc2626;
  font-size: 32px;
  font-family: monospace;
  font-weight: bold;
  text-anchor: end;
}
.dim-internal {
  fill: #059669;
  font-size: 28px;
  font-family: monospace;
  font-weight: bold;
  text-anchor: middle;
}
.line-internal {
  stroke: #059669;
  stroke-width: 2.5;
  fill: none;
}
.label-svg {
  fill: var(--text-main);
  font-size: 38px;
  font-family: sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.sub-label {
  fill: var(--text-muted);
  font-size: 28px;
  font-family: sans-serif;
  font-weight: bold;
}

/* ── BLUEPRINT MODE ─────────────────────────────────────── */
html[data-theme="dark"] .blueprint-svg {
  background-color: #07213d !important;
  border-color: #1e4a7a !important;
}
html[data-theme="dark"] .blueprint-svg .view {
  fill: rgba(30, 100, 180, 0.12) !important;
  stroke: #7ec8e3 !important;
}
html[data-theme="dark"] .blueprint-svg .cut {
  fill: rgba(96, 165, 250, 0.18) !important;
  stroke: #93c5fd !important;
}
html[data-theme="dark"] .blueprint-svg .hidden-line {
  stroke: #60a5fa !important;
  stroke-opacity: 0.55;
}
html[data-theme="dark"] .blueprint-svg .proj-line {
  stroke: #3b82f6 !important;
  stroke-opacity: 0.45;
}
html[data-theme="dark"] .blueprint-svg .dim-line,
html[data-theme="dark"] .blueprint-svg .dim-tick {
  stroke: #22d3ee !important;
}
html[data-theme="dark"] .blueprint-svg .pointer-line {
  stroke: #22d3ee !important;
}
html[data-theme="dark"] .blueprint-svg .dim-text,
html[data-theme="dark"] .blueprint-svg .dim-text-left,
html[data-theme="dark"] .blueprint-svg .dim-text-right {
  fill: #22d3ee !important;
}
html[data-theme="dark"] .blueprint-svg marker path {
  fill: #22d3ee !important;
}
html[data-theme="dark"] .blueprint-svg path[fill="#dc2626"] {
  fill: #22d3ee !important;
}
html[data-theme="dark"] .blueprint-svg circle[fill="#dc2626"] {
  fill: #22d3ee !important;
}
html[data-theme="dark"] .blueprint-svg .dim-internal {
  fill: #34d399 !important;
}
html[data-theme="dark"] .blueprint-svg .line-internal {
  stroke: #34d399 !important;
}
html[data-theme="dark"] .blueprint-svg .label-svg {
  fill: #e2e8f0 !important;
}
html[data-theme="dark"] .blueprint-svg .sub-label {
  fill: #93c5fd !important;
}
html[data-theme="dark"] .blueprint-svg line[stroke="#059669"] {
  stroke: #34d399 !important;
}
/* detalles */
html[data-theme="dark"] .blueprint-svg .hatch-mdf {
  fill: rgba(253, 179, 49, 0.15) !important;
  stroke: #fbbf24 !important;
}
html[data-theme="dark"] .blueprint-svg .solid-mdf {
  fill: rgba(253, 179, 49, 0.2) !important;
  stroke: #fbbf24 !important;
}
html[data-theme="dark"] .blueprint-svg .solid-pine {
  fill: rgba(253, 186, 116, 0.2) !important;
  stroke: #fb923c !important;
}
html[data-theme="dark"] .blueprint-svg .metal {
  fill: rgba(148, 163, 184, 0.2) !important;
  stroke: #94a3b8 !important;
}
html[data-theme="dark"] .blueprint-svg .label-text {
  fill: #e2e8f0 !important;
}
html[data-theme="dark"] .blueprint-svg .sub-text {
  fill: #93c5fd !important;
}
/* plan-armado */
html[data-theme="dark"] .blueprint-svg .part {
  fill: rgba(30, 100, 180, 0.12) !important;
  stroke: #7ec8e3 !important;
}
html[data-theme="dark"] .blueprint-svg .part-shade {
  fill: rgba(30, 80, 160, 0.2) !important;
  stroke: #7ec8e3 !important;
}
html[data-theme="dark"] .blueprint-svg .action-line {
  stroke: #22d3ee !important;
}
html[data-theme="dark"] .blueprint-svg .glue-line {
  stroke: #fbbf24 !important;
}
html[data-theme="dark"] .blueprint-svg .hardware {
  fill: rgba(148, 163, 184, 0.2) !important;
  stroke: #94a3b8 !important;
}
html[data-theme="dark"] .blueprint-svg .text-label {
  fill: #e2e8f0 !important;
}
html[data-theme="dark"] .blueprint-svg .text-sub {
  fill: #93c5fd !important;
}
html[data-theme="dark"] .blueprint-svg [filter="url(#bg-text)"] {
  filter: none !important;
}

/* ── TABLES ─────────────────────────────────────────────── */
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}
th {
  background: var(--th-bg);
  color: var(--text-muted);
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-main);
}
tr:last-child td {
  border-bottom: none;
}

/* ── INPUTS / BUTTONS ───────────────────────────────────── */
input[type="number"],
input[type="text"] {
  background: var(--input-bg);
  color: var(--text-main);
  border: 1px solid var(--input-border);
  border-radius: 0.375rem;
  padding: 0.375rem 0.5rem;
  transition:
    background 0.3s,
    color 0.3s,
    border-color 0.3s;
}
.btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-family: "Inter", sans-serif;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-hover);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-main);
}
.btn-outline:hover {
  background: var(--nav-item-hover);
}

/* ── STEP CARDS (plan-armado) ──────────────────────────── */
.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-box);
  padding: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
  box-shadow: var(--shadow-md);
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}
.step-badge {
  position: absolute;
  top: -16px;
  left: -16px;
  background: var(--step-badge-bg);
  color: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  box-shadow: 0 0 0 6px var(--bg-body);
}
.step-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.75rem 0;
  color: var(--text-main);
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.5rem;
}
.step-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin: 0 0 1.5rem 0;
  line-height: 1.6;
}
.part-code {
  background: var(--bg-surface-2);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9rem;
  color: var(--primary);
  font-weight: 700;
}
.tools-box {
  display: flex;
  gap: 1rem;
  background: var(--tools-bg);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: var(--radius-btn);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.tool-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-main);
  background: var(--tool-item-bg);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
}

/* ── GRID & MISC ────────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.card-full {
  grid-column: 1 / -1;
}
.material-section {
  margin-bottom: 4rem;
}
.material-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text-main);
}
.board-container {
  margin-bottom: 2rem;
}
.board-label {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}
.button-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.card-title-accent {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  border-left: 4px solid var(--primary);
  padding-left: 0.75rem;
  color: var(--text-main);
}

/* ── TRANSITIONS ────────────────────────────────────────── */
* {
  transition:
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.15s ease;
}
svg *,
path,
rect,
line,
circle,
polygon {
  transition: none;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE — MOBILE FIRST
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .navbar {
    padding: 0.65rem 1rem;
    flex-wrap: wrap;
  }
  .navbar-menu {
    display: none !important;
  }
  .nav-hamburger {
    display: flex !important;
  }
  .container {
    padding: 0 1rem;
    margin: 1.25rem auto;
  }
  .card {
    padding: 1.25rem;
  }
  .step-card {
    padding: 2rem 1.25rem 1.5rem;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  table {
    font-size: 0.8rem;
  }
  td,
  th {
    padding: 0.5rem 0.65rem;
  }
  input[type="number"] {
    width: 75px;
  }
  .tools-box {
    flex-direction: column;
  }
  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .button-group {
    flex-direction: column;
  }
  .button-group .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .navbar-brand {
    font-size: 0.95rem;
  }
  .navbar-brand svg {
    width: 18px !important;
    height: 18px !important;
  }
  .card {
    padding: 1rem;
  }
  .step-badge {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    top: -12px;
    left: -12px;
  }
  .step-title {
    font-size: 1.2rem;
  }
}

/* ═══════════════════════════════════════════════════════════
   FOOTER — FlyonUI Footer 2 Style
   ═══════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--bg-surface-2);
  border-top: 1px solid var(--border);
  padding: 3.5rem 0 0;
  margin-top: 4rem;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  transition:
    background 0.3s ease,
    border-color 0.3s ease;
}

/* dark mode footer bg */
html[data-theme="dark"] .site-footer {
  background: #0f172a !important;
  border-top-color: #1e293b !important;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.6fr;
  gap: 3rem;
  align-items: start;
}

/* Brand column */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}
.footer-logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.3s;
}
.footer-logo-icon svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}
.footer-logo-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  transition: color 0.3s;
}

.footer-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
  max-width: 280px;
}

.footer-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0.25rem 0;
  width: 120px;
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}
.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
  background: none;
  border: none;
  padding: 0.15rem;
}
.footer-social-link:hover {
  color: var(--primary);
  transform: translateY(-2px);
}
.footer-social-link svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Nav columns */
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-main);
  margin: 0 0 0.75rem 0;
}
html[data-theme="dark"] .footer-nav-heading {
  color: #f1f5f9 !important;
}

.footer-nav-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.2rem 0;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.footer-nav-link:hover {
  color: var(--primary);
}

/* Info / project column */
.footer-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.footer-info-heading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-main);
  margin: 0 0 0.5rem 0;
}
html[data-theme="dark"] .footer-info-heading {
  color: #f1f5f9 !important;
}

.footer-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-surface);
  transition: all 0.2s;
}
.footer-badge:hover {
  border-color: var(--primary);
  color: var(--primary);
}
html[data-theme="dark"] .footer-badge {
  background: #1e293b !important;
  border-color: #334155 !important;
}

/* Bottom bar */
.footer-bottom {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
}
html[data-theme="dark"] .footer-bottom {
  border-top-color: #1e293b !important;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
}
.footer-copy a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.footer-copy a:hover {
  text-decoration: underline;
}

/* ── Responsive footer ─────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-inner {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 2rem;
  }
  .footer-info {
    grid-column: 1 / -1;
  }
  .footer-badges {
    flex-direction: row;
  }
}

@media (max-width: 768px) {
  .site-footer {
    padding: 2.5rem 0 0;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    padding: 0 1rem;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-info {
    grid-column: 1 / -1;
  }
  .footer-bottom {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
  }
}
