/* css/style.css - EV Şarj PWA Teması ve Responsive Tasarım */

:root {
  --bg-main: #0a0c10;
  --bg-card: #131620;
  --bg-card-subtle: #191c28;
  --bg-input: #1f2333;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-active: rgba(255, 255, 255, 0.2);
  
  --tesla-red: #e82127;
  --tesla-red-glow: rgba(232, 33, 39, 0.25);
  --electric-blue: #00d2ff;
  --electric-cyan: #06b6d4;
  --success-green: #10b981;
  --warning-amber: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.12);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.4);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  min-height: 100vh;
  min-height: -webkit-fill-available;
  display: flex;
  justify-content: center;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  overflow-x: hidden;
}

/* Sayfa Çerçevesi */
.app-container {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 16px calc(env(safe-area-inset-bottom, 0px) + 24px) 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-sizing: border-box;
}

/* Üst Başlık */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 4px 8px 4px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(0, 210, 255, 0.12);
  border: 1px solid rgba(0, 210, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-info h1 {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--text-primary);
  line-height: 1.2;
}

.vehicle-picker-pill {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  margin-top: 2px;
  transition: all 0.2s ease;
  font-family: inherit;
  max-width: 220px;
}

.vehicle-picker-pill span:first-child {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vehicle-picker-pill:hover, .vehicle-picker-pill:active {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text-primary);
  border-color: var(--border-active);
}

.vehicle-picker-pill .chevron {
  font-size: 0.7rem;
  color: var(--electric-cyan);
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.icon-btn:hover, .icon-btn:active {
  color: var(--text-primary);
  background: var(--bg-card-subtle);
  border-color: var(--border-active);
}

/* Kart Yapısı */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Hero Sonuç Kartı */
.result-card {
  background: linear-gradient(145deg, #161a29 0%, #0e111a 100%);
  border: 1px solid rgba(0, 210, 255, 0.25);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  text-align: center;
}

.result-badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.live-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success-green);
  box-shadow: 0 0 10px var(--success-green);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.result-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.day-badge {
  font-size: 0.7rem;
  background: rgba(0, 210, 255, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(0, 210, 255, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

.primary-time-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin: 4px 0;
}

.big-time {
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: -2px;
  color: #ffffff;
  line-height: 1;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.15);
}

.result-summary-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin: 10px 0 14px 0;
  line-height: 1.4;
}

.result-summary-text strong {
  color: var(--text-primary);
}

/* Gece Akımı Düşürme Bildirim Rozeti */
.night-drop-badge {
  background: rgba(6, 182, 212, 0.1);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  font-size: 0.8rem;
  color: #a5f3fc;
  margin-bottom: 14px;
  text-align: left;
  line-height: 1.35;
}

/* Yetişmeme Uyarısı */
.alert-box {
  background: var(--warning-bg);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 10px 0;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
}

.alert-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.alert-content strong {
  color: #fbbf24;
  font-size: 0.88rem;
  display: block;
}

.alert-content p {
  color: #fde68a;
  font-size: 0.8rem;
  margin-top: 3px;
  line-height: 1.35;
}

/* Hızlı İstatistik Matrisi */
.quick-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  background: rgba(0, 0, 0, 0.35);
  padding: 12px 10px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  box-sizing: border-box;
  width: 100%;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 3px;
  min-width: 0;
}

.stat-name {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.stat-value {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.highlight-stat .stat-value {
  color: #34d399;
}

/* Aksiyon Butonları */
.result-actions {
  display: flex;
  gap: 10px;
}

.btn {
  flex: 1;
  min-height: 46px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--tesla-red);
  color: #ffffff;
  box-shadow: 0 4px 16px var(--tesla-red-glow);
}

.btn-primary:active {
  transform: scale(0.98);
  background: #d3181d;
}

.btn-outline {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover, .btn-outline:active {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-active);
}

.btn-full {
  width: 100%;
}

.btn-sm {
  min-height: 38px;
  padding: 0 16px;
  font-size: 0.82rem;
}

/* Batarya Görsel Çubuğu */
.battery-visual-card {
  padding: 16px 20px;
}

.battery-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
  flex-wrap: nowrap;
}

.section-title {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.battery-percent-range {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--electric-blue);
  white-space: nowrap;
  flex-shrink: 0;
}

.tesla-battery-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.battery-bar-outer {
  flex: 1;
  height: 28px;
  background: var(--bg-input);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  display: flex;
}

.battery-cap {
  width: 6px;
  height: 14px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 0 3px 3px 0;
}

.battery-bar-current {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: width 0.3s ease;
}

.battery-bar-target {
  background: repeating-linear-gradient(
    45deg,
    rgba(0, 210, 255, 0.2),
    rgba(0, 210, 255, 0.2) 6px,
    rgba(0, 210, 255, 0.35) 6px,
    rgba(0, 210, 255, 0.35) 12px
  );
  height: 100%;
  border-left: 2px dashed #00d2ff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width 0.3s ease;
}

.bar-tag {
  font-size: 0.65rem;
  font-weight: 800;
  color: #ffffff;
  padding: 0 4px;
  white-space: nowrap;
}

.battery-km-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  gap: 8px;
}

.km-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.km-stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.km-stat-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.km-stat-arrow {
  color: var(--text-muted);
  font-size: 0.9rem;
  opacity: 0.6;
}

.km-stat.highlight-km {
  text-align: right;
}

.km-stat.highlight-km .km-stat-val {
  color: var(--electric-blue);
  font-size: 1.05rem;
}

.km-wltp-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 2px;
}

/* Parametre Kontrolleri Kartı */
.controls-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.control-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.voltage-indicator-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--electric-cyan);
}

.voltage-tag {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
}

/* Büyütülmüş Stepper Rozeti: 100 Tamamen Sığıyor, Seçilmesi Kolay */
.stepper-value-badge {
  display: inline-flex;
  align-items: baseline;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 4px 12px;
}

.stepper-value-badge.large-badge {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
  cursor: text;
}

.stepper-value-badge input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 800;
  width: 68px;
  min-width: 68px;
  text-align: right;
  outline: none;
  font-family: inherit;
  padding: 0;
  margin: 0;
  cursor: text;
}

.stepper-value-badge .unit {
  font-size: 0.95rem;
  color: var(--electric-cyan);
  font-weight: 800;
  margin-left: 3px;
}

/* Slider Row */
.slider-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-btn {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  min-width: 48px;
  height: 42px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.step-btn:active {
  background: var(--bg-card-subtle);
  color: var(--text-primary);
  border-color: var(--border-active);
  transform: scale(0.96);
}

/* Custom Range Input */
.custom-range {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  outline: none;
  cursor: pointer;
}

.custom-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--electric-cyan);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
  cursor: pointer;
  transition: transform 0.1s ease;
}

.custom-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.custom-range::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid var(--electric-cyan);
  box-shadow: 0 0 10px rgba(0, 210, 255, 0.5);
  cursor: pointer;
}

/* Chip Butonları */
.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  min-height: 40px;
  font-family: inherit;
  white-space: nowrap;
}

.chip.active-chip {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: var(--border-active);
}

/* Hedef Şarj Kartları */
.preset-targets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.chip-target {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 52px;
  font-family: inherit;
}

.chip-target .target-pct {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.chip-target .target-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
}

.chip-target.active-target {
  background: rgba(0, 210, 255, 0.12);
  border-color: var(--electric-cyan);
}

.chip-target.active-target .target-pct {
  color: #38bdf8;
}

.chip-target.active-target .target-sub {
  color: #bae6fd;
}

/* Segmented Controls (Mod & Amper) */
.segmented-control {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  background: var(--bg-input);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
  border: 1px solid var(--border-color);
}

.mode-segmented {
  grid-template-columns: repeat(2, 1fr);
}

.segment-btn {
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 48px;
  font-family: inherit;
}

.segment-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text-secondary);
}

.segment-desc {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.2;
  margin-top: 2px;
}

.segment-btn * {
  pointer-events: none;
}

.segment-btn.active-segment {
  background: var(--bg-card);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.segment-btn.active-segment .segment-title {
  color: #ffffff;
}

.segment-btn.active-segment .segment-desc {
  color: var(--electric-cyan);
}

/* Şarj Gücü & Cihaz Seçimi Grupları */
.power-presets-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.power-group-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.power-group-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.power-segmented {
  grid-template-columns: repeat(3, 1fr);
}

.custom-pwr-toggle-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 4px;
}

.btn-text-link {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  font-family: inherit;
}

.btn-text-link:hover {
  color: var(--electric-cyan);
  background: rgba(0, 210, 255, 0.08);
}

/* Amper & Faz Özel Slider Alanı */
.custom-amp-container {
  background: var(--bg-card-subtle);
  border: 1px solid var(--border-color);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-top: 6px;
}

.phase-selector-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.phase-toggle-group {
  display: inline-flex;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
  border: 1px solid var(--border-color);
}

.phase-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.phase-btn.active {
  background: var(--bg-card);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.custom-amp-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--electric-cyan);
  min-width: 44px;
  text-align: right;
}

/* Ana Sayfa Şebeke Voltajı Seçimi */
.voltage-selection-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-top: 4px;
}

.voltage-row-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.voltage-row-header .sub-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.voltage-val-highlight {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--electric-cyan);
}

.voltage-chips .voltage-chip {
  min-height: 36px;
  padding: 6px 8px;
  font-size: 0.82rem;
}

/* Gece Güvenlik Akımı Plan Kartı */
.night-drop-plan-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.night-drop-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.night-drop-inputs {
  display: flex;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-color);
}

.night-drop-field {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.night-drop-field label {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.time-compact-input, .select-compact {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  height: 38px;
}

/* Çıkış Saati Seçici */
.departure-time-wrapper {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.time-input-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 16px;
}

.time-input-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.time-native-input {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 800;
  font-family: inherit;
  outline: none;
  cursor: pointer;
}

.divider {
  height: 1px;
  background: var(--border-color);
  margin: 2px 0;
}

/* Fatura & Maliyet Kartı */
.tariff-card {
  padding: 16px 20px;
}

.card-header-collapsible {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.card-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-tariff {
  font-size: 1.4rem;
}

.tariff-title-group h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.tariff-sub-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.toggle-arrow {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.card-header-collapsible.open .toggle-arrow {
  transform: rotate(180deg);
}

.tariff-body {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tariff-breakdown-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  background: var(--bg-input);
  padding: 10px;
  border-radius: var(--radius-md);
}

.tariff-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.t-label {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.t-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.highlight-cost .t-val {
  color: #34d399;
  font-size: 1rem;
}

/* PWA Install Kartı */
.install-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(0, 210, 255, 0.1) 0%, rgba(0, 0, 0, 0.4) 100%);
  border: 1px solid rgba(0, 210, 255, 0.25);
  border-radius: var(--radius-lg);
  margin-top: 14px;
}

.install-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.install-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.install-info strong {
  font-size: 0.88rem;
  color: var(--text-primary);
  display: block;
}

.install-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.3;
}

.install-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.install-actions .btn {
  white-space: nowrap;
}

.btn-icon-dismiss {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-icon-dismiss:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.1);
}

.share-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  background: rgba(255, 255, 255, 0.15);
  padding: 2px 6px;
  border-radius: 4px;
  margin: 0 3px;
  color: var(--electric-cyan);
}

@media (max-width: 480px) {
  .app-container {
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 12px calc(env(safe-area-inset-bottom, 0px) + 20px) 12px;
  }
  .card {
    padding: 16px 14px;
  }
  .quick-stats-grid {
    padding: 10px 6px;
    gap: 4px;
  }
  .stat-name {
    font-size: 0.62rem;
    letter-spacing: 0.2px;
  }
  .stat-value {
    font-size: 0.80rem;
  }
}

@media (max-width: 440px) {
  .install-card {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .install-actions {
    justify-content: space-between;
    width: 100%;
  }
  .install-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

@media (max-width: 360px) {
  .quick-stats-grid {
    padding: 8px 3px;
    gap: 2px;
  }
  .stat-name {
    font-size: 0.58rem;
  }
  .stat-value {
    font-size: 0.74rem;
  }
}

/* Modallar */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}

@media (min-width: 480px) {
  .modal-overlay {
    align-items: center;
    padding: 20px;
  }
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 20px;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

@media (min-width: 480px) {
  .modal-card {
    border-radius: var(--radius-lg);
  }
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-close {
  background: var(--bg-input);
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}

.setting-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
}

.setting-item label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.setting-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.setting-hint {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--electric-cyan);
}

.sub-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.custom-select, .custom-input {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  min-height: 46px;
  width: 100%;
  box-sizing: border-box;
}

.sub-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  display: block;
}

/* Parametrik Fatura Formülü Kutusu */
.formula-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.formula-desc {
  font-size: 0.78rem;
  color: var(--electric-cyan);
  font-weight: 600;
  background: rgba(6, 182, 212, 0.08);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
}

.formula-inputs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.formula-result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-input);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.formula-result-row strong {
  font-size: 0.95rem;
  color: #34d399;
}

.formula-manual-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.tariff-mode-toggle {
  margin-top: 2px;
  margin-bottom: 8px;
}

.manual-rate-presets {
  margin-top: 10px;
}

.manual-rate-presets .chip {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* Guide Modalı */
.guide-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-card {
  display: flex;
  gap: 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  padding: 14px;
  border-radius: var(--radius-md);
  align-items: flex-start;
}

.step-card.highlight-step {
  border-color: rgba(0, 210, 255, 0.4);
  background: rgba(0, 210, 255, 0.08);
}

.step-num {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.highlight-step .step-num {
  background: var(--electric-cyan);
  color: #0a0c10;
}

.step-text strong {
  font-size: 0.9rem;
  color: var(--text-primary);
  display: block;
}

.step-text p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 3px;
  line-height: 1.35;
}

.red-text {
  color: #38bdf8;
  font-size: 1rem;
}

.step-tip {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.2);
  padding: 12px;
  border-radius: var(--radius-md);
  line-height: 1.4;
}

/* Toast */
.toast-notification {
  position: fixed;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #ffffff;
  color: #0a0c10;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 2000;
  white-space: nowrap;
}

.toast-notification.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.app-footer {
  text-align: center;
  padding: 14px 0 24px;
  font-size: 0.72rem;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.footer-pwa-btn {
  background: rgba(0, 210, 255, 0.08);
  border: 1px solid rgba(0, 210, 255, 0.22);
  color: var(--electric-cyan);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
}

.footer-pwa-btn:hover {
  background: rgba(0, 210, 255, 0.18);
  border-color: var(--electric-cyan);
  color: #ffffff;
}

.pwa-setting-item {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  margin-top: 16px;
}

.pwa-guide-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
