/* ==========================================================================
   Trakya Teknik Servis | app.css
   Müşteri uygulaması (/uygulama/), ekip paneli (/panel/) ve sitedeki
   uygulama bileşenleri (yükleme bandı, takip kodu bildirimi).
   main.css tokenlarını kullanır.
   ========================================================================== */

:root {
  --st-yeni: var(--accent);
  --st-arandi: #5868D8;
  --st-randevu: #1C8FD0;
  --st-yolda: #0E9384;
  --st-atolyede: #B7791F;
  --st-tamamlandi: var(--ok);
  --st-iptal: var(--muted);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

/* ---------- Sitedeki parçalar ---------- */
.notice--code { color: var(--ink); background: color-mix(in srgb, var(--ok) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }
.notice--code > .ic { color: var(--ok); }
.notice--code p { font-weight: 500; }
.notice__code { margin-top: 6px; }
.notice__code strong { font: 800 1.35rem/1 var(--font-d); letter-spacing: .08em; color: var(--ink); }
.notice__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.notice__acts .btn { --h: 42px; padding: 0 16px; font-size: .95rem; }

.appbar {
  position: fixed; right: 12px; bottom: calc(82px + var(--safe-b)); z-index: 31;
  display: flex; align-items: center; gap: 0; padding: 4px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 999px;
  box-shadow: 0 6px 18px -8px rgba(16, 19, 58, .35);
  opacity: 0; transform: translateY(8px) scale(.98); transform-origin: right bottom;
  transition: opacity 220ms var(--ease-out), transform 260ms var(--ease-out);
}
.appbar.is-in { opacity: 1; transform: none; }
.appbar__main { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 4px; border: 0; background: none; color: var(--ink); font: 600 .82rem/1 var(--font-b); border-radius: 999px; }
.appbar__main:active { transform: scale(.97); }
.appbar__main img { width: 26px; height: 26px; border-radius: 7px; }
.appbar__x { width: 30px; height: 30px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; border-radius: 50%; }
.appbar__x .ic { width: 14px; height: 14px; }
.appbar__tip { position: absolute; right: 0; bottom: calc(100% + 8px); width: 230px; padding: 10px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); font-size: .8rem; line-height: 1.4; color: var(--ink); }
.appbar__tip[hidden] { display: none; }
@media (min-width: 761px) { .appbar { display: none; } }

/* ---------- Ortak uygulama kabuğu ---------- */
body.app { min-height: 100vh; min-height: 100dvh; -webkit-tap-highlight-color: transparent; overscroll-behavior-y: contain; }
body.app .custom-logo { height: 34px; }
.btn--wa { background: var(--wa); color: #fff; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--link); font-weight: 700; text-decoration: underline; text-underline-offset: .18em; }
.empty-app { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-app > .ic { width: 40px; height: 40px; color: var(--accent); }
.empty-app b { color: var(--ink); }
@keyframes shimmer { to { background-position: -200% 0; } }
.pc--sk, .rc--sk { min-height: 112px; border: 0; background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; }
.rc--sk span { display: none; }
@media (prefers-reduced-motion: reduce) { .pc--sk, .rc--sk { animation: none; } }

/* ---------- Müşteri uygulaması ---------- */
.ah {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + var(--safe-t)) 16px 10px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line);
}
.ah__btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); transition: transform 160ms var(--ease-out); }
.ah__btn:active { transform: scale(.94); }
.ab { max-width: 560px; margin: 0 auto; padding: 20px 16px calc(100px + var(--safe-b)); }
.ab__h1 { font-size: clamp(1.7rem, 1.3rem + 2vw, 2.2rem); letter-spacing: -.03em; margin: 10px 0 18px; }
.ab__lead { color: var(--muted); margin: -8px 0 20px; }
.tabp[hidden] { display: none; }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick a { text-decoration: none; transition: transform 160ms var(--ease-out); }
.quick a:active { transform: scale(.97); }
.quick__main { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 20px; border-radius: 22px; background: var(--accent); color: var(--on-accent); box-shadow: 0 14px 30px -14px color-mix(in srgb, var(--accent) 90%, transparent); }
.quick__main > .ic { width: 34px; height: 34px; }
.quick__main > .ic:last-child { width: 22px; height: 22px; margin-left: auto; }
.quick__main span { display: grid; gap: 2px; }
.quick__main strong { font: 700 1.3rem/1.15 var(--font-d); }
.quick__main small { font-size: .9rem; opacity: .85; }
.quick__item { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 96px; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); font-weight: 650; }
.quick__item .ic { width: 26px; height: 26px; color: var(--link); }
.quick__item--wa .ic { color: var(--wa); }

.last { margin-top: 14px; }
.last__in { display: grid; gap: 2px; padding: 16px 18px; border-radius: 20px; background: var(--brand-soft); color: var(--ink); text-decoration: none; border: 1px solid var(--line); }
.last__l { font-size: .82rem; color: var(--muted); font-weight: 600; }
.last__s { font: 700 1.2rem/1.25 var(--font-d); color: var(--link); }
.last__d { font-size: .92rem; color: var(--muted); }

.install { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px dashed var(--line-strong); }
.install img { width: 52px; height: 52px; border-radius: 14px; }
.install > div { flex: 1; }
.install__t { font-weight: 700; }
.install__d { font-size: .88rem; color: var(--muted); }
.install .btn { --h: 42px; padding: 0 16px; }
.install[hidden] { display: none; }

.assure { list-style: none; display: grid; gap: 10px; margin-top: 24px; color: var(--muted); font-size: .92rem; }
.assure li { display: flex; gap: 10px; align-items: center; }
.assure .ic { color: var(--accent); }

.aform { gap: 16px; }
.devs { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.devs legend { font-weight: 650; font-size: .95rem; margin-bottom: 8px; }
.dev { position: relative; }
.dev input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.dev > span { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 12px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--field); font-weight: 600; font-size: .94rem; line-height: 1.2; transition: border-color 160ms ease, background-color 160ms ease; }
.dev .ic { color: var(--muted); }
.dev input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.dev input:checked + span .ic { color: var(--accent); }
.dev input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.aform .field__err.is-on { display: block; }
.btn--block { width: 100%; }

.done { text-align: center; display: grid; justify-items: center; gap: 12px; padding: 28px 18px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); }
.done:focus { outline: none; }
.done__ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.done__ic .ic { width: 34px; height: 34px; }
.done h2 { font-size: 1.6rem; }
.done p { color: var(--muted); }
.done__code { font: 800 2.2rem/1 var(--font-d) !important; letter-spacing: .12em; color: var(--ink) !important; padding: 12px 20px; border-radius: 14px; background: var(--surface-2); }
.done[hidden], .aform[hidden] { display: none; }

.myreq { display: grid; gap: 12px; }
.rc { display: grid; gap: 12px; padding: 18px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.rc.is-cancel { opacity: .7; }
.rc__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.rc__dev { font-weight: 700; font-size: 1.05rem; }
.rc__code { font-size: .84rem; color: var(--muted); }
.rc__x { width: 36px; height: 36px; border: 0; background: var(--surface-2); color: var(--muted); border-radius: 50%; display: grid; place-items: center; flex: none; }
.rc__x .ic { width: 18px; height: 18px; }
.rc__status { font: 700 1.4rem/1.2 var(--font-d); letter-spacing: -.02em; color: var(--link); }
.steps { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); position: relative; font-size: .72rem; color: var(--muted); text-align: center; }
.steps::before { content: ""; position: absolute; top: 7px; left: 10%; right: 10%; height: 2px; background: var(--line-strong); }
.steps li { position: relative; display: grid; justify-items: center; gap: 6px; }
.steps span { width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-strong); position: relative; }
.steps .is-done span { background: var(--accent); border-color: var(--accent); }
.steps .is-done { color: var(--ink); }
.steps .is-cur span { background: var(--surface); border: 4px solid var(--accent); }
.steps .is-cur { color: var(--ink); font-weight: 700; }
@media (prefers-reduced-motion: no-preference) { .steps .is-cur span { animation: pulse 2s var(--ease-out) infinite; box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); } }
.rc__meta { display: flex; gap: 8px; align-items: center; font-size: .94rem; }
.rc__meta .ic { color: var(--accent); }
.rc__tl summary { cursor: pointer; font-weight: 650; font-size: .92rem; color: var(--muted); }
.rc__tl ol { list-style: none; display: grid; gap: 8px; margin-top: 10px; font-size: .92rem; }
.rc__tl time { display: block; font-size: .8rem; color: var(--muted); }
.rc__acts { display: flex; flex-wrap: wrap; gap: 8px; }
.rc__acts .btn { --h: 42px; padding: 0 14px; font-size: .92rem; }
.lookup { margin-top: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); }
.lookup summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 16px 18px; cursor: pointer; font-weight: 650; }
.lookup summary::-webkit-details-marker { display: none; }
.lookup summary .ic:last-child { margin-left: auto; color: var(--muted); transition: transform 200ms var(--ease-out); }
.lookup[open] summary .ic:last-child { transform: rotate(180deg); }
.lookup form { padding: 0 18px 18px; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding: 6px 8px calc(6px + var(--safe-b)); background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--line);
}
.tabbar a { position: relative; display: grid; justify-items: center; gap: 3px; padding: 8px 4px; border-radius: 14px; color: var(--muted); text-decoration: none; font-size: .76rem; font-weight: 650; }
.tabbar a .ic { width: 24px; height: 24px; }
.tabbar a[aria-current] { color: var(--ink); }
.tabbar a[aria-current] .ic { color: var(--accent); }
.tabbar__dot { position: absolute; top: 6px; left: calc(50% + 8px); width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.tabbar__dot[hidden] { display: none; }

/* ---------- Ekip paneli ---------- */
.app--panel { background: var(--bg); }
.ph { position: sticky; top: 0; z-index: 20; background: var(--panel, #0E1342); color: #fff; padding: calc(14px + var(--safe-t)) 16px 0; }
.ph__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 760px; margin: 0 auto; }
.ph__hi { font-size: .85rem; color: #B4BADA; }
.ph__t { color: #fff; font-size: 1.55rem; letter-spacing: -.025em; }
.ph__acts { display: flex; gap: 6px; }
.ph__btn { width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; background: rgba(255, 255, 255, .1); color: #fff; transition: transform 160ms var(--ease-out), background-color 200ms ease; }
.ph__btn:active { transform: scale(.94); }
.ph__btn .ic { width: 21px; height: 21px; }
.ph__btn.is-on { background: var(--accent); color: var(--on-accent); }
.ph__btn--plain { background: var(--surface-2); color: var(--ink); }
.ph__search { position: relative; max-width: 760px; margin: 14px auto 0; }
.ph__search > .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #B4BADA; width: 20px; height: 20px; }
.ph__search input { width: 100%; height: 46px; border-radius: 14px; border: 0; padding: 0 14px 0 44px; background: rgba(255, 255, 255, .1); color: #fff; }
.ph__search input::placeholder { color: rgba(233, 236, 248, .6); }
.ph__search input:focus { outline: 2px solid var(--accent); }
.ph__tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; max-width: 760px; margin: 12px auto 0; padding-bottom: 12px; }
.ph__tabs button { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .18); background: none; color: #DDE1F2; font-weight: 650; font-size: .9rem; }
.ph__tabs button.is-on { background: #fff; color: var(--panel, #0E1342); border-color: #fff; }
.ph__tabs b { font-size: .78rem; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: var(--on-accent); line-height: 20px; }
.ph__tabs b:empty { display: none; }

.pl { max-width: 760px; margin: 0 auto; padding: 14px 12px calc(110px + var(--safe-b)); }
.pl__hint { padding: 12px 14px; border-radius: 14px; background: var(--accent-soft); font-size: .92rem; margin-bottom: 12px; }
.pl__hint[hidden] { display: none; }
.pl__list { display: grid; gap: 10px; }
.pc { position: relative; display: grid; grid-template-columns: 1fr auto; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.pc::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--st-yeni); }
.pc[data-st="arandi"]::before { background: var(--st-arandi); }
.pc[data-st="randevu"]::before { background: var(--st-randevu); }
.pc[data-st="yolda"]::before { background: var(--st-yolda); }
.pc[data-st="atolyede"]::before { background: var(--st-atolyede); }
.pc[data-st="tamamlandi"]::before { background: var(--st-tamamlandi); }
.pc[data-st="iptal"]::before { background: var(--st-iptal); }
.pc__main { display: grid; gap: 6px; padding: 14px 10px 14px 18px; border: 0; background: none; text-align: left; color: var(--ink); min-width: 0; }
.pc__main:active { background: var(--surface-2); }
.pc__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pc__row--meta { justify-content: flex-start; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .84rem; color: var(--muted); }
.pc__name { font-weight: 700; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc__time { font-size: .8rem; color: var(--muted); flex: none; }
.pc__dev { color: var(--muted); font-size: .94rem; }
.pc__town, .pc__appt { display: inline-flex; align-items: center; gap: 4px; }
.pc__town .ic, .pc__appt .ic { width: 15px; height: 15px; }
.pc__appt { color: var(--ink); font-weight: 650; }
.pc__chip { padding: 3px 9px; border-radius: 999px; font-weight: 700; font-size: .76rem; color: #fff; background: var(--st-yeni); }
.pc__chip--yeni { color: var(--on-accent); }
.pc__chip--arandi { background: var(--st-arandi); }
.pc__chip--randevu { background: var(--st-randevu); }
.pc__chip--yolda { background: var(--st-yolda); }
.pc__chip--atolyede { background: var(--st-atolyede); }
.pc__chip--tamamlandi { background: var(--st-tamamlandi); }
.pc__chip--iptal { background: var(--st-iptal); }
.pc__asg { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); font-size: .72rem; font-weight: 800; margin-left: auto; }
.pc__note { font-size: .88rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pc__acts { display: grid; align-content: center; gap: 8px; padding: 10px 12px 10px 0; }
.pc__acts a { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--ink); transition: transform 160ms var(--ease-out); }
.pc__acts a:active { transform: scale(.94); }
.pc__acts a:last-child { color: var(--wa); }
.pc--sk { display: block; }
.pc--sk::before { display: none; }

.fab {
  position: fixed; right: 16px; bottom: calc(18px + var(--safe-b)); z-index: 22;
  display: inline-flex; align-items: center; gap: 8px; height: 56px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: 1rem;
  box-shadow: 0 14px 30px -10px color-mix(in srgb, var(--accent) 85%, transparent); transition: transform 160ms var(--ease-out);
}
.fab:active { transform: scale(.96); }
.fab .ic { width: 22px; height: 22px; }
.toast { position: fixed; left: 50%; bottom: calc(90px + var(--safe-b)); z-index: 60; transform: translate(-50%, 10px); opacity: 0; padding: 12px 18px; border-radius: 999px; background: #10133A; color: #fff; font-weight: 600; font-size: .92rem; box-shadow: var(--shadow-lg); transition: opacity 200ms var(--ease-out), transform 240ms var(--ease-out); white-space: nowrap; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; }
.toast.is-in { opacity: 1; transform: translate(-50%, 0); }

.sheet { width: 100%; max-width: 680px; height: 100%; max-height: none; margin: 0 auto; padding: 0; border: 0; background: var(--bg); color: var(--ink); overflow-y: auto; overscroll-behavior: contain; }
.sheet::backdrop { background: rgba(8, 10, 30, .55); }
@media (prefers-reduced-motion: no-preference) {
  .sheet[open] { animation: sheetIn 280ms var(--ease-out); }
}
@keyframes sheetIn { from { opacity: 0; transform: translateY(24px); } }
.is-sheet body { overflow: hidden; }
.sheet__bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 12px; padding: calc(10px + var(--safe-t)) 12px 10px; background: color-mix(in srgb, var(--bg) 92%, transparent); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.sheet__t { font-weight: 700; }
.sheet__body { padding: 16px 16px calc(40px + var(--safe-b)); display: grid; gap: 14px; }
.dt__cust, .dt__box { padding: 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 10px; }
.dt__name { font: 700 1.5rem/1.15 var(--font-d); letter-spacing: -.02em; }
.dt__dev { color: var(--muted); margin-top: -4px; }
.dt__line { display: flex; gap: 8px; align-items: center; }
.dt__line .ic { color: var(--accent); }
.dt__line a { color: var(--ink); font-weight: 700; }
.dt__note { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); }
.dt__acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.dt__acts .btn { --h: 46px; padding: 0 16px; }
.dt__box h2 { font: 700 1rem/1.2 var(--font-b); letter-spacing: 0; }
.stgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stb { min-height: 48px; padding: 0 12px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--field); color: var(--ink); font-weight: 650; text-align: left; display: flex; align-items: center; gap: 8px; transition: background-color 160ms ease, border-color 160ms ease, transform 160ms var(--ease-out); }
.stb::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--st-yeni)); flex: none; }
.stb:active { transform: scale(.97); }
.stb--arandi { --c: var(--st-arandi); } .stb--randevu { --c: var(--st-randevu); } .stb--yolda { --c: var(--st-yolda); } .stb--atolyede { --c: var(--st-atolyede); } .stb--tamamlandi { --c: var(--st-tamamlandi); } .stb--iptal { --c: var(--st-iptal); }
.stb.is-on { border-color: var(--c, var(--st-yeni)); background: color-mix(in srgb, var(--c, var(--st-yeni)) 14%, var(--surface)); }
.dt__log { list-style: none; display: grid; gap: 12px; }
.dt__log li { display: grid; gap: 2px; padding-left: 14px; border-left: 2px solid var(--line-strong); font-size: .94rem; }
.dt__log time { font-size: .78rem; color: var(--muted); }
.dt__log em { font-style: normal; font-size: .8rem; color: var(--muted); }
.dt__src { font-size: .82rem; color: var(--muted); text-align: center; }
.nform { gap: 14px; }
@media (prefers-reduced-motion: no-preference) {
  .is-pulse { animation: pulse 1.6s var(--ease-out) 3; box-shadow: 0 0 0 0 color-mix(in srgb, var(--wa) 60%, transparent); }
}
@media (min-width: 700px) {
  .sheet { height: auto; max-height: calc(100dvh - 48px); margin-top: 24px; border-radius: 24px; }
}
