/* ==========================================================================
   QR Menü Pro — platform tasarım sistemi (panel, giriş, landing, durum sayfaları)
   Müşteri menüsü ayrı bir tasarım dili kullanır: /css/menu.css
   ========================================================================== */

:root {
  /* Renk */
  --bg: #F6F5F1;
  --surface: #FFFFFF;
  --surface-2: #FAF9F6;
  --surface-3: #F1EFEA;
  --border: #E5E2DA;
  --border-strong: #D3CFC4;
  --text: #1B1F1C;
  --text-2: #3D433F;
  --muted: #6A706B;
  --subtle: #8E938F;

  --brand: #2F5D4A;
  --brand-600: #264D3D;
  --brand-700: #1E3D30;
  --brand-50: #EDF3EF;
  --brand-100: #D9E7DF;
  --accent: #A8743F;
  --accent-50: #F8F0E6;

  --success: #18794E;
  --success-50: #E9F6EF;
  --warning: #A15C07;
  --warning-50: #FDF3E1;
  --danger: #B42318;
  --danger-50: #FDECEA;
  --info: #1D5FB4;
  --info-50: #EAF2FC;

  /* Tipografi */
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-brand: 'Calistoga', Georgia, serif;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-md: 14px;
  --fs-base: 15px;
  --fs-lg: 17px;
  --fs-xl: 20px;
  --fs-2xl: 24px;
  --fs-3xl: 30px;
  --fs-4xl: 40px;

  /* Aralık */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 20px;
  --s-6: 24px;
  --s-8: 32px;
  --s-10: 40px;
  --s-12: 48px;

  /* Köşe, gölge */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-full: 999px;
  --shadow-xs: 0 1px 2px rgba(27, 31, 28, .05);
  --shadow-sm: 0 1px 2px rgba(27, 31, 28, .06), 0 1px 3px rgba(27, 31, 28, .06);
  --shadow-md: 0 4px 12px rgba(27, 31, 28, .08), 0 1px 3px rgba(27, 31, 28, .05);
  --shadow-lg: 0 18px 40px rgba(27, 31, 28, .14), 0 4px 10px rgba(27, 31, 28, .06);
  --ring: 0 0 0 3px rgba(47, 93, 74, .22);

  /* Bileşen boyutları */
  --h-sm: 32px;
  --h-md: 40px;
  --h-lg: 48px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.01em; color: var(--text); }
p { margin: 0; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-700); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ----------------------------------------------------------------- marka */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { display: block; width: 34px; height: 34px; flex-shrink: 0; }
.brand-name { font-family: var(--font-brand); font-size: 19px; letter-spacing: .2px; white-space: nowrap; }
.brand-name em { font-style: normal; color: var(--accent); }

/* --------------------------------------------------------------- butonlar */
.btn {
  --btn-h: var(--h-md);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--btn-h); padding: 0 16px; border-radius: var(--r-md);
  border: 1px solid transparent; background: var(--surface); color: var(--text);
  font-size: var(--fs-md); font-weight: 600; line-height: 1; white-space: nowrap;
  text-decoration: none; cursor: pointer; user-select: none;
  transition: background-color .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
}
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-sm { --btn-h: var(--h-sm); padding: 0 12px; font-size: var(--fs-sm); border-radius: var(--r-sm); }
.btn-sm svg { width: 16px; height: 16px; }
.btn-lg { --btn-h: var(--h-lg); padding: 0 22px; font-size: var(--fs-base); }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--brand-600); color: #fff; }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); box-shadow: var(--shadow-xs); }
.btn-secondary:hover:not(:disabled) { background: var(--surface-2); border-color: #C3BEB1; color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #912018; color: #fff; }
.btn-danger-ghost { background: transparent; color: var(--danger); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--danger-50); color: var(--danger); }
.btn-icon { width: var(--btn-h); padding: 0; }
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-color: rgba(255, 255, 255, .9) rgba(255, 255, 255, .9) transparent transparent;
  animation: spin .7s linear infinite;
}
.btn-secondary.is-loading::after, .btn-ghost.is-loading::after { border-color: var(--brand) var(--brand) transparent transparent; }

@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
  display: inline-block; width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--brand-100); border-top-color: var(--brand);
  animation: spin .7s linear infinite;
}

/* ---------------------------------------------------------------- formlar */
.form { display: grid; gap: var(--s-4); }
.field { display: grid; gap: 6px; min-width: 0; }
.field > label, .field-label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-2); }
.field-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.field .optional { font-weight: 400; color: var(--subtle); }
.input, .field input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]),
.field select, .field textarea, .select {
  width: 100%; height: var(--h-md); padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--surface); color: var(--text); font-size: var(--fs-md);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
  -webkit-appearance: none; appearance: none;
}
.field textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.field select, .select {
  padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236A706B' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px;
}
.input:focus, .field input:focus, .field select:focus, .field textarea:focus, .select:focus {
  outline: none; border-color: var(--brand); box-shadow: var(--ring);
}
.field input::placeholder, .field textarea::placeholder, .input::placeholder { color: var(--subtle); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field.has-error input:focus, .field.has-error textarea:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .18); }
.field-error { font-size: var(--fs-sm); color: var(--danger); }
.hint { font-size: var(--fs-xs); color: var(--muted); }
.input-group { display: flex; align-items: stretch; }
.input-group .input-prefix {
  display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--border-strong);
  border-right: 0; border-radius: var(--r-md) 0 0 var(--r-md); background: var(--surface-3);
  color: var(--muted); font-size: var(--fs-sm); white-space: nowrap; max-width: 55%; overflow: hidden; text-overflow: ellipsis;
}
.input-group input { border-radius: 0 var(--r-md) var(--r-md) 0 !important; min-width: 0; }

.form-error {
  padding: 10px 12px; border-radius: var(--r-md); background: var(--danger-50);
  color: var(--danger); font-size: var(--fs-sm); font-weight: 500;
}
.form-success {
  padding: 10px 12px; border-radius: var(--r-md); background: var(--success-50);
  color: var(--success); font-size: var(--fs-sm); font-weight: 500;
}

.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--fs-md); }
.check input { width: 18px; height: 18px; accent-color: var(--brand); margin: 0; }

/* Anahtar (switch) */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: var(--fs-md); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track {
  width: 38px; height: 22px; border-radius: 999px; background: #CFCBC0; position: relative; flex-shrink: 0;
  transition: background-color .15s var(--ease);
}
.switch-track::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .15s var(--ease);
}
.switch input:checked + .switch-track { background: var(--brand); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { box-shadow: var(--ring); }
.switch input:disabled + .switch-track { opacity: .5; }

/* --------------------------------------------------------- rozet & etiket */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2);
}
.badge-success { background: var(--success-50); color: var(--success); }
.badge-warning { background: var(--warning-50); color: var(--warning); }
.badge-danger { background: var(--danger-50); color: var(--danger); }
.badge-info { background: var(--info-50); color: var(--info); }
.badge-brand { background: var(--brand-50); color: var(--brand); }
.badge-accent { background: var(--accent-50); color: var(--accent); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ================================================================ AUTH */
.auth-page { background: var(--surface); }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-card {
  width: 100%; max-width: 420px; margin: 0 auto; padding: var(--s-12) var(--s-6);
  align-self: center; display: grid; gap: var(--s-2);
}
.auth-card .brand { margin-bottom: var(--s-8); }
.auth-card h1 { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: -0.02em; }
.auth-lead { color: var(--muted); margin-bottom: var(--s-6); }
.auth-alt { margin-top: var(--s-6); text-align: center; font-size: var(--fs-md); color: var(--muted); }
.link-sm { font-size: var(--fs-sm); }
.auth-aside {
  background: var(--brand-700);
  background-image:
    radial-gradient(circle at 20% 15%, rgba(168, 116, 63, .35), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(237, 243, 239, .12), transparent 40%);
  color: #F2EEE6; display: flex; align-items: flex-end; padding: var(--s-12);
}
.auth-aside-inner { max-width: 440px; }
.auth-quote { font-family: var(--font-brand); font-size: 32px; line-height: 1.2; margin-bottom: var(--s-6); }
.auth-aside ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; color: rgba(242, 238, 230, .85); }
.auth-aside li { display: flex; gap: 10px; align-items: center; }
.auth-aside li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.verify-state { display: grid; justify-items: start; gap: var(--s-4); min-height: 60px; }

@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-card { padding: var(--s-8) var(--s-4); align-self: start; }
  .auth-card .brand { margin-bottom: var(--s-6); }
  .auth-card h1 { font-size: var(--fs-2xl); }
}

/* ============================================================== STATUS */
.status-page { background: var(--bg); }
.status-wrap { min-height: 100vh; display: grid; place-items: center; padding: var(--s-6) var(--s-4); }
.status-card {
  max-width: 460px; width: 100%; text-align: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s-10) var(--s-8);
  box-shadow: var(--shadow-sm); display: grid; gap: var(--s-3); justify-items: center;
}
.status-card h1 { font-size: var(--fs-2xl); }
.status-card p { color: var(--muted); }
.status-card .btn { margin-top: var(--s-3); }
.status-code { font-family: var(--font-brand); font-size: 56px !important; line-height: 1; color: var(--brand) !important; }
.status-warning .status-code { color: var(--warning) !important; }

/* ============================================================= LANDING */
.landing { background: var(--surface); }
.landing-nav {
  max-width: 1160px; margin: 0 auto; padding: var(--s-5) var(--s-6);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
}
.landing-nav nav { display: flex; gap: var(--s-2); }
.hero {
  max-width: 1160px; margin: 0 auto; padding: var(--s-12) var(--s-6) var(--s-12);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: var(--s-12); align-items: center;
}
.eyebrow { font-size: var(--fs-sm); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s-4); }
.hero h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.08; letter-spacing: -0.03em; font-weight: 700; }
.lead { font-size: var(--fs-lg); color: var(--muted); margin-top: var(--s-5); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-8); }
.hero-visual { display: flex; justify-content: center; }
.phone {
  width: 280px; height: 560px; border-radius: 40px; background: #121513; padding: 12px;
  box-shadow: var(--shadow-lg); transform: rotate(-3deg);
}
.phone-screen { width: 100%; height: 100%; border-radius: 30px; background: #F9F6F0; overflow: hidden; }
.pv-hero { height: 170px; background: linear-gradient(180deg, #2B3A33, #1E2A24); display: grid; justify-items: center; align-content: center; gap: 8px; }
.pv-logo { width: 54px; height: 54px; border-radius: 50%; border: 3px solid #B07D48; background: #8FA396; }
.pv-title { width: 120px; height: 12px; border-radius: 6px; background: #F2EEE6; }
.pv-sub { width: 80px; height: 8px; border-radius: 4px; background: #B07D48; }
.pv-chips { display: flex; gap: 6px; padding: 14px 14px 6px; }
.pv-chips span { height: 24px; flex: 1; border-radius: 12px; background: #fff; border: 1px solid #DDD6C8; }
.pv-chips span:first-child { background: #1F2421; }
.pv-card { display: flex; gap: 10px; margin: 8px 14px; padding: 10px; background: #FFFDF9; border: 1px solid #EAE3D6; border-radius: 14px; }
.pv-img { width: 54px; height: 54px; border-radius: 10px; background: linear-gradient(135deg, #C8A27C, #8B5E3C); flex-shrink: 0; }
.pv-lines { display: grid; gap: 6px; flex: 1; align-content: center; }
.pv-lines i { display: block; height: 8px; border-radius: 4px; background: #E7E1D6; }
.pv-lines i:first-child { width: 70%; background: #3B3F3C; }
.pv-lines b { display: block; width: 40px; height: 9px; border-radius: 4px; background: #B07D48; }
.features, .steps { max-width: 1160px; margin: 0 auto; padding: var(--s-12) var(--s-6); }
.features h2, .steps h2 { font-size: var(--fs-3xl); letter-spacing: -0.02em; margin-bottom: var(--s-8); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.feature { padding: var(--s-6); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-2); }
.feature h3 { font-size: var(--fs-lg); margin-bottom: var(--s-2); }
.feature p { color: var(--muted); font-size: var(--fs-md); }
.step-list { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.step-list li { counter-increment: step; display: grid; gap: 6px; padding: var(--s-6); border-radius: var(--r-lg); background: var(--brand-50); }
.step-list li::before { content: counter(step); font-family: var(--font-brand); font-size: 28px; color: var(--brand); }
.step-list span { color: var(--muted); font-size: var(--fs-md); }
.landing-footer { border-top: 1px solid var(--border); padding: var(--s-6); text-align: center; color: var(--muted); font-size: var(--fs-sm); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: var(--s-6); gap: var(--s-8); }
  .hero-visual { display: none; }
  .feature-grid, .step-list { grid-template-columns: 1fr; }
  .landing-nav { padding: var(--s-4); }
  .landing-nav .brand-name { font-size: 17px; }
  .features, .steps { padding: var(--s-8) var(--s-4); }
  .hero { padding-left: var(--s-4); padding-right: var(--s-4); }
}

/* =============================================================== PRINT */
.print-page { background: var(--surface-3); }
.print-toolbar { display: flex; justify-content: center; gap: var(--s-2); padding: var(--s-4); }
.print-sheet { display: grid; place-items: center; padding: var(--s-6) var(--s-4) var(--s-12); }
.qr-card {
  width: 100%; max-width: 380px; background: #fff; border-radius: 24px; padding: 32px 28px;
  text-align: center; display: grid; gap: 10px; justify-items: center; box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.qr-card-logo { width: 72px; height: 72px; object-fit: cover; border-radius: 50%; }
.qr-card h1 { font-family: var(--font-brand); font-size: 26px; font-weight: 400; }
.qr-card-table { font-weight: 700; font-size: 18px; color: var(--accent); }
.qr-card-code { width: 260px; max-width: 100%; }
.qr-card-code svg { width: 100%; height: auto; display: block; }
.qr-card-cta { font-weight: 600; }
.qr-card-url { font-size: 12px; color: var(--muted); word-break: break-all; }
@media print {
  .no-print { display: none !important; }
  .print-page { background: #fff; }
  .print-sheet { padding: 0; }
  .qr-card { box-shadow: none; border: 1px solid #ccc; }
}

.noscript { padding: var(--s-6); text-align: center; }

/* Google ile giriş */
.btn-google { background: #fff; border-color: var(--border-strong); color: var(--text); box-shadow: var(--shadow-xs); }
.btn-google:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.btn-google svg { width: 18px; height: 18px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--subtle); font-size: var(--fs-sm); }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
