/* =====================================================================
   Müşteri portalı — birtikyazilim.tr ile aynı dil: siyah çerçeve, gren yüzey, petrol vurgu, Quicksand.
   Kendi kendine yeten stil (panel.css yüklenmez).
   ===================================================================== */
@font-face { font-family: 'Quicksand'; font-weight: 500; font-display: swap; src: url('../fonts/quicksand-latin-500.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Quicksand'; font-weight: 500; font-display: swap; src: url('../fonts/quicksand-latin-ext-500.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+A720-A7FF; }
@font-face { font-family: 'Quicksand'; font-weight: 600; font-display: swap; src: url('../fonts/quicksand-latin-600.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Quicksand'; font-weight: 600; font-display: swap; src: url('../fonts/quicksand-latin-ext-600.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+A720-A7FF; }
@font-face { font-family: 'Quicksand'; font-weight: 700; font-display: swap; src: url('../fonts/quicksand-latin-700.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Quicksand'; font-weight: 700; font-display: swap; src: url('../fonts/quicksand-latin-ext-700.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C0, U+2113, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-400.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+2000-206F; }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url('../fonts/ibm-plex-mono-latin-ext-400.woff2') format('woff2'); unicode-range: U+0100-02BA, U+20A0-20C0; }

:root {
  --frame: #0A0B0C; --surface: #ECECE9; --paper: #F7F7F4; --ink: #141617; --ink-2: #3E4447; --muted: #6E7578; --line: #D9D9D4;
  --petrol: #0F4C5C; --petrol-2: #13707F; --petrol-3: #5FB3C0;
  --warn: #9A6A12; --warn-bg: #F3E9CF; --danger: #A63A33; --danger-bg: #F2DAD6; --ok-bg: #D7EAEC;
  --font: 'Quicksand', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--frame); color: var(--ink); font-family: var(--font); font-weight: 500; font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 700; letter-spacing: -.02em; line-height: 1.12; }
button { font-family: inherit; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
:focus-visible { outline: 2px solid var(--petrol-2); outline-offset: 3px; border-radius: 8px; }

/* ---------- Çerçeve + gren */
.frame { position: relative; margin: 14px; background: var(--surface); border-radius: 36px; overflow: hidden; min-height: calc(100vh - 28px); display: flex; flex-direction: column; }
.frame::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.frame > * { position: relative; z-index: 1; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 32px; }

/* ---------- Üst çubuk */
.top { display: flex; align-items: center; gap: 16px; padding: 22px 0 0; }
.logo { font-size: 28px; font-weight: 700; letter-spacing: -.03em; display: flex; align-items: baseline; }
.logo b { color: var(--petrol-2); }
.logo small { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-left: 10px; }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.who-name { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.who-name b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-name span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ghost { height: 42px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--line); display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; background: transparent; color: var(--ink); cursor: pointer; transition: border-color .2s; white-space: nowrap; }
.ghost:hover { border-color: var(--ink); }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 46px; padding: 0 22px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 15px; white-space: nowrap; border: 0; cursor: pointer; transition: background .2s; }
.pill:hover { background: #000; }
.pill[disabled] { opacity: .5; cursor: not-allowed; }
.pill.sm, .ghost.sm { height: 36px; padding: 0 14px; font-size: 13.5px; }

.nav { display: flex; gap: 4px; margin-top: 18px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.nav::-webkit-scrollbar { display: none; }
.nav a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; font-weight: 600; font-size: 15px; color: var(--ink-2); white-space: nowrap; transition: background .2s, color .2s; }
.nav a:hover { background: rgba(0,0,0,.05); color: var(--ink); }
.nav a.on { background: var(--ink); color: #fff; }
.nav .n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--petrol-2); color: #fff; font-size: 11.5px; display: inline-grid; place-items: center; }

/* ---------- İçerik */
main.wrap { flex: 1; padding-top: 34px; padding-bottom: 56px; display: flex; flex-direction: column; gap: 22px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; height: 34px; padding: 0 14px 0 6px; border-radius: 999px; background: rgba(255,255,255,.6); font-size: 13.5px; font-weight: 600; color: var(--ink-2); width: fit-content; }
.eyebrow i { width: 22px; height: 22px; border-radius: 50%; background: var(--petrol); display: flex; align-items: center; justify-content: center; }
.eyebrow i::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--petrol-3); }
.hero h1 { font-size: clamp(32px, 4.6vw, 52px); margin-top: 18px; }
.hero h1 em { font-style: normal; color: var(--petrol-2); }
.hero p { margin-top: 12px; color: var(--ink-2); font-size: 17px; max-width: 60ch; }
.page-title { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.page-title h1 { font-size: clamp(28px, 3.4vw, 40px); }
.page-title p { color: var(--ink-2); margin-top: 8px; max-width: 62ch; }
.page-title .pill, .page-title .ghost { margin-left: auto; }
.crumb { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; color: var(--ink-2); width: fit-content; }
.crumb:hover { color: var(--ink); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tile { background: var(--paper); border-radius: 26px; padding: 24px 26px; display: flex; flex-direction: column; gap: 6px; transition: box-shadow .2s; min-width: 0; }
a.tile:hover { box-shadow: 0 0 0 1.5px var(--ink); }
.tile .k { font-size: 13.5px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.tile .v { font-size: clamp(34px, 4vw, 46px); font-weight: 700; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tile .s { font-size: 14px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .s.bad { color: var(--danger); font-weight: 600; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: stretch; }
.cols > .panel { display: flex; flex-direction: column; }
.cols > .panel > .panel-body { margin-top: auto; }
.cols > .panel > .calm { flex: 1; }
.calm { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; padding: 22px 30px 34px; }
.calm .ico { width: 52px; height: 52px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; color: var(--ink-2); margin-bottom: 4px; }
.calm b { font-size: 17px; }
.calm p { color: var(--muted); font-size: 14.5px; max-width: 30ch; margin-bottom: 10px; }
.pill.block { width: 100%; }
.panel { background: var(--paper); border-radius: 26px; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 20px 26px 6px; }
.panel-head h2 { font-size: 19px; }
.panel-head .more { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--petrol-2); display: inline-flex; align-items: center; gap: 4px; }
.panel-head .more:hover { color: var(--ink); }
.panel-body { padding: 14px 26px 24px; }
.empty { padding: 26px; color: var(--muted); text-align: center; font-size: 15px; }

.rows { list-style: none; margin: 0; padding: 6px 12px 12px; }
.row { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border-radius: 18px; transition: background .15s; }
a.row:hover { background: rgba(0,0,0,.04); }
.row .ico { width: 40px; height: 40px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; color: var(--ink-2); flex: none; }
.row .main { flex: 1; min-width: 0; }
.row .t { font-weight: 700; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .d { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .end { flex: none; display: flex; align-items: center; gap: 10px; }

.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: var(--surface); color: var(--ink-2); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--petrol); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.danger { background: var(--danger-bg); color: var(--danger); }

/* Zaman çizelgesi (güncellemeler) */
.tl { list-style: none; margin: 0; padding: 8px 26px 22px; }
.tl li { position: relative; display: grid; grid-template-columns: 104px 1fr; gap: 18px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.tl li:last-child { border-bottom: 0; }
.tl time { font-size: 13.5px; color: var(--muted); font-weight: 600; padding-top: 2px; }
.tl .t { font-weight: 700; font-size: 16px; }
.tl .m { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tl .b { margin-top: 8px; color: var(--ink-2); white-space: pre-wrap; }

/* Tablolar */
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; }
.tbl th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 6px 14px 12px; letter-spacing: .02em; }
.tbl td { padding: 15px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
.tbl .r { text-align: right; }
.tbl th[data-sort] { cursor: pointer; user-select: none; white-space: nowrap; }
.tbl th[data-sort]:hover { color: var(--ink); }
.tbl th[data-sort]::after { content: ''; display: inline-block; width: 0; height: 0; margin-left: 7px; vertical-align: middle; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: 0; transition: opacity .15s; }
.tbl th[data-sort]:hover::after { opacity: .35; }
.tbl th[aria-sort]::after { opacity: 1; color: var(--petrol-2); }
.tbl th[aria-sort="ascending"]::after { border-top: 0; border-bottom: 5px solid currentColor; }
.tbl th[data-sort]:focus-visible { outline: 2px solid var(--petrol-2); border-radius: 8px; }
.tbl .mono, .mono { font-family: var(--mono); font-size: 13px; }
.tbl-wrap { overflow-x: auto; padding: 4px 12px 14px; }
.sub { color: var(--muted); font-size: 13.5px; }

/* Formlar */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .field > span:first-child { font-weight: 700; font-size: 14px; }
.input, .select, .textarea { width: 100%; font: inherit; font-weight: 500; color: var(--ink); background: #fff; border: 1.5px solid var(--line); border-radius: 16px; padding: 13px 16px; transition: border-color .2s, box-shadow .2s; }
.textarea { resize: vertical; min-height: 120px; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--petrol-2); box-shadow: 0 0 0 4px rgba(19,112,127,.14); }
.form { display: flex; flex-direction: column; gap: 20px; padding: 26px; }

/* Şifre kartları */
.secret { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 26px; border-top: 1px solid var(--line); }
.secret:first-child { border-top: 0; }
.secret .main { flex: 1; min-width: 220px; }
.secret .val { font-family: var(--mono); font-size: 14px; background: #fff; border: 1.5px solid var(--line); border-radius: 12px; padding: 7px 12px; word-break: break-all; }

/* ---------- Destek: sohbet görünümü */
.ticket-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chat { background: var(--paper); border-radius: 26px; padding: 26px; display: flex; flex-direction: column; gap: 16px; }
.day { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted); }
.msg { display: flex; gap: 12px; max-width: 78%; }
.msg.me { margin-left: auto; flex-direction: row-reverse; }
.msg .av { width: 36px; height: 36px; border-radius: 50%; background: var(--petrol); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.msg.me .av { background: var(--ink); }
.bub { background: #fff; border: 1.5px solid var(--line); border-radius: 22px 22px 22px 6px; padding: 12px 16px; min-width: 0; }
.msg.me .bub { background: var(--ink); border-color: var(--ink); color: #fff; border-radius: 22px 22px 6px 22px; }
.bub .who { font-size: 12.5px; font-weight: 700; margin-bottom: 4px; color: var(--muted); }
.msg.me .bub .who { color: rgba(255,255,255,.65); }
.bub .txt { white-space: pre-wrap; word-break: break-word; }
.bub time { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.msg.me .bub time { color: rgba(255,255,255,.55); }
.composer { position: sticky; bottom: 14px; background: #fff; border: 1.5px solid var(--line); border-radius: 26px; padding: 12px 12px 12px 20px; display: flex; align-items: flex-end; gap: 12px; box-shadow: 0 10px 30px -14px rgba(20,22,23,.35); }
.composer:focus-within { border-color: var(--petrol-2); }
.composer textarea { flex: 1; border: 0; outline: 0; resize: none; font: inherit; font-weight: 500; background: transparent; padding: 8px 0; max-height: 220px; min-height: 28px; line-height: 1.5; color: var(--ink); }
.composer .hint { font-size: 12px; color: var(--muted); padding: 0 4px 12px; white-space: nowrap; }
.closed-note { text-align: center; color: var(--muted); font-size: 14px; }

/* ---------- Bildirimler (toast) */
.toasts { position: fixed; top: 26px; right: 26px; z-index: 100; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; background: var(--ink); color: #fff; border-radius: 22px; padding: 14px 14px 14px 14px; box-shadow: 0 18px 40px -16px rgba(0,0,0,.55); animation: toast-in .35s cubic-bezier(.2,.8,.2,1); }
.toast.leaving { animation: toast-out .25s ease forwards; }
.toast .tic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--petrol-2); flex: none; }
.toast.danger .tic { background: var(--danger); }
.toast .tic svg.i { width: 16px; height: 16px; stroke-width: 2.2; }
.toast .tx { flex: 1; font-size: 14.5px; line-height: 1.45; padding-top: 4px; }
.toast .tx b { display: block; font-size: 14.5px; }
.toast button { background: transparent; border: 0; color: rgba(255,255,255,.6); cursor: pointer; padding: 6px; border-radius: 50%; display: grid; place-items: center; }
.toast button:hover { color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-8px); } }

/* ---------- Giriş */
.login-frame { align-items: center; justify-content: center; padding: 36px 18px; }
.login { width: 100%; max-width: 460px; display: flex; flex-direction: column; gap: 22px; }
.login h1 { font-size: clamp(30px, 6vw, 42px); }
.login .lead { color: var(--ink-2); font-size: 16.5px; }
.login .card { background: var(--paper); border-radius: 28px; padding: 26px; display: flex; flex-direction: column; gap: 18px; }
.login .note { font-size: 13.5px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.login-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.foot { text-align: center; padding: 6px 20px 28px; font-size: 13.5px; color: var(--muted); }

@media (max-width: 860px) {
  .tiles { grid-template-columns: 1fr; }
  .cols { grid-template-columns: 1fr; }
  .wrap { padding: 0 20px; }
  .tl li { grid-template-columns: 1fr; gap: 4px; }
  .msg { max-width: 92%; }
  .composer .hint { display: none; }
}
@media (max-width: 720px) {
  /* Mobilde sekmeler kaydırma yerine görünür ızgara: müşteri gizli menü aramak zorunda kalmasın */
  .nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; overflow: visible; margin-top: 16px; }
  .nav a { flex-direction: column; justify-content: center; gap: 5px; padding: 11px 6px; border-radius: 18px; font-size: 12.5px; line-height: 1.2; text-align: center; white-space: normal; background: rgba(255,255,255,.55); position: relative; }
  .nav a.on { background: var(--ink); }
  .nav .n { position: absolute; top: 6px; right: 8px; }
}
@media (max-width: 560px) {
  .frame { margin: 8px; border-radius: 28px; min-height: calc(100vh - 16px); }
  .who-name { display: none; }
  .logo small { display: none; }
  .panel-head, .panel-body, .form, .chat { padding-left: 18px; padding-right: 18px; }
  .secret { padding: 14px 18px; }
  .tl { padding-left: 18px; padding-right: 18px; }
  .toasts { top: 14px; right: 14px; left: 14px; width: auto; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
