html {
  scroll-behavior: smooth;
}

.logo svg {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  margin-right: 0.5rem;
}

body {
  min-height: 100vh;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --primary: #c4b5fd;
  --accent: #f472b6;
  --secondary: #60a5fa;
  --text: #f1f5f9;
  --text-secondary: #cbd5e1;
  --muted: #cbd5e1;
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #fb7185;
  --border: rgba(203, 213, 225, 0.18);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] body,
html[data-theme="dark"] .card,
html[data-theme="dark"] .info-box,
html[data-theme="dark"] .warning-box,
html[data-theme="dark"] .result-container,
html[data-theme="dark"] .result-details,
html[data-theme="dark"] footer {
  color: var(--text-secondary);
}

html[data-theme="dark"] .card-title,
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] label,
html[data-theme="dark"] .duct-stat-value {
  color: var(--primary);
}

html[data-theme="dark"] header,
html[data-theme="dark"] .tabs-container,
html[data-theme="dark"] .card,
html[data-theme="dark"] footer {
  background-color: var(--surface);
  border-color: var(--border);
}

html[data-theme="dark"] .tab:not(.active) {
  color: var(--muted);
}

html[data-theme="dark"] .tab:not(.active):hover {
  background: #26344b;
  color: var(--text);
}

html[data-theme="dark"] .tabs .tab:not(.active),
html[data-theme="dark"] .tabs .tab:not(.active):hover {
  color: var(--muted);
}

html[data-theme="dark"] .tab.active {
  background: linear-gradient(135deg, #4c347f, #31245c);
  color: #fff;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] .unit-display {
  background-color: #111c30;
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #aab7c9;
  opacity: 1;
}

html[data-theme="dark"] option {
  background: #1e293b;
  color: var(--text);
}

html[data-theme="dark"] .info-box {
  background-color: rgba(167, 139, 250, 0.12);
  border-left-color: var(--primary);
}

html[data-theme="dark"] .warning-box,
html[data-theme="dark"] .result-container.warning {
  background-color: rgba(251, 191, 36, 0.12);
}

html[data-theme="dark"] .result-container:not(.warning) {
  background-color: rgba(52, 211, 153, 0.1);
}

html[data-theme="dark"] .result-value {
  color: var(--success);
}

html[data-theme="dark"] .result-container.warning .result-value {
  color: var(--warning);
}

html[data-theme="dark"] .btn-secondary {
  background-color: #26344b;
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .btn:not(.submit-btn):not(.btn-secondary),
html[data-theme="dark"] .chip.active,
html[data-theme="dark"] #status_badge {
  color: #111827 !important;
}

html[data-theme="dark"] .icon-btn {
  background-color: #1e293b;
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="dark"] .icon-btn:hover {
  background-color: #2a3850;
  color: #f9a8d4;
}

html[data-theme="dark"] .form-status[data-state="error"] {
  color: #fda4af;
}

html[data-theme="dark"] .form-status[data-state="success"] {
  color: #6ee7b7;
}

html[data-theme="dark"] .linkedin-link {
  color: #7dbdff;
}

button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(233, 59, 140, 0.45);
  outline-offset: 2px;
}

input,
select,
textarea {
  min-height: 44px;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.info-box {
  margin: 1rem 0;
  padding: 1rem;
  border-left: 3px solid var(--primary, #2b1e6f);
  border-radius: 8px;
  background: rgba(43, 30, 111, 0.05);
  color: var(--text-secondary, #4b5563);
}

.card {
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.icon-btn {
  flex: 0 0 44px;
  touch-action: manipulation;
}

@media (max-width: 640px) {
  .container {
    padding: 1rem;
  }

  header {
    padding: 0.75rem 1rem;
  }

  .card {
    padding: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
