* { margin: 0; padding: 0; box-sizing: border-box; font-family: Inter, Arial, sans-serif; }
body { background: #f7f8ff; color: #14142b; font-size: 12px; }
.dashboard { display: flex; min-height: 100vh; }

/* ========== SIDEBAR ========== */
.sidebar {
  width: 200px;
  background: linear-gradient(180deg, #130d35 0%, #090820 100%);
  color: #fff;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 20px;
  padding: 4px 2px;
}
.logo i { color: #a855f7; font-size: 17px; }
.logo .brand { color: #fff; }
.logo span { color: #a855f7; }

.menu-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #4d3e7a;
  text-transform: uppercase;
  padding: 0 8px;
  margin-bottom: 5px;
  margin-top: 2px;
}

.menu {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.menu a {
  color: #b8aee0;
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  user-select: none;
}

.menu a i {
  font-size: 11px;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

.menu a .badge {
  margin-left: auto;
  background: #f43f5e;
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 10px;
  min-width: 16px;
  text-align: center;
  line-height: 1.4;
}

.menu a:hover {
  background: rgba(139, 61, 255, 0.25);
  color: #e8e0ff;
}

.menu a.active {
  background: linear-gradient(90deg, #7c3aed, #9333ea);
  color: white;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.menu-divider {
  height: 1px;
  background: rgba(255,255,255,0.07);
  margin: 8px 4px;
}

.support {
  background: rgba(255,255,255,.07);
  padding: 11px;
  border-radius: 11px;
  margin-top: 12px;
  border: 1px solid rgba(255,255,255,0.06);
}

.support h4 { font-size: 11px; font-weight: 700; }
.support p { font-size: 10px; margin-top: 5px; color: #b8aee0; line-height: 1.5; }

.support button {
  width: 100%;
  margin-top: 8px;
  padding: 7px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(90deg, #7c3aed, #9333ea);
  color: white;
  font-weight: 700;
  cursor: pointer;
  font-size: 10.5px;
  transition: opacity 0.2s;
}
.support button:hover { opacity: 0.9; }

.profile {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.07);
  padding: 10px;
  border-radius: 11px;
  margin-top: 8px;
  border: 1px solid rgba(255,255,255,0.06);
}

.profile img { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; }
.profile strong { font-size: 11px; display: block; line-height: 1.3; }
.profile .role { font-size: 10px; color: #b8aee0; margin-top: 1px; }

/* ========== MAIN ========== */
.main { flex: 1; padding: 18px 22px; overflow-y: auto; min-width: 0; }

.page { display: none; }
.page.active { display: block; }

/* ========== TOPBAR ========== */
.topbar { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.topbar h1 { font-size: 17px; margin-bottom: 2px; font-weight: 700; }
.topbar p { color: #6b6b87; font-size: 11px; }
.actions { display: flex; gap: 7px; align-items: center; flex-shrink: 0; }

.date-box {
  background: white;
  border: 1px solid #e5e7f3;
  padding: 7px 11px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.membership-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, #faf5ff, #f3e8ff);
  border: 1px solid #e9d5ff;
  white-space: nowrap;
}
.membership-box > i {
  color: #9333ea;
  font-size: 15px;
}
.membership-box .mb-info { display: flex; flex-direction: column; line-height: 1.25; }
.membership-box .mb-clinic { font-weight: 700; font-size: 12px; color: #2d2d4e; }
.membership-box .mb-plan { font-size: 10px; font-weight: 700; color: #9333ea; }
.membership-box .mb-days { font-size: 10px; color: #7c5fa8; font-weight: 600; }
.membership-box.mb-warn { background: linear-gradient(90deg,#fff7ed,#ffedd5); border-color:#fed7aa; }
.membership-box.mb-warn > i { color:#ea580c; }
.membership-box.mb-warn .mb-plan { color:#ea580c; }
.membership-box.mb-warn .mb-days { color:#c2410c; }
.month-picker-wrap { position:relative; }
.month-picker-wrap .date-box { cursor:pointer; user-select:none; }
.month-picker-wrap .date-box:hover { border-color:#c4b5fd; background:#faf8ff; }
.month-picker-wrap .date-box .mp-caret { margin-left:2px; font-size:10px; color:#9b8fc4; transition:transform .15s; }
.month-picker-wrap .date-box .mp-caret.open { transform:rotate(180deg); }
.month-picker-drop { position:absolute; top:calc(100% + 6px); right:0; background:white; border:1px solid #e5e7f3; border-radius:10px; box-shadow:0 8px 28px rgba(20,10,60,.13); z-index:200; min-width:170px; overflow:hidden; display:none; }
.month-picker-drop.open { display:block; }
.month-picker-item { padding:9px 15px; font-size:12px; font-weight:600; cursor:pointer; color:#2d2d4e; transition:background .1s; display:flex; align-items:center; justify-content:space-between; gap:8px; }
.month-picker-item:hover { background:#f1e7ff; color:#8b3dff; }
.month-picker-item.active { color:#8b3dff; background:#f7f3ff; }
.month-picker-item.active::after { content:'\f00c'; font-family:'Font Awesome 6 Free'; font-weight:900; font-size:10px; }

.btn-primary {
  background: linear-gradient(90deg, #7c3aed, #9333ea);
  color: white;
  border: none;
  padding: 7px 13px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.btn-primary:hover { opacity: 0.9; }

/* ========== CARDS ========== */
.card {
  background: white;
  border: 1px solid #ececff;
  border-radius: 11px;
  padding: 11px 13px;
  box-shadow: 0 2px 8px rgba(20,20,60,.04);
}

.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.card-header h3 { font-size: 13px; font-weight: 600; }
.card-header a { color: #8b3dff; text-decoration: none; font-weight: 700; font-size: 11px; cursor: pointer; }

/* ========== ICON CIRCLES ========== */
.icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.purple { background: #f1e7ff; color: #8b3dff; }
.green { background: #e7fff2; color: #16b86a; }
.orange { background: #fff3dc; color: #f59e0b; }
.blue { background: #e9f2ff; color: #2563eb; }
.pink { background: #ffe8f2; color: #ec4899; }
.red { background: #fff1f3; color: #f43f5e; }

/* ========== STATS ========== */
.stats { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; margin-bottom: 10px; }
.stat-card { display: flex; align-items: center; gap: 9px; }
.stat-card small { color: #777891; font-size: 10px; }
.stat-card h2 { margin: 2px 0; font-size: 15px; font-weight: 700; }
.up { color: #00a86b; font-size: 10px; }
.down { color: #f43f5e; font-size: 10px; }

/* ========== HIZLI İŞLEMLER ========== */
.quick-actions { display:grid; grid-template-columns:repeat(6,1fr); gap:12px; margin-bottom:20px; }
.qa-card { background:#fff; border:1px solid #ececf4; border-radius:14px; padding:16px 10px; display:flex; flex-direction:column; align-items:center; gap:9px; cursor:pointer; transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease; text-align:center; }
.qa-card:hover { transform:translateY(-3px); box-shadow:0 8px 22px rgba(124,58,237,.14); border-color:#e0d4ff; }
.qa-card .qa-ic { width:42px; height:42px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:17px; color:#fff; flex-shrink:0; }
.qa-card span { font-size:11.5px; font-weight:700; color:#3a3a52; line-height:1.25; }
.qa-ic.purple { background:linear-gradient(135deg,#8b3dff,#b07cff); }
.qa-ic.green { background:linear-gradient(135deg,#0d9488,#2dd4bf); }
.qa-ic.orange { background:linear-gradient(135deg,#f59e0b,#fbbf24); }
.qa-ic.blue { background:linear-gradient(135deg,#2563eb,#60a5fa); }
.qa-ic.pink { background:linear-gradient(135deg,#db2777,#f472b6); }
.qa-ic.teal { background:linear-gradient(135deg,#0891b2,#22d3ee); }
@media(max-width:900px){ .quick-actions{ grid-template-columns:repeat(3,1fr); } }
@media(max-width:560px){ .quick-actions{ grid-template-columns:repeat(2,1fr); } }

/* ========== CHART ========== */
.chart { height: 130px; display: flex; align-items: end; gap: 6px; border-bottom: 1px solid #ddd; padding-top: 10px; position: relative; }
.bar { flex: 1; background: linear-gradient(180deg,#9b5cff,#eadcff); border-radius: 5px 5px 0 0; position: relative; cursor: pointer; transition: filter .12s ease; }
.bar:hover { filter: brightness(1.08) saturate(1.15); }
.bar:after { content:""; width:5px; height:5px; background:#8b3dff; border-radius:50%; position:absolute; top:-2px; left:50%; transform:translateX(-50%); }
.chart-tip { position:absolute; pointer-events:none; opacity:0; transform:translate(-50%,-4px); transition:opacity .12s ease; background:#1c1340; color:#fff; padding:6px 9px; border-radius:8px; font-size:11px; font-weight:600; white-space:nowrap; box-shadow:0 6px 18px rgba(20,10,60,.28); z-index:20; }
.chart-tip:after { content:""; position:absolute; left:50%; top:100%; transform:translateX(-50%); border:5px solid transparent; border-top-color:#1c1340; }
.chart-tip .ct-day { display:block; font-weight:500; opacity:.7; font-size:9.5px; margin-bottom:1px; }
.chart-tip.show { opacity:1; }
.chart-labels { display:flex; justify-content:space-between; color:#7b7b94; font-size:10px; margin-top:6px; }

/* ========== DASHBOARD YÖNLENDİRME LİSTESİ ========== */
.dash-ref-list { display:flex; flex-direction:column; gap:4px; }
.dash-ref-row { display:flex; align-items:center; gap:11px; padding:10px 6px; border-bottom:1px solid #f1f0f7; }
.dash-ref-row:last-child { border-bottom:none; }
.dash-ref-row img { width:38px; height:38px; border-radius:50%; object-fit:cover; flex-shrink:0; }
.dash-ref-row .drr-main { flex:1; min-width:0; }
.dash-ref-row .drr-name { font-size:13px; font-weight:700; color:#2c2c40; display:flex; align-items:center; gap:7px; }
.dash-ref-row .drr-sub { font-size:11.5px; color:#8a8a9e; margin-top:2px; }
.dash-ref-row .drr-sub b { color:#6b6b80; font-weight:700; }
.dash-ref-row .drr-time { font-size:10.5px; color:#a0a0b4; white-space:nowrap; flex-shrink:0; }
.drr-badge { background:#8b3dff; color:#fff; font-size:9px; font-weight:800; letter-spacing:.3px; padding:2px 7px; border-radius:20px; }
.dash-ref-empty { color:#9090aa; font-size:12.5px; padding:14px 6px; display:flex; align-items:center; gap:8px; }

/* ========== LISTS ========== */
.patient-list, .point-list, .birthday-list { display:flex; flex-direction:column; gap:7px; }
.row { display:flex; align-items:center; justify-content:space-between; padding-bottom:7px; border-bottom:1px solid #eeeef8; }
.row:last-child { border-bottom: none; padding-bottom: 0; }
.person { display:flex; align-items:center; gap:7px; font-size:12px; }
.person img { width:24px; height:24px; border-radius:50%; }
.medal { font-size:13px; }
.gold { color:#f5b301; }
.silver { color:#9ca3af; }
.bronze { color:#f97316; }
.point { color:#00a86b; font-weight:800; font-size:12px; }
.time { color:#7b7b94; font-size:10px; white-space: nowrap; }

/* ========== GRIDS ========== */
.content-grid { display:grid; grid-template-columns:1.25fr .85fr; gap:10px; margin-bottom:10px; }
.lower-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; margin-bottom:10px; }
.promo-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }

/* ========== DONUT ========== */
.donut { width:110px; height:110px; border-radius:50%; background:conic-gradient(#5828d9 0 8%,#3478ff 8% 28%,#fbbf24 28% 58%,#8b93a9 58% 100%); margin:auto; position:relative; }
.donut:after { content:""; width:62px; height:62px; background:white; border-radius:50%; position:absolute; top:24px; left:24px; }
.legend { margin-top:10px; display:grid; gap:5px; }
.legend div { display:flex; justify-content:space-between; font-size:11px; }

/* ========== PROMO ========== */
.promo { display:flex; align-items:center; gap:12px; min-height:72px; padding:12px 14px; }
.promo i { font-size:26px; color:#8b3dff; flex-shrink:0; }
.promo small { font-size:10px; color:#9333ea; font-weight:600; text-transform:uppercase; letter-spacing:.5px; }
.promo h3 { margin:3px 0; font-size:12px; font-weight:700; }
.promo p { font-size:11px; color:#6b6b87; }
.promo button { margin-top:6px; padding:6px 12px; border:none; border-radius:7px; color:white; background:linear-gradient(90deg,#7c3aed,#9333ea); font-weight:700; cursor:pointer; font-size:10.5px; }
.reward { background:linear-gradient(90deg,#ffffff,#eef7ff); }
.lower-grid .card h3 { font-size:13px; font-weight:600; margin-bottom:10px; }
.point-list .row > div strong { font-size:12px; }
.point-list .row > div p { font-size:10px; color:#9090aa; margin-top:1px; }

/* ========== FILTERS ========== */
.filters { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:12px; }
.filter-btn {
  padding:6px 12px; border-radius:20px; border:1px solid #e5e7f3;
  background:white; font-size:11px; font-weight:600; cursor:pointer;
  color:#6b6b87; transition:all 0.18s;
}
.filter-btn.active { background:linear-gradient(90deg,#7c3aed,#9333ea); color:white; border-color:transparent; }
.filter-btn:hover:not(.active) { border-color: #c4b3f5; color: #7c3aed; }

/* ========== SEARCH ========== */
.search-bar {
  background:white; border:1px solid #e5e7f3; border-radius:8px;
  padding:7px 11px; display:flex; align-items:center; gap:7px; width:210px;
}
.search-bar input { border:none; outline:none; font-size:11px; width:100%; color:#14142b; }
.search-bar i { color:#9090aa; font-size:11px; flex-shrink:0; }

/* ========== TABLE ========== */
.table-container { background:white; border:1px solid #ececff; border-radius:11px; overflow:hidden; box-shadow:0 2px 8px rgba(20,20,60,.04); }
table { width:100%; border-collapse:collapse; }
thead { background:#f7f8ff; border-bottom:1px solid #ececff; }
thead th { text-align:left; padding:10px 13px; font-size:10.5px; font-weight:700; color:#777891; text-transform:uppercase; letter-spacing:0.5px; white-space:nowrap; }
tbody tr { border-bottom:1px solid #f3f3fb; transition:background 0.1s; }
tbody tr:last-child { border-bottom:none; }
tbody tr:hover { background:#fafafe; }
tbody td { padding:9px 13px; font-size:11.5px; vertical-align:middle; }

.patient-info { display:flex; align-items:center; gap:8px; }
.patient-info img { width:28px; height:28px; border-radius:50%; }
.patient-info strong { display:block; font-size:12px; line-height:1.3; }
.patient-info span { font-size:10px; color:#9090aa; }

/* ========== BADGES ========== */
.level-badge { display:inline-flex; align-items:center; gap:3px; padding:3px 8px; border-radius:20px; font-size:10px; font-weight:700; }
.level-platinum { background:#f1e7ff; color:#7c3aed; }
.level-gold { background:#fff8e1; color:#f59e0b; }
.level-silver { background:#f0f0f0; color:#6b7280; }
.level-bronze { background:#fff3ec; color:#f97316; }

.status-badge { display:inline-flex; align-items:center; gap:4px; padding:3px 8px; border-radius:20px; font-size:10px; font-weight:700; }
.status-active { background:#e7fff2; color:#16b86a; }
.status-passive { background:#f3f3fb; color:#9090aa; }
.status-upcoming { background:#fff3dc; color:#f59e0b; }
.status-dot { width:6px; height:6px; border-radius:50%; background:currentColor; flex-shrink:0; }

/* ========== ACTION BUTTONS ========== */
.action-btns { display:flex; gap:4px; }
.action-btn {
  width:26px; height:26px; border-radius:6px; border:1px solid #e5e7f3;
  background:white; display:flex; align-items:center; justify-content:center;
  cursor:pointer; font-size:11px; color:#777891; transition:all 0.18s;
}
.action-btn:hover { background:#f1e7ff; color:#8b3dff; border-color:#e0d0ff; }

/* ========== PAGINATION ========== */
.pagination { display:flex; justify-content:space-between; align-items:center; padding:10px 13px; border-top:1px solid #ececff; font-size:11px; color:#777891; }
.pagination-btns { display:flex; gap:4px; }
.page-btn { width:26px; height:26px; border:1px solid #e5e7f3; border-radius:6px; background:white; font-size:11px; cursor:pointer; display:flex; align-items:center; justify-content:center; color:#14142b; transition:all 0.18s; }
.page-btn.active { background:linear-gradient(90deg,#7c3aed,#9333ea); color:white; border-color:transparent; }
.page-btn:hover:not(.active) { border-color: #c4b3f5; color: #7c3aed; }

/* ========== CAMPAIGN CARDS ========== */
.campaign-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.campaign-card { position:relative; background:white; border:1px solid #ececff; border-radius:11px; overflow:hidden; box-shadow:0 2px 8px rgba(20,20,60,.04); transition:transform 0.2s, box-shadow 0.2s; }
.campaign-card:not(.dashed-card) { cursor:pointer; }
.campaign-card:hover { transform:translateY(-2px); box-shadow:0 6px 18px rgba(20,20,60,.08); }
.campaign-card:not(.dashed-card)::after {
  content:"\f304"; font-family:"Font Awesome 6 Free"; font-weight:900; font-size:11px;
  position:absolute; top:8px; right:8px; width:26px; height:26px; border-radius:8px;
  display:flex; align-items:center; justify-content:center; color:#8b3dff;
  background:rgba(255,255,255,.92); box-shadow:0 2px 6px rgba(20,20,60,.12);
  opacity:0; transform:scale(.85); transition:opacity .15s, transform .15s; pointer-events:none;
}
.campaign-card:not(.dashed-card):hover::after { opacity:1; transform:scale(1); }
.campaign-banner { height:80px; display:flex; align-items:center; justify-content:center; font-size:32px; }
.campaign-body { padding:12px; }
.campaign-body small { font-size:10px; color:#9333ea; font-weight:600; text-transform:uppercase; letter-spacing:.5px; }
.campaign-body h3 { font-size:13px; font-weight:700; margin:4px 0; }
.campaign-body p { font-size:11px; color:#6b6b87; line-height:1.45; }
.campaign-footer { display:flex; justify-content:space-between; align-items:center; padding:8px 12px; border-top:1px solid #f3f3fb; }

/* ========== REWARD CARDS ========== */
.reward-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; }
.reward-card { background:white; border:1px solid #ececff; border-radius:11px; overflow:hidden; box-shadow:0 2px 8px rgba(20,20,60,.04); transition:transform 0.2s, box-shadow 0.2s; }
.reward-card:hover { transform:translateY(-2px); box-shadow:0 6px 18px rgba(20,20,60,.08); }
.reward-card:not(.dashed-card) { cursor:pointer; position:relative; }
.reward-card:not(.dashed-card)::after { content:'\f304'; font-family:'Font Awesome 6 Free'; font-weight:900; position:absolute; top:8px; right:10px; font-size:13px; color:#c4bde8; opacity:0; transition:opacity .2s; }
.reward-card:not(.dashed-card):hover::after { opacity:1; }
.reward-banner { height:90px; display:flex; align-items:center; justify-content:center; font-size:42px; background:linear-gradient(135deg,#f1e7ff,#e0d0ff); }
.reward-body { padding:12px; }
.reward-body h3 { font-size:13px; font-weight:700; margin-bottom:4px; }
.reward-body p { font-size:11px; color:#6b6b87; line-height:1.4; }
.reward-footer { display:flex; justify-content:space-between; align-items:center; padding:8px 12px; border-top:1px solid #f3f3fb; }
.points-required { display:flex; align-items:center; gap:4px; font-weight:800; color:#8b3dff; font-size:12px; }
.stock-info { font-size:10px; color:#9090aa; }

/* ========== LEVEL CARDS ========== */
.level-cards { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; margin-bottom:12px; }
.level-card { background:white; border:1px solid #ececff; border-radius:11px; padding:16px 14px; text-align:center; box-shadow:0 2px 8px rgba(20,20,60,.04); }
.level-icon { font-size:32px; margin-bottom:8px; }
.level-card h3 { font-size:14px; font-weight:800; margin-bottom:4px; }
.level-card .points-range { font-size:10.5px; color:#6b6b87; margin-bottom:8px; }
.level-card .patient-count { font-size:22px; font-weight:800; color:#8b3dff; margin-bottom:4px; }
.level-card .patient-count-label { font-size:10px; color:#9090aa; margin-bottom:10px; }
.benefits-list { text-align:left; margin-top:10px; border-top:1px solid #f3f3fb; padding-top:10px; }
.benefit-item { display:flex; align-items:center; gap:6px; font-size:10.5px; color:#6b6b87; padding:3px 0; }
.benefit-item i { color:#16b86a; font-size:10px; flex-shrink:0; }

/* ========== NOTIFICATIONS ========== */
.notification-list { display:flex; flex-direction:column; gap:6px; }
.notification-item { background:white; border:1px solid #ececff; border-radius:10px; padding:12px 14px; display:flex; align-items:flex-start; gap:10px; box-shadow:0 1px 4px rgba(20,20,60,.03); }
.notification-item.unread { border-left:3px solid #8b3dff; }
.notification-icon { width:34px; height:34px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:13px; flex-shrink:0; }
.notification-content { flex:1; min-width:0; }
.notification-content h4 { font-size:12px; font-weight:600; margin-bottom:2px; }
.notification-content p { font-size:11px; color:#6b6b87; line-height:1.45; }
.notification-content .time { font-size:10px; color:#9090aa; margin-top:4px; display:block; }
.unread-dot { width:8px; height:8px; background:#8b3dff; border-radius:50%; flex-shrink:0; margin-top:4px; }

/* ===== Yönlendirme bildirimleri ===== */
.ref-new-badge { display:inline-block; background:#8b3dff; color:#fff; font-size:9px; font-weight:700; padding:2px 7px; border-radius:20px; margin-left:6px; vertical-align:middle; letter-spacing:.3px; }
.ref-newpatient { display:flex; align-items:center; gap:10px; background:#faf7ff; border:1px solid #ececff; border-radius:10px; padding:9px 11px; margin-top:9px; }
.ref-newpatient img { width:38px; height:38px; border-radius:50%; flex-shrink:0; object-fit:cover; }
.ref-newpatient .rp-name { font-size:13px; font-weight:700; color:#1a1a2e; }
.ref-newpatient .rp-contact { font-size:11px; color:#6b6b87; margin-top:1px; }
.ref-newpatient .rp-contact i { color:#8b3dff; margin-right:4px; }
.ref-actions { display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }
.ref-btn { border:none; cursor:pointer; font-size:11px; font-weight:700; padding:8px 13px; border-radius:8px; display:inline-flex; align-items:center; gap:6px; transition:filter .15s; }
.ref-btn:hover { filter:brightness(.95); }
.ref-btn.wa { background:#25d366; color:#fff; }
.ref-btn.call { background:#eef0ff; color:#3b5bff; }
.ref-btn.done { background:#f1f1f6; color:#6b6b87; }
.ref-btn.done.is-done { background:#e8f9ee; color:#1a9e54; cursor:default; }
.ref-empty { text-align:center; color:#9090aa; font-size:12px; padding:26px 10px; background:#faf9ff; border:1px dashed #e2e0f5; border-radius:10px; }

/* ========== REPORTS ========== */
.report-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.big-chart { height:150px; display:flex; align-items:end; gap:8px; border-bottom:1px solid #ddd; padding-top:10px; position:relative; }

/* ========== SETTINGS ========== */
.settings-grid { display:grid; grid-template-columns:195px 1fr; gap:10px; align-items:start; }
.settings-nav { background:white; border:1px solid #ececff; border-radius:11px; overflow:hidden; box-shadow:0 2px 8px rgba(20,20,60,.04); }
.settings-nav-item { display:flex; align-items:center; gap:8px; padding:11px 14px; font-size:12px; cursor:pointer; border-bottom:1px solid #f3f3fb; color:#6b6b87; transition:all 0.18s; }
.settings-nav-item:last-child { border-bottom:none; }
.settings-nav-item.active { background:#f7f0ff; color:#8b3dff; font-weight:600; }
.settings-nav-item i { width:14px; text-align:center; font-size:11px; }
.settings-content { background:white; border:1px solid #ececff; border-radius:11px; padding:18px; box-shadow:0 2px 8px rgba(20,20,60,.04); }
.form-section-title { font-size:12px; font-weight:700; color:#14142b; margin-bottom:14px; padding-bottom:8px; border-bottom:1px solid #ececff; }
.form-group { margin-bottom:14px; }
.form-hint { display:block; margin-top:5px; font-size:10.5px; color:#8a8aa6; line-height:1.4; }
.form-hint code { background:#f1edfb; color:#7c3aed; padding:1px 5px; border-radius:4px; font-size:10px; }
.google-preview { border:1px solid #e5e7f3; border-radius:10px; overflow:hidden; background:#f7f7fb; }
.google-preview iframe { display:block; }
.google-preview-empty { padding:28px 16px; text-align:center; color:#9b9bb5; font-size:12px; }
.google-preview-empty i { display:block; font-size:22px; margin-bottom:8px; color:#c4c4dd; }
.google-preview-link { padding:16px; font-size:12px; line-height:1.6; color:#555; background:#fff8ec; }
.google-preview-link i { color:#e0a800; margin-right:6px; }
.google-preview-link a { color:#6d28d9; font-weight:600; }
.dob-row { display:grid; grid-template-columns:0.9fr 1.2fr 1fr; gap:8px; }
.dob-row .form-control { padding-left:8px; padding-right:6px; }

/* Hasta detay kartı */
.pd-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:14px; }
.pd-cell { background:#f7f7fb; border:1px solid #eee; border-radius:9px; padding:9px 11px; display:flex; flex-direction:column; gap:3px; min-width:0; }
.pd-k { font-size:10px; font-weight:600; color:#9b9bb5; text-transform:uppercase; letter-spacing:.4px; }
.pd-v { font-size:12.5px; font-weight:600; color:#14142b; word-break:break-word; }
.creds-box { border:1px solid #e0d7f7; border-radius:12px; background:#faf8ff; padding:14px; }
.creds-title { font-size:12px; font-weight:700; color:#6d28d9; margin-bottom:10px; }
.creds-title i { margin-right:6px; }
.creds-label { display:block; font-size:10.5px; font-weight:600; color:#6b6b85; margin-bottom:5px; }
.creds-row { display:flex; gap:8px; align-items:center; }
.creds-row .form-control { background:#fff; }
.creds-row .form-control.mono { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-weight:700; letter-spacing:1px; }
.creds-msg { width:100%; resize:none; line-height:1.5; background:#fff; font-family:inherit; }
.btn-wa { color:#1f9d55; border-color:#bfe9cd; }
.btn-wa:hover { background:#eafaf0; }
.btn-wa i { margin-right:5px; }
.temp-pass-box { margin-top:14px; padding:12px; border:1px dashed #c9b8f0; border-radius:10px; background:#faf7ff; }
.temp-pass-box > label { display:block; font-size:11px; font-weight:700; color:#6d28d9; margin-bottom:8px; }
.temp-pass-box > label i { margin-right:5px; }
.temp-pass-row { display:flex; gap:8px; align-items:center; }
.temp-pass-row .form-control { font-family:ui-monospace,SFMono-Regular,Menlo,monospace; font-size:14px; font-weight:700; letter-spacing:1px; color:#14142b; background:#fff; }
.temp-pass-btn { flex:0 0 auto; width:34px; height:34px; border:1px solid #e5e7f3; border-radius:8px; background:#fff; color:#6d28d9; cursor:pointer; font-size:13px; transition:background .15s,border-color .15s; }
.temp-pass-btn:hover { background:#f1edfb; border-color:#c9b8f0; }
.temp-pass-box .form-hint { margin-top:8px; }
.form-group label { display:block; font-size:11px; font-weight:600; color:#4b4b6b; margin-bottom:5px; }
.form-control { width:100%; padding:8px 10px; border:1px solid #e5e7f3; border-radius:8px; font-size:11.5px; color:#14142b; outline:none; transition:border-color 0.2s; font-family:inherit; }
.form-control:focus { border-color:#8b3dff; }
.form-row { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.toggle-row { display:flex; justify-content:space-between; align-items:center; padding:10px 0; border-bottom:1px solid #f3f3fb; }
.toggle-row:last-child { border-bottom:none; }
.toggle-label strong { display:block; font-size:12px; }
.toggle-label span { font-size:10.5px; color:#9090aa; }
.toggle { width:36px; height:20px; background:#e5e7f3; border-radius:20px; position:relative; cursor:pointer; transition:background 0.2s; flex-shrink:0; }
.toggle.on { background:linear-gradient(90deg,#7c3aed,#9333ea); }
.toggle:after { content:""; position:absolute; width:16px; height:16px; background:white; border-radius:50%; top:2px; left:2px; transition:left 0.2s; box-shadow:0 1px 4px rgba(0,0,0,0.2); }
.toggle.on:after { left:18px; }

/* ========== DASHED CARD ========== */
.dashed-card { border:2px dashed #e0d0ff !important; background:#fdfbff !important; cursor:pointer; }
.dashed-card:hover { border-color:#a855f7 !important; }

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(9,8,32,0.55);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: white; border-radius: 16px; width: 100%; max-width: 500px;
  box-shadow: 0 20px 60px rgba(20,20,60,.22); animation: modalIn .2s ease;
}
@keyframes modalIn { from { opacity:0; transform:scale(.96) translateY(-8px); } to { opacity:1; transform:scale(1) translateY(0); } }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #ececff;
}
.modal-header h3 { font-size: 14px; font-weight: 700; }
.modal-close {
  width: 28px; height: 28px; border-radius: 7px; border: 1px solid #e5e7f3;
  background: white; cursor: pointer; font-size: 13px; color: #777891;
  display: flex; align-items: center; justify-content: center; transition: all .18s;
}
.modal-close:hover { background: #f1e7ff; color: #8b3dff; border-color: #e0d0ff; }
.modal-body { padding: 18px 20px; display: flex; flex-direction: column; gap: 4px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px; border-top: 1px solid #ececff;
}
.btn-secondary {
  background: white; border: 1px solid #e5e7f3; padding: 8px 16px;
  border-radius: 8px; font-size: 11.5px; font-weight: 600; cursor: pointer;
  color: #6b6b87; transition: all .18s;
}
.btn-secondary:hover { border-color: #c4b3f5; color: #7c3aed; }
.field-error { font-size: 10px; color: #f43f5e; margin-top: 3px; display: none; }
.form-control.error { border-color: #f43f5e; }
.modal-avatar { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.modal-avatar img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid #ececff; }
.modal-avatar-info strong { display: block; font-size: 12px; }
.modal-avatar-info span { font-size: 10.5px; color: #9090aa; }
.modal-hicon { width:38px; height:38px; border-radius:10px; background:linear-gradient(135deg,#7c3aed,#9333ea); color:#fff; display:flex; align-items:center; justify-content:center; font-size:15px; flex-shrink:0; box-shadow:0 4px 12px rgba(124,58,237,.32); }
.modal-sub { font-size:10.5px; color:#9090aa; margin-top:2px; font-weight:500; }

/* ===== Aranabilir hasta seçici (combobox) ===== */
.combo { position:relative; }
.combo .combo-ico { position:absolute; left:11px; top:50%; transform:translateY(-50%); font-size:11px; color:#a3a3bf; pointer-events:none; }
.combo .combo-input { padding-left:30px; padding-right:30px; cursor:text; }
.combo .combo-caret { position:absolute; right:11px; top:50%; transform:translateY(-50%); font-size:10px; color:#a3a3bf; cursor:pointer; transition:transform .2s; }
.combo.open .combo-caret { transform:translateY(-50%) rotate(180deg); }
.combo-list { position:absolute; top:calc(100% + 5px); left:0; right:0; z-index:60; background:#fff; border:1px solid #e5e7f3; border-radius:10px; box-shadow:0 14px 34px rgba(20,20,60,.16); padding:5px; max-height:236px; overflow-y:auto; display:none; }
.combo.open .combo-list { display:block; }
.combo-item { display:flex; align-items:center; gap:9px; padding:7px 8px; border-radius:8px; cursor:pointer; transition:background .12s; }
.combo-item:hover, .combo-item.active { background:#f5efff; }
.combo-item img { width:30px; height:30px; border-radius:50%; flex-shrink:0; object-fit:cover; }
.combo-item .ci-name { font-size:11.5px; font-weight:600; color:#14142b; flex:1; line-height:1.25; display:flex; align-items:center; gap:6px; }
.combo-item .ci-bal { font-size:10.5px; font-weight:800; color:#7c3aed; background:#f1e7ff; padding:2px 8px; border-radius:20px; flex-shrink:0; }
.combo-item .ci-new { font-size:9px; font-weight:700; color:#16a34a; background:#e3fbef; padding:1px 6px; border-radius:20px; }
.combo-empty { padding:16px 10px; text-align:center; font-size:11px; color:#9090aa; }

/* ========== TOAST ========== */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 2000;
  background: #130d35; color: white; padding: 11px 16px; border-radius: 10px;
  font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 8px;
  box-shadow: 0 8px 24px rgba(20,20,60,.25); transform: translateY(80px);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), opacity .3s;
  opacity: 0; pointer-events: none;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast i { color: #a855f7; }

/* ========== HASTA PROFİL ========== */
#page-hastalar .patient-info strong { cursor:pointer; transition:color .15s; }
#page-hastalar .patient-info strong:hover { color:#8b3dff; text-decoration:underline; }
.pp-header { background:linear-gradient(135deg,#7c3aed,#9333ea); padding:20px; color:#fff; position:relative; }
.pp-header-top { display:flex; align-items:center; gap:14px; }
.pp-avatar { width:60px; height:60px; border-radius:50%; border:3px solid rgba(255,255,255,.35); object-fit:cover; flex-shrink:0; }
.pp-name { font-size:16px; font-weight:800; }
.pp-id { font-size:10.5px; opacity:.85; margin-top:2px; }
.pp-badges { display:flex; gap:6px; margin-top:8px; }
.pp-badges .level-badge, .pp-badges .status-badge { background:rgba(255,255,255,.22); color:#fff; }
.pp-close { position:absolute; top:14px; right:14px; width:28px; height:28px; border-radius:8px; border:none; background:rgba(255,255,255,.18); color:#fff; cursor:pointer; font-size:13px; display:flex; align-items:center; justify-content:center; transition:background .15s; }
.pp-close:hover { background:rgba(255,255,255,.32); }
.pp-body { max-height:58vh; overflow-y:auto; }
.pp-stats { display:grid; grid-template-columns:repeat(4,1fr); gap:1px; background:#ececff; }
.pp-stat { background:#fff; padding:12px 6px; text-align:center; }
.pp-stat .v { font-size:15px; font-weight:800; color:#14142b; }
.pp-stat .l { font-size:9px; color:#9090aa; margin-top:2px; }
.pp-section { padding:14px 20px; border-top:1px solid #f3f3fb; }
.pp-section h4 { font-size:12px; font-weight:700; margin-bottom:9px; display:flex; align-items:center; gap:6px; }
.pp-section h4 i { color:#8b3dff; font-size:11px; }
.pp-info-row { display:flex; align-items:center; gap:9px; font-size:11.5px; padding:4px 0; color:#374151; }
.pp-info-row i { width:15px; color:#9090aa; text-align:center; flex-shrink:0; }
.pp-progress-label { display:flex; justify-content:space-between; font-size:10.5px; font-weight:600; color:#6b6b87; margin-bottom:6px; }
.pp-progress-track { height:8px; background:#ececff; border-radius:10px; overflow:hidden; }
.pp-progress-fill { height:100%; background:linear-gradient(90deg,#7c3aed,#a855f7); border-radius:10px; transition:width .5s ease; }
.pp-section .activity-item:last-child { border-bottom:none; padding-bottom:0; }
.activity-item { display:flex; align-items:flex-start; gap:9px; padding:8px 0; border-bottom:1px solid #f3f3fb; }
.activity-icon { width:28px; height:28px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:11px; flex-shrink:0; }
.activity-content { flex:1; min-width:0; }
.activity-content h4 { font-size:11.5px; font-weight:600; margin:0 0 1px; display:block; }
.activity-content p { font-size:10.5px; color:#6b6b87; line-height:1.4; }
.activity-time { font-size:9.5px; color:#9090aa; margin-top:2px; }
.pp-timeline-empty { font-size:11px; color:#9090aa; padding:6px 0; }

/* Puan İşlemleri sayfasında da hasta adı tıklanabilir */
#page-puan-islemleri .patient-info strong { cursor:pointer; transition:color .15s; }
#page-puan-islemleri .patient-info strong:hover { color:#8b3dff; text-decoration:underline; }

/* Dashboard kartlarında hasta adları tıklanabilir (profil kartını açar) */
.dash-name { cursor:pointer; transition:color .15s; }
.dash-name:hover { color:#8b3dff; text-decoration:underline; }

/* Yönlendirmeler tablosunda yönlendiren hasta adı tıklanabilir (detay kartını açar) */
#page-yonlendirmeler .ref-name { cursor:pointer; color:#8b3dff; transition:color .15s,background .15s; display:inline-flex; align-items:center; gap:5px; }
#page-yonlendirmeler .ref-name::after { content:"\f105"; font-family:"Font Awesome 6 Free"; font-weight:900; font-size:11px; opacity:.6; }
#page-yonlendirmeler .ref-name:hover { color:#6d28d9; text-decoration:underline; }
#page-yonlendirmeler .ref-name:hover::after { opacity:1; }

/* ===== Yönlendiren detay kartı ===== */
.rc-header { background:linear-gradient(135deg,#7c3aed,#9333ea); padding:20px 22px; color:#fff; position:relative; }
.rc-close { position:absolute; top:14px; right:14px; width:30px; height:30px; border-radius:9px; border:none; background:rgba(255,255,255,.18); color:#fff; cursor:pointer; font-size:14px; display:flex; align-items:center; justify-content:center; transition:background .15s; }
.rc-close:hover { background:rgba(255,255,255,.32); }
.rc-header-top { display:flex; align-items:center; gap:13px; }
.rc-avatar { width:52px; height:52px; border-radius:50%; border:2px solid rgba(255,255,255,.55); object-fit:cover; }
.rc-name { font-size:16px; font-weight:800; }
.rc-sub { font-size:11.5px; opacity:.9; margin-top:2px; }
.rc-body { padding:18px 20px; }
.rc-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:10px; margin-bottom:18px; }
.rc-stat { background:#faf7ff; border:1px solid #efe7ff; border-radius:12px; padding:11px 8px; text-align:center; }
.rc-stat .v { font-size:18px; font-weight:800; color:#7c3aed; }
.rc-stat .l { font-size:10px; color:#9090aa; margin-top:2px; }
.rc-section-title { font-size:13px; font-weight:700; margin-bottom:10px; }
.rc-list { display:flex; flex-direction:column; gap:9px; max-height:300px; overflow:auto; }
.rc-item { display:flex; align-items:center; gap:11px; background:#fff; border:1px solid #eee; border-radius:12px; padding:9px 12px; }
.rc-item img { width:40px; height:40px; border-radius:12px; object-fit:cover; }
.rc-item .info { flex:1; min-width:0; }
.rc-item .info strong { display:block; font-size:12.5px; }
.rc-item .info span { font-size:10.5px; color:#9090aa; }
.rc-item .point { flex-shrink:0; }
.rc-empty { text-align:center; color:#9090aa; font-size:12px; padding:24px 0; }

/* Profil kartı: puan ekle / çıkar bölümü */
.pp-points { background:#faf7ff; }
.pp-seg { display:inline-flex; background:#f1eefb; border-radius:9px; padding:3px; gap:3px; margin-bottom:10px; }
.pp-seg-btn { border:none; background:none; cursor:pointer; font-size:11px; font-weight:700; color:#7a7a96; padding:6px 15px; border-radius:7px; display:flex; align-items:center; gap:5px; transition:all .15s; }
.pp-seg-btn.active { background:#fff; color:#16b86a; box-shadow:0 2px 6px rgba(20,20,60,.1); }
.pp-seg-btn[data-mode="sub"].active { color:#f43f5e; }
.pp-point-row { display:flex; gap:8px; }
.pp-point-row #pp-point-amt { flex:0 0 120px; }
.pp-point-row #pp-point-desc { flex:1; min-width:0; }
.pp-point-preview { display:none; font-size:11px; color:#6b6b87; margin-top:9px; background:#fff; border:1px dashed #e0d0ff; border-radius:8px; padding:8px 11px; }
.pp-point-preview strong { color:#7c3aed; font-weight:800; }
.pp-point-apply { width:100%; margin-top:10px; justify-content:center; }

/* ========== SEVİYE TABS ========== */
.sv-tabs { display:flex; gap:0; padding:0 20px; border-bottom:1px solid #f0f0fb; }
.sv-tab { padding:10px 13px; border:none; background:none; cursor:pointer; font-size:11.5px; font-weight:600; color:#9090aa; border-bottom:3px solid transparent; margin-bottom:-1px; transition:all .15s; }
.sv-tab.active { color:#8b3dff; border-bottom-color:#8b3dff; }
.sv-tab:hover:not(.active) { color:#6b6b87; background:#faf7ff; }
.sv-panel { display:none; padding:16px 20px 4px; }
.sv-panel.active { display:block; }
.sv-hint { font-size:10px; color:#9090aa; margin-top:2px; }

/* ========== RESPONSIVE ========== */
@media(max-width:1200px){
  .stats{grid-template-columns:repeat(2,1fr)}
  .content-grid,.lower-grid,.promo-grid,.report-grid{grid-template-columns:1fr}
  .campaign-grid,.reward-grid{grid-template-columns:repeat(2,1fr)}
  .level-cards{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:800px){
  .dashboard{flex-direction:column}
  .sidebar{width:100%;height:auto;position:relative}
  .main{padding:12px}
  .topbar{flex-direction:column;align-items:flex-start;gap:8px}
  .actions{flex-direction:column;width:100%}
  .campaign-grid,.reward-grid,.level-cards{grid-template-columns:1fr}
  .settings-grid{grid-template-columns:1fr}
  .form-row{grid-template-columns:1fr}
}

/* ===== KLİNİK GİRİŞ EKRANI (Auth gate) ===== */
.clinic-login-overlay{position:fixed;inset:0;z-index:9999;display:none;align-items:center;justify-content:center;background:linear-gradient(135deg,#2d2d4e,#4c1d95);padding:20px;}
.clinic-login-overlay.show{display:flex;}
.clinic-login-card{width:100%;max-width:380px;background:#fff;border-radius:18px;padding:30px 28px;box-shadow:0 24px 60px rgba(0,0,0,.35);}
.clinic-login-brand{display:flex;align-items:center;gap:12px;margin-bottom:22px;}
.clinic-login-brand i{width:46px;height:46px;border-radius:12px;background:linear-gradient(135deg,#9333ea,#7c3aed);color:#fff;display:flex;align-items:center;justify-content:center;font-size:20px;}
.clinic-login-brand strong{display:block;font-size:16px;color:#2d2d4e;}
.clinic-login-brand span{font-size:12px;color:#9b9bb5;}
.clinic-login-card form{display:flex;flex-direction:column;}
.clinic-login-card label{font-size:12px;font-weight:600;color:#4b4b6b;margin:10px 0 5px;}
.clinic-login-card input{padding:11px 13px;border:1px solid #e5e7f3;border-radius:10px;font-size:14px;color:#14142b;outline:none;transition:border-color .2s;}
.clinic-login-card input:focus{border-color:#9333ea;}
.clinic-login-btn{margin-top:18px;padding:12px;border:none;border-radius:10px;background:linear-gradient(135deg,#9333ea,#7c3aed);color:#fff;font-size:14px;font-weight:700;cursor:pointer;transition:opacity .2s;}
.clinic-login-btn:disabled{opacity:.6;cursor:default;}
.clinic-login-error{min-height:18px;margin-top:10px;font-size:12.5px;color:#e11d48;font-weight:600;}
.clinic-login-hint{margin-top:18px;font-size:11px;color:#9b9bb5;line-height:1.5;text-align:center;}
.clinic-login-hint i{color:#16a34a;margin-right:4px;}

/* Hasta profil fotoğrafı (ekle/düzenle modalı) */
.photo-row{ display:flex; align-items:center; gap:14px; padding-bottom:12px; border-bottom:1px solid #ececff; margin-bottom:10px; }
.photo-preview{ width:64px; height:64px; border-radius:50%; object-fit:cover; border:2px solid #ececff; flex-shrink:0; background:#f1edfb; }
.photo-actions{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.photo-actions .btn-secondary{ padding:7px 12px; font-size:11.5px; }
.photo-actions .form-hint{ flex-basis:100%; margin-top:0; }
