/* Haza Destek — kullanıcı sitesi. Panel (site.css) ayrıdır. */
:root {
  --bg: #f5f7fc; --surface: #ffffff; --surface-2: #f0f3fa; --text: #151c2c; --muted: #5a6478; --line: #e2e7f1;
  --brand: #2f5bea; --brand-2: #6a4de8; --brand-ink: #ffffff; --brand-soft: #e9eefe; --brand-text: #2448c7;
  --ok: #0c7a54; --ok-soft: #e2f5ec; --warn: #9a5b00; --warn-soft: #fff3da; --err: #c42b2b; --err-soft: #fdeceb;
  --bug: #d64545; --bug-soft: #fdecec; --idea: #b7791f; --idea-soft: #fff4dc;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(16 24 40 / .05), 0 4px 16px rgb(16 24 40 / .06);
  --shadow-lg: 0 12px 40px rgb(16 24 40 / .12);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1119; --surface: #151b26; --surface-2: #1b2230; --text: #e7ebf3; --muted: #9ba6ba; --line: #283244;
    --brand: #7b98ff; --brand-2: #a38bff; --brand-ink: #0d1119; --brand-soft: #1c284a; --brand-text: #a9bcff;
    --ok: #4cc79a; --ok-soft: #12291f; --warn: #f0b551; --warn-soft: #2c2312; --err: #ff8a85; --err-soft: #331817;
    --bug: #ff8a85; --bug-soft: #331817; --idea: #f0b551; --idea-soft: #2c2312;
    --shadow: 0 1px 2px rgb(0 0 0 / .3), 0 4px 16px rgb(0 0 0 / .25);
    --shadow-lg: 0 12px 40px rgb(0 0 0 / .45);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
/* hidden özniteliği bileşenin kendi display değerine yenilmesin (ilerleme çubuğu, adım alanı, hata kutusu). */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body.portal {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 15.5px/1.6 Inter, "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: var(--bg); color: var(--text);
}
a { color: var(--brand-text); text-underline-offset: 2px; }
svg { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; border-radius: 6px; }
h1 { font-size: clamp(1.45rem, 1.1rem + 1.3vw, 1.9rem); line-height: 1.25; margin: .2rem 0 .4rem; letter-spacing: -.01em; overflow-wrap: anywhere; }
h2 { font-size: 1.15rem; margin: 0 0 .6rem; }
code { font: .88em ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--surface-2); padding: .1em .35em; border-radius: 5px; overflow-wrap: anywhere; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: .5rem .8rem; border-radius: 8px; z-index: 50; }
.skip:focus { left: 8px; }

.p-wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.p-muted { color: var(--muted); }
.p-hint { color: var(--muted); font-size: .88rem; margin: .4rem 0 0; }
.p-eyebrow { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--brand-text); }

/* Üst çubuk */
.p-top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.p-top-row { display: flex; align-items: center; gap: 1rem; min-height: 62px; flex-wrap: wrap; }
.p-brand { display: inline-flex; align-items: center; gap: .55rem; color: var(--text); text-decoration: none; font-size: 1.05rem; }
.p-brand strong { color: var(--brand-text); }
.p-logo { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; color: #fff; font-weight: 800;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 4px 12px color-mix(in srgb, var(--brand) 35%, transparent); }
.p-nav { display: flex; align-items: center; gap: .75rem; flex: 1; }
.p-nav > a:not(.p-btn) { color: var(--muted); text-decoration: none; font-weight: 600; padding: .35rem .2rem; }
.p-nav > a[aria-current="page"] { color: var(--text); box-shadow: inset 0 -2px 0 var(--brand); }
.p-tools { display: flex; align-items: center; gap: .6rem; margin-left: auto; }
.p-lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); }
.p-lang a { padding: .15rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 700; color: var(--muted); text-decoration: none; }
.p-lang a[aria-current="true"] { background: var(--brand-soft); color: var(--brand-text); }
.p-user { position: relative; }
.p-user summary { list-style: none; display: flex; align-items: center; gap: .45rem; cursor: pointer; padding: .2rem .4rem .2rem .2rem;
  border-radius: 999px; border: 1px solid transparent; }
.p-user summary::-webkit-details-marker { display: none; }
.p-user[open] summary, .p-user summary:hover { border-color: var(--line); background: var(--surface); }
.p-user-name { max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .92rem; }
.p-user-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 240px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: .8rem 1rem; display: grid; gap: .5rem; z-index: 30; }
.p-user-menu p { margin: 0 0 .3rem; overflow-wrap: anywhere; }
.p-avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; flex: none; font-weight: 700; font-size: .9rem;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.p-avatar.brand { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border: 0; }

/* Düğmeler */
.p-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; font: inherit; font-weight: 650; text-decoration: none;
  padding: .62rem 1.1rem; border-radius: 10px; border: 1px solid transparent; cursor: pointer; color: var(--brand-ink);
  background: linear-gradient(135deg, var(--brand), color-mix(in srgb, var(--brand) 70%, var(--brand-2))); box-shadow: 0 2px 8px color-mix(in srgb, var(--brand) 30%, transparent);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease; }
.p-btn:hover { filter: brightness(1.05); box-shadow: 0 6px 18px color-mix(in srgb, var(--brand) 35%, transparent); }
.p-btn:active { transform: translateY(1px); }
.p-btn[disabled] { opacity: .6; cursor: progress; }
.p-btn-sm { padding: .4rem .8rem; font-size: .9rem; }
.p-btn-block { width: 100%; }
.p-btn-ghost { background: var(--surface); color: var(--text); border-color: var(--line); box-shadow: none; }
.p-btn-ghost:hover { background: var(--surface-2); box-shadow: none; }
.p-link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-text); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* Düzen */
.p-main { flex: 1; padding-top: 1.6rem; padding-bottom: 3.5rem; }
.p-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.3rem 1.4rem; margin: 1rem 0; }
.p-narrow { max-width: 480px; margin: 2.5rem auto; }
.p-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.p-head > div { min-width: 0; flex: 1 1 320px; }
.p-head p { margin: .2rem 0 0; }
.p-back { margin: 0 0 .5rem; font-size: .92rem; }
.p-back a { text-decoration: none; }
.p-toast { background: var(--ok-soft); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); border-radius: var(--radius-sm);
  padding: .7rem 1rem; font-weight: 600; margin: 0 0 1rem; }
.p-notice { background: var(--warn-soft); color: var(--warn); border-radius: var(--radius-sm); padding: .6rem .9rem; margin: 0 0 .8rem; }
.p-error { background: var(--err-soft); color: var(--err); border-radius: var(--radius-sm); padding: .6rem .9rem; margin: 0 0 .8rem; font-weight: 600; }

/* Giriş */
.p-login { display: grid; gap: 1.5rem; align-items: stretch; margin-top: .5rem; }
@media (min-width: 880px) { .p-login { grid-template-columns: 1.1fr .9fr; margin-top: 2rem; } }
.p-hero { position: relative; overflow: hidden; border-radius: 20px; padding: 2.2rem 2rem; color: #fff;
  background: radial-gradient(120% 120% at 0% 0%, #4f7bff 0%, #2f5bea 38%, #5a3fd8 100%); box-shadow: var(--shadow-lg); }
.p-hero::after { content: ""; position: absolute; inset: auto -80px -120px auto; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgb(255 255 255 / .18), transparent 70%); }
.p-hero .p-eyebrow { color: rgb(255 255 255 / .8); }
.p-hero h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.15rem); margin: .4rem 0 1.4rem; max-width: 22ch; }
.p-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; position: relative; z-index: 1; }
.p-features li { display: flex; gap: .85rem; align-items: flex-start; }
.p-features svg { width: 38px; height: 38px; padding: 9px; border-radius: 11px; background: rgb(255 255 255 / .16); stroke: #fff; }
.p-features strong { display: block; }
.p-features span span, .p-features li > span { color: rgb(255 255 255 / .88); }
.p-features strong { color: #fff; }
.p-login-card { margin: 0; align-self: center; padding: 1.8rem; }
.p-code { font: 700 1.6rem/1.2 ui-monospace, Consolas, monospace !important; letter-spacing: .35em; text-align: center; }
.p-form-inline { display: flex; gap: 1.2rem; align-items: center; margin-top: .9rem; flex-wrap: wrap; }
.p-choices { display: grid; gap: .6rem; margin-top: 1rem; }
.p-choice { width: 100%; display: flex; gap: .8rem; align-items: center; text-align: left; font: inherit; color: var(--text); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8rem 1rem; }
.p-choice:hover { border-color: var(--brand); background: var(--brand-soft); }
.p-choice > span:last-child { display: grid; min-width: 0; overflow-wrap: anywhere; }

/* Form */
.p-form { display: grid; gap: 1rem; }
.p-field { display: grid; gap: .35rem; font-weight: 600; font-size: .94rem; margin: 0; }
.p-label { font-weight: 600; font-size: .94rem; }
.p-field > span .p-muted { font-weight: 400; }
.p-field input, .p-field textarea, .p-field select {
  width: 100%; font: inherit; font-weight: 400; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: .65rem .8rem; transition: border-color .12s, box-shadow .12s; }
.p-field textarea { resize: vertical; min-height: 6rem; }
.p-field input:focus, .p-field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 18%, transparent); }
.p-actions { display: flex; gap: .7rem; justify-content: flex-end; flex-wrap: wrap; }
.p-kinds { border: 0; padding: 0; margin: 0; display: grid; gap: .7rem; }
@media (min-width: 640px) { .p-kinds { grid-template-columns: 1fr 1fr; } }
.p-kinds legend { font-weight: 600; font-size: .94rem; margin-bottom: .35rem; padding: 0; }
.p-kind-card { position: relative; display: flex; gap: .8rem; align-items: flex-start; cursor: pointer; padding: .95rem 1rem; border: 1.5px solid var(--line);
  border-radius: var(--radius-sm); background: var(--surface); transition: border-color .12s, background .12s; }
.p-kind-card input { position: absolute; opacity: 0; pointer-events: none; }
.p-kind-card > span:last-child { display: grid; gap: .1rem; }
.p-kind-card .p-muted { font-size: .88rem; }
.p-kind-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.p-kind-card:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.p-kind { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; flex: none; }
.p-kind.bug { background: var(--bug-soft); color: var(--bug); }
.p-kind.request { background: var(--idea-soft); color: var(--idea); }

/* Ek alanı */
.p-composer { display: grid; gap: .55rem; }
.p-drop { position: relative; display: flex; align-items: center; gap: .9rem; cursor: pointer; padding: 1.1rem 1.2rem; border-radius: var(--radius-sm);
  border: 1.5px dashed color-mix(in srgb, var(--brand) 40%, var(--line)); background: color-mix(in srgb, var(--brand-soft) 55%, var(--surface));
  transition: background .12s, border-color .12s; font-weight: 400; }
.p-drop:hover, .p-drop.is-over { border-color: var(--brand); background: var(--brand-soft); }
.p-drop:focus-within { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.p-drop > svg { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--surface); color: var(--brand-text); box-shadow: var(--shadow); }
.p-drop-text { display: grid; gap: .1rem; font-size: .92rem; }
.p-drop-text span { color: var(--muted); }
/* Betik varken seçici görünmez ama odaklanabilir kalır (klavye ve ekran okuyucu). Betik yoksa sıradan seçici görünür. */
.has-js .p-file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.p-composer-tools { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.p-composer-tools .p-hint { margin: 0; }
.p-rec-dot { fill: currentColor; stroke: none; }
[data-record].is-recording { color: var(--err); border-color: color-mix(in srgb, var(--err) 45%, var(--line)); background: var(--err-soft); }
[data-record].is-recording .p-rec-dot { animation: p-pulse 1s infinite; }
@keyframes p-pulse { 50% { opacity: .2; } }
.p-files { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.p-files:empty { display: none; }
.p-file { display: flex; gap: .65rem; align-items: center; padding: .5rem .6rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); min-width: 0; }
.p-file-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.p-file-meta { display: grid; min-width: 0; flex: 1; font-size: .86rem; }
.p-file-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-file-size { color: var(--muted); }
.p-file button { flex: none; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 8px; padding: .3rem; display: grid; place-items: center; }
.p-file button:hover { background: var(--err-soft); color: var(--err); }
.p-progress { display: flex; align-items: center; gap: .8rem; font-size: .9rem; color: var(--muted); }
.p-progress-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.p-progress-bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width .15s; }

/* Liste */
.p-tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.p-tabs a { padding: .55rem .9rem; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.p-tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--brand); }
.p-count { display: inline-block; min-width: 1.5em; text-align: center; font-size: .78rem; padding: 0 .35em; border-radius: 999px; background: var(--surface-2); margin-left: .2rem; }
.p-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.p-row { display: flex; align-items: center; gap: .9rem; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); color: var(--text); text-decoration: none; box-shadow: var(--shadow); transition: border-color .12s, transform .12s; }
.p-row:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); transform: translateY(-1px); }
.p-row.is-unread { border-left: 4px solid var(--brand); }
.p-row-main { display: grid; min-width: 0; flex: 1; }
.p-row-title { font-weight: 650; overflow-wrap: anywhere; }
.p-row.is-unread .p-row-title { font-weight: 800; }
.p-row-meta { color: var(--muted); font-size: .86rem; }
.p-pill { display: inline-flex; align-items: center; white-space: nowrap; font-size: .78rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px;
  background: var(--surface-2); color: var(--muted); }
.p-pill.open { background: var(--warn-soft); color: var(--warn); }
.p-pill.answered { background: var(--ok-soft); color: var(--ok); }
.p-pill.new { background: var(--brand); color: var(--brand-ink); }
.p-pill.team { background: var(--brand-soft); color: var(--brand-text); font-size: .72rem; padding: .1rem .5rem; }
.p-pill-lg { font-size: .88rem; padding: .35rem .85rem; }
.p-empty { text-align: center; padding: 3rem 1rem; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.p-empty > svg { width: 56px; height: 56px; padding: 12px; border-radius: 16px; background: var(--brand-soft); color: var(--brand-text); }
.p-empty p { max-width: 46ch; margin: .3rem auto 1.2rem; }
@media (max-width: 560px) {
  .p-row { flex-wrap: wrap; }
  .p-row-main { flex-basis: calc(100% - 60px); }
  .p-row .p-pill { margin-left: 52px; }
  .p-row .p-pill + .p-pill { margin-left: 0; }
}

/* Konuşma */
.p-steps summary { cursor: pointer; font-weight: 650; }
.p-text { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.p-pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: .5rem 0 0; max-height: 18rem; overflow: auto; font: .82rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .75rem; }
.p-check { display: flex; gap: .5rem; align-items: flex-start; cursor: pointer; }
.p-check input { margin-top: .2rem; }
.p-diagnostics details summary { cursor: pointer; color: var(--muted); font-size: .88rem; margin-top: .35rem; }
.p-thread { list-style: none; padding: 0; margin: 1.2rem 0; display: grid; gap: 1rem; }
.p-msg { display: flex; gap: .7rem; align-items: flex-start; max-width: 860px; }
.p-msg.mine { flex-direction: row-reverse; margin-left: auto; }
.p-bubble { min-width: 0; max-width: min(100%, 720px); background: var(--surface); border: 1px solid var(--line); border-radius: 4px var(--radius) var(--radius) var(--radius);
  padding: .8rem 1rem; box-shadow: var(--shadow); display: grid; gap: .5rem; }
.p-msg.mine .p-bubble { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 25%, var(--line)); border-radius: var(--radius) 4px var(--radius) var(--radius); }
.p-bubble header { display: flex; flex-wrap: wrap; gap: .2rem .7rem; align-items: baseline; font-size: .86rem; }
.p-bubble time { color: var(--muted); }
.p-close-form { margin-top: .9rem; text-align: right; font-size: .92rem; }

/* Ekler (konuşmada) */
.att { display: flex; flex-wrap: wrap; gap: .5rem; }
.att-image { display: block; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.att-image img { display: block; width: 168px; height: 112px; object-fit: cover; transition: transform .2s; }
.att-image:hover img { transform: scale(1.03); }
.att-video { margin: 0; width: min(100%, 520px); }
.att-video video { width: 100%; max-height: 360px; border-radius: 10px; background: #000; display: block; }
.att-video figcaption { font-size: .82rem; color: var(--muted); margin-top: .25rem; overflow-wrap: anywhere; }
.att-file { display: inline-flex; gap: .55rem; align-items: center; padding: .5rem .75rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text); text-decoration: none; max-width: 100%; }
.att-file:hover { border-color: var(--brand); }
.att-file > span { display: grid; min-width: 0; }
.att-name { font-weight: 600; font-size: .88rem; overflow-wrap: anywhere; }
.att-size { color: var(--muted); font-size: .8rem; }

.p-foot { border-top: 1px solid var(--line); padding: 1.2rem 0; color: var(--muted); font-size: .86rem; }
.p-foot .p-wrap { display: flex; gap: 1.2rem; flex-wrap: wrap; }
.p-foot a { color: var(--muted); }

@media (max-width: 640px) {
  /* Dar ekranda ad görünmez ama menü düğmesinin erişilebilir adı olarak kalır. */
  .p-user-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .p-nav { order: 3; flex-basis: 100%; padding-bottom: .5rem; }
  .p-hero { padding: 1.6rem 1.3rem; }
  .p-card { padding: 1.1rem; }
  .att-image img { width: 132px; height: 92px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
.p-pager { display: flex; gap: 1rem; align-items: center; justify-content: center; margin: 1rem 0; color: var(--muted); }
.p-pager a { font-weight: 600; }
