/* =============================================================
   X RANDEVU — ortak taban stil (3 uygulama). Beyaz, sade, mobil öncelikli.
   --primary / --accent salon temasından JS ile atanır.
   ============================================================= */
:root {
  --bg: #f6f7f9; --surface: #ffffff; --surface-2: #f1f2f5;
  --text: #15171a; --muted: #6b7280; --border: #e5e7eb;
  --primary: #141416; --on-primary: #ffffff;
  --accent: #16a34a; --on-accent: #ffffff;
  --free: #16a34a; --free-soft: #ecfdf3; --busy: #dc2626; --busy-soft: #fdf1f1; --warn: #b45309; --warn-soft: #fff7ed;
  --radius: 16px; --radius-sm: 10px;
  --shadow: 0 6px 20px rgba(20, 20, 22, .06); --shadow-lg: 0 16px 48px rgba(20, 20, 22, .16);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input, select, textarea { font-family: inherit; }
a { color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.h1 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; margin: 6px 0 14px; text-wrap: balance; }
.h2 { font-size: 17px; font-weight: 800; margin: 0 0 10px; }

/* Düğmeler */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none; transition: transform .06s, background .15s, opacity .15s, border-color .15s; white-space: nowrap; }
.btn:hover { border-color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.btn.primary:hover { opacity: .92; }
.btn.accent { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn.danger { color: var(--busy); border-color: #f2c7c7; background: var(--busy-soft); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn.wa { color: #128C4B; background: #f0fbf4; border-color: #cfe9d8; }
.btn.wa:hover { border-color: #25D366; }
.btn svg { width: 16px; height: 16px; flex: none; }
.icon-btn { width: 36px; height: 36px; padding: 0; border-radius: 10px; }

/* Form */
.field { display: block; margin-top: 12px; }
.field > span, .field > label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 6px; }
input, select, textarea { width: 100%; padding: 12px 14px; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 12px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 12%, transparent); }
textarea { min-height: 80px; resize: vertical; }
input[type="checkbox"] { width: auto; }
input[type="color"] { padding: 4px; height: 44px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .grid2 { grid-template-columns: 1fr; } }
.err { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--busy-soft); color: var(--busy); font-size: 14px; font-weight: 600; }
.ok-box { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--free-soft); color: var(--free); font-size: 14px; font-weight: 600; }

/* Kart / liste */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.empty { padding: 22px 12px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--border); border-radius: var(--radius); }
.pill { display: inline-block; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; background: var(--free-soft); color: var(--free); white-space: nowrap; }
.pill.cancelled, .pill.past { background: var(--surface-2); color: var(--muted); }
.pill.online { background: color-mix(in srgb, var(--primary) 10%, white); color: var(--primary); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.section-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 8px; }
.avatar { width: 100%; aspect-ratio: 1; border-radius: 12px; background: linear-gradient(145deg, #eeeff2, #d9dbe1); overflow: hidden; display: grid; place-items: center; font-weight: 800; font-size: 34px; color: #4b5059; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-av { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 11px; font-weight: 800; overflow: hidden; flex: none; }
.mini-av img { width: 100%; height: 100%; object-fit: cover; }

/* Modal */
dialog { border: none; padding: 0; background: transparent; max-width: 100vw; max-height: 100dvh; }
dialog::backdrop { background: rgba(20, 20, 22, .4); }
.modal { width: min(560px, calc(100vw - 24px)); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); max-height: calc(100dvh - 24px); overflow: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; font-weight: 800; }
.modal-body { padding: 6px 18px 18px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }

/* Bildirim / yükleniyor */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 700; color: #fff; background: #141416; box-shadow: var(--shadow-lg); max-width: 92vw; text-align: center; }
.toast.success { background: var(--free); } .toast.error { background: var(--busy); } .toast.warn { background: var(--warn); }
.loading { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.spinner { width: 36px; height: 36px; border: 4px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
