/* Demir Konut v12.5.1 – giriş ekranı · açılış durum yazısı · Marka ve Açılış yönetim ekranı
   Giriş ve açılış ekranı, "Marka ve Açılış" ayarından gelen --sp-bg / --sp-fg / --sp-acc değişkenlerini kullanır (index.html ilk boyamadan önce yazar). */

/* ---------------------------------------------------------------- giriş ekranı */
/* margin:auto ile ortalama: içerik ekrandan uzunsa (klavye açık, yatay telefon) üst kısım kırpılmaz, sayfa kaydırılır */
.login { display: flex; flex-direction: column; align-items: center; min-height: 100vh; min-height: var(--vvh, 100dvh); box-sizing: border-box; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
  padding: max(18px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) max(18px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  background: radial-gradient(1000px 500px at 110% -10%, color-mix(in srgb, var(--sp-acc, #C8963E) 26%, transparent), transparent 60%), var(--sp-bg, linear-gradient(160deg, #1B2A41, #0F1A2B)); color: var(--sp-fg, #fff); }
.login[hidden] { display: none !important; }
.lg-wrap { width: min(420px, 100%); margin: auto; }
.login-card { width: 100%; box-sizing: border-box; color: var(--ink); }
.login-card .brand { flex-wrap: wrap; row-gap: 10px; }
.lg-mark { width: 54px; height: 54px; font-size: 20px; border-radius: 16px; flex: none; }
.lg-logo { display: block; flex: none; max-width: min(150px, 42vw); max-height: 56px; object-fit: contain; }
.lg-logo.plate { background: #fff; padding: 7px 10px; border-radius: 12px; box-sizing: content-box; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); max-width: min(130px, 36vw); max-height: 42px; }
.lg-name { min-width: 0; flex: 1 1 150px; }
.lg-name h1 { overflow-wrap: anywhere; }
.pw-wrap { position: relative; display: block; font-size: inherit; font-weight: 400; color: inherit; }
.field > .pw-wrap { display: block; }
.pw-wrap input { padding-right: 52px; }
.pw-toggle { position: absolute; top: 50%; right: 3px; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); border-radius: 12px; cursor: pointer; }
.pw-toggle:hover { color: var(--ink); background: var(--surface-2); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.lg-caps { margin: -6px 0 0; padding: 8px 12px; border-radius: 10px; font-size: 12.5px; font-weight: 650; line-height: 1.4; color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, transparent); }
.lg-caps[hidden] { display: none; }
.login .field input[aria-invalid="true"] { border-color: var(--red); }
.login .form-error { min-height: 20px; line-height: 1.4; overflow-wrap: anywhere; }
.login .btn-block[disabled] { opacity: .65; cursor: not-allowed; }
.login-foot { color: color-mix(in srgb, var(--sp-fg, #fff) 68%, transparent); font-size: 12px; line-height: 1.5; margin-top: 16px; }
.lg-note { margin: 0 0 6px; font-size: 13px; color: color-mix(in srgb, var(--sp-fg, #fff) 88%, transparent); overflow-wrap: anywhere; }
.login .bio-login { margin-bottom: 16px; }
@media (max-width: 380px) { .login-card { padding: 22px 16px 18px; border-radius: 22px; } .lg-name h1 { font-size: 20px; } }
/* yatay telefon / kısa ekran: marka solda, form sağda */
@media (orientation: landscape) and (max-height: 540px) {
  .login { padding-top: max(10px, env(safe-area-inset-top)); padding-bottom: max(10px, env(safe-area-inset-bottom)); }
  .lg-wrap { width: min(780px, 100%); }
  .login-card { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); column-gap: 26px; align-content: center; padding: 18px 22px; }
  .login-card .brand { grid-column: 1; grid-row: 1 / span 4; margin: 0; flex-direction: column; align-items: flex-start; align-self: center; }
  .login-card .form, .login-card .bio-login { grid-column: 2; }
  .login-foot { margin-top: 8px; }
}
@media (prefers-reduced-motion: reduce) { .login-card.page { animation: none !important; } }

/* ---------------------------------------------------------------- açılış ekranı: durum yazısı / yeniden dene */
.splash-status { margin: 2px 0 0; max-width: 34ch; font-size: 13px; line-height: 1.45; opacity: .92; }
.splash-retry { appearance: none; margin-top: 4px; min-height: 44px; padding: 10px 22px; border-radius: 12px; border: 1.5px solid color-mix(in srgb, var(--sp-fg, #fff) 55%, transparent); background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.splash-retry:hover { background: color-mix(in srgb, var(--sp-fg, #fff) 12%, transparent); }
.splash-retry:focus-visible { outline: 2px solid var(--sp-acc, var(--accent)); outline-offset: 3px; }
@media (max-height: 430px) { .splash { gap: 8px; padding-top: 12px; padding-bottom: 12px; } .splash-mark { width: 56px; height: 56px; font-size: 22px; border-radius: 16px; } }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* ---------------------------------------------------------------- Marka ve Açılış */
.mk { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.mk-prev { display: grid; justify-items: center; gap: 10px; padding: 14px 12px 12px; border-radius: var(--radius, 18px); background: var(--surface-3); align-content: start; min-width: 0; }
.mk-ptabs { max-width: 100%; }
.mk-ptabs button { white-space: nowrap; }
.mk-phone { --pw: 168px; width: var(--pw); max-width: 100%; padding: 7px; border-radius: 32px; background: #0F1724; box-shadow: 0 12px 30px rgba(15, 23, 36, .28), inset 0 0 0 1px rgba(255, 255, 255, .08); box-sizing: content-box; }
.mk-screen { position: relative; width: 100%; aspect-ratio: 390 / 844; border-radius: 25px; overflow: hidden; background: #1B2A41; isolation: isolate; }
.mk-canvas { position: absolute; left: 0; top: 0; width: 390px; height: 844px; transform-origin: 0 0; pointer-events: none; user-select: none; -webkit-user-select: none; }
.mk-canvas .splash, .mk-canvas .login { position: absolute; inset: 0; z-index: 0; width: 390px; height: 844px; min-height: 0; overflow: hidden; }
.mk-canvas .login { justify-content: center; }
.mk-canvas .login-card { animation: none; }
.mk-canvas .splash-status { margin-top: 6px; }
.mk-pnote { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); text-align: center; max-width: 36ch; }
.mk-pact { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.mk-warn { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-width: 38ch; }
.mk-warn li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; color: var(--amber); }
.mk-warn .ic { flex: none; margin-top: 1px; }
.mk-warn[hidden] { display: none; }
.mk-form { min-width: 0; display: grid; gap: 14px; }
.mk-sec { margin: 0; }
.mk-h { font-size: 15px; font-weight: 700; margin: 0 0 10px; }
.mk-h2 { font-size: 13.5px; font-weight: 700; margin: 16px 0 8px; }
.mk-form .hint { display: block; color: var(--muted); font-size: 12px; line-height: 1.45; margin-top: 4px; }
.mk-adv { margin-top: 2px; border: 1px solid var(--line-2, var(--line)); border-radius: 12px; padding: 0 12px; }
.mk-adv > summary { cursor: pointer; padding: 12px 0; font-weight: 650; font-size: 13.5px; min-height: 24px; }
.mk-adv[open] { padding-bottom: 12px; }
.mk-adv[open] > summary { border-bottom: 1px solid var(--line-2, var(--line)); margin-bottom: 12px; }
.mk-drop { display: grid; justify-items: center; gap: 8px; padding: 16px; border: 2px dashed var(--line); border-radius: 16px; text-align: center; cursor: pointer; color: var(--ink-2); background: var(--surface-2); font-size: 13.5px; }
.mk-drop:hover, .mk-drop.drag, .mk-drop:focus-visible { border-color: var(--accent); background: var(--accent-soft); outline: none; }
.mk-drop.busy { opacity: .55; pointer-events: none; }
.mk-drop.sm { padding: 12px; }
.mk-drop[hidden] { display: none; }
.mk-drop-prev { display: grid; place-items: center; min-height: 64px; }
.mk-drop-prev img { max-width: min(220px, 70%); max-height: 84px; object-fit: contain; background: repeating-conic-gradient(#e5e7eb 0 25%, #fff 0 50%) 0 0 / 14px 14px; border-radius: 10px; padding: 6px; }
.mk-drop-prev .ic { width: 30px; height: 30px; color: var(--muted); }
.mk-radios { display: grid; gap: 8px; }
.mk-radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--surface); }
.mk-radio:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.mk-radio.dis { opacity: .55; cursor: not-allowed; }
.mk-radio input[type=radio] { appearance: none; -webkit-appearance: none; margin: 1px 0 0; width: 20px; height: 20px; padding: 0; border: 2px solid var(--muted); border-radius: 50%; background: var(--surface); display: grid; place-items: center; flex: none; cursor: inherit; }
.mk-radio input[type=radio]:checked { border-color: var(--accent); }
.mk-radio input[type=radio]:checked::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.mk-radio input[type=radio]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mk-radio.sel { border-color: var(--accent); background: var(--accent-soft); }
.mk-radio b { display: block; font-size: 13.5px; }
.mk-radio small { display: block; color: var(--muted); font-size: 12px; line-height: 1.4; }
.mk-iopt { display: grid; gap: 12px; margin-top: 12px; }
.mk-iopt [hidden] { display: none !important; }
.mk-out { margin-left: auto; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.mk-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 12px; margin-top: 14px; }
.mk-ic { margin: 0; display: grid; justify-items: center; gap: 6px; text-align: center; }
.mk-ic figcaption { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.mk-ic-i { position: relative; width: 64px; height: 64px; display: grid; place-items: center; overflow: hidden; background: repeating-conic-gradient(#e5e7eb 0 25%, #fff 0 50%) 0 0 / 12px 12px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); border-radius: 12px; }
.mk-ic-i img { width: 100%; height: 100%; object-fit: contain; display: block; }
.mk-ic.mask .mk-ic-i { border-radius: 50%; }
.mk-ic.mask.sq .mk-ic-i { border-radius: 28%; }
.mk-ic.mask .mk-ic-i::after { content: ''; position: absolute; inset: 10%; border: 1.5px dashed rgba(255, 255, 255, .85); border-radius: 50%; mix-blend-mode: difference; pointer-events: none; }
.mk-ic.apple .mk-ic-i { border-radius: 22%; }
.mk-ic.fav .mk-ic-i { width: 40px; height: 40px; border-radius: 8px; margin: 12px 0; }
.mk-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.mk-preset { display: grid; gap: 6px; justify-items: start; padding: 6px; border: 1.5px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; text-align: left; }
.mk-preset:hover { border-color: var(--accent); }
.mk-preset:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mk-preset i { display: grid; place-items: center; width: 100%; height: 40px; border-radius: 8px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.mk-preset i b { width: 14px; height: 14px; border-radius: 4px; }
.mk-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mk-color[hidden] { display: none; }
.mk-cin { display: flex; gap: 6px; align-items: center; }
.mk-cin input[type=color] { flex: none; width: 44px; height: 44px; padding: 3px; border-radius: 12px; cursor: pointer; }
.mk-cin input:not([type=color]) { min-width: 0; font-variant-numeric: tabular-nums; text-transform: uppercase; }
.mk-cin input[aria-invalid=true] { border-color: var(--red); }
.mk-form input[type=range] { width: 100%; accent-color: var(--accent); min-height: 32px; }
.mk-roles { display: grid; gap: 12px; margin-top: 10px; }
.mk-guide ol { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13.5px; line-height: 1.5; }
.mk-checks { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.mk-chk { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.4; }
.mk-chk small { display: block; color: var(--muted); font-size: 11.5px; }
.mk-chk-i { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #fff; }
.mk-chk.ok .mk-chk-i { background: var(--green); } .mk-chk.warn .mk-chk-i { background: var(--amber); } .mk-chk.bad .mk-chk-i { background: var(--red); }
.mk-chk.wait { color: var(--muted); }
.mk-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; position: sticky; bottom: calc(var(--tabbar-h, 64px) + 8px + env(safe-area-inset-bottom)); z-index: 2; padding: 10px; border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(8px); box-shadow: var(--shadow-1); }
.mk-actions .btn-primary { flex: 1; max-width: 240px; }
.mk-dirty { font-size: 12px; color: var(--amber); font-weight: 650; margin: 0 auto 0 0; flex: 1 0 100%; order: -1; }
.mk-dirty[hidden] { display: none; }
.mk-full { position: fixed; inset: 0; z-index: 400; cursor: pointer; }
.mk-full.login { z-index: 400; }
.seg button[disabled] { opacity: .45; cursor: not-allowed; }
@media (min-width: 900px) {
  .mk { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; }
  .mk-prev { order: 2; position: sticky; top: 84px; }
  .mk-phone { --pw: 236px; }
  .mk-roles { grid-template-columns: 1fr 1fr; }
  .mk-actions { bottom: 12px; }
}
@media (max-width: 380px) { .mk-colors { grid-template-columns: 1fr; } }
@media (max-width: 899px) { .mk-actions { padding-right: 78px; } } /* sağ alttaki yüzen asistan düğmesi Kaydet'i örtmesin */

/* ---------------------------------------------------------------- önizleme içerikleri (390×844 tuval) */
.mk-pv-load { position: absolute; inset: 0; }
.mk-pv-home { position: absolute; inset: 0; padding: 70px 22px 24px; display: flex; flex-direction: column; color: #fff; background: linear-gradient(165deg, #3b5b8c, #1f2f4d 55%, #121a2b); }
.mk-ph-time { text-align: center; font-size: 62px; font-weight: 300; letter-spacing: -2px; margin-bottom: 36px; }
.mk-ph-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px 8px; }
.mk-ph-row { margin-top: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 6px; border-radius: 28px; background: rgba(255, 255, 255, .14); }
.mk-ph-app { display: grid; justify-items: center; gap: 6px; font-size: 12px; text-align: center; min-width: 0; }
.mk-ph-app span { max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-ph-app i { width: 62px; height: 62px; border-radius: 17px; display: block; background: rgba(255, 255, 255, .22); overflow: hidden; }
.mk-ph-app i.d0 { background: #34c759; } .mk-ph-app i.d1 { background: #0a84ff; } .mk-ph-app i.d2 { background: #8e8e93; } .mk-ph-app i.d3 { background: #ff9f0a; } .mk-ph-app i.d4 { background: #5e5ce6; } .mk-ph-app i.d5 { background: #30b0c7; } .mk-ph-app i.d6 { background: #ff453a; }
.mk-ph-app i.ic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mk-ph-app i.ic.round { border-radius: 50%; } .mk-ph-app i.ic.sq { border-radius: 28%; } .mk-ph-app i.ic.ios { border-radius: 22%; } .mk-ph-app i.ic.any { border-radius: 17px; background: #fff; }
.mk-pv-app { position: absolute; inset: 0; background: var(--bg); padding: 44px 14px 14px; display: grid; gap: 14px; align-content: start; }
.mk-pa-tab { display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 12px 12px 0 0; background: var(--surface); box-shadow: 0 0 0 1px var(--line); font-size: 14px; font-weight: 600; width: fit-content; max-width: 100%; }
.mk-pa-tab img { width: 18px; height: 18px; object-fit: contain; flex: none; }
.mk-pa-tab span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-pa-side { background: var(--navy); border-radius: 18px; padding: 18px 16px; color: #fff; }
.mk-pa-side .sb-brand { border-bottom-color: rgba(255, 255, 255, .08); margin-bottom: 14px; }
.mk-pa-side .sb-brand b { overflow-wrap: anywhere; }
.mk-pa-links { display: grid; gap: 8px; }
.mk-pa-links i { height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .14); } .mk-pa-links i.on { background: color-mix(in srgb, var(--accent) 70%, transparent); width: 70%; }
.mk-pa-pdf { background: #fff; color: #1B2A41; border-radius: 10px; padding: 16px; display: grid; gap: 8px; box-shadow: var(--shadow-1); }
.mk-pa-pdf b { font-size: 15px; }
.mk-pa-pdf i { display: block; height: 9px; border-radius: 5px; background: #dfe3ea; } .mk-pa-pdf i.w70 { width: 70%; } .mk-pa-pdf i.w50 { width: 50%; }
.mk-pa-ph { display: flex; justify-content: flex-end; min-height: 34px; font-weight: 800; font-size: 13px; letter-spacing: .3px; }
.mk-pa-ph img { max-height: 34px; max-width: 140px; object-fit: contain; }
.mk-pa-note { text-align: center; font-size: 12px; color: var(--muted); }
