/* ============================================================
   ETSO Seçim Takip Sistemi - Mobil öncelikli stil dosyası
   ============================================================ */
:root {
  --primary: #c1121f;        /* kampanya kırmızısı */
  --primary-dark: #8f0d16;
  --primary-light: #fdeaea;
  --menu: #2b2f36;           /* antrasit menü */
  --menu-dark: #1e2126;
  --menu-text: #b9c0c9;
  --accent: #1e3a8a;
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --green: #15803d;
  --green-soft: #dcfce7;
  --lime: #65a30d;
  --lime-soft: #ecfccb;
  --yellow: #ca8a04;
  --yellow-soft: #fef9c3;
  --orange: #ea580c;
  --orange-soft: #ffedd5;
  --red: #dc2626;
  --red-soft: #fee2e2;
  --gray-soft: #f3f4f6;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --tap: 44px; /* minimum dokunma alanı */
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  padding-bottom: calc(64px + env(safe-area-inset-bottom)); /* alt nav payı */
}
@media (min-width: 900px) { body { padding-bottom: 0; } }

a { color: var(--primary); text-decoration: none; }
h1 { font-size: 1.35rem; margin: 0 0 .75rem; }
h2 { font-size: 1.1rem; margin: 1.25rem 0 .5rem; }
h3 { font-size: 1rem; margin: 1rem 0 .4rem; }

/* ---------- Üst çubuk (mobil) ---------- */
.topbar {
  background: var(--menu);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 6px rgba(0,0,0,.18);
}
.brand { display: flex; align-items: center; gap: 9px; color: #fff; }
.brand-badge {
  background: #fff;
  color: var(--primary);
  font-weight: 800;
  border-radius: 8px;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .95rem;
  flex: none;
}
.brand-badge-lg { width: 54px; height: 54px; font-size: 1.4rem; margin: 0 auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; font-weight: 700; }
.brand-text small { font-weight: 400; opacity: .82; font-size: .68rem; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-chip { font-size: .8rem; opacity: .9; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-logo { height: 40px; width: auto; }

/* ---------- Sol menü (masaüstü) ---------- */
.sidebar { display: none; }
@media (min-width: 900px) {
  .topbar { display: none; }
  body { padding-left: 236px; }
  .sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 236px;
    background: linear-gradient(180deg, var(--menu) 0%, var(--menu-dark) 100%);
    color: #fff;
    z-index: 60;
    padding: 16px 12px;
    overflow-y: auto;
  }
  .side-brand {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    color: #fff;
    padding: 4px 2px 14px;
    border-bottom: 1px solid rgba(255,255,255,.14);
    margin-bottom: 12px;
  }
  .side-logo { max-width: 100%; height: auto; }
  .sidenav { display: flex; flex-direction: column; gap: 2px; }
  .sidenav a {
    color: var(--menu-text);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: .92rem;
    font-weight: 500;
    display: flex; align-items: center; gap: 10px;
  }
  .sidenav a:hover { background: rgba(255,255,255,.09); color: #fff; }
  .sidenav a.active { background: var(--primary); color: #fff; font-weight: 700; }
  .sn-icon { width: 20px; text-align: center; flex: none; }
  .side-sep {
    font-size: .68rem; text-transform: uppercase; letter-spacing: .06em;
    color: rgba(255,255,255,.55); padding: 12px 12px 4px; font-weight: 700;
  }
  .side-footer { margin-top: auto; border-top: 1px solid rgba(255,255,255,.18); padding-top: 10px; }
  .side-user { display: flex; flex-direction: column; padding: 0 6px 8px; line-height: 1.25; }
  .side-user small { color: rgba(255,255,255,.7); font-size: .74rem; }
}

/* ---------- Alt gezinme (mobil) ---------- */
.bottomnav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--menu);
  border-top: 1px solid var(--menu-dark);
  display: flex;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav a {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  min-height: 58px;
  color: var(--menu-text);
  font-size: .68rem;
  font-weight: 600;
}
.bottomnav a.active { color: #fff; }
.bn-icon { display: inline-flex; line-height: 1; }
.sn-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; flex: none; }
@media (min-width: 900px) { .bottomnav { display: none; } }

/* ---------- Konteyner (tam ekran) ---------- */
.container { max-width: none; margin: 0; padding: 14px; }
@media (min-width: 900px) { .container { padding: 22px 26px; } }

/* ---------- Kartlar ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  padding: 16px;
  margin-bottom: 14px;
}
.card-title { font-weight: 700; margin: 0 0 12px; font-size: .98rem; display:flex; align-items:center; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.ct-ic { display: inline-flex; align-items: center; gap: 8px; }
.ct-ic .ico { color: var(--muted); }

/* ---------- Flash ---------- */
.flash {
  padding: 11px 14px;
  border-radius: var(--radius);
  margin-bottom: 12px;
  font-size: .9rem;
  font-weight: 500;
}
.flash-success { background: var(--green-soft); color: var(--green); }
.flash-error { background: var(--red-soft); color: var(--red); }
.flash-info { background: var(--primary-light); color: var(--primary); }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 15px;
  min-height: var(--tap);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: var(--text);
  border-color: var(--border);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger { background: var(--red); color: #fff; border-color: var(--red); }
.btn-success { background: var(--green); color: #fff; border-color: var(--green); }
.btn-ghost { background: transparent; color: inherit; border-color: rgba(255,255,255,.4); }
.btn-sm { padding: 5px 10px; min-height: 34px; font-size: .8rem; }
.btn-lg { padding: 13px 20px; font-size: 1rem; }
.btn-block { width: 100%; }
.inline { display: inline; }

/* ---------- Formlar ---------- */
label { display: block; font-size: .85rem; font-weight: 600; color: var(--text); margin-bottom: 10px; }
input[type=text], input[type=password], input[type=email], input[type=search], input[type=number],
input[type=date], input[type=datetime-local], input[type=tel], select, textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: .95rem;
  margin-top: 4px;
  background: #fff;
  color: var(--text);
  min-height: var(--tap);
  font-family: inherit;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--primary);
  outline-offset: 0;
  border-color: var(--primary);
}
.form-row { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 700px) {
  .form-row-2 { grid-template-columns: 1fr 1fr; }
  .form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
}
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.field-hint { font-weight: 400; color: var(--muted); font-size: .78rem; }

/* ---------- Giriş sayfası ---------- */
.login-body {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 60%, #101f4d 100%);
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
}
.login-box {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0,0,0,.3);
  padding: 26px 22px;
  width: 100%;
  max-width: 400px;
}
.login-brand { text-align: center; margin-bottom: 18px; }
.login-brand h1 { margin: 10px 0 2px; font-size: 1.45rem; }
.login-brand p { margin: 0; color: var(--muted); font-size: .85rem; }
.kvkk-note {
  margin-top: 16px;
  font-size: .72rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
  line-height: 1.5;
}

/* ---------- Tablolar ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .88rem; background: #fff; }
.tbl th, .tbl td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl th { font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); white-space: nowrap; }
.tbl tr:hover td { background: #fafbff; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Rozetler ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: .74rem;
  font-weight: 700;
  white-space: nowrap;
}
.vs-bize-kesin     { background: var(--green-soft);  color: var(--green); }
.vs-bize-egilimli  { background: var(--lime-soft);   color: var(--lime); }
.vs-kararsiz       { background: var(--yellow-soft); color: var(--yellow); }
.vs-karsi-egilimli { background: var(--orange-soft); color: var(--orange); }
.vs-karsi-kesin    { background: var(--red-soft);    color: var(--red); }
.vs-ulasilamadi    { background: var(--gray-soft);   color: var(--muted); }
.badge-visit-0 { background: var(--red-soft); color: var(--red); }
.badge-visit-1 { background: var(--yellow-soft); color: var(--yellow); }
.badge-visit-2 { background: var(--green-soft); color: var(--green); }
.badge-tag { background: var(--primary-light); color: var(--primary); }
.badge-gray { background: var(--gray-soft); color: var(--muted); }
.badge-etki { background: #fdf4ff; color: #a21caf; }

/* ---------- Durum ışıkları (dashboard) ---------- */
.light { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; }
.light-green { background: #22c55e; box-shadow: 0 0 6px #22c55e88; }
.light-yellow { background: #eab308; box-shadow: 0 0 6px #eab30888; }
.light-red { background: #ef4444; box-shadow: 0 0 6px #ef444488; }

/* ---------- İstatistik kartları ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
@media (min-width: 700px) { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .stat-grid { grid-template-columns: repeat(6, 1fr); } }
.stat {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px;
  border-left: 4px solid var(--border);
}
.stat .stat-value { font-size: 1.5rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .stat-label { font-size: .72rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }

/* ---------- Yatay çubuk grafik ---------- */
.hbar { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--gray-soft); }
.hbar > div { height: 100%; min-width: 0; transition: width .25s; }
.hbar-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: .74rem; color: var(--muted); margin-top: 8px; }
.hbar-legend .dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; vertical-align: -1px; margin-right: 4px; }

/* ---------- Arama + filtre ---------- */
.searchbar { position: relative; margin-bottom: 10px; }
.searchbar input { padding-left: 38px; font-size: 1rem; }
.searchbar::before {
  content: "⌕";
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 1.3rem; color: var(--muted);
}
.chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  min-height: 36px;
  display: inline-flex; align-items: center;
  text-decoration: none;
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- Firma liste kartları (mobil) ---------- */
.firm-card {
  display: block;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 12px 14px;
  margin-bottom: 8px;
  color: var(--text);
}
.firm-card-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.firm-card .firm-name { font-weight: 700; font-size: .92rem; line-height: 1.3; }
.firm-card .firm-sub { color: var(--muted); font-size: .8rem; margin-top: 3px; }
.firm-card .firm-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }

/* ---------- Detay sayfası ---------- */
.detail-grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 980px) { .detail-grid { grid-template-columns: 1.2fr .8fr; align-items: start; } }
.kv { display: grid; grid-template-columns: 120px 1fr; gap: 4px 10px; font-size: .88rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }
.phone-row { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--border); flex-wrap: wrap; }
.phone-row:last-child { border-bottom: none; }
.phone-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.btn-call { background: var(--green); color: #fff; border-color: var(--green); }
.btn-wa { background: #16a34a; color: #fff; border-color: #16a34a; }
.rep-block { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 8px; }
.rep-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.rep-name { font-weight: 700; }

/* ---------- Zaman çizelgesi ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 9px 0 9px 18px; border-left: 2px solid var(--border); position: relative; margin-left: 6px; }
.timeline li::before {
  content: ""; position: absolute; left: -6px; top: 14px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--primary); border: 2px solid #fff;
}
.timeline .tl-meta { font-size: .74rem; color: var(--muted); }

/* ---------- Sayfalama ---------- */
.pager { display: flex; gap: 6px; justify-content: center; margin: 14px 0; flex-wrap: wrap; }
.pager a, .pager span {
  min-width: 38px; min-height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 8px;
  background: #fff; font-size: .85rem; padding: 0 8px;
}
.pager .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Hata sayfası ---------- */
.error-page { text-align: center; padding: 60px 20px; }
.error-code { font-size: 4rem; font-weight: 800; color: var(--border); }

/* ---------- Yardımcılar ---------- */
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.flex { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.right { text-align: right; }
.center { text-align: center; }
.grow { flex: 1; }
.nowrap { white-space: nowrap; }
.hide-mobile { display: none; }
@media (min-width: 900px) { .hide-mobile { display: revert; } .hide-desktop { display: none; } }

/* ============================================================
   Kurumsal bileşenler (Genel Bakış ve genel kullanım)
   ============================================================ */

/* Sayfa başlığı */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.page-head h1 { margin: 0; font-size: 1.4rem; font-weight: 800; letter-spacing: -.01em; }
.page-sub { margin: 3px 0 0; color: var(--muted); font-size: .84rem; }
.page-actions { display: flex; gap: 8px; }

/* SVG ikonlar */
.ico { vertical-align: -3px; flex: none; }
.btn .ico { vertical-align: -2px; }

/* KPI kartları */
.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 16px; }
@media (min-width: 700px) { .kpi-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
@media (min-width: 1500px) { .kpi-grid { grid-template-columns: repeat(6, 1fr); } }
.kpi {
  position: relative;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(16, 24, 40, .06);
  padding: 18px 18px 16px 21px;
  display: flex; flex-direction: column; gap: 8px;
  overflow: hidden;
  transition: box-shadow .18s, border-color .18s, transform .18s;
}
/* Sol renk şeridi */
.kpi::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0; width: 5px;
  background: var(--kc, var(--border));
  border-radius: 14px 0 0 14px;
}
a.kpi { color: inherit; text-decoration: none; cursor: pointer; }
.kpi:hover { box-shadow: 0 6px 18px rgba(16, 24, 40, .11); border-color: var(--kc, #d7dbe0); transform: translateY(-1px); }
.kpi-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.kpi-label {
  font-size: .74rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--muted);
  padding-top: 8px;
}
.kpi-ic {
  width: 40px; height: 40px; border-radius: 11px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--kcs, var(--gray-soft)); color: var(--kc, var(--muted));
}
.kpi-ic .ico { width: 21px; height: 21px; }
.kpi-value {
  font-size: 2.15rem; font-weight: 800; line-height: 1;
  font-variant-numeric: tabular-nums; letter-spacing: -.02em; color: var(--text);
}
@media (max-width: 480px) { .kpi-value { font-size: 1.7rem; } .kpi { padding: 14px 14px 13px 17px; } }
.kpi-bar { height: 6px; border-radius: 99px; background: var(--gray-soft); overflow: hidden; }
.kpi-bar i { display: block; height: 100%; min-width: 3px; background: var(--kc, var(--primary)); border-radius: 99px; }
.kpi-sub { font-size: .8rem; color: var(--muted); }

/* Durum pill'i */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px; padding: 4px 11px;
  font-size: .74rem; font-weight: 700; white-space: nowrap;
}
.pill .light { width: 8px; height: 8px; box-shadow: none; }
.pill-green { background: var(--green-soft); color: var(--green); }
.pill-yellow { background: var(--yellow-soft); color: #a16207; }
.pill-red { background: var(--red-soft); color: var(--red); }

/* Genel dağılım bandı */
.band-wrap { position: relative; }
.band { height: 30px; border-radius: 8px; }
.band-marker {
  position: absolute; top: -4px; bottom: -4px; left: 50%;
  border-left: 2px dashed #475569; opacity: .55;
}

/* Tablo içi mini bar ve ilerleme çubuğu */
.minibar { height: 8px; border-radius: 99px; min-width: 120px; }
.prog-wrap { display: flex; align-items: center; gap: 8px; }
.prog { flex: 1; height: 6px; border-radius: 99px; background: var(--gray-soft); overflow: hidden; min-width: 56px; }
.prog i { display: block; height: 100%; background: var(--primary); border-radius: 99px; }
.prog-txt { font-size: .74rem; color: var(--muted); font-variant-numeric: tabular-nums; width: 34px; text-align: right; }

/* Kurumsal tablo */
.tbl-pro th {
  background: #f8fafc;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  font-weight: 700;
}
.tbl-pro td { padding: 10px; }
.tbl-pro tr.row-link { cursor: pointer; transition: background .15s; }
.tbl-pro tr.row-link:hover td { background: #f8fafc; }

/* İki katmanlı gruplu başlık */
.thg { text-align: center !important; border-bottom: none !important; padding-bottom: 4px; }
.thg-bize { background: var(--green-soft) !important; color: var(--green) !important; }
.thg-karsi { background: var(--red-soft) !important; color: var(--red) !important; }
.th-sub th { border-top: none; padding-top: 4px; font-size: .68rem; }
.th-sub th:nth-child(1), .th-sub th:nth-child(2) { background: var(--green-soft); color: var(--green); }
.th-sub th:nth-child(3), .th-sub th:nth-child(4) { background: var(--red-soft); color: var(--red); }
.th-hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--muted); font-size: .66rem; }

/* Sıfır değerler soluk görünür, dolu hücreler öne çıkar */
.tbl .zero { color: #cbd5e1; font-weight: 400; }

/* Toplam satırı */
.row-total td {
  background: #f8fafc;
  border-top: 2px solid var(--border);
  border-bottom: none;
  font-variant-numeric: tabular-nums;
}

/* Plan listesi */
.plan-list { list-style: none; margin: 0; padding: 0; }
.plan-list li { display: flex; align-items: flex-start; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--border); }
.plan-list li:last-child { border-bottom: none; }
.plan-list li.done { color: var(--muted); }
.plan-list li.done > span:last-child { text-decoration: line-through; }
.plan-list li.done .badge { text-decoration: none; }
.plan-check {
  width: 20px; height: 20px; border-radius: 6px; flex: none; margin-top: 1px;
  border: 1.5px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 800; color: #fff;
}
.plan-list li.done .plan-check { background: var(--green); border-color: var(--green); }

/* Simülasyon */
.sim-controls { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
input[type=range] { accent-color: var(--primary); min-height: auto; height: 28px; cursor: pointer; }
.sim-val { width: 52px; text-align: right; font-variant-numeric: tabular-nums; font-size: 1.05rem; }
.check-inline {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 500; font-size: .86rem; margin: 0; cursor: pointer;
}
.check-inline input { width: auto; min-height: auto; margin: 0; accent-color: var(--primary); cursor: pointer; }
.sim-callout {
  margin-top: 12px; padding: 11px 14px; border-radius: 10px;
  font-size: .95rem; border: 1px solid transparent;
}
.sim-callout strong { font-size: 1.1rem; }
.sc-green { background: var(--green-soft); color: var(--green); border-color: #bbe7c9; }
.sc-yellow { background: var(--yellow-soft); color: #a16207; border-color: #f0e1a0; }
.sc-red { background: var(--red-soft); color: var(--red); border-color: #f5c6c6; }

/* Mobil menü sayfası */
.menu-grid { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .menu-grid { grid-template-columns: 1fr 1fr; } }
.menu-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px; color: var(--text);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  min-height: 60px;
}
.menu-item:hover { border-color: #d7dbe0; box-shadow: 0 4px 12px rgba(16, 24, 40, .09); }
.menu-item .feed-ic { width: 38px; height: 38px; }
.menu-item strong { display: block; }

/* ---- Dashboard iki kolonlu düzen ---- */
.dash-cols { display: flex; flex-direction: column; gap: 14px; }
.dash-main, .dash-side { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dash-side { order: -1; }                 /* mobilde: günlük eylem kartları önce */
.dash-main > *, .dash-side > * { margin-bottom: 0; }
@media (min-width: 1280px) {
  .dash-cols { display: grid; grid-template-columns: minmax(0, 1fr) 350px; align-items: start; }
  .dash-side { order: 0; position: sticky; top: 14px; }
}
.side-card { padding: 15px 16px; }

/* Sidebar boş durumu */
.side-empty { text-align: center; padding: 14px 0 6px; color: var(--muted); }
.side-empty .ico { color: var(--border); }
.side-empty p { margin: 6px 0 10px; font-size: .86rem; }

/* Bugünün Planı — sadeleştirilmiş */
.plan-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.plan-progress-bar { flex: 1; height: 8px; border-radius: 99px; background: var(--gray-soft); overflow: hidden; }
.plan-progress-bar i { display: block; height: 100%; background: var(--green); border-radius: 99px; transition: width .3s; }
.plan-progress-txt { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.plan-progress-txt b { color: var(--text); font-size: .95rem; }
.plan-list2 { list-style: none; margin: 0; padding: 0; }
.plan-list2 li { display: flex; align-items: flex-start; gap: 11px; padding: 9px 0; border-bottom: 1px solid #f1f3f5; }
.plan-list2 li:last-child { border-bottom: none; padding-bottom: 0; }
.pl-check {
  width: 20px; height: 20px; border-radius: 50%; flex: none; margin-top: 1px;
  border: 2px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .68rem; font-weight: 800; color: #fff;
}
.plan-list2 li.done .pl-check { background: var(--green); border-color: var(--green); }
.pl-body { min-width: 0; flex: 1; }
.pl-title { display: block; font-weight: 600; font-size: .88rem; line-height: 1.3; }
.plan-list2 li.done .pl-title { color: var(--muted); text-decoration: line-through; }
.pl-sub { display: block; font-size: .77rem; color: var(--muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-who {
  flex: none; align-self: center; white-space: nowrap;
  font-size: .68rem; font-weight: 700; color: var(--muted);
  background: var(--gray-soft); border-radius: 99px; padding: 3px 9px;
}

/* Kayan oylar + trend */
.kayan-card { border-left: 4px solid var(--red); }
.trend-wrap { overflow-x: auto; }
.trend-svg { width: 100%; height: auto; min-width: 420px; display: block; }

/* Öncelikli hedef kartları */
.hedef-card { padding: 13px 15px; }
.hedef-sira {
  width: 26px; height: 26px; border-radius: 50%; flex: none; margin-top: 1px;
  background: var(--menu); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .74rem; font-weight: 800;
}
.hedef-puan {
  flex: none;
  background: var(--primary-light); color: var(--primary);
  border-radius: 10px; padding: 6px 12px;
  font-size: 1.1rem; font-weight: 800; font-variant-numeric: tabular-nums;
}

/* Hızlı ziyaret seçenekleri (büyük dokunma alanları) */
.quick-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.quick-opt {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--border); border-radius: 10px;
  padding: 10px 14px; margin: 0; cursor: pointer;
  font-weight: 600; min-height: var(--tap);
  transition: border-color .15s, background .15s;
}
.quick-opt input { width: auto; min-height: auto; margin: 0; accent-color: var(--primary); }
.quick-opt:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }

/* Aktivite akışı */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f1f3f5; }
.feed li:last-child { border-bottom: none; }
.feed-ic {
  width: 28px; height: 28px; border-radius: 8px; flex: none; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--fcs, var(--gray-soft)); color: var(--fc, var(--muted));
}
.feed-body { min-width: 0; font-size: .88rem; }
.feed-body a { font-weight: 600; }
.feed-meta { display: block; font-size: .74rem; color: var(--muted); margin-top: 1px; }

/* Erişilebilirlik: klavye odağı ve azaltılmış hareket */
a:focus-visible, button:focus-visible, .chip:focus-visible {
  outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 6px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Yazdırma ---------- */
@media print {
  body { background: #fff; padding: 0; font-size: 11pt; }
  .topbar, .bottomnav, .no-print, .flash { display: none !important; }
  .container { max-width: none; padding: 0; }
  .card { box-shadow: none; border: none; padding: 0; }
  a { color: inherit; }
  .tbl th, .tbl td { padding: 5px 6px; }
}
