/* ════════════════════════════════════════════════════════════════
   Frequenzumrichter Rechner — Styles
   Akzentfarbe: #00838F (Cyan/Teal)
   ════════════════════════════════════════════════════════════════ */

:root {
  --fu-accent:      #00838F;
  --fu-accent-dark: #006064;
  --fu-accent-lite: #E0F7FA;
  --fu-accent-glow: rgba(0,131,143,.13);
  --fu-freq-color:  #00838F;
  --fu-rpm-color:   #AD1457;
  --fu-volt-color:  #E65100;
  --fu-ramp-color:  #2E7D32;
  --fu-border:      #E2E8F0;
  --fu-bg:          #F8FAFC;
  --fu-bg-card:     #FFFFFF;
  --fu-text:        #1E293B;
  --fu-muted:       #64748B;
  --fu-radius:      10px;
}

/* ── Wrapper ─────────────────────────────────────────────────── */
.fu-wrapper {
  max-width: 1140px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

/* ── Header ──────────────────────────────────────────────────── */
.fu-header {
  display: flex; align-items: center; gap: 1rem;
  margin-bottom: 1.25rem;
}
.fu-header-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--fu-accent), var(--fu-accent-dark));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: #fff;
  box-shadow: 0 3px 8px rgba(0,131,143,.35);
  flex-shrink: 0;
}
.fu-title    { font-size: 1.35rem; font-weight: 700; color: var(--fu-text); margin: 0; }
.fu-subtitle { font-size: 0.82rem; color: var(--fu-muted); margin: 0; }

/* ── Main grid ───────────────────────────────────────────────── */
.fu-main {
  display: grid;
  grid-template-columns: 1fr 1.45fr;
  gap: 1.25rem;
  align-items: start;
}

/* ── Card ─────────────────────────────────────────────────────── */
.fu-card {
  background: var(--fu-bg-card);
  border: 1.5px solid var(--fu-border);
  border-radius: var(--fu-radius);
  padding: 1rem 1.1rem;
  margin-bottom: 1rem;
}
.fu-card:last-child { margin-bottom: 0; }
.fu-card-title {
  font-size: 0.75rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .05em;
  color: var(--fu-muted); margin-bottom: 0.9rem;
}

/* ── Fields ──────────────────────────────────────────────────── */
.fu-field { margin-bottom: 0.9rem; }
.fu-field:last-child { margin-bottom: 0; }
.fu-field-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.35rem;
}
.fu-label { font-size: 0.82rem; font-weight: 500; color: var(--fu-text); }
.fu-input-wrap { display: flex; align-items: center; gap: 5px; }
.fu-input {
  width: 88px; text-align: right;
  font-size: 0.95rem; font-weight: 700;
  padding: .3rem .55rem;
  border: 1.5px solid var(--fu-border); border-radius: 7px;
  background: var(--fu-bg); color: var(--fu-text);
  outline: none; transition: border-color .15s;
  -moz-appearance: textfield;
}
.fu-input::-webkit-outer-spin-button,
.fu-input::-webkit-inner-spin-button { -webkit-appearance: none; }
.fu-input:focus { border-color: var(--fu-accent); background: #fff; }
.fu-select {
  font-size: 0.82rem; font-weight: 600;
  padding: .35rem .6rem;
  border: 1.5px solid var(--fu-border); border-radius: 7px;
  background: var(--fu-bg); color: var(--fu-text);
  outline: none; cursor: pointer; width: 100%;
}
.fu-select:focus { border-color: var(--fu-accent); }
.fu-unit { font-size: 0.78rem; color: var(--fu-muted); min-width: 26px; }
.fu-hint-row { font-size: 0.72rem; color: var(--fu-muted); margin-top: 2px; }

/* Sliders */
.fu-slider {
  width: 100%; -webkit-appearance: none; appearance: none;
  height: 5px; border-radius: 3px; outline: none; cursor: pointer;
  background: linear-gradient(to right, var(--fu-accent) 0%, var(--fu-accent) 42%, #E2E8F0 42%, #E2E8F0 100%);
}
.fu-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--fu-accent); border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer;
}
.fu-slider::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--fu-accent); border: 2.5px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer;
}
.fu-slider-labels {
  display: flex; justify-content: space-between;
  font-size: 0.65rem; color: var(--fu-muted); margin-top: 2px;
}

/* Ramp info */
.fu-ramp-info {
  margin-top: 0.5rem; font-size: 0.78rem;
  background: var(--fu-accent-lite); border-radius: 7px;
  padding: .4rem .7rem; color: var(--fu-accent-dark); font-weight: 500;
  display: none;
}
.fu-ramp-info.visible { display: block; }

/* ── Hero grid ───────────────────────────────────────────────── */
.fu-hero-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-bottom: 1rem;
}
.fu-hero-card {
  border-radius: var(--fu-radius); padding: .85rem 1rem;
  color: #fff; text-align: center;
}
.fu-hero-drehzahl { background: linear-gradient(135deg, var(--fu-rpm-color), #880E4F); }
.fu-hero-freq     { background: linear-gradient(135deg, var(--fu-accent),     var(--fu-accent-dark)); }
.fu-hero-pct      { background: linear-gradient(135deg, #37474F, #263238); }
.fu-hero-lbl  { font-size: 0.68rem; opacity: .8; font-weight: 500; margin-bottom: 4px; }
.fu-hero-val  { font-size: 1.7rem; font-weight: 800; line-height: 1; }
.fu-hero-sub  { font-size: 0.72rem; opacity: .75; margin-top: 3px; }

/* ── Results table ───────────────────────────────────────────── */
.fu-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; }
.fu-table td { padding: 5px 4px; border-bottom: 1px solid #F1F5F9; }
.fu-table td:first-child { color: var(--fu-muted); }
.fu-td-val  { font-weight: 700; text-align: right; font-family: 'SF Mono','Fira Code',monospace; color: var(--fu-text); }
.fu-td-unit { color: var(--fu-muted); font-size: 0.75rem; padding-left: 4px !important; white-space: nowrap; width: 55px; }
.fu-tr-section td {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--fu-accent);
  padding-top: 10px; padding-bottom: 3px;
}
.fu-tr-section:first-child td { padding-top: 0; }
.fu-tr-highlight { background: #E0F7FA; }
.fu-tr-highlight .fu-td-val { color: var(--fu-accent-dark); }

/* ── Chart tabs ──────────────────────────────────────────────── */
.fu-chart-tabs { display: flex; gap: 6px; margin-bottom: 0.75rem; }
.fu-tab {
  padding: .3rem .9rem; font-size: 0.78rem; font-weight: 600;
  border: 1.5px solid var(--fu-border); border-radius: 20px;
  background: var(--fu-bg); color: var(--fu-muted); cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.fu-tab:hover  { border-color: var(--fu-accent); color: var(--fu-accent); }
.fu-tab.active { border-color: var(--fu-accent); background: var(--fu-accent); color: #fff; }

/* Canvas */
#fuCanvas { width: 100%; display: block; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .fu-main { grid-template-columns: 1fr; }
  .fu-hero-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 480px) {
  .fu-hero-grid { grid-template-columns: 1fr; }
  .fu-hero-card { padding: .65rem; }
}
