:root {
  --font-sans: 'Inter', -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: 'SFMono-Regular', ui-monospace, Menlo, Consolas, monospace;

  /* Marka yesili rampasi - derin "cam/orman" yesili */
  --brand-900: #0b2e1d;
  --brand-800: #123f27;
  --brand-700: #1a5b37;
  --brand-600: #1f7a45;
  --brand-500: #2c9a57;
  --brand-400: #57be7c;
  --brand-100: #dbf0e1;
  --brand-50: #f1faf4;

  /* Notr gri skala - soguk, teknik */
  --gray-25: #fbfcfb;
  --gray-50: #f5f7f5;
  --gray-100: #edf0ee;
  --gray-200: #e2e6e3;
  --gray-300: #cbd2cc;
  --gray-400: #9ba69d;
  --gray-500: #6b786e;
  --gray-600: #4b564d;
  --gray-700: #313b33;
  --gray-900: #142019;

  /* Semantik renkler - marka yesilinden bilincli olarak ayri ton */
  --success-600: #16a34a;
  --success-bg: #eafbf1;
  --success-text: #0f7a36;
  --error-600: #dc2626;
  --error-bg: #fdecec;
  --error-text: #b42318;
  --warning-600: #d97706;
  --warning-bg: #fdf3e0;
  --warning-text: #92620c;

  --accent-600: #c22a82;
  --accent-50: #fcebf5;
  --color-whatsapp: #25d366;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --radius-pill: 999px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 56px;
  --space-10: 72px;

  --shadow-xs: 0 1px 2px rgba(8, 20, 15, 0.05);
  --shadow-sm: 0 1px 3px rgba(8, 20, 15, 0.06), 0 1px 2px rgba(8, 20, 15, 0.04);
  --shadow-md: 0 4px 12px rgba(8, 20, 15, 0.08), 0 2px 4px rgba(8, 20, 15, 0.05);
  --shadow-lg: 0 12px 32px rgba(8, 20, 15, 0.14), 0 4px 10px rgba(8, 20, 15, 0.06);

  --color-border: var(--gray-200);
  --color-border-strong: var(--gray-300);
  --focus-ring: 0 0 0 3px rgba(31, 122, 69, 0.22);
  --sidebar-width: 264px;

  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 14.5px;
  --text-md: 16px;
  --text-lg: 20px;
  --text-xl: 26px;
  --text-2xl: 36px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.5;
  background: var(--gray-25);
  color: var(--gray-900);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-700); }
code { font-family: var(--font-mono); font-size: 0.92em; }
/* display:flex/grid gibi kural verilen elemanlarda tarayicinin varsayilan
   [hidden]{display:none} kurali ayni ozgulluktekiler tarafindan ezilebiliyor
   - "hidden" ozniteligi (el.hidden = true) her zaman gorunmezligi garanti
   etsin diye !important ile sabitleniyor (bkz. chat-search.js). */
[hidden] { display: none !important; }

/* --- App shell: sidebar (nav === 'tenant' | 'admin') --- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--brand-900);
  color: #eaf3ec;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 50;
  padding: var(--space-5) var(--space-3);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: var(--space-2) var(--space-3) var(--space-5);
}
.brand-logo {
  display: inline-flex;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 3px;
  overflow: hidden;
  flex-shrink: 0;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }
.sidebar-tenant {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 var(--space-3) var(--space-4);
  padding: 8px var(--space-3);
  background: var(--brand-800);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--brand-100);
}
.sidebar-tenant-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brand-400); flex-shrink: 0; }
.sidebar-tenant-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--brand-100);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 500;
  border: none;
  background: none;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
}
.sidebar-link svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.8; }
.sidebar-link:hover { background: var(--brand-800); color: #fff; }
.sidebar-link.is-active { background: var(--brand-700); color: #fff; }
.sidebar-link.is-active svg { opacity: 1; }
.sidebar-footer { border-top: 1px solid rgba(255, 255, 255, 0.08); padding-top: var(--space-3); margin-top: var(--space-3); }

.mobile-topbar { display: none; }
.sidebar-backdrop { display: none; }

.app-content { min-height: 100vh; }
body.has-sidebar .app-content { margin-left: var(--sidebar-width); }

@media (max-width: 960px) {
  body.has-sidebar .app-content { margin-left: 0; }
  .mobile-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 56px;
    padding: 0 var(--space-4);
    position: sticky;
    top: 0;
    z-index: 30;
    background: #fff;
    border-bottom: 1px solid var(--color-border);
  }
  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-300);
    background: #fff;
    color: var(--gray-700);
    cursor: pointer;
    flex-shrink: 0;
  }
  .sidebar-toggle svg { width: 18px; height: 18px; }
  .mobile-topbar-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: var(--text-base); color: var(--gray-900); }
  .brand-logo-sm { width: 24px; height: 24px; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    box-shadow: var(--shadow-lg);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(4, 20, 13, 0.5);
    z-index: 45;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
  }
  body.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: auto; }
}

/* --- Minimal ust baslik (nav === 'none' | undefined: landing/login/legal) --- */
.topbar-minimal {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
}
.topbar-minimal-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 16px 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--gray-900);
  text-decoration: none;
}
.topbar-minimal .brand-logo { background: var(--brand-900); }
.link-button { background: none; border: none; cursor: pointer; padding: 0; font: inherit; color: inherit; }
.inline { display: inline; }

.container { max-width: 1120px; margin: 0 auto; padding: var(--space-7) 20px 64px; }
h1 { font-size: var(--text-xl); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 var(--space-6); color: var(--gray-900); }
h2 { font-size: var(--text-lg); font-weight: 600; letter-spacing: -0.012em; margin: 0 0 var(--space-3); color: var(--gray-900); }
h3 { font-size: var(--text-md); font-weight: 600; letter-spacing: -0.005em; margin: 0 0 var(--space-2); color: var(--gray-900); }

/* --- Kartlar: hairline border, golgesiz (varsayilan) --- */
.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-4);
}
.card-accent-instagram { border-top: 3px solid var(--accent-600); }
.legal-card { max-width: 760px; margin-left: auto; margin-right: auto; }
.legal-card h2 { margin-top: var(--space-7); }
.legal-card h2:first-of-type { margin-top: 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-4); }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: var(--space-2); }
.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  background: var(--brand-50);
  color: var(--brand-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}
.stat-icon svg { width: 18px; height: 18px; }
.stat-num { font-size: 26px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--gray-900); }
.stat-label { font-size: var(--text-sm); color: var(--gray-500); }

/* --- Tablolar --- */
.table-wrap { overflow-x: auto; margin: -4px -4px 0; padding: 4px; }
table { width: 100%; border-collapse: collapse; font-size: var(--text-base); }
th { text-align: left; padding: 9px 10px; background: var(--gray-50); border-bottom: 1px solid var(--gray-200); color: var(--gray-500); font-weight: 600; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap; }
td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--gray-100); }
th:first-child, td:first-child { padding-left: 4px; }
tbody tr:hover { background: var(--gray-50); }

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

/* --- Formlar --- */
form.stacked { display: flex; flex-direction: column; gap: var(--space-3); max-width: 420px; }
label { font-size: var(--text-sm); font-weight: 500; color: var(--gray-600); }
input, textarea, select {
  padding: 9px 12px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-family: inherit;
  color: var(--gray-900);
  background: #fff;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: var(--focus-ring);
}
textarea { min-height: 100px; resize: vertical; }
input[type="checkbox"] { width: auto; padding: 0; border: none; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-weight: 500; }

/* --- Butonlar: .primary/.small mevcut kullanimla uyumlu alias, ustune kademeler --- */
.primary, .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--brand-600);
  color: #fff;
  border: 1px solid var(--brand-600);
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.primary:hover, .btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); }
.primary:active, .btn-primary:active { background: var(--brand-800); }
.primary:disabled, .btn-primary:disabled { background: var(--gray-300); border-color: var(--gray-300); cursor: default; }
.primary:focus-visible, .btn-primary:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.small, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: var(--radius-xs);
  border: 1px solid var(--gray-300);
  background: #fff;
  color: var(--gray-700);
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}
.small:hover, .btn-secondary:hover { background: var(--gray-50); border-color: var(--gray-400); }
.small:focus-visible, .btn-secondary:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: var(--radius-xs);
  border: 1px solid transparent;
  background: none;
  color: var(--gray-600);
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s ease, color 0.12s ease;
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-900); }

.btn-danger.small, .btn-danger.btn-secondary { color: var(--error-text); }
.btn-danger.small:hover, .btn-danger.btn-secondary:hover { background: var(--error-bg); border-color: var(--error-600); }

/* --- Dropzone --- */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: var(--space-7) var(--space-4);
  border: 2px dashed var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: var(--gray-25);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover { border-color: var(--gray-400); background: var(--gray-50); }
.dropzone.dragover { border-color: var(--brand-600); background: var(--brand-50); }
.dropzone.has-file { border-style: solid; border-color: var(--brand-600); background: var(--brand-50); }
.dropzone.disabled { cursor: default; opacity: 0.65; }
.dropzone input[type='file'] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
.dropzone-icon { width: 26px; height: 26px; color: var(--gray-500); }
.dropzone.has-file .dropzone-icon { color: var(--brand-600); }
.dropzone-text { font-size: var(--text-base); color: var(--gray-700); font-weight: 400; }
.dropzone-hint { font-size: var(--text-sm); color: var(--gray-500); }

.upload-progress-track {
  background: var(--gray-100);
  border-radius: var(--radius-pill);
  height: 8px;
  position: relative;
  overflow: hidden;
}
.upload-progress-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--brand-600);
  border-radius: var(--radius-pill);
  transition: width 0.2s ease;
}
.upload-progress-label { display: block; margin-top: 6px; font-size: var(--text-sm); color: var(--gray-500); }

.flash { padding: 11px 15px; border-radius: var(--radius-md); margin-bottom: var(--space-4); font-size: var(--text-base); border: 1px solid transparent; }
.flash-success { background: var(--success-bg); color: var(--success-text); border-color: rgba(15, 122, 54, 0.15); }
.flash-error { background: var(--error-bg); color: var(--error-text); border-color: rgba(180, 35, 24, 0.15); }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-pill); font-size: var(--text-xs); font-weight: 600; letter-spacing: 0.02em; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.pill-active, .pill-open, .pill-confirmed, .pill-completed, .pill-ready { background: var(--success-bg); color: var(--success-text); }
.pill-suspended, .pill-close, .pill-cancelled, .pill-failed { background: var(--error-bg); color: var(--error-text); }
.pill-pending, .pill-unknown, .pill-processing { background: var(--warning-bg); color: var(--warning-text); }

.qr-box { display: flex; flex-direction: column; align-items: center; gap: var(--space-4); padding: var(--space-5); }
.qr-box img { width: 260px; height: 260px; max-width: 100%; background: #fff; padding: 12px; border-radius: var(--radius-lg); border: 1px solid var(--color-border); box-shadow: var(--shadow-sm); }
.muted { color: var(--gray-500); font-size: var(--text-sm); }
.footer { text-align: center; padding: var(--space-6) 16px; font-size: var(--text-sm); }
.footer a { color: var(--gray-500); }

/* --- Nokta-grid teknik doku (login/landing hero zeminleri) --- */
.dot-grid-bg {
  background-color: var(--gray-25);
  background-image: radial-gradient(var(--gray-200) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* --- Giris sayfalari --- */
.hero-wrap { max-width: 1120px; margin: 0 auto; padding: var(--space-9) 20px; }
.hero-logo {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 8px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-5);
}
.hero-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: var(--radius-sm); }
.hero-wrap-narrow { max-width: 420px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-8); align-items: start; }
.hero-info h1 { font-size: 28px; margin-bottom: var(--space-3); }
.hero-info p { line-height: 1.65; color: var(--gray-700); }
.hero-info .muted { line-height: 1.65; }
.hero-login {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-7);
  box-shadow: var(--shadow-md);
}
.hero-login h2 { margin: 0 0 var(--space-5); font-size: var(--text-md); }
.hero-login form.stacked { max-width: none; }
.hero-login .primary { align-self: stretch; padding: 12px 18px; font-weight: 600; }

/* --- Ana sayfa (landing) --- */
.lp-hero-bg {
  background-color: var(--gray-25);
  background-image: radial-gradient(var(--gray-200) 1px, transparent 1px);
  background-size: 24px 24px;
  border-bottom: 1px solid var(--color-border);
}
.lp-hero { max-width: 760px; margin: 0 auto; padding: var(--space-10) 20px var(--space-9); text-align: center; }
.lp-hero-logo {
  width: 76px;
  height: 76px;
  margin: 0 auto var(--space-6);
  border-radius: var(--radius-lg);
  background: #fff;
  padding: 9px;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}
.lp-hero-logo img { width: 100%; height: 100%; object-fit: contain; border-radius: var(--radius-sm); }
.lp-hero h1 { font-size: var(--text-2xl); font-weight: 800; margin: 0 0 var(--space-4); letter-spacing: -0.025em; }
.lp-tagline { font-size: 17px; line-height: 1.6; color: var(--gray-700); margin: 0 0 var(--space-7); }
.lp-cta { display: flex; gap: var(--space-3); justify-content: center; flex-wrap: wrap; }

.lp-hero-split {
  max-width: 1120px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: var(--space-8);
  text-align: left;
}
.lp-hero-split .lp-hero-logo { margin: 0 0 var(--space-5); }
.lp-hero-split .lp-cta { justify-content: flex-start; }

.lp-phone {
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  max-width: 380px;
  margin: 0 auto;
}
.lp-phone-header {
  background: var(--brand-900);
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}
.lp-phone-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-600);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lp-phone-avatar svg { width: 20px; height: 20px; color: #fff; }
.lp-phone-name { font-size: var(--text-base); font-weight: 600; }
.lp-phone-status { font-size: var(--text-sm); color: var(--brand-400); }
.lp-phone-body {
  background: #e9ede9;
  background-image: radial-gradient(#dde3dd 1px, transparent 1px);
  background-size: 16px 16px;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lp-bubble { max-width: 82%; padding: 9px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06); }
.lp-bubble-in { background: #fff; color: var(--gray-900); align-self: flex-start; border-bottom-left-radius: 3px; }
.lp-bubble-out { background: #d9fdd3; color: var(--gray-900); align-self: flex-end; border-bottom-right-radius: 3px; }

.lp-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--brand-50);
  color: var(--brand-700);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
}
.lp-icon svg { width: 22px; height: 22px; }
.lp-about { max-width: 780px; margin: 0 auto; }
.lp-about h2 { text-align: left; margin-bottom: var(--space-3); }
.lp-about p { line-height: 1.7; color: var(--gray-700); }
.lp-about p + p { margin-top: var(--space-3); }
.lp-cta .primary { padding: 12px 22px; font-size: var(--text-base); font-weight: 600; }
.lp-cta-secondary {
  display: inline-flex;
  align-items: center;
  padding: 12px 22px;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--gray-900);
  text-decoration: none;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: background 0.12s ease;
}
.lp-cta-secondary:hover { background: var(--gray-50); }

.lp-whatsapp-fab {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  z-index: 100;
  transition: transform 0.15s ease;
}
.lp-whatsapp-fab:hover { transform: scale(1.06); }
.lp-whatsapp-fab svg { width: 28px; height: 28px; }

.lp-section { max-width: 1120px; margin: 0 auto var(--space-9); padding: 0 20px; }
.lp-section h2 { font-size: 24px; text-align: center; margin: 0 0 var(--space-6); letter-spacing: -0.01em; }
.lp-feature h3, .lp-step h3 { margin: 0 0 6px; font-size: var(--text-md); }
.lp-feature p, .lp-step p { margin: 0; }
.lp-step { text-align: center; }
.lp-step-num {
  width: 30px;
  height: 30px;
  line-height: 30px;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 700;
  margin: 0 auto var(--space-3);
}

/* --- Responsive --- */
@media (max-width: 820px) {
  .lp-hero-split { grid-template-columns: 1fr; text-align: center; }
  .lp-hero-split .lp-hero-logo { margin: 0 auto var(--space-5); }
  .lp-hero-split .lp-cta { justify-content: center; }
}

@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-wrap { padding: var(--space-6) 20px; }
}

@media (max-width: 640px) {
  .container { padding: var(--space-5) 14px 48px; }
  h1 { font-size: 21px; }
  .card { padding: var(--space-4); }
  .hero-login { padding: var(--space-5); }
  .lp-hero h1 { font-size: 28px; }
  .lp-hero { padding: var(--space-8) 16px var(--space-7); }
  th, td { padding: 8px; }
}

/* --- Sohbetler listesi: kisi listesi gorunumu --- */
.chat-search { width: 100%; margin-bottom: var(--space-3); }
.chat-contact-list { display: flex; flex-direction: column; }
.chat-contact { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-2); border-bottom: 1px solid var(--gray-100); text-decoration: none; color: inherit; }
.chat-contact:last-child { border-bottom: none; }
.chat-contact:hover { background: var(--gray-50); }
.chat-avatar { width: 46px; height: 46px; border-radius: 50%; background: var(--brand-500); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; font-size: var(--text-sm); }
.chat-contact-info { flex: 1; min-width: 0; }
.chat-contact-name { font-weight: 600; }
.chat-contact-preview { color: var(--gray-500); font-size: var(--text-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-contact-count { font-size: var(--text-xs); color: var(--gray-500); background: var(--gray-100); border-radius: var(--radius-pill); padding: 2px 9px; flex-shrink: 0; }

/* --- Sohbet detayi: WhatsApp benzeri sohbet penceresi --- */
.chat-window { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--gray-100); box-shadow: var(--shadow-sm); }
.chat-header { display: flex; align-items: center; gap: var(--space-3); background: var(--brand-700); color: #fff; padding: var(--space-3) var(--space-4); }
.chat-back { color: #fff; text-decoration: none; font-size: 20px; line-height: 1; opacity: .9; }
.chat-back:hover { opacity: 1; }
.chat-avatar-header { background: rgba(255, 255, 255, .18); color: #fff; }
.chat-header-name { font-weight: 600; }
.chat-log {
  display: flex; flex-direction: column; gap: 6px;
  background-color: #e9e3d8;
  background-image: radial-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px);
  background-size: 18px 18px;
  padding: var(--space-5); max-height: 65vh; overflow-y: auto;
}
.chat-bubble-row { display: flex; }
.chat-bubble-row.chat-bubble-row-customer { justify-content: flex-start; }
.chat-bubble-row.chat-bubble-row-bot { justify-content: flex-end; }
.chat-bubble { max-width: 70%; padding: 7px 10px 9px; border-radius: 9px; box-shadow: 0 1px 1px rgba(0, 0, 0, .12); }
.chat-bubble-customer { background: #fff; border-top-left-radius: 0; }
.chat-bubble-bot { background: #d9fdd3; border-top-right-radius: 0; }
.chat-bubble-label { font-size: 11px; font-weight: 700; color: var(--brand-600); margin-bottom: 2px; }
.chat-bubble-customer .chat-bubble-label { color: var(--gray-500); }
.chat-bubble-text { white-space: pre-wrap; word-break: break-word; font-size: 14.5px; line-height: 20px; color: #111b21; }
.chat-input-bar { display: flex; align-items: flex-end; gap: var(--space-2); background: var(--gray-50); padding: var(--space-3); }
.chat-input-bar textarea { flex: 1; resize: none; border-radius: 20px; border: 1px solid var(--gray-100); padding: 10px 16px; font-family: inherit; font-size: 14px; min-height: 20px; max-height: 120px; }
.chat-input-bar textarea:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.chat-send-btn { width: 42px; height: 42px; border-radius: 50%; background: var(--brand-500); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.chat-send-btn:hover { background: var(--brand-600); }
.chat-send-btn:disabled { opacity: .55; cursor: not-allowed; }
.chat-send-btn svg { width: 20px; height: 20px; }
@media (max-width: 640px) {
  .chat-bubble { max-width: 88%; }
  .chat-log { max-height: 55vh; }
}

/* --- Randevu takvimi (public/appointments-calendar.js) --- */
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.cal-title { font-weight: 700; font-size: var(--text-md); color: var(--gray-900); }
.cal-nav {
  width: 32px; height: 32px; border-radius: var(--radius-pill); border: 1px solid var(--color-border);
  background: #fff; color: var(--gray-600); font-size: 18px; line-height: 1; cursor: pointer;
}
.cal-nav:hover { background: var(--gray-50); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-grid-headers { margin-bottom: 4px; }
.cal-day-header { text-align: center; font-size: var(--text-xs); font-weight: 600; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.03em; padding: 4px 0; }
.cal-cell {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: var(--radius-md); cursor: pointer; gap: 2px;
}
.cal-cell:not(.cal-cell-empty):hover { background: var(--gray-50); }
.cal-cell-today .cal-day-num { color: var(--brand-600); font-weight: 700; }
.cal-cell-selected { background: var(--brand-50); }
.cal-cell-selected .cal-day-num { color: var(--brand-700); font-weight: 700; }
.cal-day-num { font-size: var(--text-sm); color: var(--gray-700); }
.cal-dots { display: flex; gap: 2px; }
.cal-dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.cal-day-list-title { margin-top: var(--space-6); }
.cal-appointment-list { display: flex; flex-direction: column; gap: var(--space-3); }
.cal-appointment {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md);
}
.cal-appointment-info { min-width: 160px; }
.cal-appointment-notes { font-style: italic; margin-top: 2px; }
.cal-status-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-status-btn {
  border: 1.5px solid; border-radius: var(--radius-pill); background: #fff; padding: 5px 12px;
  font-size: var(--text-xs); font-weight: 600; cursor: pointer;
}
.cal-status-btn-active { color: #fff !important; }
