/* Randevu Takip — canlı, mobil öncelikli tema */
:root {
  --violet: #6C4CF5; --violet-d: #5236d8; --violet-l: #F1EDFF;
  --coral: #FF5C7A; --coral-l: #FFE8ED; --coral-d: #C21E45;
  --green: #12B886; --green-l: #E3F8F0; --green-d: #0C8A63;
  --yellow: #FFC93C; --yellow-l: #FFF3DC; --yellow-d: #A65F00;
  --red: #D6284B; --red-btn: #E8355A;
  --bg: #F4F5FB; --ink: #1E1B33; --ink2: #4A4664; --muted: #6B6880; --faint: #8A8699;
  --line: #E3E1F0; --track: #EEECF7;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
/* Çift dokunmada ekran büyümesin (iPhone + Android) */
html, body, a, button, input, select, textarea, label { touch-action: manipulation; }
body { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--ink); font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 15px; line-height: 1.4; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: var(--violet); }
button { font: inherit; cursor: pointer; }
.hidden, [hidden] { display: none !important; }
.i { flex-shrink: 0; display: inline-block; vertical-align: middle; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- form ---------- */
input, textarea, select {
  font: inherit; font-size: 16px; color: var(--ink); width: 100%; border: 1.5px solid var(--line);
  border-radius: 14px; padding: 13px 14px; background: #fff; outline: none;
}
select { appearance: none; -webkit-appearance: none; height: 50px; padding: 0 38px 0 14px; }
textarea { resize: none; }
input:focus, textarea:focus, select:focus, .datefield[aria-expanded="true"] { border-color: var(--violet); box-shadow: 0 0 0 4px rgba(108,76,245,.14); }
label, .label { display: block; font-size: 13px; font-weight: 600; color: var(--ink2); margin: 0 0 6px; }
label small, .label small { font-weight: 500; color: var(--muted); font-size: 13px; }
.field-err { font-size: 12px; color: var(--red); margin-top: 4px; }
.input-err, .input-err:focus { border-color: var(--red); }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.affix { position: relative; }
.affix > input { padding-right: 40px; }
.affix > .suffix { position: absolute; right: 14px; top: 13px; font-weight: 700; color: var(--muted); pointer-events: none; }
.affix > .ico-r { position: absolute; right: 12px; top: 15px; color: var(--violet); pointer-events: none; }
.affix > .ico-l { position: absolute; left: 14px; top: 15px; color: var(--faint); pointer-events: none; }
.affix > .pad-l { padding-left: 42px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.grid-dt { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* ---------- butonlar ---------- */
.btn {
  height: 54px; border: 0; border-radius: 16px; background: var(--violet); color: #fff; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; text-decoration: none; width: 100%;
}
.btn:active { transform: scale(.98); }
.btn.coral { background: var(--coral); box-shadow: 0 10px 22px rgba(255,92,122,.4); }
.btn.ghost { height: 48px; background: #fff; border: 1.5px solid var(--line); color: var(--ink2); font-size: 15px; }
.btn.sm { height: 44px; border-radius: 12px; font-size: 14px; width: auto; }
.btn.soft { background: var(--violet-l); color: var(--violet-d); height: 40px; border-radius: 12px; font-size: 14px; width: auto; padding: 0 14px; }
.btn.outline { height: 44px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); font-size: 14px; }
.btn.danger-soft { height: 44px; border-radius: 12px; background: var(--coral-l); color: var(--coral-d); font-size: 14px; }
.btn.danger { height: 44px; border-radius: 12px; background: var(--red-btn); font-size: 14px; }
.btn.dashed { height: 44px; border-radius: 12px; border: 1.5px dashed #C9C5DC; background: #fff; color: var(--ink2); font-size: 14px; }
.btn.disabled { background: var(--track); color: var(--faint); pointer-events: none; }
.iconbtn {
  width: 44px; height: 44px; flex-shrink: 0; border-radius: 14px; border: 0; background: rgba(255,255,255,.18); color: #fff;
  display: flex; align-items: center; justify-content: center; position: relative; text-decoration: none;
}
.navbtn { width: 40px; height: 40px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); display: flex; align-items: center; justify-content: center; text-decoration: none; }

/* ---------- uygulama iskeleti ---------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; background: var(--bg); }
.topbar {
  position: sticky; top: 0; z-index: 20; background: var(--violet); color: #fff;
  padding: calc(16px + env(safe-area-inset-top)) 18px 16px; display: flex; align-items: center; gap: 12px;
}
.topbar .t { flex: 1; min-width: 0; }
.topbar .eyebrow { font-size: 12px; font-weight: 600; color: #E7E1FF; letter-spacing: .04em; }
.topbar h1 { margin: 0; font-size: 21px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--coral); color: #fff; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.content { flex: 1; padding: 16px 16px 100px; display: flex; flex-direction: column; gap: 14px; }
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid #ECEAF4;
  display: flex; padding: 6px 6px calc(10px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto;
}
.tab { flex: 1; min-height: 56px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 11px; font-weight: 700; color: var(--faint); text-decoration: none; }
.tab .ic { width: 52px; height: 30px; border-radius: 15px; display: flex; align-items: center; justify-content: center; }
.tab.on { color: var(--violet); }
.tab.on .ic { background: var(--violet-l); }
.tab.coral.on { color: var(--coral); }
.tab.coral.on .ic { background: var(--coral-l); }

.card { background: #fff; border-radius: 22px; padding: 18px 16px; display: flex; flex-direction: column; gap: 14px; }
.card.tight { border-radius: 18px; padding: 14px; gap: 12px; }
h2.h { margin: 0; font-size: 17px; font-weight: 800; }
.sub { font-size: 13px; color: var(--muted); }
.empty { background: #fff; border-radius: 18px; padding: 28px 16px; text-align: center; display: flex; flex-direction: column; gap: 10px; align-items: center; font-weight: 700; }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 16px; right: 16px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 50; max-width: 528px; margin: 0 auto;
  background: var(--ink); color: #fff; border-radius: 16px; padding: 14px 16px; font-size: 14px; font-weight: 600;
  box-shadow: 0 12px 30px rgba(30,27,51,.25); animation: toast 4s forwards;
}
.toast.warn { background: #B26A00; } .toast.err { background: var(--red); }
@keyframes toast { 0% { opacity: 0; transform: translateY(10px); } 6%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; visibility: hidden; } }

/* ---------- giriş ---------- */
.login { min-height: 100dvh; background: var(--violet); position: relative; overflow: hidden; display: flex; flex-direction: column; }
.login .blob { position: absolute; border-radius: 50%; }
.login .b1 { width: 260px; height: 260px; background: var(--coral); top: -90px; right: -80px; }
.login .b2 { width: 150px; height: 150px; background: var(--yellow); top: 150px; left: -60px; }
.login .b3 { width: 90px; height: 90px; border: 14px solid var(--green); top: 64px; left: 220px; }
.login .b4 { width: 18px; height: 18px; background: #fff; top: 230px; right: 54px; }
.login .hero { position: relative; padding: 70px 26px 28px; color: #fff; display: flex; flex-direction: column; gap: 14px; max-width: 480px; width: 100%; margin: 0 auto; }
.login .logo { width: 68px; height: 68px; border-radius: 22px; background: #fff; color: var(--violet); display: flex; align-items: center; justify-content: center; box-shadow: 0 14px 30px rgba(30,27,51,.25); }
.login h1 { margin: 0; font-size: 34px; line-height: 1.1; font-weight: 800; letter-spacing: -.03em; }
.login .hero p { margin: 0; font-size: 16px; max-width: 260px; line-height: 1.45; }
.login .panel {
  position: relative; margin: auto 14px 18px; background: #fff; border-radius: 28px; padding: 24px 20px 20px;
  box-shadow: 0 24px 50px rgba(30,27,51,.28); display: flex; flex-direction: column; gap: 16px; max-width: 452px; align-self: center; width: calc(100% - 28px);
}
.login .panel h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.login .panel p { margin: 0; font-size: 14px; color: var(--muted); }
.login input { background: #F7F6FC; border-color: #F7F6FC; }
.login input:focus { background: #fff; }
.eyebtn { position: absolute; right: 4px; top: 4px; width: 44px; height: 42px; border: 0; background: none; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; margin: 0; color: var(--ink); cursor: pointer; }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check .box { width: 24px; height: 24px; border-radius: 8px; background: #fff; border: 2px solid #C9C5DC; display: flex; align-items: center; justify-content: center; color: #fff; }
.check .box svg { visibility: hidden; }
.check input:checked + .box { background: var(--violet); border-color: var(--violet); }
.check input:checked + .box svg { visibility: visible; }
.check input:focus-visible + .box { box-shadow: 0 0 0 4px rgba(108,76,245,.2); }
.alert { font-size: 13px; font-weight: 600; border-radius: 12px; padding: 10px 12px; }
.alert.err { color: var(--red); background: var(--coral-l); }
.alert.warn { color: #8A5A00; background: var(--yellow-l); }
.alert.info { color: var(--violet-d); background: var(--violet-l); }

/* ---------- ana sayfa ---------- */
.week { background: #fff; border-radius: 22px; padding: 14px 12px 12px; display: flex; flex-direction: column; gap: 12px; }
.week .head { display: flex; align-items: center; gap: 8px; }
.week .head .m { flex: 1; text-align: center; font-size: 16px; font-weight: 800; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.day {
  min-height: 66px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 6px 0; text-decoration: none; background: var(--bg); color: var(--ink); border: 1.5px solid transparent;
}
.day .dw { font-size: 11px; font-weight: 600; opacity: .85; }
.day .dn { font-size: 17px; font-weight: 800; }
.dot { width: 6px; height: 6px; border-radius: 3px; background: transparent; }
.dot.on { background: var(--coral); }
.day.today { border-color: var(--violet); background: var(--violet-l); color: var(--violet-d); }
.day.sel { background: var(--violet); color: #fff; border-color: var(--violet); }
.day.sel .dot.on { background: #fff; }
.pills { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pill { height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; text-decoration: none; background: var(--bg); color: var(--ink2); }
.pill.on { background: var(--violet-l); color: var(--violet-d); box-shadow: inset 0 0 0 1.5px var(--violet); }

.meter { background: #fff; border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.bar { height: 10px; border-radius: 5px; background: var(--track); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 5px; background: var(--green); }
.bar.warn > i { background: var(--yellow); } .bar.over > i { background: var(--red); }
.bar.thin { height: 8px; }
.left { font-size: 13px; font-weight: 700; color: var(--green-d); }
.left.over { color: var(--red); } .left.none { color: var(--muted); font-size: 12px; }

.appt { background: #fff; border-radius: 18px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.appt.cancelled { opacity: .6; }
.appt .top { display: flex; gap: 12px; align-items: flex-start; }
.datebox { width: 62px; flex-shrink: 0; border-radius: 14px; padding: 10px 0; display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--coral-l); color: var(--coral-d); }
.datebox.today { background: var(--violet); color: #fff; }
.datebox.off { background: var(--track); color: var(--muted); }
.datebox b { font-size: 16px; font-weight: 800; } .datebox span { font-size: 11px; font-weight: 600; }
.appt .who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.appt .who b { font-size: 15px; } .appt .who span { font-size: 13px; color: var(--muted); }
.appt .who a { font-size: 13px; font-weight: 600; text-decoration: none; }
.tag { font-size: 12px; font-weight: 700; border-radius: 99px; padding: 5px 10px; white-space: nowrap; }
.tag.green { color: var(--green-d); background: var(--green-l); }
.tag.red { color: var(--coral-d); background: var(--coral-l); }
.tag.violet { color: var(--violet-d); background: var(--violet-l); }
.tag.yellow { color: var(--yellow-d); background: var(--yellow-l); }
.tag.xs { font-size: 11px; padding: 3px 8px; }
.note { font-size: 13px; color: var(--ink2); background: var(--bg); border-radius: 10px; padding: 8px 10px; white-space: pre-line; }
.acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.acts form { display: contents; }
.confirm { background: #FFF4F6; border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.confirm > span { font-size: 13px; font-weight: 600; color: #8A1530; }
.daysep { font-size: 13px; font-weight: 800; color: var(--muted); margin: 4px 2px -4px; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- randevu formu ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; margin-top: 8px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; border: 1.5px solid var(--line); background: #fff; color: var(--ink2); border-radius: 99px; padding: 7px 13px; font-size: 13px; font-weight: 700; }
.chip.on { border-color: var(--violet); background: var(--violet-l); color: var(--violet-d); }
.datefield {
  width: 100%; height: 50px; border-radius: 14px; background: #fff; font-size: 16px; color: var(--ink); border: 1.5px solid var(--line);
  display: flex; align-items: center; gap: 8px; padding: 0 12px 0 14px; text-align: left;
}
.datefield span { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.datefield.empty span { color: var(--faint); }
.datefield svg { color: var(--violet); }
.cal { border: 1.5px solid var(--line); border-radius: 18px; padding: 12px; display: flex; flex-direction: column; gap: 10px; margin-top: -4px; box-shadow: 0 12px 28px rgba(30,27,51,.12); }
.cal .head { display: flex; align-items: center; gap: 8px; }
.cal .head .m { flex: 1; text-align: center; font-size: 15px; font-weight: 800; }
.cal .dows, .cal .cells { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal .dows { text-align: center; font-size: 11px; font-weight: 700; color: var(--faint); }
.cell { height: 42px; border-radius: 12px; border: 0; background: none; color: var(--ink); font-size: 14px; font-weight: 700; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.cell .dot { width: 5px; height: 5px; }
.cell:disabled { color: #C9C5DC; cursor: default; }
.cell.today { box-shadow: inset 0 0 0 1.5px var(--violet); background: var(--violet-l); color: var(--violet-d); }
.cell.on { background: var(--violet); color: #fff; box-shadow: none; }
.cell.on .dot.on { background: #fff; }
.cal .foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); }
.cal .foot i { display: inline-block; width: 7px; height: 7px; border-radius: 4px; background: var(--coral); margin-right: 6px; }
.cal .foot button { border: 0; background: none; color: var(--violet); font-size: 13px; font-weight: 700; padding: 8px 4px; }
.warnbox { font-size: 12px; font-weight: 600; color: var(--yellow-d); background: var(--yellow-l); border-radius: 12px; padding: 8px 12px; margin-top: -4px; }

/* ---------- yemek ---------- */
.big { font-size: 22px; font-weight: 800; }
.mrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-top: 1px solid #F0EEF6; }
.mrow:first-child { border-top: 0; }
.mrow.over { background: linear-gradient(90deg, #FFF8EA, transparent); margin: 0 -14px; padding: 12px 14px; }
.mrow .l { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mrow .l b { font-size: 14px; font-weight: 600; } .mrow .l span { font-size: 12px; color: var(--muted); }
.mrow .r { display: flex; align-items: center; gap: 8px; }
.mrow .amt { font-size: 15px; font-weight: 800; white-space: nowrap; }
.xbtn { width: 32px; height: 32px; border: 0; border-radius: 10px; background: var(--bg); color: var(--muted); display: flex; align-items: center; justify-content: center; }
.listcard { background: #fff; border-radius: 18px; padding: 4px 14px; }

/* ---------- kullanıcılar ---------- */
.avatar { width: 44px; height: 44px; border-radius: 14px; color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.kv { background: var(--bg); border-radius: 12px; padding: 8px 10px; min-width: 0; }
.kv small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.kv b { font-size: 14px; font-family: ui-monospace, Menlo, Consolas, monospace; word-break: break-all; }
.seg { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { height: 48px; border-radius: 14px; border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; color: var(--ink2); background: #fff; cursor: pointer; }
.seg input:checked + span { border-color: var(--violet); background: var(--violet-l); color: var(--violet-d); }
.seg input:focus-visible + span { box-shadow: 0 0 0 4px rgba(108,76,245,.2); }

/* ---------- bildirimler ---------- */
.notif { background: #fff; border-radius: 18px; padding: 14px; display: flex; gap: 12px; text-decoration: none; color: inherit; }
.notif.unread { box-shadow: inset 4px 0 0 var(--coral); }
.notif .ni { width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: var(--violet); }
.notif .ni.coral { background: var(--coral); }
.notif .ni.green { background: var(--green); }
.notif .nb { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.notif .nb b { font-size: 15px; } .notif .nb span { font-size: 13px; color: var(--ink2); } .notif .nb small { font-size: 12px; color: var(--muted); }
.pushbox { border: 1.5px dashed var(--violet); background: var(--violet-l); color: var(--violet-d); border-radius: 16px; padding: 12px 14px; font-size: 13px; font-weight: 600; display: flex; flex-direction: column; gap: 10px; }

@media (min-width: 600px) {
  .content { padding-top: 22px; }
}
