@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #1a6b3c;
  --primary-light: #22883d;
  --primary-bg: #eaf6ee;
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --warning: #f59e0b;
  --warning-light: #fffbeb;
  --success: #10b981;
  --success-light: #ecfdf5;
  --info: #3b82f6;
  --info-light: #eff6ff;
  --wa: #25d366;
  --text: #1e293b;
  --text-muted: #374151;
  --text-light: #64748b;
  --border: #e2e8f0;
  --bg: #f1f5f9;
  --surface: #ffffff;
  --hover-bg: #eef2f7;
  --sidebar-w: 230px;
  --bottom-nav-h: 64px;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
}

/* ── KOYU MOD ── */
body.dark {
  --primary: #22883d;
  --primary-light: #2aa84c;
  --primary-bg: #0d2e1a;
  --danger: #f87171;
  --danger-light: #2d1515;
  --warning: #fbbf24;
  --warning-light: #2d2008;
  --success: #34d399;
  --success-light: #052e1c;
  --info: #60a5fa;
  --info-light: #0c1f3d;
  --text: #f1f5f9;
  --text-muted: #cbd5e1;
  --text-light: #94a3b8;
  --border: #334155;
  --bg: #0f172a;
  --surface: #1e293b;
  --hover-bg: #283548;
  --shadow: 0 1px 3px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.5);
}
body.dark .topbar { background: #1e293b; border-bottom-color: #334155; }
body.dark .bottom-nav { background: #1e293b; border-top-color: #334155; }
body.dark .modal { background: #1e293b; }
body.dark .modal-header, body.dark .modal-footer { background: #1e293b; }
body.dark .form-control { background: #0f172a; color: var(--text); border-color: #334155; }
body.dark .form-control:focus { border-color: var(--primary); background: #0f172a; }
body.dark select.form-control option { background: #1e293b; }
body.dark .topbar-user { background: #0f172a; border-color: #334155; }
body.dark .topbar-user:hover { background: var(--primary-bg); }
body.dark .list-item:hover, body.dark .list-item:active { background: #263248; }
body.dark .photo-upload-area { background: #0f172a; border-color: #334155; }
body.dark .photo-upload-area:hover { background: var(--primary-bg); }
body.dark .premium-banner { filter: brightness(.9); }
body.dark .loading-overlay { background: rgba(15,23,42,.9); }
body.dark .badge-gray { background: #263248; color: #cbd5e1; }
/* Koyu modda rozetler: koyu zemin + canlı/parlak metin (yüksek kontrast, okunaklı) */
body.dark .badge-green,
body.dark .badge-success { background: #064e3b; color: #6ee7b7; border: 1px solid #0f766e; }
body.dark .badge-yellow,
body.dark .badge-warning { background: #553a0b; color: #fcd34d; border: 1px solid #a16207; }
body.dark .badge-blue { background: #1e3a8a; color: #93c5fd; border: 1px solid #2563eb; }
body.dark .badge-red,
body.dark .badge-danger { background: #5a1a1a; color: #fca5a5; border: 1px solid #b91c1c; }
body.dark .badge-orange { background: #5a2e0a; color: #fdba74; border: 1px solid #c2410c; }
body.dark .badge-purple { background: #3b2a6b; color: #c4b5fd; border: 1px solid #6d28d9; }
body.dark .hisse-btn { background: #0f172a; color: var(--text); border-color: #334155; }
body.dark .hisse-btn.active { background: var(--primary-bg); border-color: var(--primary); color: var(--primary); }
body.dark .btn-secondary { background: #263248; color: var(--text); border-color: #334155; }
body.dark .btn-secondary:active { background: #334155; }
body.dark .summary-item { background: #263248; }
body.dark .stat-card { background: #1e293b; }
body.dark .detail-item label { color: var(--text-muted); }
body.dark input::placeholder, body.dark textarea::placeholder { color: #475569; }

body { font-family: 'Inter', 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-tap-highlight-color: transparent; }

/* ── LAYOUT ── */
.app-layout { display: flex; min-height: 100vh; }

/* SIDEBAR — slide-in drawer (all sizes) */
.sidebar {
  width: 286px; max-width: 84vw; background: var(--surface); color: var(--text);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 3000;
  transform: translateX(-100%); transition: transform .26s ease;
  box-shadow: 2px 0 28px rgba(0,0,0,.22);
}
.sidebar.open { transform: translateX(0); }
.sidebar-head { background: var(--primary); color: #fff; padding: calc(18px + env(safe-area-inset-top)) 16px 18px; flex: 0 0 auto; }
.sidebar-head h2 { font-size: 16px; font-weight: 700; word-break: break-word; }
.sidebar-head p { font-size: 12px; opacity: .85; margin-top: 3px; word-break: break-word; }
.sidebar-nav { flex: 1; padding: 6px 0 14px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.nav-group-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); padding: 12px 18px 4px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 11px 18px; cursor: pointer; font-size: 14px; font-weight: 500;
  color: var(--text); background: none; border: none; font-family: inherit; text-align: left;
  transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--primary-bg); color: var(--primary); }
.nav-item.active { background: var(--primary-bg); color: var(--primary); font-weight: 600; }
.nav-item svg { width: 19px; height: 19px; flex-shrink: 0; }
.sidebar-sep { border-top: 1px solid var(--border); margin: 6px 0; }
.sidebar-logout { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 18px; font-size: 14px; font-weight: 500; color: var(--danger); background: none; border: none; cursor: pointer; font-family: inherit; text-align: left; transition: background .12s; }
.sidebar-logout svg { width: 19px; height: 19px; flex-shrink: 0; }
.sidebar-logout:hover { background: var(--danger-light); }

/* MAIN */
.main-content { flex: 1; margin-left: 0; display: flex; flex-direction: column; min-height: 100vh; }
.topbar {
  height: calc(56px + env(safe-area-inset-top)); background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: env(safe-area-inset-top) 18px 0; position: sticky; top: 0; z-index: 100;
  transition: transform .28s ease;
}
.topbar.topbar--hidden { transform: translateY(-100%); }
.topbar-title { font-size: 16px; font-weight: 700; }
.hamburger { display: flex; background: none; border: none; cursor: pointer; padding: 8px; color: var(--text); border-radius: 8px; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.topbar-user { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 6px 10px; border-radius: 10px; background: var(--bg); border: 1.5px solid var(--border); transition: background .15s; }
.topbar-user:hover { background: var(--primary-bg); border-color: var(--primary); }
.topbar-user-name { font-size: 12px; font-weight: 600; color: var(--text); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.page-content { flex: 1; padding: 16px; max-width: 900px; width: 100%; margin: 0 auto; padding-bottom: 80px; }
.page { display: none; }
.page.active { display: block; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.page-header h2 { font-size: 18px; font-weight: 700; }

/* BOTTOM NAV — mobile only */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--surface); border-top: 1px solid var(--border);
  z-index: 200; height: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom));
  align-items: center; justify-content: space-around;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; flex: 1; cursor: pointer; padding: 6px 0;
  font-size: 10px; font-weight: 600; color: var(--text-muted);
  transition: color .15s; min-height: 54px;
  border: none; background: none; text-decoration: none;
}
.bottom-nav-item svg { width: 22px; height: 22px; }
.bottom-nav-item.active { color: var(--primary); }
.bottom-nav-item.active svg { stroke: var(--primary); }

/* FAB */
.fab {
  position: fixed; bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 14px); right: 18px;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--primary); color: #fff; border: none;
  cursor: pointer; display: none; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(26,107,60,.4); z-index: 150;
  transition: transform .15s;
}
.fab:active { transform: scale(.93); }
.fab svg { width: 24px; height: 24px; }

/* STATS GRID */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.stat-card { background: var(--surface); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); border: 1px solid var(--border); }
.stat-icon { width: 38px; height: 38px; border-radius: 9px; display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.stat-icon svg { width: 18px; height: 18px; }
.stat-value { font-size: 20px; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* CARD */
.card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); margin-bottom: 14px; }
.card-header { padding: 13px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.card-title { font-size: 14px; font-weight: 700; }
.card-body { padding: 16px; }

/* SİPARİŞ KARTLARI (Bekleyen Siparişler) — kompakt, taşma yapmayan */
.siparis-card { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.siparis-card:last-child { border-bottom: none; }
.siparis-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 5px; }
.siparis-ad { font-weight: 700; font-size: 14px; min-width: 0; line-height: 1.3; overflow-wrap: anywhere; }
.siparis-card-top .badge { flex: 0 0 auto; }
.siparis-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.siparis-hayvan { font-size: 13px; line-height: 1.45; margin-bottom: 4px; overflow-wrap: anywhere; }
.siparis-dot { color: var(--text-light); }
.siparis-fiyat { color: var(--primary); font-weight: 700; white-space: nowrap; }
.siparis-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; overflow-wrap: anywhere; }
.siparis-tarih { font-size: 11px; color: var(--text-light); margin-top: 6px; }
.siparis-aksiyon { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.siparis-aksiyon .btn { flex: 1 1 auto; justify-content: center; white-space: normal; min-height: 38px; }

/* LIST ITEMS (card-based) */
.list-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .1s; min-height: 68px;
  text-decoration: none; color: inherit;
}
.list-item:last-child { border-bottom: none; }
.list-item:active, .list-item:hover { background: #f8fafc; }
.list-item-thumb {
  width: 48px; height: 48px; border-radius: 10px;
  background: var(--primary-bg); overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.list-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-item-thumb-placeholder { font-size: 20px; }
.list-item-body { flex: 1; min-width: 0; }
.list-item-title { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.list-item-right { text-align: right; flex-shrink: 0; }
.list-item-price { font-size: 14px; font-weight: 700; }
.list-item-badge { margin-top: 3px; }
.list-item-chevron { color: var(--text-light); margin-left: 4px; }
.list-item-chevron svg { width: 16px; height: 16px; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 9px; font-size: 13.5px; font-weight: 600; cursor: pointer; border: none; transition: all .15s; white-space: nowrap; font-family: inherit; min-height: 44px; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:active { background: #155c33; }
.btn-secondary { background: var(--bg); color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:active { background: #e2e8f0; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:active { background: #1aad54; }
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 7px; min-height: 36px; }
.btn-xs { padding: 4px 8px; font-size: 11px; border-radius: 5px; min-height: 28px; }
.btn-block { width: 100%; justify-content: center; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-icon { padding: 10px; border-radius: 9px; min-width: 44px; min-height: 44px; justify-content: center; }

/* FORMS */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-full { grid-column: 1 / -1; }
.form-group { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-control {
  padding: 11px 13px; border: 1.5px solid var(--border); border-radius: 9px;
  font-size: 15px; font-family: inherit; background: var(--surface); color: var(--text);
  transition: border-color .15s; width: 100%; min-height: 46px;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,107,60,.1); }
.form-control::placeholder { color: var(--text-light); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; font-size: 14px; }
/* Tarih/saat alanları iOS'ta içsel genişlikle kapsayıcıyı taşırıp metni
   ortalıyor → diğer alanlarla simetrik olması için sığdır + sola hizala */
input[type="date"].form-control,
input[type="datetime-local"].form-control,
input[type="time"].form-control {
  -webkit-appearance: none; appearance: none;
  min-width: 0; max-width: 100%; width: 100%; text-align: left;
}
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.form-hint { font-size: 11px; color: var(--text-light); margin-top: 2px; }

/* PHOTO UPLOAD */
.photo-upload-area {
  border: 2px dashed var(--border); border-radius: 10px;
  padding: 20px; text-align: center; cursor: pointer;
  transition: border-color .15s; background: #fafafa; position: relative;
}
.photo-upload-area:hover, .photo-upload-area.drag-over { border-color: var(--primary); background: var(--primary-bg); }
.photo-upload-area input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-preview { width: 100%; max-height: 180px; object-fit: cover; border-radius: 8px; margin-top: 10px; }
.photo-remove { position: absolute; top: 8px; right: 8px; background: var(--danger); color: #fff; border: none; border-radius: 50%; width: 28px; height: 28px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* SEARCH */
.search-bar { display: flex; gap: 8px; margin-bottom: 14px; align-items: center; flex-wrap: wrap; }
.search-wrap { position: relative; flex: 1; min-width: 0; }
.search-wrap svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-light); pointer-events: none; }
.search-wrap .form-control { padding-left: 36px; }

/* Çoklu seçim filtresi (Satışlar) */
.multiselect { position: relative; flex-shrink: 0; }
.multiselect-trigger { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: auto; max-width: 170px; cursor: pointer; text-align: left; }
.multiselect-trigger > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multiselect-trigger .ms-caret { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-light); transition: transform .15s; }
.multiselect-trigger[aria-expanded="true"] .ms-caret { transform: rotate(180deg); }
.multiselect-menu { display: none; position: absolute; top: calc(100% + 6px); right: 0; z-index: 300; min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 6px; }
.multiselect-menu.open { display: block; animation: fadeIn .12s ease; }
.ms-opt { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--text); min-height: 0; }
.ms-opt:hover { background: var(--bg); }
.ms-opt input { width: 18px; height: 18px; accent-color: var(--primary); margin: 0; min-height: 0; cursor: pointer; flex-shrink: 0; }
.ms-opt.ms-all { font-weight: 700; }
.ms-sep { height: 1px; background: var(--border); margin: 4px 2px; }
.ms-group-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--text-light); padding: 6px 10px 2px; }

/* BADGES */
.badge { display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-green { background: var(--success-light); color: #065f46; }
.stars { color: #f59e0b; font-size: 15px; letter-spacing: 1px; line-height: 1; white-space: nowrap; }
.stars .empty { color: var(--border); }
.star-picker { display: flex; gap: 8px; margin: 4px 0 10px; }
.star-picker button { background: none; border: none; cursor: pointer; font-size: 34px; line-height: 1; color: var(--border); padding: 0; transition: color .12s; min-height: 0; }
.star-picker button.on { color: #f59e0b; }
.badge-red { background: var(--danger-light); color: #991b1b; }
.badge-yellow { background: var(--warning-light); color: #92400e; }
.badge-blue { background: var(--info-light); color: #1e40af; }
.badge-gray { background: #f1f5f9; color: #475569; }
.badge-orange { background: #fff7ed; color: #9a3412; }
.badge-purple { background: #f5f3ff; color: #5b21b6; }
.badge-premium { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; font-size: 10px; }

/* MODAL */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 500; align-items: flex-end; justify-content: center; }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border-radius: 20px 20px 0 0; width: 100%; max-width: 640px; max-height: 92vh; overflow-y: auto; animation: slideUpSheet .25s ease; }
.modal-lg { max-width: 640px; }
.modal-sm { max-width: 420px; }
@keyframes slideUpSheet { from { transform: translateY(60px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-header { padding: 16px 18px 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-handle { width: 36px; height: 4px; background: var(--border); border-radius: 2px; margin: 0 auto 12px; }
.modal-title { font-size: 15px; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; padding: 8px; color: var(--text-muted); border-radius: 8px; line-height: 0; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; }
.modal-body { padding: 18px; }
.modal-footer { padding: 12px 18px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; position: sticky; bottom: 0; background: var(--surface); }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state svg { width: 52px; height: 52px; margin: 0 auto 14px; display: block; opacity: .25; }
.empty-state h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.empty-state p { font-size: 13px; }

/* SUMMARY ROW */
.summary-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.summary-item { background: var(--bg); border-radius: 10px; padding: 12px 14px; border: 1px solid var(--border); }
.summary-item-label { font-size: 10px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.summary-item-value { font-size: 17px; font-weight: 700; margin-top: 4px; }

/* PAYMENT PROGRESS */
.payment-bar { background: var(--border); border-radius: 10px; height: 7px; overflow: hidden; }
.payment-bar-fill { height: 100%; border-radius: 10px; background: var(--success); transition: width .4s; }
.payment-bar-fill.mid { background: var(--warning); }
.payment-bar-fill.low { background: var(--danger); }

/* AVATAR */
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--primary-bg); color: var(--primary); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* DETAIL VIEW */
.detail-section { margin-bottom: 18px; }
.detail-section-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 10px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-item label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; color: var(--text-muted); display: block; margin-bottom: 2px; }
.detail-item span { font-size: 14px; font-weight: 500; }
.detail-photo { width: 100%; border-radius: 12px; object-fit: cover; max-height: 220px; margin-bottom: 14px; }

/* TOAST */
.toast-container { position: fixed; bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 12px); right: 14px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background: #1e293b; color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 8px; pointer-events: auto; animation: toastIn .25s ease; max-width: 320px; font-family: inherit; }
.toast svg { width: 15px; height: 15px; flex-shrink: 0; }
.toast-success { background: #064e3b; }
.toast-error { background: #7f1d1d; }
.toast-warning { background: #78350f; }
@keyframes toastIn { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* HISSE PICKER */
.hisse-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.hisse-btn { width: 44px; height: 44px; border-radius: 9px; border: 2px solid var(--border); background: var(--surface); font-size: 16px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.hisse-btn.active { border-color: var(--primary); background: var(--primary-bg); color: var(--primary); }
.hisse-btn:disabled { opacity: .35; cursor: not-allowed; }

/* SIDEBAR OVERLAY */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 2900; }
.sidebar-overlay.open { display: block; }

/* LOADING */
.loading-overlay { position: fixed; inset: 0; background: rgba(255,255,255,.85); z-index: 9000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.spinner { width: 36px; height: 36px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* PREMIUM */
.premium-banner {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border-radius: var(--radius); padding: 16px; color: #fff;
  margin-bottom: 14px; display: flex; align-items: center; gap: 14px;
}
.premium-banner-icon { font-size: 28px; flex-shrink: 0; }
.premium-banner h3 { font-size: 14px; font-weight: 700; }
.premium-banner p { font-size: 12px; opacity: .85; margin-top: 2px; }

.limit-bar-wrap { margin-top: 6px; }
.limit-bar { background: rgba(255,255,255,.3); border-radius: 10px; height: 6px; }
.limit-bar-fill { height: 100%; border-radius: 10px; background: var(--primary); transition: width .4s; }
.limit-bar-fill.warn { background: var(--warning); }
.limit-bar-fill.full { background: var(--danger); }

/* SİPARİŞ BADGE */
.siparis-badge {
  background: var(--danger); color: #fff;
  border-radius: 10px; font-size: 10px; font-weight: 700;
  padding: 1px 6px; min-width: 18px; height: 18px;
  align-items: center; justify-content: center;
  margin-left: 4px; vertical-align: middle;
}

/* BADGE variants (used in siparisler) */
.badge-warning { background: #fffbeb; color: #92400e; }
.badge-success { background: #ecfdf5; color: #065f46; }
.badge-danger { background: #fef2f2; color: #991b1b; }

/* PROFILE */
.profil-avatar-big {
  width: 72px; height: 72px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 26px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 10px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .bottom-nav { display: flex; }
  .fab { display: flex; }
  .topbar { height: calc(52px + env(safe-area-inset-top)); }
  .page-content { padding: 12px 12px calc(var(--bottom-nav-h) + env(safe-area-inset-bottom) + 16px); }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .form-grid { grid-template-columns: 1fr; }
  .quick-cust-grid { grid-template-columns: 1fr; }
  .summary-row { grid-template-columns: 1fr 1fr; }
  .modal { border-radius: 20px 20px 0 0; }
  .modal-overlay { align-items: flex-end; }
  .topbar-user-name { display: none; }
}
@media (min-width: 769px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .summary-row { grid-template-columns: repeat(4, 1fr); }
}

.qr-preview-container {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.qr-url-label {
  font-size: 11px;
  color: var(--text-muted);
  word-break: break-all;
  text-align: center;
  max-width: 160px;
}
.qr-preview-container img,
.qr-preview-container canvas {
  border-radius: 8px;
  border: 2px solid var(--border);
  display: block;
}

/* ── HİSSE PAZARI HARİTA ── */
.view-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
}
.view-toggle-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.view-toggle-btn.active {
  background: var(--primary);
  color: #fff;
}
.view-toggle-btn:not(.active):hover {
  background: var(--border);
  color: var(--text);
}
.ilan-harita-container {
  height: 380px;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
}
.leaflet-popup-content-wrapper {
  border-radius: 10px !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15) !important;
  padding: 0 !important;
}
.leaflet-popup-content {
  margin: 0 !important;
  width: auto !important;
}
.ilan-popup {
  padding: 12px 14px;
  min-width: 200px;
  max-width: 260px;
  font-family: 'Inter', sans-serif;
}
.ilan-popup-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ilan-popup-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.5;
}
.ilan-popup-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 8px;
}
.ilan-popup-wa {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--wa);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 7px;
  text-decoration: none;
  justify-content: center;
}
.ilan-popup-wa:hover { background: #1aad54; }

/* ── İLAN COMPACT CARD ── */
.ilan-compact-card {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
}
.ilan-compact-card:last-child { border-bottom: none; }
.ilan-compact-card:active { background: var(--hover-bg); }
@media (hover: hover) { .ilan-compact-card:hover { background: var(--hover-bg); } }
.ilan-compact-main {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}

/* ── İLAN DETAY MODAL ── */
.ilan-modal-detay {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.ilan-modal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  background: var(--surface);
  font-size: 14px;
}
.ilan-modal-label { color: var(--text-muted); font-weight: 600; flex-shrink: 0; }
.ilan-modal-val { color: var(--text); font-weight: 600; text-align: right; }
.ilan-modal-aciklama {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--bg);
  border-radius: 12px;
  font-size: 13px;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
}
@keyframes fadeIn { from { opacity:0; transform:translateY(-4px); } to { opacity:1; transform:translateY(0); } }

/* ── PROFİL FOTOĞRAFI ── */
.profil-avatar-wrap {
  position: relative;
  display: inline-block;
  cursor: pointer;
  border-radius: 50%;
}
.profil-avatar-edit-overlay {
  position: absolute;
  bottom: 0; right: 0;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  pointer-events: none;
}
.profil-avatar-wrap .profil-avatar-photo {
  width: 80px; height: 80px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* ── SCROLL LOCK (modal/drawer açıkken arka plan kilitli) ── */
body.scroll-locked {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Standardized confirm dialog */
.confirm-overlay{position:fixed;inset:0;background:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;z-index:10000;padding:20px;animation:fadeIn .12s ease;}
.confirm-box{background:var(--surface);border-radius:14px;padding:24px 20px 18px;max-width:360px;width:100%;box-shadow:var(--shadow-md);border:1px solid var(--border);}
.confirm-msg{font-size:15px;color:var(--text);margin-bottom:20px;line-height:1.5;text-align:center;white-space:pre-line;}
.confirm-actions{display:flex;gap:10px;}
.confirm-actions .btn{flex:1;}

/* P2: yatay taşma önlemleri — hiçbir ekran yatay kaymasın */
/* Temel: overflow-x:hidden her yerde yatay kaymayı durdurur (eski iOS dahil).
   Destekleyen tarayıcılarda overflow-x:clip'e yükseltilir — clip kökü kaydırma
   kabı yapmaz, böylece sabit (fixed) üst/alt bar ve sticky öğeler bozulmaz. */
html, body { max-width: 100%; overflow-x: hidden; }
.page-content { overflow-x: hidden; }
@supports (overflow: clip) {
  html, body { overflow-x: clip; }
  .page-content { overflow-x: clip; }
}
.modal { overflow-x: hidden; }
.page-content img, .page-content video { max-width: 100%; height: auto; }
.page-content canvas { max-width: 100%; }
.list-item-sub, .detail-item span, .ilan-modal-val, .card p { overflow-wrap: anywhere; }
.form-control { max-width: 100%; }
.intl-tel { max-width: 100%; }
.quick-cust-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }

/* ═══════════ BİLDİRİMLER ═══════════ */
.notif-wrap { position: relative; }
#notifBtn { position: relative; padding: 7px 9px; }
#notifBtn svg { width: 18px; height: 18px; }
.notif-badge {
  position: absolute; top: -5px; right: -5px;
  min-width: 17px; height: 17px; padding: 0 4px;
  background: var(--danger); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 17px;
  text-align: center; border-radius: 9px;
  box-shadow: 0 0 0 2px var(--surface);
}
.notif-center {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 340px; max-width: calc(100vw - 24px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  z-index: 120; overflow: hidden; display: none;
}
.notif-center.open { display: block; }
/* Telefonda bildirim panelini zile yaslamak yerine ekranda YATAY ortala.
   Bu kural taban .notif-center'dan SONRA gelmeli ki kaynak sırasında kazansın. */
@media (max-width: 768px) {
  .notif-center {
    position: fixed; top: 60px; left: 50%; right: auto;
    transform: translateX(-50%);
    width: min(360px, calc(100vw - 24px)); max-width: none;
  }
}
.notif-center-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
  font-weight: 700; font-size: 14px; color: var(--text);
}
.notif-mark-all {
  background: none; border: none; cursor: pointer;
  color: var(--primary); font-size: 12px; font-weight: 600; padding: 0; white-space: nowrap;
}
.notif-list { max-height: 60vh; overflow-y: auto; }
.notif-empty { padding: 28px 14px; text-align: center; color: var(--text-light); font-size: 13px; }
.notif-item {
  display: flex; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--hover-bg); }
.notif-item.unread { background: var(--primary-bg); }
.notif-ic { font-size: 18px; line-height: 1.2; flex-shrink: 0; }
.notif-body { min-width: 0; flex: 1; }
.notif-title { font-weight: 600; font-size: 13px; color: var(--text); overflow-wrap: anywhere; }
.notif-msg { font-size: 12px; color: var(--text-muted); margin-top: 2px; overflow-wrap: anywhere; }
.notif-time { font-size: 11px; color: var(--text-light); margin-top: 4px; }

/* Rehberden Seç düğmesi — tüm cihazlarda görünür; davranış cihaza göre değişir */
.rehber-btn { font-weight: 500; }
.rehber-btn::first-letter { font-size: 1.05em; }

/* Rapor görünüm sekmeleri (Özet / Ekstre) */
.rapor-tabs { display: flex; gap: 6px; margin-bottom: 14px; background: var(--bg); padding: 4px; border-radius: 11px; border: 1px solid var(--border); }
.rapor-tab {
  flex: 1; padding: 9px 12px; font-size: 13px; font-weight: 600; cursor: pointer;
  background: transparent; color: var(--text-muted); border: none; border-radius: 8px; transition: background .15s, color .15s;
}
.rapor-tab:hover { color: var(--text); }
.rapor-tab.active { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }
