:root {
  --primary: #0f4c81;
  --primary-dark: #09345a;
  --primary-light: #e6f0fa;
  --accent: #0d9488;
  --accent-light: #ccfbf1;
  --success: #16a34a;
  --success-bg: #dcfce7;
  --warning: #d97706;
  --warning-bg: #fef3c7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --purple: #7c3aed;
  --purple-bg: #f3e8ff;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #cbd5e1;
  --radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 60px;
}

/* Top Header */
.app-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: #fff;
  padding: 14px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.brand-badge {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 4px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.brand-text h1 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
}

.brand-text p {
  font-size: 0.78rem;
  opacity: 0.88;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Container */
.container {
  max-width: 1280px;
  margin: 18px auto;
  padding: 0 14px;
}

.container-narrow {
  max-width: 760px;
  margin: 18px auto;
  padding: 0 14px;
}

/* Cards */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.05);
  padding: 20px;
  margin-bottom: 18px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 18px;
  border-bottom: 2px solid #e2e8f0;
}

.nav-tab {
  background: #fff;
  color: var(--muted);
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 10px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.nav-tab:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 2px 6px rgba(15, 76, 129, 0.25);
}

/* Sub-tabs */
.sub-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.sub-tab {
  background: #f1f5f9;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 7px 13px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.sub-tab.active {
  background: var(--primary-light);
  color: var(--primary-dark);
  border-color: var(--primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-sm {
  padding: 6px 11px;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 14px 20px;
  font-size: 1rem;
  width: 100%;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  background: #0f766e;
}

.btn-success {
  background: var(--success);
  color: #fff;
}
.btn-success:hover {
  background: #15803d;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-outline {
  background: #fff;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary-light);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.26);
}

/* Forms & Grids */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

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

.form-group label {
  font-size: 0.83rem;
  font-weight: 600;
  color: #334155;
}

.form-group .hint {
  font-size: 0.75rem;
  color: #64748b;
}

input[type="text"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  background: #fff;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 76, 129, 0.15);
}

/* Badges & Alerts */
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 0.76rem;
  font-weight: 700;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge-purple {
  background: var(--purple-bg);
  color: var(--purple);
}

.badge-info {
  background: var(--primary-light);
  color: var(--primary-dark);
}

.alert {
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.alert-purple {
  background: var(--purple-bg);
  border: 1px solid #d8b4fe;
  color: #581c87;
}

.alert-info {
  background: var(--primary-light);
  border: 1px solid #93c5fd;
  color: var(--primary-dark);
}

.alert-warning {
  background: var(--warning-bg);
  border: 1px solid #fcd34d;
  color: #92400e;
}

.alert-success {
  background: var(--success-bg);
  border: 1px solid #86efac;
  color: #166534;
}

/* Metric KPI Grid */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kpi-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px;
}

.kpi-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.kpi-value {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary-dark);
  margin: 4px 0 2px;
}

.kpi-sub {
  font-size: 0.75rem;
  color: #64748b;
}

/* Tables */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

th, td {
  padding: 9px 10px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

th {
  background: #f1f5f9;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
}

tr:hover td {
  background: #f8fafc;
}

/* Stepper / Counter buttons for mobile */
.counter-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.counter-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #f8fafc;
  font-weight: 700;
  font-size: 1.1rem;
  cursor: pointer;
}

.counter-btn:active {
  background: var(--primary-light);
}

/* Progress bar */
.bar-track {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 99px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 99px;
}

/* Sticky Live Carbon Footer for Session Form */
.live-carbon-bar {
  position: sticky;
  bottom: 10px;
  background: var(--primary-dark);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  z-index: 50;
}

/* Toast Notification */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #0f172a;
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  border-left: 4px solid var(--accent);
}

@media (max-width: 640px) {
  .card {
    padding: 14px;
  }
  .kpi-value {
    font-size: 1.25rem;
  }
}

/* ==========================================================================
   YARDIM / KULLANIM KILAVUZU (HELP PAGE) VE EKRAN MAKETLERİ STİLLERİ
   ========================================================================== */
.help-hero {
  background: linear-gradient(135deg, #0f4c81, #0d9488);
  color: #fff;
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.help-switch {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.help-switch-btn {
  flex: 1;
  min-width: 240px;
  padding: 14px 18px;
  border-radius: 12px;
  border: 2px solid #cbd5e1;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.help-switch-btn.active {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 3px 10px rgba(15, 76, 129, 0.15);
}

.step-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
  align-items: center;
}

@media (max-width: 820px) {
  .step-card {
    grid-template-columns: 1fr;
  }
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  margin-right: 8px;
}

/* Gerçekçi Uygulama Ekran Görüntüsü Maketi (Annotated UI Mockup) */
.ui-mockup {
  background: #f8fafc;
  border: 2px solid #cbd5e1;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  font-size: 0.82rem;
}

.ui-mockup-bar {
  background: #0f4c81;
  color: #fff;
  padding: 8px 12px;
  font-weight: 700;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ui-mockup-body {
  padding: 14px;
}

.ui-callout {
  display: inline-block;
  background: #dc2626;
  color: #fff;
  font-weight: 800;
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 99px;
  margin-left: 6px;
  animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

.mock-input {
  background: #fff;
  border: 2px solid #94a3b8;
  border-radius: 6px;
  padding: 7px 10px;
  margin: 5px 0 10px;
  font-weight: 700;
  color: #0f172a;
}

.mock-btn-green {
  background: #16a34a;
  color: #fff;
  font-weight: 700;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  margin-top: 8px;
}

.mock-btn-blue {
  background: #0f4c81;
  color: #fff;
  font-weight: 700;
  text-align: center;
  padding: 9px;
  border-radius: 8px;
  margin-top: 8px;
}

@media print {
  .app-header, .nav-tabs, .help-switch, .no-print {
    display: none !important;
  }
  body {
    background: #fff;
    padding: 0;
  }
  .step-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #94a3b8;
  }
}
