/* PatronunPaneli - marka: lacivert #0F1E3D, turuncu #F97316, antrasit #2B2F36, açık gri #F1F3F6 */
/* Poppins (kendi sunucumuzdan; Windows'ta yüklü değil, yoksa Segoe UI'ya düşüp ekran dağınık görünüyordu) */
@font-face { font-family: "Poppins"; src: url(fonts/poppins-regular.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url(fonts/poppins-medium.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url(fonts/poppins-semibold.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url(fonts/poppins-bold.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
:root {
  --navy: #0F1E3D; --orange: #F97316; --orange-d: #EA580C; --anthracite: #2B2F36; --light: #F1F3F6;
  --white: #fff; --muted: #6B7280; --ok: #16A34A; --err: #DC2626; --warn: #D97706;
  --radius: 12px; --shadow: 0 1px 3px rgba(15,30,61,.08), 0 4px 16px rgba(15,30,61,.06);
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); color: var(--anthracite); background: var(--light); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--orange); color: var(--white); padding: .5rem .9rem; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { left: 12px; }
.svg-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
a { color: var(--navy); }
h1, h2, h3 { color: var(--navy); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.5rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
code { background: var(--light); padding: .1em .35em; border-radius: 6px; word-break: break-all; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; }
.inline { display: inline; }

/* Butonlar */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4em; padding: .6em 1.1em; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; background: var(--white); color: var(--navy); min-height: 44px; }
.btn-primary { background: var(--orange); color: var(--white); }
.btn-primary:hover { background: var(--orange-d); }
.btn-ghost { border-color: #D6DAE1; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; color: var(--navy); font: inherit; cursor: pointer; text-decoration: underline; padding: .25em .4em; }
.btn-link.danger, .danger { color: var(--err); }
.btn-icon { background: var(--light); border: 0; border-radius: 8px; width: 36px; height: 36px; cursor: pointer; }

/* Formlar */
label { display: block; font-weight: 500; margin: 0 0 .9em; }
input, select { display: block; width: 100%; margin-top: .3em; padding: .65em .8em; font: inherit; border: 1px solid #D6DAE1; border-radius: 10px; background: var(--white); min-height: 44px; }
input[type=radio], input[type=checkbox] { display: inline-block; width: auto; height: auto; min-height: 0; margin: 0 .35em 0 0; padding: 0; vertical-align: middle; accent-color: var(--orange); }
input[type=date]::-webkit-date-and-time-value { text-align: left; margin: 0; }
input:focus, select:focus { outline: 2px solid var(--orange); outline-offset: 1px; border-color: var(--orange); }
label.check { display: flex; gap: .6em; align-items: flex-start; font-weight: 400; }
label.check input { width: auto; min-height: 0; margin-top: .3em; }
.row-form { display: flex; flex-wrap: wrap; gap: .8em; align-items: flex-end; }
.row-form label { flex: 1 1 200px; margin: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: .4em 1.2em; margin: 0 0 .8em; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }

/* Kartlar, uyarılar */
.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; margin-bottom: 1rem; }
.card.narrow { max-width: 480px; margin: 2rem auto; text-align: center; }
.callout { border-left: 4px solid var(--orange); }
.alert { display: flex; align-items: flex-start; gap: .6em; padding: .8em 1em; border-radius: 10px; margin-bottom: 1rem; border: 1px solid transparent; font-size: .92rem; line-height: 1.45; }
.alert-icon { flex: none; width: 20px; height: 20px; margin-top: .05em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.alert-success { background: #ECFDF5; color: #065F46; border-color: #A7F3D0; }
.alert-error { background: #FEF2F2; color: #991B1B; border-color: #FECACA; }
.alert-info { background: #EFF6FF; color: #1E3A8A; border-color: #BFDBFE; }
.alert-warning { background: #FFFBEB; color: #92400E; border-color: #FDE68A; }
.badge { display: inline-block; padding: .2em .6em; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--light); }
.badge-ok { background: #DCFCE7; color: #166534; } .badge-off { background: #FEE2E2; color: #991B1B; }
.badge-wait { background: #FEF3C7; color: #92400E; } .badge-trial { background: rgba(249,115,22,.15); color: #FDBA74; }

/* Giriş ekranları (giriş, kayıt, parola, davet) – tanıtım sitesiyle aynı dil */
.guest { background: var(--light); min-height: 100vh; min-height: 100dvh; }
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1fr; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; --logo-gap: transparent; }
.brand-mark { width: 24px; height: 37px; flex: none; }
.brand-word { font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; color: var(--navy); }
.brand-word b { color: var(--orange); font-weight: 700; }
.brand--light { --logo-stem: #fff; }
.brand--light .brand-word { color: var(--white); }

/* Sol marka paneli (masaüstü) */
.auth-brand { display: none; position: relative; overflow: hidden; isolation: isolate; color: var(--white); padding: 40px 56px;
  background: radial-gradient(520px 380px at 85% 12%, rgba(249,115,22,.22), transparent 70%), radial-gradient(620px 460px at 0% 100%, rgba(56,92,170,.38), transparent 70%), linear-gradient(180deg, #0F1E3D 0%, #0B1730 100%); }
.auth-brand-glow { position: absolute; z-index: -1; right: -120px; bottom: -120px; width: 380px; height: 380px; border-radius: 50%; border: 60px solid rgba(249,115,22,.07); }
.auth-brand-body { max-width: 460px; margin: auto 0; padding: 48px 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 600; letter-spacing: .18em; color: #FDBA74; margin: 0 0 18px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); position: relative; display: inline-block; flex: none; }
.pulse::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--orange); animation: pp-pulse 1.8s ease-out infinite; }
@keyframes pp-pulse { from { transform: scale(.6); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
.auth-brand-title { font-size: clamp(1.9rem, 2.6vw, 2.5rem); font-weight: 700; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 32px; }
.hl { color: var(--orange); }
.benefits { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.benefits li { display: flex; gap: 14px; align-items: flex-start; color: rgba(255,255,255,.82); font-size: .98rem; line-height: 1.5; }
.benefits b { color: var(--white); font-weight: 600; }
.benefits svg { flex: none; width: 28px; height: 28px; padding: 6px; border-radius: 8px; background: rgba(249,115,22,.16); fill: none; stroke: var(--orange); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.auth-brand-foot { margin: 0; font-size: .8rem; color: rgba(255,255,255,.5); }
.auth-brand-foot__link { color: inherit; text-decoration: underline; }

/* Sağ: form alanı (mobil öncelikli) */
.auth-main { display: flex; flex-direction: column; min-width: 0; }
.auth-mobile-head { background: linear-gradient(180deg, #0F1E3D 0%, #0B1730 100%); padding: 22px 20px 64px; padding-top: max(22px, env(safe-area-inset-top)); text-align: center; }
.auth-mobile-slogan { margin: 10px 0 0; color: #FDBA74; font-size: .72rem; font-weight: 600; letter-spacing: .18em; }
.auth-panel { width: min(100% - 32px, 440px); margin: -44px auto 0; background: var(--white); border-radius: 16px; box-shadow: 0 1px 2px rgba(15,30,61,.06), 0 12px 32px rgba(15,30,61,.10); padding: 28px 22px; }
.auth-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; padding: 24px 16px; padding-bottom: max(24px, env(safe-area-inset-bottom)); margin-top: auto; font-size: .82rem; }
.auth-foot a { color: var(--muted); text-decoration: none; }
.auth-foot a:hover { color: var(--navy); text-decoration: underline; }

.auth-head { margin-bottom: 22px; }
.auth-head h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; margin: 0 0 6px; text-align: left; }
.auth-head p { margin: 0; color: var(--muted); font-size: .93rem; }
.auth-head p b { color: var(--anthracite); }
.auth-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: rgba(249,115,22,.12); margin-bottom: 16px; }
.auth-icon svg { width: 24px; height: 24px; fill: none; stroke: var(--orange-d); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tag { display: inline-block; font-size: .74rem; font-weight: 600; letter-spacing: .02em; color: var(--orange-d); background: rgba(249,115,22,.1); border-radius: 999px; padding: 4px 10px; margin-bottom: 12px; }

.auth-form .field { margin: 0 0 16px; padding: 0; border: 0; min-width: 0; }
.auth-form label, .auth-form legend { display: block; font-size: .875rem; font-weight: 500; color: var(--navy); margin: 0 0 6px; padding: 0; }
.field-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.field-head label { margin-bottom: 6px; }
.optional { color: var(--muted); font-weight: 400; }
.auth-form input[type=email], .auth-form input[type=text], .auth-form input[type=tel], .auth-form input[type=password], .auth-form input:not([type]) {
  margin: 0; min-height: 48px; padding: 12px 14px; border: 1px solid #D6DAE1; border-radius: 10px; background: var(--white); color: var(--anthracite); font-size: 1rem; transition: border-color .15s, box-shadow .15s; }
.auth-form input::placeholder { color: #9AA1AD; }
.auth-form input:hover:not(:disabled) { border-color: #B8BFCB; }
.auth-form input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(249,115,22,.18); }
.auth-form input:disabled { background: var(--light); color: var(--muted); cursor: not-allowed; }
.auth-form input:user-invalid { border-color: var(--err); }
.auth-form input:user-invalid:focus { box-shadow: 0 0 0 4px rgba(220,38,38,.15); }
.hint { margin: 6px 0 0; font-size: .8rem; color: var(--muted); }
.link-sm { font-size: .82rem; font-weight: 500; color: var(--orange-d); text-decoration: none; }
.link-sm:hover { text-decoration: underline; }
.field-grid { display: grid; gap: 0 14px; grid-template-columns: 1fr; }

.pw { position: relative; }
.pw input { padding-right: 52px !important; }
.pw-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 44px; height: 40px; display: grid; place-items: center; background: none; border: 0; border-radius: 8px; color: var(--muted); cursor: pointer; }
.pw-toggle:hover { color: var(--navy); background: var(--light); }
.pw-toggle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pw-toggle .i-eye-off, .pw-toggle[aria-pressed="true"] .i-eye { display: none; }
.pw-toggle[aria-pressed="true"] .i-eye-off { display: block; }

.auth-form label.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; color: var(--anthracite); font-size: .875rem; line-height: 1.5; margin: 4px 0 20px; cursor: pointer; }
.auth-form label.check input { flex: none; width: 18px; height: 18px; min-height: 0; margin: 1px 0 0; accent-color: var(--orange); cursor: pointer; }
.auth-form label.check a { color: var(--navy); font-weight: 500; }

.choice-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 420px) { .choice-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.auth-form label.choice { margin: 0; position: relative; cursor: pointer; font-weight: 500; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice-box { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; border: 1px solid #D6DAE1; border-radius: 10px; color: var(--anthracite); font-size: .92rem; transition: border-color .15s, background .15s, box-shadow .15s; }
.choice-dot { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #B8BFCB; transition: border .15s; }
.choice:hover .choice-box { border-color: #B8BFCB; }
.choice input:checked + .choice-box { border-color: var(--orange); background: rgba(249,115,22,.06); color: var(--navy); }
.choice input:checked + .choice-box .choice-dot { border: 6px solid var(--orange); }
.choice input:focus-visible + .choice-box { box-shadow: 0 0 0 4px rgba(249,115,22,.18); border-color: var(--orange); }

.auth-form .btn { border-radius: 12px; transition: background .15s, transform .15s, box-shadow .15s; }
.auth-form .btn-primary { box-shadow: 0 8px 20px -8px rgba(249,115,22,.7); }
.auth-form .btn-primary:hover { transform: translateY(-1px); }
.auth-form .btn-lg { min-height: 50px; font-size: 1rem; padding: .7em 1.2em; }
.btn-outline { border: 1px solid #D6DAE1; color: var(--navy); background: var(--white); }
.btn-outline:hover { border-color: var(--navy); background: var(--light); }
.btn.is-loading { opacity: .75; cursor: progress; }
.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 14px; color: var(--muted); font-size: .82rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: #E5E7EB; }
.auth-alt { margin: 18px 0 0; text-align: center; font-size: .9rem; color: var(--muted); }
.auth-alt a { color: var(--orange-d); font-weight: 600; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }
.back-link { display: inline-flex; align-items: center; gap: 4px; }
.back-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.auth-panel .alert { margin-bottom: 18px; }
.auth-panel > .card { box-shadow: none; padding: 0; margin: 0; }

@media (min-width: 560px) {
  .auth-panel { padding: 36px 36px; }
  .field-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .auth { grid-template-columns: minmax(420px, 46%) 1fr; }
  .auth-brand { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
  .auth-mobile-head { display: none; }
  .auth-main { justify-content: center; padding: 48px 32px 0; }
  .auth-panel { margin: auto; width: 100%; max-width: 440px; box-shadow: none; background: transparent; padding: 0; }
  .auth-panel:has(.choice-grid) { max-width: 520px; }
  .auth-head h1 { font-size: 1.75rem; }
  .auth-foot { margin-top: 32px; }
}
@media (min-width: 960px) { .guest { background: var(--white); } }
@media (prefers-reduced-motion: reduce) { .pulse::after { animation: none; } .auth-form .btn-primary:hover { transform: none; } }

/* Uygulama iskeleti */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .75rem; background: var(--navy); color: var(--white); padding: .5rem 1rem; padding-top: max(.5rem, env(safe-area-inset-top)); min-height: 56px; }
.topbar .brand { display: flex; align-items: center; gap: .5rem; color: var(--white); text-decoration: none; font-weight: 700; font-size: 1.1rem; }
.topbar .brand b { color: var(--orange); }
.topbar .brand img { border-radius: 8px; background: var(--white); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.topbar .tenant { font-weight: 500; opacity: .9; }
.topbar .btn-link { color: var(--white); }
.menu-toggle { display: none; background: none; border: 0; color: var(--white); font-size: 1.4rem; cursor: pointer; min-width: 44px; min-height: 44px; }
.layout { display: grid; grid-template-columns: 250px 1fr; min-height: calc(100vh - 56px); }
.sidebar { background: var(--white); border-right: 1px solid #E5E7EB; padding: 1rem .5rem; display: flex; flex-direction: column; gap: 2px; }
.nav-title { text-transform: uppercase; font-size: .72rem; letter-spacing: .08em; color: var(--muted); margin: 1rem .75rem .25rem; font-weight: 600; }
.nav-item { display: block; padding: .55rem .75rem; border-radius: 8px; text-decoration: none; color: var(--anthracite); }
.nav-item:hover { background: var(--light); }
.nav-item.active { background: rgba(249,115,22,.12); color: var(--orange-d); font-weight: 600; }
.nav-sub { font-size: .85rem; color: var(--muted); }
.nav-empty { padding: .5rem .75rem; color: var(--muted); font-size: .85rem; }
.nav-foot { margin-top: auto; padding: 1rem .75rem 0; border-top: 1px solid #E5E7EB; font-weight: 500; }
.content { padding: 1.25rem; max-width: 1200px; width: 100%; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }

/* Dashboard */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.report-card { text-decoration: none; color: inherit; display: block; transition: transform .1s; margin: 0; }
.report-card:hover { transform: translateY(-2px); }
.kpi { display: flex; flex-direction: column; gap: .15rem; margin-top: .5rem; }
.kpi-value { font-size: 1.6rem; font-weight: 700; color: var(--navy); line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi-value.is-loading { opacity: .35; animation: kpi-pulse 1.2s ease-in-out infinite; }
.kpi-value.is-muted { opacity: .35; }
.kpi-value.kpi-text { font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kpi-label.kpi-error { color: #B45309; }
.kpi-open .kpi-label { color: var(--orange-d); font-weight: 600; font-size: .9rem; }
@keyframes kpi-pulse { 50% { opacity: .15; } }
@media (prefers-reduced-motion: reduce) { .kpi-value.is-loading { animation: none; } }
.cat { display: inline-block; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--orange-d); margin-bottom: .35rem; }
.agent-strip { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.filters { display: flex; gap: .4rem .8rem; flex-wrap: wrap; align-items: center; margin-bottom: .6rem; }
.filters label { margin: 0; display: flex; align-items: center; gap: .35rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.filters label.check { text-transform: none; letter-spacing: 0; font-size: .84rem; color: var(--anthracite); font-weight: 400; }
.filters input:not([type=checkbox]), .filters select { min-height: 32px; height: 32px; margin: 0; width: auto; font-size: .84rem; padding: .2em .45em; border-radius: 7px; text-transform: none; letter-spacing: 0; color: var(--anthracite); font-weight: 400; }
.filters .ts-wrapper { width: 15rem; margin: 0; } .filters .ts-control { min-height: 32px; padding: 3px 26px 3px 8px; border-radius: 7px; font-size: .84rem; text-transform: none; letter-spacing: 0; font-weight: 400; }
.filters .btn { min-height: 32px; padding: 0 .9rem; font-size: .82rem; border-radius: 7px; }
@media (max-width: 760px) { .filters label { flex-direction: column; align-items: stretch; width: 100%; } .filters input:not([type=checkbox]), .filters select, .filters .ts-wrapper { width: 100%; min-height: 40px; height: 40px; } .filters .btn { width: 100%; min-height: 40px; } }
.report-result { margin: 1rem 0; min-height: 120px; }

/* Menü sıralama */
.sortable { list-style: none; padding: 0; margin: 1rem 0; }
.sort-item { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; border: 1px solid #E5E7EB; border-radius: 10px; margin-bottom: .5rem; background: var(--white); cursor: grab; }
.sort-item.dragging { opacity: .5; border-style: dashed; border-color: var(--orange); }
.sort-item.is-hidden .sort-title { opacity: .45; text-decoration: line-through; }
.sort-title { flex: 1; }
.handle { color: var(--muted); font-weight: 700; user-select: none; }
.vis { display: flex; align-items: center; gap: .3em; margin: 0; font-weight: 400; font-size: .85rem; }
.vis input { width: auto; min-height: 0; margin: 0; }
.actions { display: flex; align-items: center; gap: 1rem; }
.reset-form { display: block; margin-top: .75rem; }

/* Tablo */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .6rem .5rem; border-bottom: 1px solid #E5E7EB; vertical-align: middle; }
th { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
td select { display: inline-block; width: auto; min-height: 36px; padding: .3em .5em; margin: 0; }
ul.plain { list-style: none; padding: 0; }
.token-box .token { display: block; font-size: 1rem; padding: .75rem; margin: .5rem 0; background: var(--navy); color: var(--white); }

/* Mobil */
@media (max-width: 860px) {
  .menu-toggle { display: inline-block; }
  .topbar .tenant { display: none; }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: fixed; top: 56px; left: 0; bottom: 0; width: 82%; max-width: 300px; transform: translateX(-100%); transition: transform .2s; z-index: 30; box-shadow: var(--shadow); overflow-y: auto; }
  .sidebar.open { transform: translateX(0); }
  .content { padding: 1rem; }
}

/* Ajanlar: indirme + kurulum adımları */
.btn-lg { font-size: 1.05rem; padding: .8em 1.5em; min-height: 52px; }
.download-head { display: flex; gap: 1.25rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.download-head > div:first-child { flex: 1 1 360px; }
.download-cta { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.download-card { border-top: 4px solid var(--orange); }
.sha code { font-size: .8rem; }
ol.steps { counter-reset: s; list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: .6rem; }
ol.steps li { counter-increment: s; position: relative; padding: .7rem .9rem .7rem 3.1rem; background: var(--light); border-radius: 10px; }
ol.steps li::before { content: counter(s); position: absolute; left: .8rem; top: .65rem; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--navy); color: var(--white); font-weight: 700; display: grid; place-items: center; font-size: .9rem; }
pre.code { background: var(--navy); color: #E5E7EB; padding: 1rem; border-radius: 10px; overflow-x: auto; font-size: .8rem; line-height: 1.45; white-space: pre; }
.troubleshoot details { border-bottom: 1px solid #E5E7EB; padding: .6rem 0; }
.troubleshoot summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.troubleshoot ul { margin: .5rem 0 0; padding-left: 1.2rem; }
@media (max-width: 860px) { .download-cta { align-items: stretch; width: 100%; } }
/* Çevrimdışı sayfası (giriş ekranı stilini kullanır) */
.offline-head { display: block !important; }
.offline-logo { display: block; margin: 0 auto; background: var(--white); border-radius: 10px; padding: 4px 10px; height: auto; }
.offline-panel { margin-top: -44px !important; background: var(--white) !important; padding: 28px 22px !important; box-shadow: var(--shadow) !important; max-width: 440px; }

/* Başlık: Logo firma/dönem seçici */
.fp-switch select { font: inherit; font-size: .85rem; max-width: 22rem; padding: .35rem 2rem .35rem .7rem; border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08); color: inherit; cursor: pointer; }
.fp-switch select option { color: #2B2F36; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (max-width: 720px) { .fp-switch select { max-width: 11rem; } }

/* Tom Select: marka */
.ts-wrapper { width: 18rem; max-width: 100%; font-family: inherit; }
.ts-wrapper .ts-control > input { min-width: 4rem; }
.ts-wrapper .ts-control { border-radius: 8px; border-color: #d5dae2; padding: .5rem .7rem; font-size: .95rem; box-shadow: none; }
.ts-wrapper.focus .ts-control { border-color: #F97316; box-shadow: 0 0 0 3px rgba(249,115,22,.18); }
.ts-dropdown { border-radius: 8px; border-color: #d5dae2; font-size: .92rem; }
.ts-dropdown .active { background: #F1F3F6; color: #0F1E3D; }
.ts-dropdown .option, .ts-dropdown .no-results, .ts-dropdown .loading-more-results { padding: .5rem .75rem; }
.report-error { color: #b42318; }
.table-wrap { overflow-x: auto; }
.agent-error { background: #fef3f2; border: 1px solid #fecdca; color: #912018; border-radius: 8px; padding: .75rem 1rem; margin: .5rem 0; font-size: .9rem; }
.agent-events-row td { padding-top: 0; border-top: 0; }
.agent-events summary { cursor: pointer; font-size: .85rem; color: #912018; }
.agent-events ul { list-style: none; margin: .4rem 0 0; padding: 0; }
.agent-events li { padding: .35rem 0; border-top: 1px dashed #e5e7eb; font-size: .875rem; }
.agent-events li .badge { margin-right: .35rem; }

/* ===== Rapor sayfası çerçevesi (report-page.js) ===== */
.btn-sm { min-height: 36px; padding: .35em .8em; font-size: .85rem; }
/* Rapor sayfası: rapora odak — kompakt filtre çubuğu, belirgin sekmeler (docs/ui-rapor-sayfasi.md) */
.rp-head { display: flex; justify-content: space-between; gap: .4rem 1rem; flex-wrap: wrap; align-items: center; margin-bottom: .5rem; }
.rp-title { min-width: 0; flex: 1 1 22rem; }
.rp-head h1 { margin: 0; color: var(--navy); font-size: 1.35rem; }
.rp-desc { width: 0; min-width: 100%; margin: .1rem 0 0; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.rp-actions .btn-sm { min-height: 32px; padding: .25em .7em; font-size: .82rem; }
.rp-scope { background: #FFF7ED; color: #9A3412; border: 1px solid #FED7AA; padding: .3em .7em; border-radius: 8px; display: inline-block; margin: 0 0 .5rem; }
/* Sekmeler: etkin görünüm koyu lacivert dolgu + kalın turuncu alt çizgi; geniş tıklama alanı */
.rp-tabs { display: flex; gap: .2rem; border-bottom: 3px solid var(--navy); margin: 0 0 .5rem; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; }
.rp-tabs::-webkit-scrollbar { display: none; }
.rp-tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: .45em 1.1em; color: #374151; text-decoration: none; font-weight: 600; font-size: .92rem; white-space: nowrap; border-radius: 8px 8px 0 0; border-bottom: 4px solid transparent; scroll-snap-align: start; transition: background .12s, color .12s; }
.rp-tabs a:hover { background: #E8EBF1; color: var(--navy); }
.rp-tabs a:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.rp-tabs a.on { background: var(--navy); color: var(--white); border-bottom-color: var(--orange); font-weight: 700; }
.rp-tabs a.on:hover { background: var(--navy); color: var(--white); }
.rp-tabs a.rp-related { font-weight: 500; font-size: .84rem; color: var(--muted); min-height: 36px; padding: .4em .8em; }
.rp-tabs a.rp-related:hover { color: var(--navy); }
/* Filtre çubuğu: tek sıkı satır, satır içi küçük etiketler, 32px kontroller */
.rp-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .6rem; padding: .4rem .6rem; margin-bottom: .6rem; font-size: .85rem; border-radius: 10px; }
.rp-filter-body { display: contents; }
.rp-filters-toggle, .rp-sheet-head, .rp-sheet-foot, .rp-sheet-backdrop { display: none; }
.rp-f { display: flex; flex-direction: row; align-items: center; gap: .35rem; min-width: 0; margin: 0; font-weight: 400; order: 1; }
.rp-l { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; white-space: nowrap; }
.rp-filters input[type=date], .rp-filters select:not(.tomselected) { font: inherit; font-size: .84rem; padding: 4px 8px; margin: 0; border: 1px solid #D6DAE1; border-radius: 7px; background: var(--white); min-height: 34px; height: 34px; max-height: 34px; line-height: 1.2; width: auto; -webkit-appearance: none; appearance: none; box-sizing: border-box; }
.rp-filters input[type=date] { width: 8.1rem; padding-right: .2em; }
.rp-dates { display: flex; gap: .25rem; align-items: center; color: var(--muted); }
.rp-f .ts-wrapper { width: 10.5rem; margin: 0; }
.rp-f-wide .ts-wrapper { width: 15rem; }
.rp-filters .ts-control { display: flex; align-items: center; min-height: 32px; padding: 0 26px 0 8px; border-radius: 7px; font-size: .84rem; line-height: 1.2; border-color: #D6DAE1; }
.rp-filters .ts-control > .item, .rp-filters .ts-control > input { margin: 0 !important; line-height: 1.2; }
.rp-filters .ts-wrapper.single .ts-control input { font-size: .84rem; }
.rp-filters .ts-dropdown { font-size: .84rem; z-index: 40; box-shadow: 0 8px 24px rgba(15,30,61,.16); border-color: #CBD5E1; border-radius: 8px; }
.rp-filters .ts-dropdown .ts-dropdown-content { max-height: 260px; }
.rp-filters .ts-dropdown .option { padding: 8px 10px; border-bottom: 1px solid #F1F5F9; line-height: 1.35; }
.rp-chips { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; order: 2; min-width: 0; }
.rp-chips:empty { display: none; }
.rp-chip { display: inline-flex; align-items: center; gap: .25rem; background: #FFF7ED; border: 1px solid #FED7AA; color: #7C2D12; border-radius: 999px; padding: 0 .1rem 0 .6rem; font-size: .78rem; min-height: 26px; white-space: nowrap; max-width: 18rem; }
.rp-chip b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.rp-chip-l { color: #9A3412; }
.rp-chip button { border: 0; background: none; color: inherit; font-size: 1rem; line-height: 1; cursor: pointer; padding: .15rem .4rem; border-radius: 999px; }
.rp-chip button:hover { background: #FED7AA; }
.rp-tools { display: flex; gap: .4rem; align-items: center; margin-left: auto; order: 3; }
.rp-more-toggle { display: inline-flex; align-items: center; gap: .3rem; border: 1px solid #D6DAE1; background: var(--white); color: var(--navy); font: inherit; font-size: .82rem; font-weight: 600; border-radius: 7px; min-height: 32px; padding: 0 .65rem; cursor: pointer; white-space: nowrap; }
.rp-more-toggle:hover, .more-open .rp-more-toggle { background: #F1F3F6; }
.more-open .rp-caret { transform: rotate(180deg); }
.rp-caret { font-size: .7rem; transition: transform .12s; }
.rp-n { display: inline-flex; align-items: center; justify-content: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 999px; background: var(--orange); color: var(--white); font-size: .7rem; font-weight: 700; }
.rp-n[hidden] { display: none; }
/* masaüstünde filtreler değişince anında uygulanır; Uygula yalnız dar çubukta yer kaplamasın diye gizli (Enter yine çalışır), mobil sayfada görünür */
.rp-apply { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; padding: 0; border: 0; }
.rp-more { flex: 1 1 100%; order: 4; display: flex; flex-wrap: wrap; gap: .35rem .9rem; align-items: center; border-top: 1px dashed #E5E7EB; padding-top: .4rem; }
.rp-more[hidden] { display: none; }
.rp-pivot-row { display: flex; gap: .3rem; flex-wrap: wrap; align-items: center; }
.seg { display: inline-flex; border: 1px solid #D6DAE1; border-radius: 7px; overflow: hidden; flex: none; }
.seg button, .seg label span { font: inherit; font-size: .8rem; border: 0; background: var(--white); padding: 0 .6em; min-height: 30px; line-height: 30px; cursor: pointer; color: var(--anthracite); display: block; white-space: nowrap; }
.seg label { position: relative; margin: 0; font-weight: 400; }
.seg button:hover, .seg label:hover span { background: #F1F3F6; }
.seg button + button, .seg label + label span { border-left: 1px solid #E5E7EB; }
.seg button.on, .seg input:checked + span { background: var(--navy); color: var(--white); }
.seg input { position: absolute; inset: 0; width: 1px; height: 1px; min-height: 0; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.seg input:focus-visible + span { outline: 2px solid var(--orange); outline-offset: -2px; }
.rp-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: .6rem; margin-bottom: .6rem; }
.rp-summary:empty, .rp-msg:empty, #mk-msg:empty, .card:empty { display: none; }
.rp-table-card { margin-bottom: .6rem; }
.kpi-card { padding: .55rem .85rem; border-left: 4px solid var(--navy); margin-bottom: 0; min-width: 0; }
.kpi-card.is-bad { border-left-color: var(--err); }
.kpi-l { font-size: .75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.kpi-v { font-size: clamp(1.02rem, 1.4vw, 1.25rem); font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-v small { font-size: .7em; color: var(--muted); }
.rp-chart { padding: .75rem 1rem; margin-bottom: .6rem; }
.rp-chart h3 { margin: 0 0 .6rem; font-size: .95rem; color: var(--navy); }
.hbar, .sbar { display: grid; grid-template-columns: 1.6rem minmax(8rem, 14rem) 1fr 8.5rem; gap: .5rem; align-items: center; font-size: .83rem; padding: .18rem 0; }
.sbar { grid-template-columns: minmax(8rem, 14rem) 1fr 5rem; }
.hn { color: var(--muted); text-align: right; }
.rp-hl, .sl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ht { background: var(--light); border-radius: 4px; height: 14px; overflow: hidden; }
.ht i { display: block; height: 100%; background: linear-gradient(90deg, var(--navy), #2C4A85); border-radius: 4px; }
.ht i.neg { background: var(--ok); }
.hbar b, .sbar b { text-align: right; font-variant-numeric: tabular-nums; }
.st { display: flex; height: 16px; border-radius: 4px; overflow: hidden; min-width: 2px; }
.st i { display: block; height: 100%; }
.leg { display: flex; gap: .9rem; flex-wrap: wrap; font-size: .78rem; margin-bottom: .5rem; color: var(--muted); }
.leg .sw { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: .3rem; vertical-align: -1px; }
.rp-table-card { padding: 0; overflow: hidden; }
.rp-tt { display: flex; justify-content: space-between; align-items: center; gap: .75rem; padding: .45rem .75rem; border-bottom: 1px solid #E5E7EB; flex-wrap: wrap; }
.rp-tt input { font: inherit; padding: .45em .7em; border: 1px solid #D6DAE1; border-radius: 8px; min-width: 14rem; }
.rp-table-wrap { overflow: auto; max-height: 70vh; }
.rp-table-wrap.is-loading { opacity: .45; transition: opacity .2s; }
.rp-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: .84rem; font-variant-numeric: tabular-nums; }
.rp-table th, .rp-table td { padding: .45rem .7rem; border-bottom: 1px solid #EEF0F3; white-space: nowrap; }
.rp-table thead th { position: sticky; top: 0; background: var(--navy); color: var(--white); font-weight: 600; text-align: left; cursor: pointer; user-select: none; z-index: 2; }
.rp-table thead th.n { text-align: right; }
.rp-table .rp-lbl, .rp-table thead th:first-child, .rp-table tfoot th:not([colspan]) { position: sticky; left: 0; background: inherit; z-index: 1; text-align: left; font-weight: 500; max-width: 22rem; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid #E5E8EE; }
.rp-table thead th:first-child { z-index: 3; background: var(--navy); border-right-color: #2A3A5C; }
.rp-table tfoot th:not([colspan]) { z-index: 2; background: #F1F3F6; }
.rp-table tbody tr { background: var(--white); }
.rp-table tbody tr:nth-child(even) { background: #FAFBFC; }
.rp-table tbody tr:hover { background: #FFF7ED; }
.rp-table tr.is-group { background: #EEF2F8; font-weight: 600; }
.rp-table tr.is-child .rp-lbl { padding-left: 1.8rem; color: var(--anthracite); }
.rp-table td.n { text-align: right; }
.rp-table td.is-total, .rp-table th.is-total { font-weight: 700; }
.rp-table td.neg { color: var(--err); }
.rp-table td.is-credit { color: var(--ok); }
.rp-table td.age-mid { background: #FEF3C7; }
.rp-table td.age-old { background: #FEE2E2; color: #991B1B; }
.rp-table .z { color: #C5CAD3; }
/* Yıl + ay sütunlu yaşlandırma: tüm aylar tek ekranda (kuruşsuz, sıkı) */
.rp-table.is-dense { font-size: .76rem; }
.rp-table.is-dense th, .rp-table.is-dense td { padding: .36rem .2rem; }
.rp-table.is-dense .rp-lbl, .rp-table.is-dense thead th:first-child, .rp-table.is-dense tfoot th { max-width: 10rem; }
.rp-table.is-dense thead th:last-child { white-space: normal; min-width: 4.6rem; }
.rp-table tfoot td, .rp-table tfoot th { position: sticky; bottom: 0; background: #F1F3F6; font-weight: 700; border-top: 2px solid var(--navy); }
.rp-table .lnk { color: var(--navy); text-decoration: none; border-bottom: 1px dotted var(--orange); }
.cell-btn { font: inherit; background: none; border: 0; padding: 0; color: var(--navy); cursor: pointer; border-bottom: 1px dotted var(--orange); }
.rp-dialog { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); padding: 0; width: min(960px, 96vw); max-height: 88vh; }
.rp-dialog::backdrop { background: rgba(15,30,61,.45); }
.rp-dialog-head { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1rem; background: var(--navy); color: var(--white); }
.rp-dialog-head h2 { margin: 0; font-size: 1rem; }
.rp-dialog-head .btn-link { color: var(--white); text-decoration: none; font-size: 1.1rem; }
#rp-dialog-body { padding: .5rem; }
@media (max-width: 760px) {
  .hbar { grid-template-columns: 1.2rem 7rem 1fr 6rem; } .sbar { grid-template-columns: 7rem 1fr 4rem; }
  .rp-table .rp-lbl { max-width: 10rem; }
  .rp-head h1 { font-size: 1.2rem; }
  .rp-desc { display: none; }
  .rp-actions .rp-updated { width: 100%; order: -1; }
  .rp-tabs a { min-height: 42px; padding: .4em .95em; }
  /* filtre çubuğu -> düğme + çipler; filtreler alttan açılan sayfada */
  .rp-filters { padding: .35rem .45rem; gap: .35rem; }
  .rp-filters-toggle { display: inline-flex; min-height: 34px; gap: .3rem; }
  .rp-chip[data-primary] { display: inline-flex; }
  .rp-filter-body:not(.mk-filter-body) { display: none; }
  .mk-filter-body { display: grid; grid-template-columns: 1fr auto; gap: .45rem .5rem; width: 100%; align-items: end; }
  .mk-filter-body .rp-f-wide { grid-column: 1 / -1; }
  .mk-filter-body .rp-submit .btn { min-height: 32px; height: 32px; padding: 0 .85rem; font-size: .82rem; }
  .rp-filters.open .rp-filter-body { display: flex; flex-direction: column; gap: .65rem; position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; max-height: 82vh; overflow-y: auto; background: var(--white); border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgba(15,30,61,.25); padding: 0 1rem calc(.8rem + env(safe-area-inset-bottom)); }
  .rp-filters.open .rp-sheet-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 59; background: rgba(15,30,61,.45); }
  .rp-sheet-head { order: -1; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--white); padding: .75rem 0 .4rem; border-bottom: 1px solid #EEF0F3; color: var(--navy); z-index: 1; }
  .rp-sheet-head .btn-link { font-size: 1.15rem; text-decoration: none; color: var(--navy); min-height: 40px; min-width: 40px; }
  .rp-sheet-foot { order: 9; display: block; position: sticky; bottom: 0; background: var(--white); padding-top: .5rem; }
  .rp-sheet-foot .btn { width: 100%; }
  .rp-f, .rp-more { flex-direction: column; align-items: stretch; gap: .3rem; }
  .rp-more, .rp-more[hidden] { display: flex; border-top: 0; padding-top: 0; }
  .rp-more .rp-f { flex-direction: column; }
  .rp-tools { display: none; }
  .rp-f .ts-wrapper, .rp-f-wide .ts-wrapper { width: 100%; }
  .rp-filters input[type=date] { min-height: 32px; height: 32px; max-height: 32px; padding: 2px 6px; font-size: 12.5px; line-height: 1.15; -webkit-appearance: none; appearance: none; }
  .rp-filters select:not(.tomselected) { min-height: 38px; height: 38px; }
  .rp-filters .ts-control { min-height: 40px; }
  .seg { align-self: flex-start; max-width: 100%; overflow-x: auto; }
  .seg button, .seg label span { min-height: 36px; line-height: 36px; }
  body.rp-sheet-on { overflow: hidden; }
}
@media (min-width: 761px) { .rp-chip[data-primary] { display: none; } }
.content { min-width: 0; }
.rp-table th { font-size: inherit; text-transform: none; letter-spacing: 0; color: inherit; }
.rp-table thead th { color: var(--white); font-size: .8rem; }
.rp-chart, .rp-summary, .rp-table-card, .rp-tabs, .rp-filters { min-width: 0; max-width: 100%; }
@media (max-width: 760px) {
  .rp-pivot-row select, .rp-f select:not(.tomselected) { width: 100%; }
  .rp-dates { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; width: 100%; align-items: center; }
  .rp-dates input[type=date] { width: 100% !important; min-width: 0; height: 32px !important; min-height: 32px !important; max-height: 32px !important; padding: 2px 6px; font-size: 12.5px; }
  .rp-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-v { font-size: 1.05rem; }
}
.content:has(.rp-head) { max-width: 1600px; }
.rp-tt input { width: auto; margin: 0; min-height: 32px; height: 32px; padding: .2em .6em; font-size: .84rem; }
/* Müşteri kartı */
.rp-below { margin-top: 18px; }
.mk-head { padding: 1rem 1.25rem; margin-bottom: 1rem; }
.mk-head h2 { margin: 0; color: var(--navy); font-size: 1.2rem; }
.mk-head p { margin: .2rem 0 0; }
.mk-id { display: flex; justify-content: space-between; gap: 1rem; align-items: center; flex-wrap: wrap; }
.mk-note { padding: .6rem 1rem; font-size: .85rem; color: var(--muted); border-bottom: 1px solid #EEF0F3; }
.mk-pad { padding: 1rem; margin: 0; }
.mk-empty { padding: 1.5rem; }
.rp-table tr.mk-devir { background: #F1F5F9; }
.mk-devir td { background: #F1F5F9; color: var(--navy); border-bottom: 2px solid #CBD5E1; }
/* Yeni panel */
.content:has(.pn-kpis) { max-width: 1600px; }
.pn-bar { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin: .5rem 0 .75rem; flex-wrap: wrap; }
.pn-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.pn-kpi { padding: .85rem 1rem .6rem; border-left: 4px solid var(--navy); position: relative; min-width: 0; }
.pn-kpi.is-bad { border-left-color: var(--err); }
.pn-kpi.is-loading { opacity: .5; }
.pn-sub { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; min-height: 1.3em; }
.pn-chg { font-size: .78rem; font-weight: 700; padding: .05em .4em; border-radius: 6px; }
.pn-chg.up { color: #166534; background: #DCFCE7; } .pn-chg.down { color: #991B1B; background: #FEE2E2; }
.pn-spark { width: 100%; height: 32px; margin-top: .3rem; display: block; }
.pn-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.pn-card { padding: 1rem 1.1rem; min-width: 0; }
.pn-card h3 { margin: 0 0 .7rem; font-size: .95rem; color: var(--navy); }
.pn-wide { grid-column: span 2; }
.pn-chart svg { width: 100%; height: auto; display: block; }
.pn-ax { font-size: 10px; fill: #6B7280; font-family: var(--font); }
.sw-navy { background: var(--navy); } .sw-grey { background: #CBD5E1; }
.pn-row { display: grid; grid-template-columns: minmax(5rem, 9rem) 1fr 4.5rem 2.6rem; gap: .5rem; align-items: center; font-size: .84rem; padding: .2rem 0; }
.pn-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-row b { text-align: right; font-variant-numeric: tabular-nums; } .pn-pct { text-align: right; }
.pn-age .ht i.age-0 { background: #94A3B8; } .pn-age .ht i.age-1 { background: #16A34A; } .pn-age .ht i.age-2 { background: #F59E0B; } .pn-age .ht i.age-3 { background: #F97316; } .pn-age .ht i.age-4 { background: #DC2626; }
.pn-more { display: inline-block; margin-top: .6rem; font-size: .82rem; color: var(--navy); }
.pn-alerts { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.pn-al { border-left: 3px solid var(--warn); background: #FFFBEB; padding: .5rem .7rem; border-radius: 6px; font-size: .86rem; }
.pn-al.bad { border-left-color: var(--err); background: #FEF2F2; }
.pn-al a { color: inherit; text-decoration: none; }
@media (max-width: 1200px) { .pn-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pn-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 760px) { .pn-kpis { grid-template-columns: 1fr 1fr; } .pn-grid { grid-template-columns: 1fr; } .pn-wide { grid-column: auto; } }
.scope-form { display: flex; flex-direction: column; gap: .25rem; min-width: 12rem; }
.scope-form input[type=text] { min-height: 36px; padding: .35em .6em; margin: 0; }
.scope-form label.check { margin: 0; }
.rp-tab-sep { width: 1px; background: #D6DAE1; margin: .4rem .5rem; flex: none; }
.rp-related { font-size: .9em; }
.rp-related.is-current { color: var(--orange); font-weight: 600; }
/* Dar telefonlarda üst çubuk yatay kaydırma üretmesin (rapor sayfası 390px) */
@media (max-width: 480px) {
  .topbar { gap: .45rem; padding-left: .6rem; padding-right: .6rem; }
  .topbar-right { gap: .4rem; min-width: 0; }
  .topbar .brand { font-size: .95rem; gap: .35rem; }
  .topbar .brand img { width: 28px; height: 28px; }
  .topbar .badge-trial, .topbar .badge-wait { font-size: .62rem; line-height: 1.15; padding: .15em .4em; max-width: 5.2rem; white-space: normal; }
}

/* Faz 1: Paketim / platform */
.pk-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.pk-plan { font-size: 1.6rem; font-weight: 700; color: #1E3A5F; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pk-days { display: grid; text-align: center; background: #FFF7ED; border: 1px solid #FED7AA; border-radius: 10px; padding: 10px 18px; min-width: 120px; }
.pk-days b { font-size: 2rem; color: #C2410C; line-height: 1.1; }
.pk-days small { color: #9A3412; }
.pk-limits { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 16px 0; }
.pk-limits div { background: #F8FAFC; border: 1px solid #E2E8F0; border-radius: 8px; padding: 10px 12px; }
.pk-limits dt { font-size: .8rem; color: #64748B; }
.pk-limits dd { margin: 2px 0 0; font-weight: 600; }
.pk-compare th, .pk-compare td { text-align: center; }
.pk-compare tbody th { text-align: left; font-weight: 500; }
.pk-compare .pk-cur { background: #EFF6FF; }
.pf-form { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pf-form select, .pf-form input { max-width: 150px; }
.access-banner a { font-weight: 600; margin-left: 6px; }
.pn-featured { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: thin; }
.pn-feat { flex: 0 0 auto; background: #fff; border: 1px solid #E2E8F0; border-radius: 99px; padding: 7px 14px; font-size: .88rem; color: #0F1E3D; text-decoration: none; white-space: nowrap; }
.pn-feat:hover { border-color: #F97316; color: #C2410C; }

/* Ajanlar: bağlantı adımları (faz 2b) */
.connect-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.connect-head h2 { margin-bottom: 4px; }
.connect-live { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.cstep-list { list-style: none; margin: 18px 0 12px; padding: 0; display: grid; gap: 0; }
.cstep { display: grid; grid-template-columns: 40px 1fr; gap: 14px; position: relative; padding-bottom: 18px; }
.cstep:not(:last-child)::before { content: ""; position: absolute; left: 19px; top: 40px; bottom: 0; width: 2px; background: #E5E7EB; }
.cstep.is-done:not(:last-child)::before { background: var(--ok); }
.cstep-n { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: var(--light); color: var(--muted); border: 2px solid #E5E7EB; }
.cstep.is-now .cstep-n { background: var(--orange); color: #fff; border-color: var(--orange); box-shadow: 0 0 0 5px rgba(249,115,22,.15); }
.cstep.is-done .cstep-n { background: var(--ok); color: #fff; border-color: var(--ok); }
.cstep-body h3 { margin: 8px 0 4px; font-size: 1.02rem; color: var(--navy); }
.cstep:not(.is-now):not(.is-done) .cstep-body h3 { color: var(--muted); }
.cstep-body .btn { margin: 4px 8px 4px 0; }
.cstep-auto { margin: 4px 0 6px; padding-left: 18px; }
.cstep-auto li { margin: 2px 0; }
.code-box { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: #FFF7ED; border: 1px dashed var(--orange); border-radius: 10px; padding: 10px 12px; margin: 6px 0; }
.code-box code { font-size: .95rem; word-break: break-all; flex: 1 1 260px; background: none; }
.connect-ok { border-top: 4px solid var(--ok); }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid rgba(249,115,22,.3); border-top-color: var(--orange); border-radius: 50%; animation: pp-spin .8s linear infinite; vertical-align: -2px; margin-left: 6px; }
@keyframes pp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.sha summary { cursor: pointer; color: var(--muted); }
.btn-sm { padding: 4px 10px; font-size: .85rem; }

/* Çoklu firma: başlıktaki firma değiştirici (lacivert zemin, turuncu vurgu) */
.tenant-switch { display: inline-flex; align-items: center; gap: .35rem; padding: .15rem .25rem .15rem .55rem;
  border: 1px solid rgba(249,115,22,.55); border-radius: 999px; background: rgba(249,115,22,.12); }
.tenant-switch-icon { color: #F97316; font-weight: 700; }
.tenant-switch select { font: inherit; font-size: .85rem; font-weight: 600; max-width: 16rem; padding: .3rem 1.6rem .3rem .35rem;
  border: 0; background: transparent; color: inherit; cursor: pointer; }
.tenant-switch select:focus-visible { outline: 2px solid #F97316; outline-offset: 2px; border-radius: 6px; }
.tenant-switch select option { color: #0F1E3D; }
@media (max-width: 720px) { .tenant-switch { padding: .1rem .15rem .1rem .4rem; } .tenant-switch-icon { display: none; }
  .tenant-switch select { min-width: 6.5rem; max-width: 8rem; font-size: .78rem; padding-right: 1.2rem; text-overflow: ellipsis; } }
/* Çoklu firma: giriş sonrası firma seçici */
.tenant-list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .6rem; }
.tenant-card { width: 100%; display: flex; align-items: center; gap: .85rem; padding: .85rem 1rem; text-align: left; cursor: pointer;
  border: 1px solid #DCE1EA; border-radius: 12px; background: #fff; color: #0F1E3D; font: inherit; transition: border-color .15s, box-shadow .15s; }
.tenant-card:hover, .tenant-card:focus-visible { border-color: #F97316; box-shadow: 0 0 0 3px rgba(249,115,22,.15); outline: none; }
.tenant-card.is-current { border-color: #0F1E3D; }
.tenant-avatar { flex: 0 0 2.4rem; height: 2.4rem; border-radius: 10px; display: grid; place-items: center; background: #0F1E3D; color: #F97316; font-weight: 700; font-size: 1.1rem; }
.tenant-meta { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.tenant-meta b { font-size: 1rem; }
.tenant-meta small { color: #5B6475; }
.tenant-go { color: #F97316; font-size: 1.2rem; font-weight: 700; }
.tenant-pick-foot { text-align: center; }
.pf-member-form { margin-top: .4rem; padding-top: .4rem; border-top: 1px dashed #DCE1EA; }
.pf-member-form input[type=email] { min-width: 14rem; }
.pf-members summary { cursor: pointer; color: #F97316; }
@media (max-width: 480px) { .topbar:has(.tenant-switch) .brand > span { display: none !important; } }
/* Ajanı indir (sayfa başı) */
.agent-dl{display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end;max-width:640px}
.agent-dl .small{max-width:360px;line-height:1.35}
@media (max-width:720px){.agent-dl{justify-content:flex-start;width:100%}.agent-dl .btn{width:100%;justify-content:center;text-align:center}}
.code-hidden{display:block;background:#EFF6FF;border:1px solid #BFDBFE;border-radius:10px;padding:10px 12px;margin:6px 0 10px;line-height:1.45;overflow-wrap:anywhere}

/* Mobil kompakt (≤640px / ≤380px): daha küçük yazı, boşluk ve kutular; dokunma hedefleri ≥40px. Masaüstü değişmez. */
@media (max-width: 640px) {
  html, body { overflow-x: hidden; }
  body { font-size: 14px; line-height: 1.45; }
  h1 { font-size: 1.25rem; } h2 { font-size: 1.05rem; } h3 { font-size: .95rem; }
  .content { padding: .75rem; }
  .page-head { gap: .5rem; margin-bottom: .6rem; }
  .page-head h1 { margin-bottom: .1em; }
  .card { padding: .8rem .9rem; margin-bottom: .65rem; border-radius: 10px; }
  .grid { gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .btn { min-height: 40px; padding: .45em .85em; font-size: .9rem; border-radius: 9px; }
  .btn-sm, .rp-actions .btn-sm, .filters .btn { min-height: 40px; padding: .3em .7em; font-size: .82rem; }
  .btn-lg, .auth-form .btn-lg { min-height: 44px; font-size: .95rem; padding: .55em 1em; }
  .rp-tt input, .rp-filters select:not(.tomselected), .rp-filters .ts-control, .rp-more-toggle, .filters select, .filters .ts-control { min-height: 38px; height: 38px; }
  .rp-filters input[type=date], .filters input[type=date], .cf-grid input[type=date] { min-height: 32px !important; height: 32px !important; max-height: 32px !important; padding: 2px 6px !important; font-size: 12.5px !important; line-height: 1.15 !important; -webkit-appearance: none; appearance: none; }
  .btn-link { min-height: 40px; display: inline-flex; align-items: center; }
  .btn-icon { width: 40px; height: 40px; }
  input, select { min-height: 40px; padding: .5em .7em; }
  .badge { font-size: .72rem; }
  /* Üst çubuk / menü */
  .topbar { min-height: 48px; padding-top: max(.3rem, env(safe-area-inset-top)); padding-bottom: .3rem; }
  .menu-toggle { min-width: 40px; min-height: 40px; font-size: 1.25rem; }
  .layout { min-height: calc(100vh - 48px); }
  .nav-item { padding: .5rem .7rem; min-height: 40px; font-size: .9rem; }
  .nav-title { margin: .7rem .7rem .2rem; font-size: .68rem; }
  /* KPI kutuları */
  .pn-kpis { gap: .5rem; margin-bottom: .65rem; }
  .pn-kpi { padding: .55rem .7rem .45rem; }
  .pn-grid { gap: .65rem; }
  .pn-card { padding: .75rem .8rem; }
  .pn-card h3 { margin-bottom: .45rem; font-size: .9rem; }
  .pn-spark { height: 26px; }
  .kpi-value { font-size: 1.25rem; }
  .kpi-value.kpi-text { font-size: .95rem; }
  .kpi-card { padding: .45rem .7rem; }
  .kpi-l { font-size: .68rem; }
  .kpi-v { font-size: 1rem; }
  /* Tablolar: kendi kutusunda kayar */
  .table-wrap, .rp-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }
  th, td { padding: .45rem .4rem; font-size: .85rem; }
  .rp-table { font-size: .78rem; }
  .rp-table th, .rp-table td { padding: .35rem .5rem; }
  .rp-table .rp-lbl, .rp-table thead th:first-child, .rp-table tfoot th { max-width: 11rem; }
  .rp-tabs a { padding-top: .45rem; padding-bottom: .45rem; font-size: .88rem; min-height: 40px; }
  /* Ajanlar adımları */
  .cstep-list { margin: 12px 0 8px; }
  .cstep { grid-template-columns: 32px 1fr; gap: 10px; padding-bottom: 12px; }
  .cstep-n { width: 32px; height: 32px; font-size: .85rem; }
  .cstep:not(:last-child)::before { left: 15px; top: 32px; }
  .cstep-body h3 { margin: 5px 0 3px; font-size: .95rem; }
  .cstep-body p, .cstep-auto { font-size: .85rem; }
  .code-box { padding: 8px 10px; }
  .code-box code { font-size: .85rem; flex-basis: 180px; }
  /* Giriş */
  .auth-panel { padding: 20px 16px; border-radius: 14px; }
  .auth-form input { min-height: 44px; padding: 10px 12px; font-size: 16px; } /* iOS yakınlaştırmasın */
  .auth-form label.check { margin: 2px 0 14px; }
  .choice-box { min-height: 44px; padding: 8px 12px; }
}
@media (max-width: 380px) {
  body { font-size: 13.5px; }
  h1 { font-size: 1.15rem; }
  .content { padding: .6rem; }
  .card { padding: .7rem .75rem; }
  .topbar .brand { font-size: .88rem; }
  .pn-kpis { gap: .4rem; }
  .kpi-value { font-size: 1.1rem; }
  .rp-table { font-size: .74rem; }
  .rp-table th, .rp-table td { padding: .32rem .4rem; }
}
/* Deneme rozeti: mobilde üst çubuktan çıkar, menü çekmecesinde küçük gösterilir */
.nav-trial { display: none; }
@media (max-width: 640px) {
  .topbar .topbar-trial { display: none !important; }
  .sidebar .nav-trial { display: flex; align-items: center; align-self: flex-start; min-height: 40px; margin: .5rem .7rem 0; padding: 0 .7rem; font-size: .75rem; text-decoration: none; white-space: normal; line-height: 1.25; }
}

/* Profilim */
.profile-form { max-width: 32rem; }
.profile-form .field { margin: 0 0 14px; }
.profile-form .field label { margin-bottom: 0; }
.profile-form .hint { margin: .35em 0 0; }
.profile-form input[readonly] { background: #F3F4F6; color: #4B5563; }

/* Kullanıcı koltuk bilgisi + Firma Profili */
.seat-info { margin: 0 0 .8em; }
.firm-grid { display: grid; gap: 0 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .firm-grid { grid-template-columns: 1fr 1fr; } .firm-grid .wide { grid-column: 1 / -1; } }
.firm-logo { display: flex; align-items: center; gap: 12px; margin: 0 0 12px; }
.firm-logo img { max-width: 140px; max-height: 56px; border: 1px solid #E5E7EB; border-radius: 8px; padding: 4px; background: #fff; }
.firm-dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 0; }
.firm-dl dt { color: #6B7280; font-size: .85rem; } .firm-dl dd { margin: 0; overflow-wrap: anywhere; }
.danger-zone { border-color: #F3C4C4; }

/* Alacak takibi (23.10.2026): haftalık karşılaştırma, uyarı ayarları, müşteri kartı tahsilat takibi */
.dlt-up { color: #B91C1C; font-weight: 600; white-space: nowrap; }      /* geciken alacak arttı = kötü */
.dlt-down { color: #15803D; font-weight: 600; white-space: nowrap; }
.at-week h2, .mk-follow h2 { margin-bottom: .25rem; }
.at-table th[scope="row"] { white-space: nowrap; }
.at-cards { margin-top: .6rem; }
.at-cards .kpi-v .dlt-up, .at-cards .kpi-v .dlt-down { font-size: inherit; }
tr.at-late th, tr.at-late td { background: #FEF2F2; }
.at-alerts { margin: 0; padding-left: 1.1rem; font-size: .9rem; display: grid; gap: .35rem; }
.at-form .check { display: flex; gap: .5rem; align-items: flex-start; margin: .35rem 0; }
.at-fs { border: 1px solid var(--line, #E5E7EB); border-radius: 10px; padding: .6rem .8rem; margin: .7rem 0; min-width: 0; }
.at-fs legend { font-weight: 600; padding: 0 .3rem; }
.at-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: .6rem; margin-top: .4rem; }
.at-grid .field input, .at-grid .field select { width: 100%; }
.at-members { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 0 .8rem; }
.at-run { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .4rem; }
.mk-follow { margin-top: .8rem; }
.cf-items { list-style: none; margin: 0 0 .6rem; padding: 0; display: grid; gap: .45rem; }
.cf-item { border: 1px solid var(--line, #E5E7EB); border-left: 4px solid #CBD5E1; border-radius: 8px; padding: .45rem .6rem; }
.cf-item.is-late { border-left-color: #DC2626; background: #FEF2F2; }
.cf-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: .15rem 0; }
.cf-acts { margin-left: .4rem; }
.cf-form { border-top: 1px solid var(--line, #E5E7EB); padding-top: .6rem; }
.cf-kind { display: flex; gap: 1.2rem; align-items: center; margin-bottom: .5rem; }
.cf-kind label { display: inline-flex; align-items: center; gap: .35rem; margin: 0; cursor: pointer; font-weight: 500; }
.cf-grid input:not([type=radio]):not([type=checkbox]) { height: 32px; min-height: 32px; max-height: 32px; padding: 2px 6px; font-size: 12.5px; margin-top: .2em; }
.cf-grid { display: grid; grid-template-columns: 160px 160px 1fr; gap: .5rem; align-items: end; }
.cf-grid label { display: flex; flex-direction: column; min-width: 0; }
.cf-grid input, .cf-grid textarea { width: 100%; }
.cf-lim-form { display: flex; gap: .4rem; }
.cf-lim-form[hidden] { display: none; }
@media (max-width: 640px) {
  .cf-grid { grid-template-columns: 1fr 1fr; }
  .cf-grid .cf-note { grid-column: 1 / -1; }
  .at-table { font-size: .82rem; }
}
.cf-grid label[hidden] { display: none; }

/* Bildirimler › Telegram (QR ile bağla) */
.tg-card { max-width: 560px; }
.tg-card [hidden] { display: none !important; }
.tg-linked .tg-actions { margin-top: .75rem; }
.tg-steps { margin: .25rem 0 1rem; padding-left: 1.2rem; line-height: 1.6; }
.tg-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: .5rem; margin: .5rem 0 1rem; }
.tg-qr { width: 232px; height: 232px; padding: 10px; background: #fff; border: 2px solid #0F1E3D; border-radius: 16px; display: grid; place-items: center; position: relative; }
.tg-qr svg { width: 100%; height: 100%; display: block; }
.tg-qr.is-expired svg { opacity: .12; filter: grayscale(1); }
.tg-qr.is-expired::after { content: 'Süresi doldu'; position: absolute; font-weight: 700; color: #0F1E3D; }
.tg-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.tg-open { background: #F97316; border-color: #F97316; }
.tg-open:hover { background: #ea670c; border-color: #ea670c; }
.tg-linked { text-align: left; }
.tg-ok { width: 48px; height: 48px; border-radius: 50%; background: #0F1E3D; color: #F97316; display: grid; place-items: center; font-size: 1.6rem; font-weight: 800; margin-bottom: .5rem; }
@media (max-width: 760px) {
  .tg-card { padding: 1rem; }
  .tg-qr { width: 200px; height: 200px; }
  .tg-actions .btn { flex: 1 1 100%; min-height: 44px; justify-content: center; text-align: center; }
  .tg-steps { font-size: .85rem; }
}

/* Ajan durumu: kontrol sürerken nötr (gri) + dönen nokta */
.badge-check { background: #EEF0F4; color: #475569; display: inline-flex; align-items: center; gap: .4em; }
.dot-spin { width: .7em; height: .7em; border-radius: 50%; border: 2px solid #CBD5E1; border-top-color: #64748B; animation: pp-spin .8s linear infinite; flex: none; }
@keyframes pp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dot-spin { animation: none; border-color: #94A3B8; } }

/* Telegram QR: dokunulabilir derin bağlantı */
a.tg-qr { color: inherit; text-decoration: none; }
a.tg-qr[href] { cursor: pointer; transition: transform .15s, box-shadow .15s; }
a.tg-qr[href]:hover, a.tg-qr[href]:focus-visible { box-shadow: 0 0 0 4px rgba(249,115,22,.35); }
a.tg-qr[href]:active { transform: scale(.98); }
a.tg-qr:not([href]) { cursor: default; }
.tg-qr-hint { display: none; margin: 0; color: #475569; }
@media (max-width: 760px), (pointer: coarse) { .tg-qr-hint { display: block; } }

/* Firma ayarları (/ayarlar/firma): 8 grup, tipli alanlar */
.fs-head { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; align-items: flex-start; justify-content: space-between; }
.fs-head p { max-width: 62ch; margin: 0; }
.fs-summary { display: flex; flex-wrap: wrap; gap: .4rem; }
.fs-pill { display: inline-block; padding: .3em .75em; border-radius: 999px; background: var(--white); border: 1px solid #D6DAE1; font-size: .82rem; font-weight: 600; color: var(--navy); }
.fs-pill.is-diff { background: rgba(249,115,22,.12); border-color: var(--orange); color: #9A3412; }
.fs-nav { position: sticky; top: 0; z-index: 5; display: flex; gap: .4rem; overflow-x: auto; padding: .6rem 0; margin: 0 0 .75rem; background: var(--light); scrollbar-width: thin; }
.fs-nav a { flex: none; padding: .45em .9em; border-radius: 999px; background: var(--navy); color: var(--white); text-decoration: none; font-size: .85rem; font-weight: 500; white-space: nowrap; }
.fs-nav a b { display: inline-block; min-width: 1.4em; margin-left: .25em; padding: 0 .35em; border-radius: 999px; background: var(--orange); font-size: .75rem; text-align: center; }
.fs-group { scroll-margin-top: 64px; }
.fs-group h2 { padding-bottom: .5rem; border-bottom: 2px solid var(--orange); display: inline-block; }
.fs-row { display: grid; grid-template-columns: 1fr; gap: .4rem; padding: .85rem 0 .85rem .75rem; border-top: 1px solid #EEF0F4; border-left: 3px solid transparent; }
.fs-row.is-diff { border-left-color: var(--orange); background: linear-gradient(90deg, rgba(249,115,22,.05), transparent 40%); }
.fs-row.has-err { border-left-color: var(--err); }
.fs-label label { margin: 0; font-weight: 600; color: var(--navy); display: inline; }
.fs-label .fs-def { display: block; margin-top: .15rem; word-break: break-word; }
.fs-label .fs-help { display: block; margin-top: .2rem; line-height: 1.35; }
.fs-badge { display: inline-block; margin-left: .4rem; padding: .05em .55em; border-radius: 999px; background: var(--orange); color: var(--white); font-size: .72rem; font-weight: 600; vertical-align: middle; }
.fs-input > input, .fs-input > select, .fs-input textarea { margin-top: 0; }
.fs-input textarea { width: 100%; font: inherit; padding: .65em .8em; border: 1px solid #D6DAE1; border-radius: 10px; }
.fs-input .muted.small { display: block; margin-top: .3rem; }
.fs-err { margin: .35rem 0 0; color: var(--err); font-size: .85rem; font-weight: 500; }
.fs-reset { margin-top: .3rem; font-size: .85rem; color: #9A3412; }
.fs-switch { display: inline-flex; align-items: center; gap: .5rem; margin: 0; font-weight: 500; }
.fs-switch input { width: 22px; height: 22px; min-height: 0; margin: 0; accent-color: var(--orange); }
.fs-map-head, .fs-map-row { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) minmax(0, 9.5rem); gap: .4rem; align-items: center; }
.fs-map-row { margin-bottom: .35rem; }
.fs-map-row input, .fs-map-row select { margin: 0; min-height: 40px; padding: .45em .6em; }
.fs-ord { text-align: center; font-weight: 600; color: var(--muted); }
.fs-groups { display: grid; grid-template-columns: 1fr; gap: .4rem; }
.fs-inline { display: grid; grid-template-columns: 7rem 1fr; align-items: center; gap: .5rem; margin: 0; font-weight: 500; }
.fs-inline input { margin: 0; }
.fs-actions { padding-top: .9rem; border-top: 1px solid #EEF0F4; display: flex; justify-content: flex-end; }
.fs-static .fs-input { display: flex; align-items: center; gap: .6rem; }
@media (max-width: 559px) { .fs-actions .btn { width: 100%; } .fs-row { padding-left: .55rem; } }
@media (min-width: 760px) {
  .fs-row { grid-template-columns: minmax(220px, 34%) 1fr; gap: 1.25rem; }
  .fs-groups { grid-template-columns: 1fr 1fr; }
}

/* Firma kurulum sihirbazı */
.wz-steps { display: flex; gap: .4rem; list-style: none; padding: 0; margin: .5rem 0 1rem; flex-wrap: wrap; }
.wz-steps li { padding: .35em .9em; border-radius: 999px; background: var(--white); border: 1px solid #D6DAE1; color: var(--navy); font-size: .85rem; font-weight: 600; }
.wz-steps li.is-on { background: var(--navy); color: var(--white); border-color: var(--navy); }
.wz-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.wz-list { display: grid; gap: .5rem; }
.wz-item { display: flex; gap: .75rem; align-items: flex-start; padding: .75rem; border: 1px solid #E3E6EB; border-radius: 10px; cursor: pointer; }
.wz-item:has(input:checked) { border-color: var(--orange); background: rgba(249,115,22,.05); }
.wz-item input[type=checkbox] { margin-top: .25rem; accent-color: var(--orange); width: 1.1rem; height: 1.1rem; flex: none; }
.wz-body { display: grid; gap: .25rem; min-width: 0; }
.wz-vals { overflow-wrap: anywhere; font-size: .9rem; }
.wz-old { color: #6B7280; text-decoration: line-through; overflow-wrap: anywhere; }
.wz-new { color: var(--navy); font-weight: 600; overflow-wrap: anywhere; }
.wz-table { width: 100%; table-layout: fixed; }
.wz-confirm { display: flex; gap: .5rem; align-items: center; margin-top: 1rem; font-weight: 600; }
.wz-confirm input { accent-color: var(--orange); width: 1.1rem; height: 1.1rem; }
.wz-confirm.is-error { color: #B91C1C; }
.wz-note { margin-bottom: .75rem; }

/* Kurulum sayfası: kalıcı bağlantı kodu ve onaylı işlemler (Yeni kod al / Kodu sil / Bağlantıyı kes) */
.code-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; align-items: flex-start; }
.code-act > summary { list-style: none; cursor: pointer; }
.code-act > summary::-webkit-details-marker { display: none; }
.code-act[open] > summary { background: var(--light); }
.code-act-form { margin-top: .5rem; padding: .7rem .8rem; border: 1px solid #F3D3BC; background: #FFF7F0; border-radius: 10px; max-width: 30rem; display: grid; gap: .45rem; }
.code-act-form .warn { margin: 0; color: #9A3412; }
.code-act-form label { display: flex; gap: .45rem; align-items: center; }
.btn-sm { min-height: 36px; padding: .35em .8em; font-size: .9rem; }
.btn-danger { background: #B42318; color: #fff; }
.btn-danger:hover { background: #912018; }
.btn-ghost.danger { color: #B42318; }
.fs-adv { margin-top: .4rem; border-top: 1px dashed #D5DAE1; padding-top: .4rem; }
.fs-adv > summary { cursor: pointer; font-weight: 600; color: var(--navy); padding: .35rem 0; }
.fs-note { background: var(--light); border-radius: 10px; padding: .55rem .8rem; margin: 0 0 .8rem; }
@media (max-width: 640px) {
  .code-act-form { max-width: none; }
  .code-box { flex-wrap: wrap; }
  .code-box .token { word-break: break-all; font-size: .85rem; }
}
.code-act-form label input[type=checkbox] { width: 20px; height: 20px; min-height: 0; flex: 0 0 auto; margin: 0; }
.code-act-form label { flex-direction: row; font-weight: 500; }

/* Select2 kurumsal tema (#0F1E3D / #F97316) */
.rp-f .select2-container { width: 14rem !important; max-width: 100%; }
.rp-f-wide .select2-container, .mk-filter-body .select2-container { width: 100% !important; min-width: 18rem; }
.select2-container--default .select2-selection--single {
  height: 36px; min-height: 36px; border: 1px solid #D6DAE1; border-radius: 8px; background: var(--white);
  display: flex; align-items: center; padding: 0 28px 0 10px; font-size: .86rem; color: var(--navy); font-weight: 500;
}
.select2-container--default .select2-selection--single .select2-selection__rendered {
  color: var(--navy); line-height: 34px; padding-left: 0; padding-right: 0; width: 100%;
}
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--muted); font-weight: 400; }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 34px; right: 6px; width: 20px; }
.select2-container--default.select2-container--open .select2-selection--single,
.select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249,115,22,.16); outline: none;
}
.select2-dropdown {
  border: 1px solid #CBD5E1; border-radius: 10px; box-shadow: 0 10px 28px rgba(15,30,61,.18);
  overflow: hidden; z-index: 90; font-size: .86rem;
}
.select2-search--dropdown { padding: 8px; background: #F8FAFC; border-bottom: 1px solid #E5E8EE; }
.select2-container--default .select2-search--dropdown .select2-search__field {
  border: 1px solid #CBD5E1; border-radius: 7px; padding: 7px 10px; font-size: 14px; min-height: 36px; height: 36px; margin: 0;
  color: var(--anthracite); background: var(--white); outline: none;
}
.select2-container--default .select2-search--dropdown .select2-search__field:focus {
  border-color: var(--orange); box-shadow: 0 0 0 2px rgba(249,115,22,.18);
}
.select2-results__options { max-height: 260px !important; }
.select2-results__option { padding: 8px 11px; border-bottom: 1px solid #F1F5F9; line-height: 1.35; color: var(--anthracite); }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--navy); color: var(--white); }
.select2-container--default .select2-results__option[aria-selected=true] { background: #FFF7ED; color: var(--navy); font-weight: 600; }
@media (max-width: 760px) {
  .rp-f .select2-container, .rp-f-wide .select2-container, .mk-filter-body .select2-container { width: 100% !important; min-width: 0; }
  .select2-container--default .select2-selection--single { height: 38px; min-height: 38px; font-size: .85rem; }
  .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 36px; }
  .select2-container--default .select2-selection--single .select2-selection__arrow { height: 36px; }
  .select2-container--default .select2-search--dropdown .select2-search__field { font-size: 16px; min-height: 38px; height: 38px; }
}

/* ===== WhatsApp Bağlantısı & WhatsApp Cloud API Yönetimi ===== */
.wa-card { border-left: 4px solid #16A34A; }
.wa-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.wa-head h2 { margin: 0 0 .2rem; }
.wa-head p { margin: 0; max-width: 44rem; }
.wa-info-box { background: #F8FAFC; border: 1px solid #E5E8EE; border-radius: 10px; padding: .75rem 1rem; margin-bottom: .85rem; display: grid; gap: .4rem; }
.wa-info-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.wa-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: .65rem 0; }
.wa-guide { margin-top: .75rem; background: #FAFBFC; border: 1px solid #EEF0F3; border-radius: 8px; padding: .6rem .85rem; }
.wa-guide summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.wa-guide ul { margin: .5rem 0 0; padding-left: 1.2rem; display: grid; gap: .25rem; }
.wa-pair-box { background: #FFF7ED; border: 1px solid #FED7AA; border-radius: 10px; padding: .85rem 1rem; }
.wa-code-box { max-width: 22rem; margin: .5rem 0; background: var(--white); }
.wa-input-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; max-width: 32rem; margin-top: .3rem; }
.wa-input-row input { flex: 1 1 14rem; margin: 0; }
.wa-admin-foot { margin: .75rem 0 0; padding-top: .6rem; border-top: 1px solid #EEF0F3; }
.wa-webhook-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 1rem; margin-top: .5rem; }
.wa-test-ok { border-left: 4px solid #16A34A; background: #F0FDF4; margin-bottom: 1rem; }
.wa-setup-steps { margin: .4rem 0 0; padding-left: 1.25rem; display: grid; gap: .6rem; line-height: 1.55; }

/* ===== PatronunPaneli Yapay Zeka Asistanı (Dashboard Kartı & Yüzen Sohbet Penceresi) ===== */
.pp-ai-dash-card {
  background: linear-gradient(135deg, #0F1E3D 0%, #162B54 68%, #1E3A6E 100%);
  color: var(--white);
  border: 1px solid rgba(249, 115, 22, .38);
  box-shadow: 0 8px 24px rgba(15, 30, 61, .16);
  padding: 1.05rem 1.25rem;
  margin-bottom: 1.1rem;
  position: relative;
  overflow: hidden;
}
.pp-ai-dash-card::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(249, 115, 22, .24) 0%, transparent 70%);
  pointer-events: none;
}
.pp-ai-dash-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
  flex-wrap: wrap;
  margin-bottom: .75rem;
}
.pp-ai-dash-title-wrap {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  flex: 1;
}
.pp-ai-dash-icon {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: rgba(249, 115, 22, .18);
  border: 1px solid rgba(249, 115, 22, .45);
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  flex: none;
}
.pp-ai-dash-card h2 {
  color: var(--white);
  font-size: 1.04rem;
  margin: 0 0 .12rem;
}
.pp-ai-dash-card .muted {
  color: rgba(255, 255, 255, .78);
  margin: 0;
}
.pp-ai-dash-form {
  display: flex;
  gap: .5rem;
  margin-bottom: .65rem;
}
.pp-ai-dash-input {
  flex: 1;
  min-width: 0;
  margin: 0;
  min-height: 42px;
  height: 42px;
  padding: .5rem .85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .96);
  color: var(--navy);
  font-size: .9rem;
}
.pp-ai-dash-input::placeholder {
  color: #64748B;
}
.pp-ai-dash-chips {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  align-items: center;
  gap: .4rem;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pp-ai-dash-chips::-webkit-scrollbar {
  display: none;
}
.pp-ai-dash-chips-lbl {
  font-size: .75rem;
  font-weight: 600;
  color: #FDBA74;
  margin-right: .15rem;
  white-space: nowrap;
  flex: none;
}
.pp-ai-dash-card .pp-ai-chip {
  background: rgba(255, 255, 255, .11);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .22);
  flex: none;
}
.pp-ai-dash-card .pp-ai-chip:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

/* Sağ alt yüzen düğme (FAB) ve sohbet penceresi */
.pp-ai-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 950;
  font-family: var(--font);
}
.pp-ai-fab {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 2px solid rgba(249, 115, 22, .65);
  background: linear-gradient(135deg, #0F1E3D 0%, #172E5C 100%);
  color: var(--white);
  box-shadow: 0 10px 28px rgba(15, 30, 61, .32), 0 0 0 3px rgba(249, 115, 22, .14);
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease;
  text-align: left;
}
.pp-ai-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(15, 30, 61, .4), 0 0 0 4px rgba(249, 115, 22, .25);
}
.pp-ai-fab-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--orange);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex: none;
}
.pp-ai-fab-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.pp-ai-fab-text strong {
  font-size: .86rem;
  font-weight: 700;
  color: var(--white);
}
.pp-ai-fab-text small {
  font-size: .7rem;
  color: #FDBA74;
}
.pp-ai-fab-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .25);
}

.pp-ai-window {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: min(430px, calc(100vw - 24px));
  height: min(630px, calc(100vh - 32px));
  background: #F8FAFC;
  border-radius: 16px;
  border: 1px solid #CBD5E1;
  box-shadow: 0 20px 50px rgba(15, 30, 61, .32);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 960;
}
.pp-ai-window[hidden] {
  display: none !important;
}
.pp-ai-window.is-expanded {
  width: min(660px, calc(100vw - 24px));
  height: min(750px, calc(100vh - 32px));
}
.pp-ai-head {
  background: linear-gradient(135deg, #0F1E3D 0%, #162B54 100%);
  color: var(--white);
  padding: .65rem .85rem;
  border-bottom: 3px solid var(--orange);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .6rem;
  flex: none;
}
.pp-ai-head-brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: .5rem;
  min-width: 0;
  overflow: hidden;
}
.pp-ai-head-text {
  min-width: 0;
  overflow: hidden;
  padding-right: .25rem;
}
.pp-ai-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: rgba(249, 115, 22, .2);
  border: 1px solid rgba(249, 115, 22, .55);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex: none;
}
.pp-ai-title {
  font-size: .92rem;
  font-weight: 700;
  letter-spacing: -.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.pp-ai-title b {
  color: var(--orange);
}
.pp-ai-sub {
  font-size: .71rem;
  color: rgba(255, 255, 255, .82);
  display: flex;
  align-items: center;
  gap: .3rem;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
.pp-ai-sub-txt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pp-ai-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22C55E;
  flex: none;
}
.pp-ai-head-actions {
  display: flex;
  align-items: center;
  gap: .3rem;
  flex: 0 0 auto;
}
.pp-ai-hbtn {
  background: rgba(255, 255, 255, .12);
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 7px;
  padding: .24rem .5rem;
  font-size: .73rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
  transition: background .15s;
}
.pp-ai-hbtn:hover {
  background: rgba(249, 115, 22, .85);
  border-color: var(--orange);
}

.pp-ai-messages {
  flex: 1 1 0%;
  min-height: 0;
  overflow-y: auto;
  padding: .75rem .8rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  background: #F1F5F9;
  -webkit-overflow-scrolling: touch;
}
.pp-ai-row {
  display: flex;
  align-items: flex-start;
  gap: .45rem;
  max-width: 100%;
}
.pp-ai-row-user {
  justify-content: flex-end;
}
.pp-ai-bot-badge {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--navy);
  color: var(--white);
  display: grid;
  place-items: center;
  font-size: .82rem;
  flex: none;
  margin-top: 2px;
}
.pp-ai-bubble {
  max-width: 89%;
  border-radius: 12px;
  padding: .62rem .8rem;
  font-size: .83rem;
  line-height: 1.44;
  box-shadow: 0 1px 3px rgba(15, 30, 61, .06);
  word-break: break-word;
}
.pp-ai-bubble-user {
  background: var(--navy);
  color: var(--white);
  border-bottom-right-radius: 4px;
  font-weight: 500;
}
.pp-ai-bubble-bot {
  background: var(--white);
  color: var(--anthracite);
  border: 1px solid #E2E8F0;
  border-left: 3px solid var(--orange);
  border-top-left-radius: 4px;
}

.ai-msg-firm {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: .2rem;
  padding-bottom: .2rem;
  border-bottom: 1px solid #F1F5F9;
}
.ai-msg-title {
  font-size: .86rem;
  font-weight: 700;
  color: var(--navy);
  margin: .15rem 0 .28rem;
  line-height: 1.35;
}
.ai-msg-line {
  margin: .16rem 0;
}
.ai-msg-list {
  margin: .25rem 0;
  padding-left: 1.05rem;
  display: grid;
  gap: .16rem;
}
.ai-msg-list li strong {
  color: var(--navy);
}
.ai-msg-hint {
  margin-top: .38rem;
  padding: .36rem .55rem;
  border-radius: 7px;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  color: #1E3A8A;
  font-size: .75rem;
  line-height: 1.38;
}
.ai-msg-ask {
  margin: .2rem 0;
  padding: .42rem .6rem;
  border-radius: 7px;
  background: #FFF7ED;
  border: 1px solid #FED7AA;
  color: #9A3412;
  font-weight: 600;
  font-size: .8rem;
}
.ai-msg-warn {
  margin: .2rem 0;
  padding: .42rem .6rem;
  border-radius: 7px;
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
  font-size: .78rem;
}
.ai-msg-link {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  margin-top: .3rem;
  padding: .28rem .58rem;
  border-radius: 6px;
  background: rgba(249, 115, 22, .12);
  color: var(--orange-d);
  font-weight: 600;
  font-size: .77rem;
  text-decoration: none;
}
.ai-msg-link:hover {
  background: var(--orange);
  color: var(--white);
}
.ai-msg-code {
  background: #F1F5F9;
  color: var(--navy);
  padding: .06rem .3rem;
  border-radius: 4px;
  font-size: .76rem;
}

/* Hızlı Sorular: tek satır yatay kaydırılabilir kompakt bar (sohbet alanını daraltmaz) */
.pp-ai-chips-bar {
  padding: .42rem .75rem;
  background: var(--white);
  border-top: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  gap: .4rem;
  flex: none;
}
.pp-ai-chips-label {
  font-size: .7rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  flex: none;
  margin: 0;
}
.pp-ai-chips {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: .35rem;
  flex: 1;
  min-width: 0;
  padding: 1px 0;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pp-ai-chips::-webkit-scrollbar {
  display: none;
}
.pp-ai-chip {
  background: #F1F5F9;
  color: var(--navy);
  border: 1px solid #CBD5E1;
  border-radius: 999px;
  padding: .24rem .62rem;
  font-family: var(--font);
  font-size: .74rem;
  font-weight: 600;
  white-space: nowrap;
  flex: none;
  cursor: pointer;
  transition: all .14s ease;
}
.pp-ai-chip:hover {
  background: var(--orange);
  color: var(--white);
  border-color: var(--orange);
}

.pp-ai-form {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .75rem;
  background: var(--white);
  border-top: 1px solid #E2E8F0;
  flex: none;
}
.pp-ai-input {
  flex: 1;
  min-width: 0;
  margin: 0;
  min-height: 38px;
  height: 38px;
  padding: .4rem .7rem;
  border-radius: 9px;
  border: 1px solid #CBD5E1;
  font-size: .85rem;
}
.pp-ai-send {
  background: var(--orange);
  color: var(--white);
  border: 0;
  border-radius: 9px;
  padding: 0 .85rem;
  font-family: var(--font);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 38px;
  height: 38px;
  white-space: nowrap;
  flex: none;
}
.pp-ai-send:hover {
  background: var(--orange-d);
}
.pp-ai-send:disabled {
  opacity: .6;
  cursor: wait;
}

.pp-ai-history-list {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.pp-ai-meta {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-bottom: .22rem;
  font-size: .68rem;
}
.pp-ai-meta-user {
  justify-content: flex-end;
  color: rgba(255, 255, 255, .75);
}
.pp-ai-meta-bot {
  justify-content: space-between;
  color: var(--muted);
}
.pp-ai-ch-badge {
  display: inline-flex;
  align-items: center;
  gap: .18rem;
  padding: .08rem .42rem;
  border-radius: 999px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .01em;
}
.pp-ai-ch-whatsapp {
  background: #DCFCE7;
  color: #166534;
}
.pp-ai-ch-telegram {
  background: #E0F2FE;
  color: #075985;
}
.pp-ai-ch-web {
  background: #FFF7ED;
  color: #9A3412;
}
.pp-ai-bubble-user .pp-ai-ch-badge {
  background: rgba(255, 255, 255, .16);
  color: #FDBA74;
}
.pp-ai-time {
  font-size: .66rem;
  opacity: .8;
}

/* Mobil Kompakt Sohbet & Dashboard Kartı (@media max-width: 640px) */
@media (max-width: 640px) {
  .pp-ai-dash-card {
    padding: .8rem .9rem;
    margin-bottom: .85rem;
    border-radius: 12px;
  }
  .pp-ai-dash-top {
    gap: .55rem;
    margin-bottom: .55rem;
  }
  .pp-ai-dash-icon {
    width: 34px;
    height: 34px;
    font-size: 1.05rem;
    border-radius: 9px;
  }
  .pp-ai-dash-card h2 {
    font-size: .88rem;
    line-height: 1.28;
  }
  .pp-ai-dash-card .muted.small {
    font-size: .74rem;
    line-height: 1.32;
  }
  .pp-ai-open-btn {
    width: 100%;
    min-height: 34px;
    padding: .3rem .65rem;
    font-size: .78rem;
  }
  .pp-ai-dash-form {
    flex-direction: row;
    gap: .4rem;
    margin-bottom: .5rem;
  }
  .pp-ai-dash-input {
    min-height: 36px;
    height: 36px;
    padding: .35rem .65rem;
    font-size: 16px; /* iOS otomatik zoom önleme */
  }
  .pp-ai-dash-form .btn {
    min-height: 36px;
    height: 36px;
    padding: 0 .75rem;
    font-size: .8rem;
  }
  .pp-ai-dash-chips-lbl {
    display: none;
  }

  .pp-ai-root {
    right: 12px;
    bottom: 12px;
  }
  .pp-ai-fab {
    padding: .48rem .82rem;
    gap: .45rem;
  }
  .pp-ai-fab-icon {
    width: 28px;
    height: 28px;
    font-size: .95rem;
  }
  .pp-ai-fab-text strong {
    font-size: .78rem;
  }
  .pp-ai-fab-text small {
    display: none;
  }

  .pp-ai-window,
  .pp-ai-window.is-expanded {
    left: 10px;
    right: 10px;
    bottom: max(14px, env(safe-area-inset-bottom));
    width: auto;
    height: min(66dvh, 470px);
    max-height: calc(100dvh - 96px);
    border-radius: 14px;
  }
  .pp-ai-head {
    padding: .55rem .7rem;
    gap: .4rem;
  }
  .pp-ai-avatar {
    width: 28px;
    height: 28px;
    font-size: .95rem;
    border-radius: 7px;
  }
  .pp-ai-title {
    font-size: .84rem;
  }
  .pp-ai-sub {
    font-size: .66rem;
  }
  .pp-ai-expand {
    display: none !important;
  }
  .pp-ai-hbtn {
    padding: .22rem .45rem;
    font-size: .68rem;
    border-radius: 6px;
  }
  .pp-ai-messages {
    padding: .55rem .62rem;
    gap: .45rem;
  }
  .pp-ai-bot-badge {
    width: 22px;
    height: 22px;
    font-size: .74rem;
    border-radius: 6px;
  }
  .pp-ai-bubble {
    max-width: 91%;
    padding: .5rem .65rem;
    font-size: .78rem;
    line-height: 1.38;
    border-radius: 10px;
  }
  .ai-msg-firm {
    font-size: .68rem;
    margin-bottom: .15rem;
    padding-bottom: .15rem;
  }
  .ai-msg-title {
    font-size: .8rem;
    margin: .1rem 0 .2rem;
  }
  .ai-msg-list {
    padding-left: .95rem;
    gap: .12rem;
    margin: .18rem 0;
  }
  .ai-msg-hint,
  .ai-msg-ask,
  .ai-msg-warn {
    font-size: .71rem;
    padding: .3rem .45rem;
    margin-top: .25rem;
  }
  .pp-ai-chips-bar {
    padding: .35rem .55rem;
    gap: .3rem;
  }
  .pp-ai-chips-label {
    font-size: .65rem;
  }
  .pp-ai-chip {
    font-size: .71rem;
    padding: .2rem .52rem;
  }
  .pp-ai-form {
    padding: .42rem .55rem;
    gap: .35rem;
  }
  .pp-ai-input {
    min-height: 36px;
    height: 36px;
    padding: .32rem .6rem;
    font-size: 16px; /* iOS Safari auto-zoom engeli */
  }
  .pp-ai-send {
    min-height: 36px;
    height: 36px;
    padding: 0 .7rem;
    font-size: .78rem;
  }
}

/* Kayıt: WhatsApp doğrulama adımı */
.wa-code-box{display:flex;flex-direction:column;gap:6px;padding:16px;border:1px dashed #25d366;border-radius:12px;background:#f3fcf6;margin:8px 0 14px}
.wa-code{font-size:1.35rem;letter-spacing:.06em;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;color:#0b3d2e}
.btn-whatsapp{background:#25d366;color:#fff;border-color:#25d366}
.btn-whatsapp:hover{background:#1ebe5a;color:#fff}
.wa-ok{font-weight:600;color:#0b6b3a;margin:0 0 14px}
.wa-wait{text-align:center;margin:10px 0 18px}
.wa-newcode{margin-top:8px}

/* WhatsApp panel eşleştirme: arka plan yoklaması ve başarı durumu */
.wa-poll-status{display:flex;align-items:center;gap:8px;padding:8px 12px;margin-bottom:10px;border-radius:10px;background:rgba(249,115,22,.08);color:#0F1E3D;border:1px solid rgba(249,115,22,.25)}
.wa-poll-status.is-expired{background:#fef2f2;border-color:#fecaca;color:#991b1b}
.wa-spin{width:14px;height:14px;border:2px solid rgba(249,115,22,.3);border-top-color:#F97316;border-radius:50%;animation:wa-spin 1s linear infinite;flex:none}
@keyframes wa-spin{to{transform:rotate(360deg)}}
.wa-success{display:flex;align-items:center;gap:14px;padding:16px;border-radius:12px;background:#0F1E3D;color:#fff}
.wa-success p{margin:4px 0 0;color:rgba(255,255,255,.8)}
.wa-check{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#F97316;color:#fff;font-size:20px;font-weight:700;flex:none}
@media (prefers-reduced-motion:reduce){.wa-spin{animation:none}}
.wa-vcf-btn{margin-top:10px}

/* Güvenlik 13.11.2026: /sistem/whatsapp satır içi stil yerine sınıf (CSP style-src 'self') */
.wa-ai-sep { margin-top: 8px; padding-top: 12px; border-top: 1px solid #e2e8f0; }

/* Parola güç göstergesi (pw-strength.js; genişlik data-level ile, satır içi stil yok) */
.pw-meter { margin-top: .4rem; }
.pw-bar { height: 6px; border-radius: 3px; background: #E5E7EB; overflow: hidden; }
.pw-bar span { display: block; height: 100%; width: 0; background: var(--err); transition: width .2s ease, background-color .2s ease; }
.pw-bar span[data-level="1"] { width: 20%; }
.pw-bar span[data-level="2"] { width: 40%; }
.pw-bar span[data-level="3"] { width: 60%; background: var(--warn); }
.pw-bar span[data-level="4"] { width: 80%; background: var(--warn); }
.pw-bar span[data-level="5"] { width: 100%; background: var(--ok); }
.pw-rules { list-style: none; margin: .45rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .75rem; font-size: .8rem; color: var(--muted); }
.pw-rules li::before { content: "○ "; }
.pw-rules li.ok { color: var(--ok); }
.pw-rules li.ok::before { content: "✓ "; }

/* Bot koruması: honeypot alanı ekranda ve erişilebilirlik ağacında görünmez (BotGuard) */
.hp-field { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.cf-turnstile { margin: .25rem 0 .75rem; min-height: 65px; }

/* İki adımlı doğrulama (P5) */
.auth-form--secondary { margin-top: 12px; }
details.auth-form--secondary > summary { cursor: pointer; color: var(--navy); font-size: .9rem; margin-bottom: 8px; }
.tf-qr { display: inline-block; width: 200px; max-width: 100%; padding: 8px; background: #fff; border: 1px solid #E5E7EB; border-radius: 8px; }
.tf-qr svg { display: block; width: 100%; height: auto; }
.tf-secret { word-break: break-all; }
.tf-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tf-backup { background: #FEF3C7; border-radius: 8px; padding: 12px 14px; margin: 0 0 14px; }
.tf-codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; list-style: none; padding: 0; margin: 8px 0 0; }
.tf-codes code { font-size: 1rem; letter-spacing: .05em; }
