/* ZMIENNE KOLORYSTYCZNE na cały motyw */
:root {
  --bg-base: #060d17;
  --green-glow: #10b981;
  --green-light: #34d399;
  --green-mint: #6ee7b7;
  --glass-bg: rgba(13, 27, 46, 0.75);
  --glass-border: rgba(52, 211, 153, 0.2);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --card-shadow:
    0 20px 40px -15px rgba(0, 0, 0, 0.6),
    0 0 30px -10px rgba(16, 185, 129, 0.15);
}

/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
  background: linear-gradient(
    135deg,
    #050b14 0%,
    #0a1b2a 40%,
    #064e3b 85%,
    #052e16 100%
  );
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  padding: 2rem 1rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.container {
  width: 100%;
  max-width: 1100px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--card-shadow);
}

/* HEADER I LOGO */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.brand-box {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.logo-badge {
  background: linear-gradient(135deg, var(--green-glow), #059669);
  color: #022c22;
  font-weight: 800;
  font-size: 1.2rem;
  padding: 0.5rem 0.8rem;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}
.brand-text h1 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(90deg, #fff, var(--green-mint));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* PRZEŁĄCZNIKI */
.toggles-container {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.toggle-group {
  display: flex;
  background: rgba(10, 25, 47, 0.8);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.toggle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.5rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
}
.toggle-btn.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}
.toggle-btn.active.primary {
  background: linear-gradient(135deg, var(--green-glow), #059669);
}

/* LAYOUT GŁÓWNY */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}
.panel {
  background: rgba(10, 25, 47, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 2rem;
}
.divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 1.5rem 0;
}

/* POLA FORMULARZA */
.input-group {
  margin-bottom: 1.2rem;
}
.input-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.input-wrapper input {
  width: 100%;
  background: rgba(6, 13, 23, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  outline: none;
}
.input-wrapper input:focus {
  border-color: var(--green-glow);
}
.unit-tag {
  position: absolute;
  right: 15px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}

/* SUWAK */
.slider-card {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 12px;
  padding: 1.2rem;
  margin-top: 1.5rem;
}
.slider-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: #fff;
}
.slider-value {
  font-weight: 800;
  color: var(--green-light);
  font-size: 1.1rem;
}
input[type='range'] {
  width: 100%;
  accent-color: var(--green-glow);
  cursor: pointer;
  margin-top: 0.8rem;
  height: 6px;
}

/* PRESETY */
.presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.preset-btn {
  flex: 1;
  min-width: 80px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
  padding: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.preset-btn:hover {
  border-color: var(--green-light);
  color: #fff;
}

/* WYNIKI */
.results-panel {
  display: flex;
  flex-direction: column;
  /* justify-content: center; */
  gap: 1.2rem;
}
.metric-card {
  background: rgba(10, 25, 47, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 1.5rem;
}
.metric-card.hero {
  background: linear-gradient(
    145deg,
    rgba(6, 78, 59, 0.4),
    rgba(10, 25, 47, 0.8)
  );
  border: 1px solid rgba(52, 211, 153, 0.35);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.15);
}
.metric-label {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
  letter-spacing: 0.5px;
}
.metric-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
}
.metric-value.glow {
  font-size: 2.5rem;
  color: var(--green-light);
  text-shadow: 0 0 15px rgba(52, 211, 153, 0.3);
}
.metric-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.4;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

/* KOLORY TEKSTÓW WYNIKÓW */
.text-white {
  color: #fff !important;
}
.text-mint {
  color: var(--green-mint) !important;
}

/* BREAK-EVEN BANNER */
.break-even-banner {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  padding: 1.2rem;
  font-size: 0.95rem;
  color: #e0f2fe;
  margin-top: 0.5rem;
  line-height: 1.5;
}

/* WERSJA MOBILNA (RWD) */
@media (max-width: 900px) {
  .main-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  header {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    margin-bottom: 1.5rem;
  }
  .toggles-container {
    justify-content: center;
  }
}

@media (max-width: 600px) {
  body {
    padding: 1rem 0.5rem;
  }
  .container {
    padding: 1.2rem;
    border-radius: 16px;
  }
  header {
    gap: 1rem;
    padding-bottom: 1rem;
  }
  .brand-box {
    flex-direction: column;
    gap: 0.5rem;
  }
  .toggle-group {
    width: 100%;
    display: flex;
  }
  .toggle-btn {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
  }
  .panel,
  .metric-card {
    padding: 1.2rem;
  }
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .metric-value.glow {
    font-size: 2rem;
  }
  .brand-text h1 {
    font-size: 1.3rem;
  }
  .input-wrapper input {
    font-size: 0.9rem;
  }
}

/* Usunięcie strzałek z pól numerycznych */
input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type='number'] {
  -moz-appearance: textfield;
}
