/* Otomobin giriş uygulaması: ekran düzeni. Belirteçler ve bileşenler ui-kit'ten gelir; yolcu/sürücü uygulamalarıyla aynı görsel dil. */
:root { --focus: #073b63; }
:root[data-theme="dark"] { --focus: #8fd0f5; }
[hidden] { display: none !important; }

/* ---- erişilebilirlik: odak halkası, gizli metin, 44px hedefler, kontrast ---- */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 10px; }
.input:focus-visible, .otp-box:focus-visible { outline-offset: 1px; }
.sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -80px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--deep); color: var(--on-deep); border: 2px solid var(--edge); font-weight: 700; }
.skip:focus { top: 8px; }
h1:focus { outline: none; }
.iconbtn { width: 44px; height: 44px; }
.input::placeholder { color: var(--mut); opacity: 1; }
.linkbtn { background: none; border: 0; padding: 0 8px; min-height: 44px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; color: var(--accent); cursor: pointer; border-radius: 10px; font: inherit; font-weight: 700; }
:root[data-theme="light"] .linkbtn, :root[data-theme="light"] a:not(.btn) { color: var(--deep); }
.tiny.legal { text-transform: none; letter-spacing: 0; font-weight: 500; line-height: 1.6; }
.center { text-align: center; }
.err { color: var(--bad); font-size: 13px; font-weight: 600; }
.err:empty { display: none; }
:root[data-theme="light"] .err { color: #b3231e; }
.card.accent .mut, .card.accent small { color: var(--deep); }
:root[data-theme="dark"] .card.accent .mut, :root[data-theme="dark"] .card.accent { color: var(--fg); }
.demo-note { color: var(--deep); }
:root[data-theme="dark"] .demo-note { color: var(--fg); }
.btn.primary { background: var(--blue); color: #fff; }
:root[data-theme="dark"] .btn.primary { background: var(--digital); color: #06141f; }

/* ---- kabuk ---- */
.device { position: relative; }
.view { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; animation: fade 0.28s var(--ease); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.offline { display: flex; align-items: center; gap: 10px; padding: 8px 16px; background: var(--ink); color: #fff; font-weight: 600; font-size: 13px; z-index: 60; }
:root[data-theme="dark"] .offline { background: #000; }
.offline svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; flex: none; }
.toast { position: absolute; left: 16px; right: 16px; top: 64px; z-index: 30; padding: 12px 16px; border-radius: var(--r-m); background: #17212b; color: #fff; font-weight: 600; }

/* ---- üst çubuk + dil seçici ---- */
.langsw { display: inline-flex; border: 2px solid var(--edge); border-radius: var(--r-pill); overflow: hidden; background: var(--surface); }
.langsw button { min-width: 44px; min-height: 44px; padding: 0 10px; border: 0; background: transparent; color: var(--fg); font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; border-radius: 0; }
.langsw button[aria-pressed="true"] { background: var(--deep); color: var(--on-deep); }
:root[data-theme="dark"] .langsw button[aria-pressed="true"] { background: var(--digital); color: #06141f; }

/* ---- hoş geldin / telefon / OTP ---- */
.welcome { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 20px; overflow-y: auto; }
.hero { padding: 8px 20px 0; display: flex; flex-direction: column; gap: 14px; }
.hero h1 { font-size: 34px; }
.hero h1 em { font-style: normal; color: var(--blue); }
:root[data-theme="dark"] .hero h1 em { color: var(--digital); }
.hero .sub { color: var(--mut); }
.phone-row { display: grid; grid-template-columns: 108px 1fr; gap: 8px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--mut) 50%), linear-gradient(135deg, var(--mut) 50%, transparent 50%); background-position: calc(100% - 20px) 23px, calc(100% - 14px) 23px; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 30px; }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: 48px; padding: 6px 0; cursor: pointer; }
.check input { width: 24px; height: 24px; accent-color: var(--blue); flex: none; margin: 10px 0 0; }
.check b { display: block; }
.otp-boxes { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.otp-box { min-width: 0; width: 100%; height: 60px; text-align: center; font: inherit; font-size: 24px; font-weight: 800; border-radius: 14px; border: 2px solid var(--line); background: var(--surface); color: var(--fg); padding: 0; caret-color: var(--blue); transition: border-color 0.15s, box-shadow 0.15s; }
.otp-box:focus { border-color: var(--edge); box-shadow: 0 3px 0 var(--edge); }
.otp-box[aria-invalid="true"] { border-color: var(--bad); }
.otp-box:disabled { opacity: 0.5; }
.shake { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---- tanıtım ---- */
.tour { flex: 1; min-height: 0; overflow: hidden; outline-offset: -3px; }
.tour-track { display: flex; height: 100%; transform: translateX(calc(var(--i, 0) * -100%)); transition: transform 0.45s var(--ease); }
.tour-slide { flex: 0 0 100%; padding: 8px 28px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 14px; text-align: center; }
.tour-slide .illus { max-width: 230px; }
.tour-slide h2 { font-size: 26px; }
.pager { display: flex; gap: 8px; justify-content: center; }
.pager i { width: 8px; height: 8px; border-radius: 99px; background: var(--line); transition: width 0.3s var(--ease), background 0.3s; border: 1px solid var(--edge); }
.pager i.on { width: 26px; background: var(--blue); }

/* ---- rol seçimi ---- */
.role-head { padding: 8px 20px 0; display: flex; flex-direction: column; gap: 10px; }
.role-head h1 { font-size: 30px; }
.role-list { display: flex; flex-direction: column; gap: 14px; }
.role-card { position: relative; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 112px; padding: 16px; text-align: left; font: inherit; color: var(--fg); background: var(--surface); border: 2px solid var(--edge); border-radius: var(--r-l); box-shadow: var(--shadow-hard); cursor: pointer; transition: transform 0.12s var(--ease), box-shadow 0.12s var(--ease); }
.role-card:active { transform: translateY(4px); box-shadow: 0 0 0 var(--edge); }
.role-card.last { background: var(--accent-soft); }
.role-card .rc-ico { width: 52px; height: 52px; border-radius: 16px; border: 2px solid var(--edge); background: var(--blue); display: grid; place-items: center; flex: none; }
:root[data-theme="dark"] .role-card .rc-ico { background: var(--digital); }
.role-card .rc-ico svg { width: 28px; height: 28px; stroke: #fff; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
:root[data-theme="dark"] .role-card .rc-ico svg { stroke: #06141f; }
.role-card .rc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.role-card .rc-t { font-size: 19px; line-height: 1.2; }
.role-card .rc-b { font-size: 13px; color: var(--mut); }
.role-card .rc-state, .role-card .rc-last { align-self: flex-start; display: inline-flex; align-items: center; min-height: 26px; padding: 2px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 800; background: var(--accent-soft); color: var(--deep); margin-top: 2px; }
:root[data-theme="dark"] .role-card .rc-state, :root[data-theme="dark"] .role-card .rc-last { color: var(--fg); }
.role-card.last .rc-state { background: var(--surface); }
.role-card .rc-state[data-state="APPROVED"] { background: var(--ok-soft); color: #0f6a37; }
.role-card .rc-state[data-state="PENDING"] { background: var(--warn-soft); color: #8a5a0b; }
.role-card .rc-state[data-state="REJECTED"] { background: var(--bad-soft); color: #b3231e; }
:root[data-theme="dark"] .role-card .rc-state[data-state="APPROVED"] { color: var(--ok); }
:root[data-theme="dark"] .role-card .rc-state[data-state="PENDING"] { color: var(--warn); }
:root[data-theme="dark"] .role-card .rc-state[data-state="REJECTED"] { color: var(--bad); }
.role-card .rc-go { width: 22px; height: 22px; stroke: var(--mut); fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; flex: none; }

@media (max-width: 360px) { .hero h1, .role-head h1 { font-size: 28px; } .role-card { gap: 10px; } }
@media (prefers-reduced-motion: reduce) { .tour-track { transition: none; } .screen { animation: none; } }

/* rol kartı: durum ve "son kullandığın" etiketleri aynı satırda, ikon ortada */
.role-card .rc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.role-card .rc-tags > * { margin-top: 0; }
