:root {
  --bg: #0b0d14;
  --bg-2: #10131d;
  --card: #151926;
  --card-2: #1a1f30;
  --border: #242a3b;
  --text: #eef0f6;
  --dim: #9aa1b4;
  --accent: #7c5cff;
  --accent-2: #22d3c0;
  --warn: #ffb86b;
  --bad: #ff8a8a;
  --ok: #4ade80;
  --r: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.015em; }
.muted { color: var(--dim); }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.empty { color: var(--dim); font-size: 14px; margin: 8px 0; }
.empty.big { padding: 40px; text-align: center; }

/* ---------- giriş ekranı ---------- */
.login {
  flex: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(600px circle at 20% 0%, rgba(124,92,255,0.22), transparent 60%),
    radial-gradient(500px circle at 85% 10%, rgba(34,211,192,0.14), transparent 60%);
}
.login-box {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
}
.brand-mark {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0d14;
  font-size: 22px; font-weight: 800;
  margin-bottom: 18px;
}
.brand-mark.sm { width: 26px; height: 26px; font-size: 14px; border-radius: 8px; margin: 0; }
.login-box h1 { font-size: 23px; margin-bottom: 6px; }
.login-sub { color: var(--accent-2); font-size: 13px; font-weight: 600; margin: 0 0 18px; }
.login-hint { color: var(--dim); font-size: 14px; line-height: 1.6; margin: 0 0 20px; }

.tenant-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.tenant-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  cursor: pointer;
  font: inherit;
}
.tenant-btn:hover { border-color: var(--accent); background: var(--card-2); }
.tenant-btn.on { border-color: var(--accent-2); }
.tenant-info { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tenant-info strong { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tenant-info .muted { font-size: 12.5px; }
.arrow { color: var(--dim); }

.avatar {
  width: 38px; height: 38px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(124,92,255,0.35), rgba(34,211,192,0.3));
  font-size: 13px; font-weight: 800;
}
.avatar.sm { width: 30px; height: 30px; font-size: 11.5px; border-radius: 8px; }
.avatar.lg { width: 54px; height: 54px; font-size: 18px; border-radius: 16px; flex: none; }

/* ---------- profil ---------- */
.profile-top { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.profile-top > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.profile-name { font-size: 17px; font-weight: 700; word-break: break-word; }
.profile-top .muted { font-size: 13px; }

/* ---------- uygulama iskeleti ---------- */
#app { display: flex; min-height: 100vh; }
.side {
  width: 232px; flex-shrink: 0;
  background: var(--bg-2);
  border-right: 1px solid var(--border);
  padding: 20px 14px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.side-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 14.5px; margin-bottom: 22px; padding: 0 6px; }
.side nav { display: flex; flex-direction: column; gap: 3px; flex: 1; }
.side nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--dim);
  font-size: 14px; font-weight: 500;
}
.side nav a:hover { background: var(--card); color: var(--text); }
.side nav a.on { background: rgba(124,92,255,0.16); color: var(--text); font-weight: 600; }
.side nav .ic { width: 18px; text-align: center; font-size: 14px; }
.side-foot { border-top: 1px solid var(--border); padding-top: 14px; }
.side-note { font-size: 11px; color: var(--dim); line-height: 1.5; margin: 10px 0 0; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 24px;
  background: rgba(11,13,20,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.menu { display: none; }
.tenant-switch {
  margin-left: auto;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  max-width: 260px;
}
.tenant-switch:hover { border-color: var(--accent); }
.caret { color: var(--dim); font-size: 11px; }

#view { padding: 24px; max-width: 1180px; width: 100%; }
.scrim { display: none; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 25px; }
.page-sub { color: var(--dim); font-size: 13.5px; margin: 5px 0 0; }

/* ---------- butonlar ---------- */
.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  white-space: nowrap;
}
.btn.primary { background: linear-gradient(135deg, var(--accent), #6b4ff0); color: #fff; }
.btn.primary:hover { filter: brightness(1.1); }
.btn.ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.danger { background: rgba(255,138,138,0.15); color: var(--bad); border-color: rgba(255,138,138,0.3); }
.btn.sm { padding: 6px 12px; font-size: 12.5px; border-radius: 8px; }
.btn.full { width: 100%; }
.icon-btn {
  background: transparent; border: none; color: var(--dim);
  font-size: 16px; cursor: pointer; padding: 6px 8px; border-radius: 8px;
}
.icon-btn:hover { background: var(--card-2); color: var(--text); }
.mini {
  background: var(--card-2); border: 1px solid var(--border); color: var(--dim);
  border-radius: 7px; padding: 4px 8px; font-size: 12px; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; line-height: 1.4;
}
.mini:hover { color: var(--text); border-color: var(--accent); }
.mini.ok:hover { color: var(--ok); border-color: var(--ok); }
.mini.warn:hover { color: var(--bad); border-color: var(--bad); }
.mini.wa { color: var(--accent-2); font-weight: 700; font-size: 11px; }

/* ---------- istatistik kartları ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px; margin-bottom: 22px;
}
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 16px; }
.stat-card.warn { border-color: rgba(255,184,107,0.35); }
.stat-card.bad { border-color: rgba(255,138,138,0.35); }
.stat-card.good { border-color: rgba(74,222,128,0.3); }
.stat-value { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.stat-label { font-size: 12.5px; color: var(--dim); margin-top: 3px; }
.stat-hint { font-size: 11.5px; color: var(--dim); margin-top: 7px; opacity: 0.85; }

/* ---------- paneller ---------- */
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 18px; margin-bottom: 16px; }
.panel.accent { background: linear-gradient(135deg, rgba(124,92,255,0.1), rgba(34,211,192,0.06)); border-color: rgba(124,92,255,0.3); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.panel-head h2 { font-size: 16px; font-weight: 700; }
.panel-note { font-size: 12.5px; color: var(--dim); line-height: 1.6; margin: 12px 0 0; }
.col-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.list { list-style: none; margin: 0; padding: 0; }
.list-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--border);
}
.list-row:last-child { border-bottom: none; }
.list-row div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.list-row strong { font-size: 14px; }
.list-row .muted { font-size: 12.5px; }
.list-row .right { align-items: flex-end; text-align: right; }
.list.compact .list-row { padding: 8px 0; }
.row-actions { flex-direction: row !important; align-items: center !important; gap: 8px !important; flex-wrap: wrap; justify-content: flex-end; }

.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.bar-label { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.bar { height: 7px; background: var(--card-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* ---------- etiketler ---------- */
.tag, .chip {
  display: inline-block; padding: 3px 9px; border-radius: 99px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.chip { background: var(--card-2); color: var(--dim); font-weight: 600; }
.chip-ok { background: rgba(74,222,128,0.14); color: var(--ok); }
.tag-ok, .tag-tamamlandi { background: rgba(74,222,128,0.14); color: var(--ok); }
.tag-off { background: rgba(154,161,180,0.14); color: var(--dim); }
.tag-planlandi { background: rgba(124,92,255,0.18); color: #b7a6ff; }
.tag-gelmedi { background: rgba(255,138,138,0.15); color: var(--bad); }
.tag-iptal { background: rgba(154,161,180,0.14); color: var(--dim); }

/* ---------- araç çubuğu ---------- */
.toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.search {
  flex: 1; min-width: 200px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 14px; color: var(--text); font: inherit; font-size: 14px;
}
.search:focus { outline: none; border-color: var(--accent); }
.seg { display: flex; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.seg button {
  background: transparent; border: none; color: var(--dim);
  padding: 7px 14px; border-radius: 8px; font: inherit; font-size: 13px; cursor: pointer;
}
.seg button.on { background: var(--card-2); color: var(--text); font-weight: 600; }

/* ---------- danışan kartları ---------- */
.cards { display: flex; flex-direction: column; gap: 10px; }
.client-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 14px 16px; cursor: pointer;
}
.client-card:hover { border-color: var(--accent); }
.client-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.client-main strong { font-size: 14.5px; }
.client-main .muted { font-size: 12.5px; }
.pkg { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.pkg-bar { flex: 1; max-width: 170px; height: 5px; background: var(--card-2); border-radius: 99px; overflow: hidden; }
.pkg-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.pkg .muted { font-size: 11.5px; }
.client-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-size: 12px; text-align: right; }

/* ---------- randevu takvimi ---------- */
.weeknav { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.weeknav strong { font-size: 14px; }
.days { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.day { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 14px; }
.day.dim { opacity: 0.55; }
.day.today { border-color: var(--accent); }
.day header { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.day header strong { font-size: 13.5px; }
.day header .muted { font-size: 11.5px; }
.appt {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--card-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 10px; margin-bottom: 8px;
  flex-wrap: wrap;
}
.appt.gelmedi { border-color: rgba(255,138,138,0.3); }
.appt.tamamlandi { opacity: 0.75; }
.appt-time { font-weight: 800; font-size: 13px; color: var(--accent-2); }
.appt-main { flex: 1; min-width: 90px; display: flex; flex-direction: column; gap: 2px; }
.appt-main strong { font-size: 13px; }
.appt-main .muted { font-size: 11.5px; }
.appt-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.appt-actions { display: flex; gap: 4px; }

/* ---------- lead pipeline ---------- */
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: start; }
.stage { background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--r); padding: 12px; min-width: 0; }
.stage header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.stage header strong { font-size: 12.5px; }
.stage .count { background: var(--card-2); color: var(--dim); border-radius: 99px; padding: 1px 8px; font-size: 11px; font-weight: 700; }
.stage-danisan { border-color: rgba(74,222,128,0.3); }
.stage-kayip { opacity: 0.7; }
.lead-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 11px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 5px;
  min-width: 0;
}
.lead-card .chip { white-space: normal; overflow-wrap: anywhere; align-self: flex-start; }
.lead-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lead-top strong { font-size: 13.5px; overflow-wrap: anywhere; }
.lead-card .muted { font-size: 12px; }
.lead-note { margin: 2px 0 0; font-size: 12px; color: var(--dim); line-height: 1.45; }
.lead-actions { display: flex; gap: 6px; align-items: center; margin-top: 4px; }
.lead-actions select {
  flex: 1; min-width: 0;
  background: var(--card-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 7px; padding: 5px 7px; font: inherit; font-size: 11.5px;
}
.lead-date { font-size: 10.5px; color: var(--dim); }

.camp-table { display: flex; flex-direction: column; }
.camp-row {
  display: grid; grid-template-columns: 2fr 1fr 1fr 60px;
  gap: 10px; align-items: center;
  padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px;
}
.camp-row:last-child { border-bottom: none; }
.camp-name { font-weight: 600; }
.camp-won { color: var(--accent-2); font-weight: 600; }
.camp-rate { font-weight: 700; text-align: right; }

/* ---------- detay ---------- */
.detail-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.detail-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.detail-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.detail-grid div { display: flex; flex-direction: column; gap: 3px; background: var(--bg-2); border-radius: 10px; padding: 10px 12px; }
.detail-grid span { font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.detail-grid strong { font-size: 14px; overflow-wrap: anywhere; }
.detail-note { background: var(--bg-2); border-left: 2px solid var(--accent); border-radius: 0 8px 8px 0; padding: 10px 12px; font-size: 13px; color: var(--dim); line-height: 1.55; margin: 0 0 16px; }
.detail-h { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dim); margin: 18px 0 6px; }

/* ---------- modal ---------- */
#modal { display: none; }
#modal.open { display: block; position: fixed; inset: 0; z-index: 50; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5,7,12,0.72); backdrop-filter: blur(3px); }
.modal-panel {
  position: relative; z-index: 1;
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px); overflow-y: auto;
  margin: 24px auto;
  background: var(--card); border: 1px solid var(--border); border-radius: 18px;
  padding: 22px;
}
.modal-panel.narrow { width: min(420px, calc(100vw - 32px)); }
.modal-panel.wide { width: min(680px, calc(100vw - 32px)); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal-head h3 { font-size: 18px; }
.modal-head p { margin: 4px 0 0; font-size: 13px; color: var(--dim); }
.modal-text { color: var(--dim); font-size: 14px; line-height: 1.6; margin: 0 0 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field.wide { grid-column: 1 / -1; }
.field > span { font-size: 12px; color: var(--dim); font-weight: 600; }
.field input, .field select, .field textarea {
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 9px;
  padding: 9px 11px; color: var(--text); font: inherit; font-size: 14px; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; }
.field small { font-size: 11px; color: var(--dim); line-height: 1.4; }

/* ---------- bildirimler ---------- */
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--card-2); border: 1px solid var(--border); color: var(--text);
  padding: 10px 18px; border-radius: 99px; font-size: 13.5px; font-weight: 500;
  box-shadow: 0 8px 28px rgba(0,0,0,0.45);
  animation: toast-in 0.2s ease;
}
.toast-warn { border-color: rgba(255,184,107,0.4); color: var(--warn); }
.toast.out { opacity: 0; transition: opacity 0.25s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- duyarlı ---------- */
@media (max-width: 1000px) {
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .col-2 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .side {
    position: fixed; left: 0; top: 0; z-index: 30;
    transform: translateX(-100%); transition: transform 0.22s ease;
    box-shadow: 0 0 40px rgba(0,0,0,0.5);
  }
  .side.open { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(5,7,12,0.6); z-index: 20; opacity: 0; pointer-events: none; transition: opacity 0.2s; }
  .scrim.on { opacity: 1; pointer-events: auto; }
  .menu { display: inline-flex; }
  .topbar { padding: 10px 14px; }
  #view { padding: 16px 14px 40px; }
  .page-head h1 { font-size: 21px; }
  .pipeline { grid-template-columns: 1fr; }
  .days { grid-template-columns: 1fr; }
  .day.dim { display: none; }
  .fields { grid-template-columns: 1fr; }
  .camp-row { grid-template-columns: 1.6fr 1fr 60px; }
  .camp-row .camp-won { display: none; }
  .client-card { align-items: flex-start; }
  .client-side { font-size: 11px; }
  .modal-panel { margin: 12px auto; padding: 18px; }
  .tenant-switch .tenant-info { display: none; }
}

/* ---------- giriş / kayıt formu ---------- */
.auth-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.auth-form .field > span { font-size: 12px; }
.auth-form .btn { margin-top: 4px; }
.auth-error {
  background: rgba(255,138,138,0.12); border: 1px solid rgba(255,138,138,0.3);
  color: var(--bad); font-size: 13px; line-height: 1.5;
  padding: 10px 12px; border-radius: 10px; margin: 0 0 14px;
}
.auth-notice {
  background: rgba(34,211,192,0.1); border: 1px solid rgba(34,211,192,0.3);
  color: var(--accent-2); font-size: 13px; line-height: 1.5;
  padding: 10px 12px; border-radius: 10px; margin: 0 0 14px;
}
.auth-alt { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.linkbtn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--accent-2); font: inherit; font-size: 13px; font-weight: 600;
}
.linkbtn:hover { text-decoration: underline; }
.side-note a { color: var(--accent-2); }

/* ---------- onay kutusu ---------- */
.field.check { gap: 6px; }
.check-row { display: flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--text); font-weight: 500; }
.field.check input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; flex: none; }

/* ---------- kayıt göstergesi ---------- */
.sync { width: 8px; height: 8px; border-radius: 50%; background: transparent; margin-left: 4px; transition: background 0.2s; }
.sync.on { background: var(--accent-2); box-shadow: 0 0 0 4px rgba(34,211,192,0.15); animation: sync-pulse 1s ease-in-out infinite; }
@keyframes sync-pulse { 50% { opacity: 0.35; } }
.tenant-btn.loading { opacity: 0.55; pointer-events: none; }

/* ---------- abonelik şeridi ---------- */
.banner {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding: 10px 24px; font-size: 13.5px; border-bottom: 1px solid var(--border);
}
.banner-warn { background: rgba(255,184,107,0.1); color: var(--warn); }
.banner-bad { background: rgba(255,138,138,0.12); color: var(--bad); }
.banner strong { color: inherit; }

.notice {
  padding: 14px 16px; border-radius: 12px; font-size: 13.5px; line-height: 1.6;
  margin-bottom: 18px; border: 1px solid var(--border); background: var(--card);
}
.notice-warn { border-color: rgba(255,184,107,0.35); background: rgba(255,184,107,0.08); }
.notice-bad { border-color: rgba(255,138,138,0.35); background: rgba(255,138,138,0.09); }
.notice strong { display: block; margin-bottom: 3px; }

/* Abonelik bitince: veriler görünür, yazma kapalı. Asıl kısıt RLS'te. */
body.readonly #view .btn.primary:not(.always),
body.readonly #view .btn.danger:not(.always) { opacity: 0.45; pointer-events: none; }

/* ---------- planlar ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.plan-card {
  position: relative; background: var(--card-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 16px;
}
.plan-card.on { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.plan-badge {
  position: absolute; top: -9px; right: 12px; background: var(--accent); color: #fff;
  font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 99px;
}
.plan-card h3 { font-size: 15px; margin-bottom: 6px; }
.plan-price { font-size: 21px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.plan-price .mini { font-size: 12px; font-weight: 600; color: var(--dim); }
.plan-blurb { color: var(--dim); font-size: 12.5px; line-height: 1.5; margin: 0 0 10px; }
.plan-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; }
.plan-feats li { font-size: 12.5px; color: var(--text); padding-left: 16px; position: relative; }
.plan-feats li::before { content: '✓'; position: absolute; left: 0; color: var(--accent-2); font-weight: 700; }

/* ---------- yönetim tablosu ---------- */
.admin-table { display: flex; flex-direction: column; }
.admin-row {
  display: grid; grid-template-columns: 1.6fr 1fr 0.7fr 1fr auto;
  align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.admin-row:last-child { border-bottom: 0; }
.admin-main { display: flex; flex-direction: column; min-width: 0; }
.admin-main strong { font-size: 14px; }
.admin-main .muted { font-size: 12px; }
.admin-plan { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; font-size: 12px; }
.admin-days { font-size: 14px; }
.admin-usage { font-size: 13px; line-height: 1.5; }
.admin-usage .muted { font-size: 11.5px; }
.admin-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 900px) {
  .admin-row { grid-template-columns: 1fr 1fr; }
  .admin-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 760px) {
  .banner { padding: 10px 14px; }
  .topbar { padding-top: max(10px, env(safe-area-inset-top)); }
  #view { padding-bottom: max(40px, env(safe-area-inset-bottom)); }
}

/* ---------- kayıt onayı (KVKK) ---------- */
.field.check.consent .check-row { align-items: flex-start; }
.field.check.consent input[type="checkbox"] { margin-top: 2px; }
.consent .check-label { font-size: 12.5px; line-height: 1.5; color: var(--dim); font-weight: 400; }
.consent .check-label a { color: var(--accent-2); font-weight: 600; }

/* ---------- marka işareti: MEYA logosu ---------- */
/* HTML'deki ◈ karakteri yerinde duruyor, görsel olarak logo ile değiştiriliyor. */
.brand-mark {
  color: transparent;
  background-image: url('../icons/logo-white.png'), linear-gradient(135deg, var(--accent), var(--accent-2));
  background-size: 58% auto, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}

.btn.ghost.danger-text { color: var(--bad, #ff8a8a); }
.btn.ghost.danger-text:hover { border-color: rgba(255,138,138,0.45); }

/* Profil > tehlikeli bölge: hesap silme kartı görsel olarak ayrışsın. */
.panel.danger-zone { border-color: rgba(255,138,138,0.3); }
.panel.danger-zone h2 { color: var(--bad, #ff8a8a); }
