/* ==========================================================================
   KiyakEmlak SaaS — Sayfaya özel bileşenler
   ========================================================================== */

/* --------------------------------------------------------------------------
   İlan (portföy) kartı
   -------------------------------------------------------------------------- */
.prop-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm);
  transition: box-shadow var(--t-base), transform var(--t-base), border-color var(--t-base);
}
.prop-card:hover { box-shadow: var(--sh-lg); transform: translateY(-3px); border-color: var(--border-strong); }
.prop-media { position: relative; padding-top: 64%; overflow: hidden; background: var(--bg-surface-3); }
.prop-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.prop-card:hover .prop-media img { transform: scale(1.06); }
.prop-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(15,23,42,.55) 0%, transparent 46%);
  pointer-events: none;
}
.prop-tags { position: absolute; top: 10px; left: 10px; z-index: 2; display: flex; gap: 5px; flex-wrap: wrap; max-width: calc(100% - 60px); }
.prop-fav {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%;
  background: rgba(255,255,255,.92); color: var(--text-muted);
  box-shadow: var(--sh-sm); transition: all var(--t-fast);
}
.prop-fav:hover { background: #fff; color: var(--danger-500); transform: scale(1.08); }
.prop-fav.is-on { background: var(--danger-500); color: #fff; }
.prop-fav svg { width: 15px; height: 15px; }
.prop-price {
  position: absolute; left: 12px; bottom: 11px; z-index: 2;
  font-size: 18px; font-weight: 700; color: #fff; letter-spacing: -.02em;
  text-shadow: 0 1px 6px rgba(0,0,0,.4);
}
.prop-price small { font-size: 11.5px; font-weight: 520; opacity: .85; }
.prop-count {
  position: absolute; right: 12px; bottom: 11px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 560; color: #fff; opacity: .9;
}
.prop-count svg { width: 12px; height: 12px; }
.prop-body { padding: 14px; flex: 1; display: flex; flex-direction: column; gap: 7px; }
.prop-title { font-size: 14.5px; font-weight: 620; color: var(--text-strong); line-height: 1.4; }
.prop-title a { color: inherit; }
.prop-title a:hover { color: var(--brand-600); }
.prop-addr { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-muted); }
.prop-addr svg { width: 13px; height: 13px; flex: none; color: var(--text-subtle); }
.prop-specs {
  display: flex; align-items: center; gap: 14px; padding-top: 11px; margin-top: auto;
  border-top: 1px solid var(--border-subtle); font-size: 12.5px; color: var(--text-muted);
}
.prop-specs span { display: inline-flex; align-items: center; gap: 5px; }
.prop-specs svg { width: 14px; height: 14px; color: var(--text-subtle); }
.prop-specs b { color: var(--text-body); font-weight: 580; }
.prop-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border-top: 1px solid var(--border-subtle); background: var(--bg-surface-2);
}

/* Yatay ilan kartı (liste görünümü) */
.prop-row {
  display: grid; grid-template-columns: 220px 1fr auto; gap: 16px;
  padding: 14px; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  transition: box-shadow var(--t-base), border-color var(--t-base);
}
.prop-row:hover { box-shadow: var(--sh-md); border-color: var(--border-strong); }
.prop-row .rm { position: relative; border-radius: var(--r-md); overflow: hidden; min-height: 148px; background: var(--bg-surface-3); }
.prop-row .rm img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.prop-row .rb { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.prop-row .ra { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: 10px; min-width: 150px; }
@media (max-width: 767px) { .prop-row { grid-template-columns: 1fr; } .prop-row .ra { align-items: flex-start; flex-direction: row; } }

/* Şerit kartı (harita altı) */
.strip-card {
  flex: 0 0 292px; width: 292px; display: flex; gap: 0; overflow: hidden;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--r-md); box-shadow: var(--sh-md); cursor: pointer;
  transition: all var(--t-fast);
}
.strip-card:hover, .strip-card.is-active { border-color: var(--brand-500); box-shadow: var(--sh-lg); transform: translateY(-2px); }
.strip-card .sm { width: 92px; flex: none; position: relative; background: var(--bg-surface-3); }
.strip-card .sm img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.strip-card .sb { flex: 1; min-width: 0; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }

/* Harita açılır balonu içeriği */
.map-pop .mp-media { position: relative; height: 132px; background: var(--bg-surface-3); }
.map-pop .mp-media img { width: 100%; height: 100%; object-fit: cover; }
.map-pop .mp-price {
  position: absolute; left: 10px; bottom: 9px; padding: 3px 9px; border-radius: var(--r-full);
  background: var(--brand-600); color: #fff; font-size: 13px; font-weight: 680;
}
.map-pop .mp-body { padding: 11px 13px 13px; }

/* --------------------------------------------------------------------------
   Bölge (kategori) kartları — Denizli hiyerarşisi
   -------------------------------------------------------------------------- */
.region-card {
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 18px; overflow: hidden;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); box-shadow: var(--sh-sm); color: inherit;
  transition: all var(--t-base);
}
.region-card::after {
  content: ""; position: absolute; right: -34px; top: -34px; width: 108px; height: 108px;
  border-radius: 50%; background: var(--brand-50); opacity: 0; transition: opacity var(--t-base);
}
.region-card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); border-color: var(--brand-300); color: inherit; }
.region-card:hover::after { opacity: 1; }
.region-card > * { position: relative; z-index: 1; }
.region-ico {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--r-md);
  background: var(--brand-50); color: var(--brand-600); transition: all var(--t-base);
}
.region-card:hover .region-ico { background: var(--brand-600); color: #fff; }
.region-ico svg { width: 21px; height: 21px; }
.region-name { font-size: 15px; font-weight: 630; color: var(--text-strong); }
.region-meta { font-size: 12.5px; color: var(--text-muted); }
.region-stats { display: flex; gap: 16px; padding-top: 12px; border-top: 1px solid var(--border-subtle); }
.region-stats div { line-height: 1.25; }
.region-stats b { display: block; font-size: 16px; font-weight: 680; color: var(--text-strong); font-variant-numeric: tabular-nums; }
.region-stats span { font-size: 11px; color: var(--text-subtle); }
.region-card .arrow {
  position: absolute; right: 16px; bottom: 16px; width: 26px; height: 26px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--bg-surface-3); color: var(--text-muted);
  transition: all var(--t-base);
}
.region-card:hover .arrow { background: var(--brand-600); color: #fff; transform: translateX(3px); }
.region-card .arrow svg { width: 14px; height: 14px; }

/* Kırılım gezinme şeridi */
.drill-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; margin-bottom: 18px;
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-lg);
}
.drill-node {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px;
  border-radius: var(--r-full); font-size: 12.5px; font-weight: 550;
  background: var(--bg-surface-3); color: var(--text-body); transition: all var(--t-fast);
}
.drill-node:hover { background: var(--brand-50); color: var(--brand-700); }
.drill-node.is-current { background: var(--brand-600); color: #fff; }
.drill-node svg { width: 14px; height: 14px; }
.drill-sep { color: var(--text-subtle); display: inline-flex; }
.drill-sep svg { width: 14px; height: 14px; }

/* Isı listesi (bölge yoğunluğu) */
.heat-row { display: grid; grid-template-columns: 140px 1fr 74px; gap: 12px; align-items: center; padding: 7px 0; }
.heat-bar { height: 22px; border-radius: var(--r-sm); background: var(--bg-surface-3); overflow: hidden; }
.heat-bar > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-400), var(--brand-600)); }

/* --------------------------------------------------------------------------
   İlan detay
   -------------------------------------------------------------------------- */
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; height: 420px; }
.gallery > a { position: relative; overflow: hidden; border-radius: var(--r-md); background: var(--bg-surface-3); }
.gallery > a:first-child { grid-row: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow); }
.gallery > a:hover img { transform: scale(1.05); }
.gallery .more-overlay {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 7px;
  background: rgba(15,23,42,.58); color: #fff; font-size: 14px; font-weight: 600;
}
.gallery .more-overlay svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 767px) { .gallery { grid-template-columns: 1fr 1fr; height: 300px; } .gallery > a:first-child { grid-column: span 2; grid-row: span 1; } .gallery > a:nth-child(n+4) { display: none; } }

.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: 1px; background: var(--border-subtle); border: 1px solid var(--border-subtle); border-radius: var(--r-md); overflow: hidden; }
.spec-item { padding: 14px; background: var(--bg-surface); }
.spec-item .sl { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-muted); margin-bottom: 4px; }
.spec-item .sl svg { width: 13px; height: 13px; }
.spec-item .sv { font-size: 14px; font-weight: 620; color: var(--text-strong); }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px,1fr)); gap: 9px 16px; }
.feature-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-body); }
.feature-item svg { width: 15px; height: 15px; color: var(--success-500); flex: none; }
.feature-item.is-off { color: var(--text-subtle); }
.feature-item.is-off svg { color: var(--border-strong); }

.agent-box { padding: 18px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-surface); }

/* --------------------------------------------------------------------------
   Takvim
   -------------------------------------------------------------------------- */
.cal { border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--bg-surface); }
.cal-head { display: grid; grid-template-columns: repeat(7,1fr); background: var(--bg-surface-2); border-bottom: 1px solid var(--border); }
.cal-head div { padding: 10px 8px; text-align: center; font-size: 11.5px; font-weight: 620; text-transform: uppercase; letter-spacing: .05em; color: var(--text-subtle); }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); }
.cal-cell {
  min-height: 116px; padding: 7px; border-right: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; gap: 4px; transition: background var(--t-fast);
}
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell:hover { background: var(--bg-surface-2); }
.cal-cell.is-out { background: var(--bg-surface-2); }
.cal-cell.is-out .cal-num { color: var(--text-subtle); opacity: .55; }
.cal-num { font-size: 12.5px; font-weight: 570; color: var(--text-body); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-cell.is-today .cal-num { background: var(--brand-600); color: #fff; }
.cal-ev {
  padding: 3px 7px; border-radius: var(--r-xs); font-size: 11px; font-weight: 540;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer;
  background: var(--brand-50); color: var(--brand-700); border-left: 2.5px solid var(--brand-500);
}
.cal-ev.is-success { background: var(--success-50); color: var(--success-700); border-left-color: var(--success-500); }
.cal-ev.is-warning { background: var(--warning-50); color: var(--warning-700); border-left-color: var(--warning-500); }
.cal-ev.is-danger  { background: var(--danger-50);  color: var(--danger-700);  border-left-color: var(--danger-500); }
.cal-ev.is-info    { background: var(--info-50);    color: var(--info-700);    border-left-color: var(--info-500); }
.cal-more { font-size: 10.5px; color: var(--text-muted); padding-left: 6px; }
@media (max-width: 767px) { .cal-cell { min-height: 78px; } }

/* Gün/hafta ızgarası */
.cal-week { display: grid; grid-template-columns: 62px repeat(7,1fr); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--bg-surface); }
.cw-time { padding: 6px 8px; font-size: 11px; color: var(--text-subtle); text-align: right; border-right: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); height: 52px; }
.cw-slot { border-right: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); height: 52px; position: relative; transition: background var(--t-fast); }
.cw-slot:hover { background: var(--bg-surface-2); }

/* --------------------------------------------------------------------------
   Sohbet / mesaj
   -------------------------------------------------------------------------- */
.chat-shell { display: grid; grid-template-columns: 292px 1fr; height: calc(100vh - var(--topbar-h) - var(--page-pad) * 2); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--bg-surface); }
.chat-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; }
.chat-thread { display: flex; flex-direction: column; min-height: 0; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.chat-item { display: flex; gap: 11px; padding: 11px 14px; cursor: pointer; border-bottom: 1px solid var(--border-subtle); transition: background var(--t-fast); }
.chat-item:hover { background: var(--bg-surface-2); }
.chat-item.is-active { background: var(--brand-50); }
html[data-theme="dark"] .chat-item.is-active { background: rgba(99,102,241,.1); }
.bubble { max-width: 74%; padding: 9px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.55; }
.bubble-in  { background: var(--bg-surface-3); color: var(--text-body); border-bottom-left-radius: 4px; align-self: flex-start; }
.bubble-out { background: var(--brand-600); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.bubble-time { font-size: 10.5px; opacity: .65; margin-top: 3px; display: block; }
.chat-compose { padding: 12px 16px; border-top: 1px solid var(--border); display: flex; gap: 9px; align-items: flex-end; }
@media (max-width: 1023px) { .chat-shell { grid-template-columns: 1fr; } .chat-list { display: none; } }

/* --------------------------------------------------------------------------
   Posta kutusu
   -------------------------------------------------------------------------- */
.mail-shell { display: grid; grid-template-columns: 210px 340px 1fr; height: calc(100vh - var(--topbar-h) - var(--page-pad) * 2); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--bg-surface); }
.mail-nav { border-right: 1px solid var(--border); padding: 14px 10px; overflow-y: auto; }
.mail-nav a { display: flex; align-items: center; gap: 9px; padding: 8px 11px; border-radius: var(--r-sm); font-size: 13px; color: var(--text-body); }
.mail-nav a:hover { background: var(--bg-surface-3); }
.mail-nav a.is-active { background: var(--brand-50); color: var(--brand-700); font-weight: 570; }
.mail-nav a svg { width: 16px; height: 16px; }
.mail-list { border-right: 1px solid var(--border); overflow-y: auto; }
.mail-row { padding: 12px 14px; border-bottom: 1px solid var(--border-subtle); cursor: pointer; transition: background var(--t-fast); }
.mail-row:hover { background: var(--bg-surface-2); }
.mail-row.is-unread { background: var(--brand-50); }
html[data-theme="dark"] .mail-row.is-unread { background: rgba(99,102,241,.07); }
.mail-row.is-active { background: var(--bg-surface-3); box-shadow: inset 3px 0 0 var(--brand-600); }
.mail-read { overflow-y: auto; padding: 24px; }
@media (max-width: 1279px) { .mail-shell { grid-template-columns: 300px 1fr; } .mail-nav { display: none; } }
@media (max-width: 767px) { .mail-shell { grid-template-columns: 1fr; } .mail-list { display: none; } }

/* --------------------------------------------------------------------------
   Proje / inşaat
   -------------------------------------------------------------------------- */
.gantt { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--bg-surface); }
.gantt-grid { min-width: 900px; }
.gantt-row { display: grid; grid-template-columns: 230px 1fr; border-bottom: 1px solid var(--border-subtle); }
.gantt-row:last-child { border-bottom: 0; }
.gantt-label { padding: 11px 14px; border-right: 1px solid var(--border-subtle); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.gantt-track { position: relative; padding: 11px 0; min-height: 44px; background-image: repeating-linear-gradient(to right, var(--border-subtle) 0 1px, transparent 1px calc(100% / 12)); }
.gantt-bar {
  position: absolute; top: 50%; transform: translateY(-50%); height: 22px;
  border-radius: var(--r-full); background: var(--brand-500);
  display: flex; align-items: center; padding: 0 9px;
  font-size: 11px; font-weight: 570; color: #fff; white-space: nowrap; overflow: hidden;
  box-shadow: var(--sh-xs);
}
.gantt-bar.is-success { background: var(--success-500); }
.gantt-bar.is-warning { background: var(--warning-500); }
.gantt-bar.is-danger { background: var(--danger-500); }
.gantt-bar.is-gray { background: var(--gray-400); }
.gantt-head { display: grid; grid-template-columns: 230px 1fr; background: var(--bg-surface-2); border-bottom: 1px solid var(--border); }
.gantt-months { display: grid; grid-template-columns: repeat(12,1fr); }
.gantt-months span { padding: 9px 4px; text-align: center; font-size: 11px; font-weight: 600; color: var(--text-subtle); border-right: 1px solid var(--border-subtle); }

/* Blok / kat / daire şeması */
.block-plan { display: flex; flex-direction: column-reverse; gap: 5px; }
.floor-row { display: flex; align-items: center; gap: 8px; }
.floor-tag { width: 62px; flex: none; font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-align: right; }
.unit-row { display: flex; gap: 5px; flex-wrap: wrap; flex: 1; }
.unit {
  width: 54px; height: 40px; border-radius: var(--r-sm); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 620; line-height: 1.15;
  border: 1px solid transparent; transition: all var(--t-fast);
}
.unit:hover { transform: scale(1.08); box-shadow: var(--sh-md); z-index: 1; }
.unit small { font-size: 8.5px; font-weight: 500; opacity: .8; }
.unit.st-available { background: var(--success-50); color: var(--success-700); border-color: var(--success-500); }
.unit.st-reserved  { background: var(--warning-50); color: var(--warning-700); border-color: var(--warning-500); }
.unit.st-sold      { background: var(--danger-50);  color: var(--danger-700);  border-color: var(--danger-500); }
.unit.st-blocked   { background: var(--bg-surface-3); color: var(--text-subtle); border-color: var(--border-strong); }

/* --------------------------------------------------------------------------
   Fatura / belge
   -------------------------------------------------------------------------- */
.invoice-doc { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 36px; max-width: 860px; }
.invoice-head { display: flex; justify-content: space-between; gap: 26px; flex-wrap: wrap; padding-bottom: 26px; border-bottom: 2px solid var(--border); }
.invoice-total { display: grid; grid-template-columns: auto auto; gap: 8px 32px; justify-content: end; font-size: 13.5px; }
.invoice-total .lbl { color: var(--text-muted); text-align: right; }
.invoice-total .val { font-weight: 600; color: var(--text-strong); text-align: right; font-variant-numeric: tabular-nums; }
.invoice-total .grand { font-size: 19px; font-weight: 700; color: var(--brand-600); }

/* Dosya / arşiv */
.file-card {
  display: flex; align-items: center; gap: 12px; padding: 13px;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--r-md); transition: all var(--t-fast); cursor: pointer;
}
.file-card:hover { border-color: var(--brand-300); box-shadow: var(--sh-sm); }
.file-ico {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center;
  border-radius: var(--r-sm); background: var(--bg-surface-3); color: var(--text-muted);
}
.file-ico svg { width: 19px; height: 19px; }
.file-ico.ft-pdf { background: var(--danger-50); color: var(--danger-600); }
.file-ico.ft-doc { background: var(--info-50); color: var(--info-600); }
.file-ico.ft-xls { background: var(--success-50); color: var(--success-600); }
.file-ico.ft-img { background: var(--purple-50); color: var(--purple-600); }
.file-ico.ft-dwg { background: var(--warning-50); color: var(--warning-600); }
.file-ico.ft-folder { background: var(--brand-50); color: var(--brand-600); }

/* --------------------------------------------------------------------------
   Fiyatlandırma / abonelik
   -------------------------------------------------------------------------- */
.plan-card {
  position: relative; display: flex; flex-direction: column; gap: 16px; padding: 26px;
  background: var(--bg-surface); border: 1.5px solid var(--border); border-radius: var(--r-xl);
  transition: all var(--t-base);
}
.plan-card:hover { border-color: var(--brand-300); box-shadow: var(--sh-lg); }
.plan-card.is-current { border-color: var(--brand-600); box-shadow: var(--sh-brand); }
.plan-card.is-popular::before {
  content: "En çok tercih edilen"; position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  padding: 3px 13px; border-radius: var(--r-full); white-space: nowrap;
  background: var(--accent-500); color: #fff; font-size: 11px; font-weight: 640;
}
.plan-price { font-size: 38px; font-weight: 720; letter-spacing: -.03em; color: var(--text-strong); line-height: 1; }
.plan-price small { font-size: 14px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.plan-feats { display: grid; gap: 10px; }
.plan-feats li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: var(--text-body); }
.plan-feats svg { width: 16px; height: 16px; color: var(--success-500); flex: none; margin-top: 1px; }
.plan-feats li.is-off { color: var(--text-subtle); }
.plan-feats li.is-off svg { color: var(--border-strong); }

/* Kullanım göstergesi */
.usage-row { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--border-subtle); }
.usage-row:last-child { border-bottom: 0; }

/* --------------------------------------------------------------------------
   Yetki matrisi
   -------------------------------------------------------------------------- */
.perm-table th:first-child { width: 300px; }
.perm-table td { text-align: center; }
.perm-table td:first-child { text-align: left; }
.perm-check { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; }
.perm-check.yes { background: var(--success-50); color: var(--success-600); }
.perm-check.no  { background: var(--bg-surface-3); color: var(--text-subtle); }
.perm-check svg { width: 13px; height: 13px; }

/* --------------------------------------------------------------------------
   Eşleştirme skoru
   -------------------------------------------------------------------------- */
.match-score { display: inline-flex; align-items: center; gap: 7px; }
.match-bar { width: 54px; height: 5px; border-radius: var(--r-full); background: var(--bg-surface-3); overflow: hidden; }
.match-bar > span { display: block; height: 100%; border-radius: inherit; }
.match-hi > span { background: var(--success-500); }
.match-mid > span { background: var(--warning-500); }
.match-lo > span { background: var(--danger-500); }

/* --------------------------------------------------------------------------
   Portal entegrasyon kartı
   -------------------------------------------------------------------------- */
.portal-card { display: flex; align-items: center; gap: 14px; padding: 16px; background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.portal-logo { width: 46px; height: 46px; flex: none; border-radius: var(--r-md); display: grid; place-items: center; font-size: 15px; font-weight: 720; color: #fff; }

/* --------------------------------------------------------------------------
   Bildirim listesi
   -------------------------------------------------------------------------- */
.notif-row { display: flex; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--border-subtle); transition: background var(--t-fast); }
.notif-row:hover { background: var(--bg-surface-2); }
.notif-row.is-unread { background: var(--brand-50); }
html[data-theme="dark"] .notif-row.is-unread { background: rgba(99,102,241,.07); }
.notif-ico { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 50%; }
.notif-ico svg { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   Global arama paleti
   -------------------------------------------------------------------------- */
.palette { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: start center; padding-top: 12vh; opacity: 0; visibility: hidden; transition: all var(--t-base); }
.palette.is-open { opacity: 1; visibility: visible; }
.palette-box { width: min(620px, calc(100vw - 32px)); background: var(--bg-surface); border-radius: var(--r-xl); box-shadow: var(--sh-xl); overflow: hidden; transform: translateY(-12px) scale(.98); transition: transform var(--t-base); }
.palette.is-open .palette-box { transform: none; }
.palette-input { display: flex; align-items: center; gap: 11px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.palette-input input { flex: 1; border: 0; outline: none; background: transparent; font-size: 15.5px; color: var(--text-strong); }
.palette-results { max-height: 400px; overflow-y: auto; padding: 8px; }
.palette-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--r-md); cursor: pointer; }
.palette-item:hover, .palette-item.is-sel { background: var(--bg-surface-3); }
.palette-item svg { width: 16px; height: 16px; color: var(--text-subtle); }

/* --------------------------------------------------------------------------
   Yardım / bilgi bankası
   -------------------------------------------------------------------------- */
.faq-item { border-bottom: 1px solid var(--border-subtle); }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 16px 0; text-align: left; font-size: 14px; font-weight: 570; color: var(--text-strong); }
.faq-q svg { width: 17px; height: 17px; color: var(--text-subtle); transition: transform var(--t-base); flex: none; }
.faq-item.is-open .faq-q svg { transform: rotate(180deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height var(--t-slow); font-size: 13.5px; color: var(--text-muted); line-height: 1.7; }
.faq-item.is-open .faq-a { max-height: 400px; padding-bottom: 16px; }

/* --------------------------------------------------------------------------
   404
   -------------------------------------------------------------------------- */
.err-page { min-height: 100vh; display: grid; place-items: center; padding: 40px 20px; text-align: center; }
.err-code { font-size: 118px; font-weight: 800; letter-spacing: -.05em; line-height: 1; background: linear-gradient(135deg, var(--brand-500), var(--brand-800)); -webkit-background-clip: text; background-clip: text; color: transparent; }
