/* ==========================================================================
   Bulls Yatırım — Fon Asistanı Yönetim Paneli
   Kurumsal kimlik bullsyatirim.com'dan türetildi:
     marka mavisi #156EDC (site theme-color), lacivert #303085 (logo),
     açık mavi #1BA7DF (logo gradyanı), nötrler #F6F6FA / #EBECF2 / #7F91AA,
     tipografi: Onest (kurumsal siteyle aynı, yerelden sunulur).
   Not: tüm stiller burada — şablonlarda inline style yok (CSP: style-src 'self').
   ========================================================================== */

@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/static/fonts/onest-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(/static/fonts/onest-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------- tasarım belirteçleri */
:root {
  --brand:        #156EDC;
  --brand-dark:   #0f57b0;
  --brand-deep:   #303085;
  --brand-light:  #1BA7DF;
  --brand-tint:   #eaf2fd;

  --bg:           #f6f6fa;
  --surface:      #ffffff;
  --surface-2:    #fafbfd;
  --sidebar:      #1b2340;
  --sidebar-2:    #141a30;

  --line:         #e4e7ef;
  --line-strong:  #d3d8e6;

  --txt:          #1e293b;
  --txt-2:        #5b5b71;
  --txt-3:        #7f91aa;
  --txt-invert:   #ffffff;

  --ok:           #12805c;
  --ok-bg:        #e6f6f0;
  --warn:         #a35b00;
  --warn-bg:      #fdf2e2;
  --danger:       #c02626;
  --danger-bg:    #fdecec;
  --info-bg:      #eaf2fd;

  --radius:       12px;
  --radius-sm:    8px;
  --radius-pill:  999px;
  --shadow:       0 1px 2px rgba(20, 26, 48, .06), 0 8px 24px rgba(20, 26, 48, .06);
  --shadow-sm:    0 1px 2px rgba(20, 26, 48, .08);
  --sidebar-w:    252px;
  --header-h:     64px;
}

/* --------------------------------------------------------------------- temel */
*, *::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: 'Onest', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; color: var(--txt); }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p  { margin: 0 0 10px; }
code, pre, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.muted     { color: var(--txt-2); }
.dim       { color: var(--txt-3); }
.small     { font-size: 12.5px; }
.nowrap    { white-space: nowrap; }
.right     { text-align: right; }
.grow      { flex: 1; }
.truncate  { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-0      { margin-top: 0; }
.mb-0      { margin-bottom: 0; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------------- düzen */
.app { min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar-w); z-index: 40;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  border-right: 1px solid rgba(255, 255, 255, .06);
}

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  height: var(--header-h); padding: 0 18px; flex: none;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sidebar-brand img { height: 30px; width: auto; display: block; }
.sidebar-brand .brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.sidebar-brand .brand-name { color: #fff; font-weight: 650; font-size: 14px; }
.sidebar-brand .brand-sub  { color: #8fa3c8; font-size: 11px; letter-spacing: .02em; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 12px 20px; }
.nav-group-title {
  color: #7185ab; font-size: 10.5px; font-weight: 600; letter-spacing: .09em;
  text-transform: uppercase; padding: 14px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; margin-bottom: 2px; border-radius: var(--radius-sm);
  color: #c3cede; font-size: 13.5px; font-weight: 500; text-decoration: none;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav-item.active { background: var(--brand); color: #fff; box-shadow: var(--shadow-sm); }
.nav-item .ic { width: 18px; text-align: center; flex: none; opacity: .95; }
.nav-item .nav-count {
  margin-left: auto; background: rgba(255, 255, 255, .14); color: #fff;
  border-radius: var(--radius-pill); padding: 1px 7px; font-size: 11px; font-weight: 600;
}
.nav-item.active .nav-count { background: rgba(0, 0, 0, .22); }

.sidebar-foot {
  flex: none; padding: 12px; border-top: 1px solid rgba(255, 255, 255, .08);
  color: #7185ab; font-size: 11.5px;
}
.sidebar-foot .sf-row { display: flex; align-items: center; gap: 7px; }

.content { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--header-h); flex: none;
  display: flex; align-items: center; gap: 14px; padding: 0 24px;
  background: rgba(255, 255, 255, .88); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar .page-title { font-size: 16px; font-weight: 650; }
.topbar .page-sub { color: var(--txt-3); font-size: 12.5px; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.userchip {
  display: flex; align-items: center; gap: 9px;
  padding: 5px 12px 5px 5px; border: 1px solid var(--line);
  border-radius: var(--radius-pill); background: #fff;
  color: var(--txt); text-decoration: none;
}
.userchip:hover { border-color: var(--brand); text-decoration: none; }
.userchip .avatar {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 12px; font-weight: 650; color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
}
.userchip .u-name { font-size: 13px; font-weight: 550; line-height: 1.1; }
.userchip .u-role { font-size: 11px; color: var(--txt-3); line-height: 1.1; }

.menu-toggle {
  display: none; width: 38px; height: 38px; flex: none;
  align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; color: var(--txt); font-size: 17px; cursor: pointer;
}

.page { padding: 22px 24px 48px; max-width: 1240px; width: 100%; }

.page-head {
  display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.page-head .ph-text { flex: 1; min-width: 240px; }
.page-head h1 { margin-bottom: 3px; }
.page-head .ph-desc { color: var(--txt-2); font-size: 13.5px; margin: 0; }
.page-head .ph-actions { display: flex; gap: 8px; align-items: center; }

.backdrop {
  display: none; position: fixed; inset: 0; z-index: 35;
  background: rgba(20, 26, 48, .45);
}

/* ------------------------------------------------------------------ kartlar */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm); margin-bottom: 18px;
}
.card-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.card-head h2 { flex: 1; min-width: 160px; }
.card-head .ch-desc { width: 100%; color: var(--txt-2); font-size: 12.5px; margin: 0; }
.card-head .ch-actions { display: flex; gap: 8px; align-items: center; }
.card-body { padding: 18px; }
.card-body > :last-child { margin-bottom: 0; }
.card.accent { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }

/* --------------------------------------------------------------- ızgaralar */
.grid { display: grid; gap: 14px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid .span-2 { grid-column: span 2; }
.grid .span-full { grid-column: 1 / -1; }

.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }

/* -------------------------------------------------------------- KPI döşeme */
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 4px;
}
.stat .s-label {
  color: var(--txt-3); font-size: 11.5px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase;
}
.stat .s-value { font-size: 27px; font-weight: 680; letter-spacing: -.02em; line-height: 1.15; }
.stat .s-note { color: var(--txt-2); font-size: 12.5px; }
.stat .s-note.ok { color: var(--ok); }
.stat .s-note.warn { color: var(--warn); }
.stat .s-note.danger { color: var(--danger); }
.stat.is-brand { border-left: 3px solid var(--brand); }
.stat.is-ok { border-left: 3px solid var(--ok); }
.stat.is-warn { border-left: 3px solid var(--warn); }
.stat.is-danger { border-left: 3px solid var(--danger); }

/* ----------------------------------------------------------------- rozetler */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: var(--radius-pill);
  font-size: 11.5px; font-weight: 600; line-height: 1.7; white-space: nowrap;
  background: #eef1f7; color: var(--txt-2); border: 1px solid transparent;
}
.badge.ok     { background: var(--ok-bg);     color: var(--ok); }
.badge.warn   { background: var(--warn-bg);   color: var(--warn); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.info   { background: var(--info-bg);   color: var(--brand); }
.badge.neutral{ background: #eef1f7;          color: var(--txt-2); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------------------------------------------------------------- butonlar */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 15px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font-family: inherit; font-size: 13.5px; font-weight: 600; line-height: 1.35;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  background: var(--brand); color: #fff;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.btn:disabled, .btn[disabled] { opacity: .5; cursor: not-allowed; }

.btn.secondary { background: #fff; color: var(--txt); border-color: var(--line-strong); }
.btn.secondary:hover { background: var(--surface-2); border-color: var(--txt-3); }
.btn.danger { background: var(--danger); color: #fff; }
.btn.danger:hover { background: #a01f1f; }
.btn.ghost { background: transparent; color: var(--txt-2); }
.btn.ghost:hover { background: #eef1f7; color: var(--txt); }
.btn.sm { padding: 5px 11px; font-size: 12.5px; }
.btn.block { width: 100%; }

.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------------ formlar */
.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.field:last-child { margin-bottom: 0; }
.field > label, .label {
  color: var(--txt-2); font-size: 12.5px; font-weight: 600;
}
.field .hint { color: var(--txt-3); font-size: 11.5px; }

input[type=text], input[type=email], input[type=password], input[type=number],
input[type=date], input[type=file], select, textarea {
  width: 100%; padding: 9px 11px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: #fff; color: var(--txt);
  font-family: inherit; font-size: 13.5px; line-height: 1.4;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint);
}
input::placeholder, textarea::placeholder { color: #a9b4c6; }
input:disabled, select:disabled, textarea:disabled { background: var(--surface-2); color: var(--txt-3); }
textarea { resize: vertical; min-height: 110px; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237f91aa' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; padding-right: 30px;
}

.form-grid { display: grid; gap: 12px; }
.form-grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid .full { grid-column: 1 / -1; }
.form-grid .field { margin-bottom: 0; }
.form-actions {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
}
.form-actions.tight { margin-top: 12px; padding-top: 0; border-top: 0; }
.form-inline { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.form-inline .field { flex: 1; min-width: 150px; margin-bottom: 0; }
form.inline { display: inline-block; margin: 0; }

.check { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; }
.form-grid + .check { margin-top: 14px; }
.check input[type=checkbox] { width: 16px; height: 16px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.check .c-text { color: var(--txt); }
.check .c-text .c-hint { display: block; color: var(--txt-3); font-size: 11.5px; }

/* ----------------------------------------------------------------- tablolar */
.table-wrap { width: 100%; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data th {
  text-align: left; padding: 10px 14px; white-space: nowrap;
  background: var(--surface-2); border-bottom: 1px solid var(--line);
  color: var(--txt-3); font-size: 11.5px; font-weight: 650;
  letter-spacing: .05em; text-transform: uppercase;
}
table.data td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--surface-2); }
table.data td.actions { text-align: right; white-space: nowrap; }
table.data .t-main { font-weight: 550; }
table.data .t-sub { color: var(--txt-3); font-size: 12px; }
table.data tr.sub-row td { background: var(--surface-2); border-bottom: 1px solid var(--line); }
table.data tr.sub-row:hover td { background: var(--surface-2); }

.table-toolbar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.table-toolbar .search { position: relative; flex: 1; min-width: 200px; max-width: 340px; }
.table-toolbar .search input { padding-left: 32px; }
.table-toolbar .search .s-ic {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  color: var(--txt-3); font-size: 13px; pointer-events: none;
}
.table-count { color: var(--txt-3); font-size: 12.5px; margin-left: auto; }

/* -------------------------------------------------------------- boş durumlar */
.empty { padding: 40px 20px; text-align: center; color: var(--txt-3); }
.empty .e-ic { font-size: 30px; display: block; margin-bottom: 8px; opacity: .65; }
.empty .e-title { color: var(--txt-2); font-weight: 600; font-size: 14px; margin-bottom: 3px; }
.empty .e-desc { font-size: 12.5px; }
tr.empty-row td { padding: 0; }

/* -------------------------------------------------------------- bildirimler */
.alert {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px solid transparent; margin-bottom: 16px; font-size: 13.5px;
}
.alert .a-ic { flex: none; }
.alert.ok     { background: var(--ok-bg);     color: var(--ok);     border-color: #bfe6d6; }
.alert.warn   { background: var(--warn-bg);   color: var(--warn);   border-color: #f2ddba; }
.alert.danger { background: var(--danger-bg); color: var(--danger); border-color: #f3c9c9; }
.alert.info   { background: var(--info-bg);   color: var(--brand);  border-color: #c8ddf8; }

.callout {
  background: var(--surface-2); border: 1px solid var(--line);
  border-left: 3px solid var(--brand); border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13px; color: var(--txt-2);
}

/* ------------------------------------------------------- sistem durumu listesi */
.status-list { display: flex; flex-direction: column; }
.status-row {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 0; border-bottom: 1px solid var(--line);
}
.status-row:last-child { border-bottom: 0; }
.status-row .sr-text { flex: 1; min-width: 0; }
.status-row .sr-name { font-weight: 550; font-size: 13.5px; }
.status-row .sr-desc { color: var(--txt-3); font-size: 12px; }

/* ---------------------------------------------------------- kopyalanan alan */
.copy-field { display: flex; gap: 8px; align-items: center; }
.copy-field input {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px;
  background: var(--surface-2);
}

pre.code {
  background: #141a30; color: #dbe4f5; padding: 14px 16px;
  border-radius: var(--radius-sm); overflow-x: auto; font-size: 12.5px;
  line-height: 1.6; margin: 0;
}
pre.code .c-str { color: #9ad4a0; }

code.inline {
  background: #eef1f7; border: 1px solid var(--line);
  border-radius: 5px; padding: 1px 5px; font-size: 12.5px;
}

/* --------------------------------------------- yükleme adımları + onay bandı */
.steps { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-no {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; font-size: 12.5px; font-weight: 650;
  background: #eef1f7; color: var(--txt-3);
}
.step.is-now .step-no { background: var(--brand); color: #fff; }
.step-text { font-size: 13px; color: var(--txt-2); line-height: 1.5; }
.step-text b { color: var(--txt); }

.approve-band {
  display: flex; gap: 18px; align-items: center; flex-wrap: wrap;
  background: var(--warn-bg); border: 1px solid #f2ddba;
  border-left: 4px solid var(--warn);
  border-radius: var(--radius); padding: 16px 20px; margin-bottom: 18px;
}
.approve-band .ab-text { flex: 1; min-width: 260px; }
.approve-band h2 { font-size: 15px; margin: 6px 0 4px; color: var(--warn); }
.approve-band p { margin: 0; font-size: 13px; color: var(--txt-2); }
.approve-band .ab-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.approve-band form { margin: 0; }

/* ------------------------------------------------- fon analizi: hero + grafik */
/* Renkler doğrulandı (beyaz yüzeyde işaret kontrastı):
   marka #156EDC 4,89:1 · kâr #12805c 4,92:1 · zarar #c02626 5,92:1 · nötr #7f91aa 3,21:1 */

.hero-band {
  display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 14px; margin-bottom: 14px;
}
.hero {
  background: linear-gradient(135deg, var(--sidebar) 0%, var(--brand-deep) 100%);
  color: #fff; border-radius: var(--radius); padding: 20px 22px;
  display: flex; flex-direction: column; gap: 5px; box-shadow: var(--shadow);
}
.hero .hero-label {
  color: #b9c6e4; font-size: 11.5px; font-weight: 600;
  letter-spacing: .07em; text-transform: uppercase;
}
/* Hero rakamı: orantılı rakamlar (tabular-nums büyük puntoda gevşek durur) */
.hero .hero-value { font-size: 40px; font-weight: 680; letter-spacing: -.02em; line-height: 1.1; }
.hero .hero-note { color: #a8b8da; font-size: 12.5px; }
.hero-side { display: contents; }

.stat .s-value.is-gain { color: var(--ok); }
.stat .s-value.is-loss { color: var(--danger); }

/* Grafik markları — sınıf üzerinden, satır içi stil yok (CSP) */
.mark-brand { fill: var(--brand); }
.mark-gain  { fill: var(--ok); }
.mark-loss  { fill: var(--danger); }
.mark-muted { fill: #a9b8cd; }
.axis-line  { stroke: var(--line-strong); stroke-width: 1; }
.axis-zero  { stroke: var(--line-strong); stroke-width: 1; }
.ts-tick    { fill: var(--txt-3); font-size: 15px; font-family: inherit; }
.ts-col rect { transition: opacity .12s ease; }
.ts-col:hover rect { opacity: .78; }

.chart { display: flex; flex-direction: column; gap: 9px; }
.hbar-row { display: grid; grid-template-columns: 92px 1fr 116px; gap: 12px; align-items: center; }
.hbar-label { font-size: 13px; font-weight: 550; color: var(--txt); }
.hbar-track { display: block; min-width: 0; }
.bar-svg { display: block; width: 100%; height: 14px; }
.hbar-value {
  text-align: right; font-size: 13px; color: var(--txt-2);
  font-variant-numeric: tabular-nums;
}
.hbar-value.is-gain { color: var(--ok); font-weight: 600; }
.hbar-value.is-loss { color: var(--danger); font-weight: 600; }

.chart-frame { width: 100%; overflow-x: auto; }
.ts-svg { display: block; width: 100%; min-width: 520px; height: auto; }

/* Tablolarda hizalı rakamlar */
td.nums, th.right { font-variant-numeric: tabular-nums; }
td.nums.is-gain { color: var(--ok); font-weight: 600; }
td.nums.is-loss { color: var(--danger); font-weight: 600; }

.btn-row.center { justify-content: center; margin-top: 14px; }

.disclaimer {
  color: var(--txt-3); font-size: 12px; line-height: 1.6;
  border-top: 1px solid var(--line); padding-top: 14px; margin-top: 6px;
}

@media (max-width: 1080px) {
  .hero-band { grid-template-columns: 1fr 1fr; }
  .hero { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .hero-band { grid-template-columns: 1fr; }
  .hero .hero-value { font-size: 32px; }
  .hbar-row { grid-template-columns: 74px 1fr 96px; gap: 8px; }
  .hbar-label, .hbar-value { font-size: 12px; }
}

/* ----------------------------------------------------------- tanıtım turu -- */
.tour[hidden], .tour-steps { display: none; }
.tour { position: fixed; inset: 0; z-index: 90; }
.tour-veil { position: absolute; inset: 0; background: rgba(20, 26, 48, .55); }
.tour-card {
  position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%);
  width: 460px; max-width: calc(100vw - 32px);
  background: #fff; border-radius: 16px; padding: 20px 22px 16px;
  box-shadow: 0 24px 60px rgba(10, 16, 40, .38);
}
.tour-card .tour-step {
  font-size: 11px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brand); margin-bottom: 6px;
}
.tour-card h2 { font-size: 17px; margin-bottom: 6px; }
.tour-card p { font-size: 13.5px; color: var(--txt-2); line-height: 1.6; margin-bottom: 14px; }
.tour-dots { display: flex; gap: 5px; margin-bottom: 14px; }
.tour-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.tour-dot.is-on { background: var(--brand); width: 18px; border-radius: 3px; }
.tour-actions { display: flex; gap: 8px; align-items: center; }
.tour-never {
  display: flex; align-items: center; gap: 7px; margin-top: 12px;
  padding-top: 11px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--txt-2); cursor: pointer;
}
.tour-never input { width: 15px; height: 15px; accent-color: var(--brand); }

/* Turun işaret ettiği öğe örtünün üstüne çıkar */
.tour-spot {
  position: relative; z-index: 91;
  outline: 3px solid var(--brand); outline-offset: 3px;
  border-radius: var(--radius-sm); background: var(--surface);
}
body.tour-open { overflow: hidden; }

@media (max-width: 520px) {
  .tour-card { bottom: 12px; padding: 16px; }
}

/* ------------------------------------------- Excel rapor görünümü (biçimli) */
.viewtabs { display: flex; gap: 4px; background: #eef1f7; padding: 3px; border-radius: var(--radius-sm); }
.viewtab {
  padding: 5px 12px; border-radius: 6px; font-size: 12.5px; font-weight: 600;
  color: var(--txt-2); text-decoration: none; white-space: nowrap;
}
.viewtab:hover { color: var(--txt); text-decoration: none; }
.viewtab.is-on { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }

.xls-wrap { width: 100%; overflow: auto; max-height: 72vh; border-top: 1px solid var(--line); }
table.xls {
  border-collapse: collapse; font-size: 12px; background: #fff;
  font-variant-numeric: tabular-nums;
}
table.xls td {
  border: 1px solid #dfe3ec; padding: 3px 7px; white-space: nowrap;
  vertical-align: middle; color: var(--txt); max-width: 320px;
  overflow: hidden; text-overflow: ellipsis;
}
/* Boş hücreler gridi taşımaya devam etsin ama göze batmasın */
table.xls td:empty { background: #fcfdff; }

/* ---------------------------------------------------------- fon asistanı --- */
.chat-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; padding: 0;
  background: #fff; border: 1px solid var(--line);
  box-shadow: 0 6px 22px rgba(20, 26, 48, .20);
}
.chat-fab:hover { border-color: var(--brand); box-shadow: 0 8px 26px rgba(21, 110, 220, .28); }
.chat-fab img { width: 32px; height: 32px; display: block; }

/* Karşılama balonu — ilk açılışta bir kez, dikkat çekmek için */
.chat-greet {
  position: fixed; right: 88px; bottom: 30px; z-index: 60;
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: 9px 12px 9px 16px;
  box-shadow: 0 6px 22px rgba(20, 26, 48, .18);
  animation: greet-in .35s ease-out;
}
.chat-greet[hidden] { display: none; }
.chat-greet .cg-text { font-size: 13px; font-weight: 550; color: var(--txt); white-space: nowrap; }
.chat-greet .cg-x {
  border: 0; background: none; color: var(--txt-3); cursor: pointer;
  font-size: 17px; line-height: 1; padding: 0 2px;
}
.chat-greet .cg-x:hover { color: var(--txt); }
@keyframes greet-in { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .chat-greet { animation: none; } }

/* Canlı mikrofon seviyesi — kullanıcı duyulduğunu görsün */
.chat-level {
  flex: none; height: 4px; background: var(--line);
  margin: 0 16px; border-radius: 2px; overflow: hidden;
}
.chat-level[hidden] { display: none; }
.chat-level span {
  display: block; height: 100%; width: var(--seviye, 0%);
  background: var(--danger); border-radius: 2px; transition: width .08s linear;
}

/* Sohbet ekleri: tablo ve grafik */
.att {
  margin: 2px 0 0; padding: 10px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface-2); align-self: stretch;
}
.att-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.att-title { flex: 1; font-size: 12.5px; font-weight: 650; color: var(--txt); }
.att-dl {
  border: 1px solid var(--line-strong); background: #fff; color: var(--txt-2);
  border-radius: var(--radius-pill); padding: 3px 10px; cursor: pointer;
  font-family: inherit; font-size: 11px; font-weight: 600; white-space: nowrap;
}
.att-dl:hover { border-color: var(--brand); color: var(--brand); }
.att-scroll { overflow-x: auto; }
.att-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.att-table th {
  text-align: left; padding: 5px 7px; white-space: nowrap;
  color: var(--txt-3); font-weight: 650; border-bottom: 1px solid var(--line);
  text-transform: uppercase; font-size: 10px; letter-spacing: .04em;
}
.att-table td {
  padding: 5px 7px; border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.att-table tr:last-child td { border-bottom: 0; }
.att-chart { display: block; width: 100%; height: auto; }
.att-label { fill: var(--txt); font-size: 11px; font-family: inherit; }
.att-value { fill: var(--txt-2); font-size: 11px; font-family: inherit; font-variant-numeric: tabular-nums; }

.chat-panel {
  position: fixed; right: 22px; bottom: 86px; z-index: 61;
  width: 380px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 120px);
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 22px 56px rgba(20, 26, 48, .26);
}
.chat-panel[hidden] { display: none; }

.chat-head {
  flex: none; padding: 14px 16px; position: relative;
  background: linear-gradient(135deg, var(--sidebar) 0%, var(--brand-deep) 100%); color: #fff;
}
.chat-title { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 14.5px; }
.chat-dot { width: 8px; height: 8px; border-radius: 50%; background: #4ade80; flex: none; }
.chat-sub { display: block; color: #b9c6e4; font-size: 11.5px; margin-top: 2px; }
.chat-x {
  position: absolute; top: 10px; right: 10px; width: 28px; height: 28px;
  border: 0; border-radius: 8px; background: rgba(255, 255, 255, .14);
  color: #fff; font-size: 19px; line-height: 1; cursor: pointer;
}
.chat-x:hover { background: rgba(255, 255, 255, .26); }

.chat-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; font-size: 13.5px; line-height: 1.55; }
.msg p { margin: 0; padding: 10px 13px; border-radius: 13px; white-space: pre-wrap; }
.msg.bot { align-self: flex-start; }
.msg.bot p { background: #eef1f7; color: var(--txt); border-bottom-left-radius: 4px; }
.msg.user { align-self: flex-end; }
.msg.user p { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; }
.msg-speak {
  margin-top: 5px; border: 0; background: none; cursor: pointer; padding: 2px 0;
  color: var(--brand); font-family: inherit; font-size: 11.5px; font-weight: 600;
}
.msg-speak:hover { text-decoration: underline; }
.msg-speak:disabled { color: var(--txt-3); cursor: default; text-decoration: none; }

.chat-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.chip {
  border: 1px solid var(--line-strong); background: #fff; color: var(--txt-2);
  border-radius: var(--radius-pill); padding: 5px 11px;
  font-family: inherit; font-size: 12px; cursor: pointer;
}
.chip:hover { border-color: var(--brand); color: var(--brand); }

.chat-status {
  flex: none; padding: 7px 16px; font-size: 12px; color: var(--txt-2);
  background: var(--surface-2); border-top: 1px solid var(--line);
}
.chat-status.is-err { color: var(--danger); background: var(--danger-bg); }
.chat-status.is-rec { color: var(--danger); }

.chat-form {
  flex: none; display: flex; gap: 8px; align-items: center;
  padding: 10px 12px; border-top: 1px solid var(--line);
}
.chat-form input { flex: 1; border-radius: var(--radius-pill); padding: 9px 14px; }
.chat-mic, .chat-send {
  flex: none; width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; border: 1px solid var(--line-strong);
  background: #fff; color: var(--txt-2);
}
.chat-mic:hover, .chat-send:hover { border-color: var(--brand); color: var(--brand); }
.chat-send { background: var(--brand); border-color: var(--brand); color: #fff; }
.chat-send:hover { background: var(--brand-dark); color: #fff; }
.chat-mic.is-recording {
  background: var(--danger); border-color: var(--danger); color: #fff;
  animation: chat-pulse 1.3s ease-in-out infinite;
}
@keyframes chat-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(192, 38, 38, .45); }
  50%      { box-shadow: 0 0 0 7px rgba(192, 38, 38, 0); }
}
@media (prefers-reduced-motion: reduce) { .chat-mic.is-recording { animation: none; } }

.chat-foot {
  flex: none; margin: 0; padding: 0 16px 11px;
  font-size: 10.5px; color: var(--txt-3); text-align: center;
}

@media (max-width: 520px) {
  .chat-panel {
    right: 8px; left: 8px; bottom: 78px; width: auto;
    height: calc(100vh - 108px);
  }
  .chat-fab { right: 14px; bottom: 14px; }
}

/* ------------------------------------------------------------- giriş sayfası */
body.auth {
  display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(1000px 520px at 12% -10%, rgba(27, 167, 223, .30), transparent 60%),
    linear-gradient(140deg, #1b2340 0%, #303085 55%, #156EDC 130%);
}
.auth-card {
  width: 100%; max-width: 400px; background: #fff;
  border-radius: 16px; box-shadow: 0 24px 60px rgba(10, 16, 40, .35);
  padding: 30px 28px;
}
.auth-card .auth-logo { display: block; height: 40px; width: auto; margin: 0 auto 18px; }
.auth-card h1 { font-size: 19px; text-align: center; margin-bottom: 4px; }
.auth-card .auth-sub {
  text-align: center; color: var(--txt-3); font-size: 13px; margin-bottom: 22px;
}
.auth-foot {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
  text-align: center; color: var(--txt-3); font-size: 11.5px;
}

/* ------------------------------------------------------------------ duyarlı */
@media (max-width: 1080px) {
  .split { grid-template-columns: 1fr; }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .backdrop { display: block; }
  .content { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .page { padding: 18px 16px 40px; }
  .topbar { padding: 0 16px; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .form-grid.c2, .form-grid.c3, .form-grid.c4 { grid-template-columns: 1fr; }
  .grid .span-2 { grid-column: auto; }
  .userchip .u-meta { display: none; }
}

@media (max-width: 520px) {
  .grid.cols-4 { grid-template-columns: 1fr; }
  .page-head .ph-actions { width: 100%; }
}
