/* ── CarbSust Global Styles ─────────────────────────────────────────── */

:root {
  --cs-green:      #1a7f5a;
  --cs-green-dark: #135c41;
  --cs-green-light:#e8f5f0;
  --cs-teal:       #0d9488;
  --cs-amber:      #f59e0b;
  --cs-red:        #ef4444;
  --cs-gray:       #64748b;
  --cs-bg:         #f8fafc;
}

body {
  background: var(--cs-bg);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Navbar */
.carbsust-nav {
  background: linear-gradient(135deg, var(--cs-green-dark) 0%, var(--cs-teal) 100%);
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.brand-icon {
  font-size: 1.4rem;
  background: rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 2px 8px;
}

/* Step indicator */
.stepper-bar {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 14px 0;
}
.stepper-bar .step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: .85rem;
  font-weight: 500;
}
.stepper-bar .step.active  { color: var(--cs-green); }
.stepper-bar .step.done    { color: var(--cs-teal); }
.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  flex-shrink: 0;
}
.step.active .step-num { background: var(--cs-green); color: #fff; }
.step.done   .step-num { background: var(--cs-teal);  color: #fff; }
.step-divider {
  flex: 1;
  height: 2px;
  background: #e2e8f0;
  margin: 0 4px;
}
.step.done + .step-divider { background: var(--cs-teal); }

/* Cards */
.cs-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.cs-card-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--cs-green-light);
}
.cs-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--cs-green-light);
  color: var(--cs-green);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.cs-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}
.cs-card-subtitle {
  font-size: .8rem;
  color: var(--cs-gray);
  margin: 0;
}

/* Welcome page */
.hero-section {
  min-height: 75vh;
  display: flex;
  align-items: center;
  background: linear-gradient(150deg, #f0faf5 0%, #e0f2fe 100%);
  border-radius: 20px;
  padding: 3rem 2rem;
}
.hero-badge {
  display: inline-block;
  background: var(--cs-green-light);
  color: var(--cs-green-dark);
  font-size: .8rem;
  font-weight: 700;
  padding: .3rem .9rem;
  border-radius: 100px;
  margin-bottom: 1.5rem;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.hero-title {
  font-size: 3rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.15;
}
.hero-title span { color: var(--cs-green); }
.hero-desc {
  font-size: 1.1rem;
  color: #475569;
  max-width: 540px;
  line-height: 1.7;
}
.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: #fff;
  border: 1px solid #e2e8f0;
  padding: .4rem 1rem;
  border-radius: 100px;
  font-size: .85rem;
  color: #334155;
  margin: .3rem .2rem;
}
.feature-pill i { color: var(--cs-green); }

.btn-cs-primary {
  background: linear-gradient(135deg, var(--cs-green) 0%, var(--cs-teal) 100%);
  color: #fff;
  border: none;
  padding: .85rem 2.5rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 4px 16px rgba(26,127,90,.35);
  transition: transform .15s, box-shadow .15s;
}
.btn-cs-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(26,127,90,.45);
  color: #fff;
}

.scope-badge {
  display: inline-block;
  padding: .25rem .7rem;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 700;
}
.scope-badge.s1 { background:#dcfce7; color:#166534; }
.scope-badge.s2 { background:#dbeafe; color:#1e40af; }
.scope-badge.s3 { background:#fef3c7; color:#92400e; }

/* Fuel toggle rows */
.fuel-row {
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: .75rem;
  background: #fff;
  transition: border-color .2s, background .2s;
}
.fuel-row.selected {
  border-color: var(--cs-green);
  background: #f0fdf6;
}
.fuel-row label { cursor: pointer; }
.fuel-inputs { display: none; margin-top: .75rem; }
.fuel-row.selected .fuel-inputs { display: flex; gap: .75rem; flex-wrap: wrap; }

/* Form controls */
.form-control, .form-select {
  border-radius: 8px;
  border-color: #e2e8f0;
}
.form-control:focus, .form-select:focus {
  border-color: var(--cs-green);
  box-shadow: 0 0 0 3px rgba(26,127,90,.12);
}

/* Navigation buttons */
.nav-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
}
.btn-cs-back {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #e2e8f0;
  padding: .7rem 1.8rem;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}
.btn-cs-back:hover { background: #e2e8f0; color: #0f172a; }
.btn-cs-next {
  background: linear-gradient(135deg, var(--cs-green) 0%, var(--cs-teal) 100%);
  color: #fff;
  border: none;
  padding: .7rem 2rem;
  border-radius: 10px;
  font-weight: 700;
  transition: transform .15s, box-shadow .15s;
}
.btn-cs-next:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(26,127,90,.35); color: #fff; }

/* Results page */
.stat-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  text-align: center;
  box-shadow: 0 1px 6px rgba(0,0,0,.06);
}
.stat-card .stat-value {
  font-size: 2.2rem;
  font-weight: 800;
  line-height: 1;
}
.stat-card .stat-label {
  font-size: .82rem;
  color: var(--cs-gray);
  margin-top: .3rem;
}
.stat-card.s1 { border-top: 4px solid #22c55e; }
.stat-card.s1 .stat-value { color: #166534; }
.stat-card.s2 { border-top: 4px solid #3b82f6; }
.stat-card.s2 .stat-value { color: #1e40af; }
.stat-card.s3 { border-top: 4px solid #f59e0b; }
.stat-card.s3 .stat-value { color: #92400e; }
.stat-card.total { border-top: 4px solid var(--cs-green); background: var(--cs-green-light); }
.stat-card.total .stat-value { color: var(--cs-green-dark); font-size: 2.8rem; }

.breakdown-table td { vertical-align: middle; }
.ef-chip {
  background: #f1f5f9;
  border-radius: 6px;
  padding: .1rem .5rem;
  font-size: .78rem;
  color: #475569;
}

/* Tips */
.tip-card {
  border-left: 4px solid var(--cs-green);
  background: #f0fdf4;
  border-radius: 0 10px 10px 0;
  padding: .85rem 1.2rem;
  margin-bottom: .75rem;
}

/* Footer */
.footer {
  background: #fff;
  border-top: 1px solid #e2e8f0;
  margin-top: auto;
}

/* Detaylı veri girişi */
.detail-intro {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: .85rem 1.1rem;
  font-size: .88rem;
  color: #166534;
}
.detail-intro > i { font-size: 1.3rem; }
.form-control.detail-locked {
  background: #ecfdf5;
  border-color: #86efac;
  font-weight: 600;
  color: #166534;
}
.btn-detail { font-size: .78rem; }

.detail-dialog { max-width: 96vw; }
.dm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 3;
}
.dm-hint { background: #fffbeb; border-bottom: 1px solid #fde68a; }
.dm-scroll { overflow: auto; max-height: calc(100vh - 290px); }
.dm-table { font-size: .82rem; }
.dm-table thead th {
  position: sticky;
  top: 0;
  background: #f1f5f9;
  z-index: 2;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: middle;
}
.dm-table td { padding: .15rem .2rem; }
.dm-table .form-control, .dm-table .form-select {
  font-size: .8rem;
  padding: .2rem .4rem;
  border-radius: 4px;
  min-height: 0;
}
.dm-table .form-select { padding-right: 1.6rem; background-position: right .3rem center; }
.dm-idx { width: 36px; text-align: center; color: #94a3b8; }
.dm-calc { background: #f0fdf4; font-weight: 600; white-space: nowrap; }
.dm-table thead th.dm-calc { background: #dcfce7; }
.dm-actions { width: 52px; }
.dm-readonly { padding: .2rem .4rem; color: #475569; }
.dm-table tr.dm-error td { background: #fef2f2; }
.dm-table tr.dm-error td.dm-idx { color: #dc2626; font-weight: 700; }
.dm-table tr.dm-warn td.dm-idx { background: #fef3c7; color: #b45309; font-weight: 700; }
.dm-summary { display: flex; flex-wrap: wrap; gap: 1.25rem; font-size: .88rem; }

/* Yönetim / üyelik */
.auth-card { max-width: 460px; margin: 2rem auto; }
.status-pill { font-size: .72rem; font-weight: 700; padding: .25rem .6rem; border-radius: 100px; }
.status-pending   { background: #fef3c7; color: #92400e; }
.status-active    { background: #dcfce7; color: #166534; }
.status-suspended { background: #fee2e2; color: #991b1b; }
.status-rejected  { background: #e2e8f0; color: #475569; }

/* Print */
@media print {
  .navbar, .stepper-bar, .nav-btns, footer, .no-print { display: none !important; }
  .cs-card { box-shadow: none; border: 1px solid #ccc; }
}
