/* Kapia ortak tasarim dili. Renkler degisken: logo/marka degisirse yalniz burasi. */
:root {
  --ink: #14232B;        /* derin deniz murekkebi */
  --ink-2: #213540;
  --ink-3: #31505C;
  --sand: #F4EEE4;       /* kum */
  --sand-2: #EBE3D5;
  --sand-3: #DDD2C0;
  --paper: #FFFCF7;
  --tile: #C8643B;       /* kiremit */
  --tile-soft: #F3DACB;
  --sea: #2F6F6A;        /* zeytin-deniz */
  --sea-soft: #D6E6E2;
  --amber: #B7832F;
  --amber-soft: #F3E4C5;
  --rose: #B23A2B;
  --rose-soft: #F5D6D0;
  --stone: #6E7A7E;
  --line: rgba(20, 35, 43, .12);
  --line-2: rgba(20, 35, 43, .2);
  --muted: #5C6A70;
  --brass: #B8925A;
  --brass-2: #D8BC8C;

  --f-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --f-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 18px;
  --shadow-1: 0 1px 0 rgba(20,35,43,.04), 0 1px 3px rgba(20,35,43,.06);
  --shadow-2: 0 10px 30px -12px rgba(20,35,43,.28), 0 2px 6px rgba(20,35,43,.06);
  --focus: 0 0 0 3px rgba(200, 100, 59, .35);
  --ease: cubic-bezier(.2,.7,.2,1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--sand); color: var(--ink);
  font: 500 15px/1.5 var(--f-body); font-feature-settings: 'tnum' 1, 'ss01' 1;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; letter-spacing: -.01em; margin: 0; font-variation-settings: 'opsz' 72; }
h1 { font-size: clamp(26px, 3vw, 34px); line-height: 1.1; }
h2 { font-size: 22px; line-height: 1.2; }
h3 { font-size: 17px; line-height: 1.3; }
p { margin: 0 0 .6em; }
a { color: var(--sea); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; letter-spacing: .02em; }
.num { font-variant-numeric: tabular-nums; }
.eyebrow { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 720px) { .grid2, .grid3 { grid-template-columns: 1fr; } }

/* Dugmeler */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--paper); color: var(--ink);
  font-weight: 650; font-size: 14px; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease);
}
.btn:hover { background: #fff; border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: var(--sand); border-color: var(--ink); }
.btn.primary:hover { background: var(--ink-2); }
.btn.accent { background: var(--tile); color: #fff; border-color: var(--tile); }
.btn.accent:hover { background: #b65733; }
.btn.sea { background: var(--sea); color: #fff; border-color: var(--sea); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: rgba(20,35,43,.06); }
.btn.danger { color: var(--rose); border-color: rgba(178,58,43,.35); }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.icon-btn { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; border: 1px solid transparent; background: transparent; cursor: pointer; color: inherit; }
.icon-btn:hover { background: rgba(20,35,43,.07); }

/* Form */
.field { display: grid; gap: 6px; }
.field > span, .label { font-size: 12.5px; font-weight: 700; color: var(--ink-3); letter-spacing: .01em; }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: var(--r-s); border: 1px solid var(--line-2);
  background: #fff; transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 84px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--tile); box-shadow: var(--focus); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--sea); }
.hint { font-size: 12.5px; color: var(--muted); }
.error-text { color: var(--rose); font-size: 13px; font-weight: 600; }

/* Kart, rozet */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px; box-shadow: var(--shadow-1); }
.card.flat { box-shadow: none; }
.card-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.card-h h2, .card-h h3 { flex: 1; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--sand-2); color: var(--ink-3); white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.st-pending { background: var(--amber-soft); color: #81591A; }
.st-confirmed { background: var(--sea-soft); color: #1E4F4B; }
.st-checked_in { background: var(--ink); color: var(--sand); }
.st-checked_out { background: var(--sand-2); color: var(--stone); }
.st-cancelled, .st-no_show { background: #EEE; color: #7a7a7a; text-decoration: line-through; }
.st-overbook { background: var(--rose); color: #fff; }
.tag-warn { background: var(--tile-soft); color: #8E3F1F; }
.tag-ok { background: var(--sea-soft); color: #1E4F4B; }
.tag-bad { background: var(--rose-soft); color: #8A2A1E; }

/* Imza: pirinc oda anahtari etiketi */
.key {
  --kw: 64px;
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-width: var(--kw); height: 30px; padding: 0 12px 0 22px; border-radius: 999px 10px 10px 999px;
  background: linear-gradient(160deg, var(--brass-2), var(--brass) 70%);
  color: #2b2115; font-family: var(--f-display); font-weight: 600; font-size: 14px; letter-spacing: .01em;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 -1px 0 rgba(0,0,0,.12), 0 1px 2px rgba(20,35,43,.15);
  white-space: nowrap;
}
.key::before { content: ''; position: absolute; left: 8px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%; background: var(--sand); box-shadow: inset 0 1px 1px rgba(0,0,0,.35); }
.key.none { background: transparent; border: 1px dashed var(--line-2); color: var(--muted); box-shadow: none; font-family: var(--f-body); font-size: 12.5px; }
.key.none::before { background: var(--line-2); box-shadow: none; }
.key.sm { height: 24px; font-size: 12.5px; padding: 0 9px 0 18px; min-width: 0; }
.key.sm::before { left: 6px; width: 6px; height: 6px; margin-top: -3px; }

/* Tablo */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; padding: 10px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: rgba(255,255,255,.6); }
.table .r { text-align: right; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 720px) {
  .table.cards thead { display: none; }
  .table.cards tr { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .table.cards td { border: 0; padding: 0; }
  .table.cards td[data-hide-sm] { display: none; }
}

/* Modal + cekmece */
.overlay { position: fixed; inset: 0; background: rgba(20,35,43,.42); backdrop-filter: blur(2px); z-index: 80; display: grid; place-items: center; padding: 16px; animation: fade .18s var(--ease); }
.modal { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--paper); border-radius: 22px; padding: 22px; box-shadow: var(--shadow-2); animation: rise .22s var(--ease); }
.modal.wide { width: min(860px, 100%); }
.modal-h { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.modal-h h2 { flex: 1; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.drawer-wrap { position: fixed; inset: 0; z-index: 70; background: rgba(20,35,43,.32); animation: fade .18s var(--ease); }
.drawer { position: absolute; right: 0; top: 0; bottom: 0; width: min(640px, 100%); background: var(--sand); overflow: auto; box-shadow: var(--shadow-2); animation: slide .24s var(--ease); }
.drawer-h { position: sticky; top: 0; z-index: 2; background: var(--sand); display: flex; gap: 12px; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-b { padding: 18px 20px 40px; }
@media (max-width: 720px) {
  .overlay { align-items: end; padding: 0; }
  .modal { border-radius: 22px 22px 0 0; max-height: 92vh; }
}
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes slide { from { transform: translateX(30px); opacity: .4; } }

/* Bildirim */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 120; display: grid; gap: 8px; width: min(440px, calc(100% - 32px)); }
.toast { background: var(--ink); color: var(--sand); padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-2); font-weight: 600; font-size: 14px; animation: rise .2s var(--ease); }
.toast.err { background: var(--rose); color: #fff; }
@media (max-width: 860px) { .toasts { bottom: 84px; } }

.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 4px; }
.skeleton { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--sand-2), #f7f2ea, var(--sand-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Maskeli alan */
.masked { display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.masked button { border: 0; background: none; color: var(--sea); font-weight: 700; font-size: 12px; cursor: pointer; padding: 2px 4px; border-radius: 4px; }
.masked button:hover { background: var(--sea-soft); }

/* Yer tutucu sayfa */
body.placeholder { display: grid; place-items: center; min-height: 100vh; text-align: center; padding: 24px; }
body.placeholder main { max-width: 420px; }
body.placeholder h1 { margin: 14px 0 8px; font-size: 40px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
[hidden] { display: none !important; }
