/* MÜSİAD B2B — ui-design-notes.md token'ları (lacivert + altın, mobil öncelikli) */
:root {
  --navy-900: #1B2A4A;
  --navy-700: #24365C;
  --gold-500: #C9A227;
  --gold-600: #B08E1E;
  --gold-100: #F6EED9;
  --bg:       #F2F4F8;
  --card:     #FFFFFF;
  --ink-900:  #16203A;
  --ink-500:  #6B7690;
  --ok:       #1E8E5A;
  --warn:     #D97A1F;
  --danger:   #C0392B;
  --line:     #E3E7F0;
  --radius:   12px;
}
* { -webkit-tap-highlight-color: transparent; }
body { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; background: var(--bg); color: var(--ink-900); }

.brand-mark {
  width: 56px; height: 56px; border-radius: 14px; background: var(--navy-900); color: var(--gold-500);
  display: flex; align-items: center; justify-content: center; font-weight: 800; letter-spacing: .5px;
}
.brand-mark.sm { width: 36px; height: 36px; border-radius: 10px; font-size: .7rem; }

/* Login */
.login-wrap { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 60%, #2e4170 100%); }
.login-card { background: var(--card); border-radius: 18px; padding: 32px 28px; width: 100%; max-width: 420px;
  box-shadow: 0 24px 60px rgba(10,18,40,.35); }

/* Layout */
#appShell { display: flex; min-height: 100dvh; }
.sidebar { width: 248px; background: var(--navy-900); color: #fff; position: sticky; top: 0; height: 100dvh; padding: 18px 14px; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; padding: 4px 8px 18px; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; color: #cdd5e6; text-decoration: none;
  padding: 11px 12px; border-radius: 10px; margin-bottom: 4px; font-weight: 500; }
.sidebar nav a.active { background: var(--gold-500); color: var(--navy-900); font-weight: 700; }
.sidebar nav a:hover:not(.active) { background: var(--navy-700); color: #fff; }
.nav-badge { background: var(--danger); color: #fff; border-radius: 11px; font-size: .68rem; font-weight: 800;
  padding: 1px 7px; min-width: 20px; text-align: center; }
.sidebar nav a.active .nav-badge { background: var(--navy-900); color: #fff; }
.bottomnav .bn-ico { position: relative; }
.bottomnav .nav-badge { position: absolute; top: -4px; right: -10px; padding: 0 5px; min-width: 16px; font-size: .6rem; }
.sidebar-foot { border-top: 1px solid rgba(255,255,255,.12); padding-top: 12px; color: #cdd5e6; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar { display: flex; align-items: center; gap: 12px; background: var(--card); border-bottom: 1px solid var(--line);
  padding: 12px 18px; position: sticky; top: 0; z-index: 50; }
.topbar-title { font-weight: 700; font-size: 1.05rem; }
.bell { position: relative; font-size: 1.15rem; text-decoration: none; }
.bell-badge { position: absolute; top: -4px; right: -8px; background: var(--danger); color: #fff;
  border-radius: 10px; font-size: .62rem; font-weight: 700; padding: 1px 5px; }
.user-chip { background: var(--gold-100); color: var(--navy-900); border-radius: 999px; padding: 6px 14px;
  font-weight: 600; font-size: .85rem; }

.content { padding: 18px 16px 90px; max-width: 1180px; width: 100%; margin: 0 auto; }
@media (min-width: 992px) { .content { padding: 24px 28px 40px; } }

/* Bottom nav (mobil) */
.bottomnav { position: fixed; bottom: 0; left: 0; right: 0; background: var(--card); border-top: 1px solid var(--line);
  display: flex; z-index: 60; padding-bottom: env(safe-area-inset-bottom); }
.bottomnav a { flex: 1; text-align: center; padding: 9px 4px 7px; text-decoration: none; color: var(--ink-500);
  font-size: .68rem; font-weight: 600; }
.bottomnav a .bn-ico { display: block; font-size: 1.25rem; line-height: 1.25; }
.bottomnav a.active { color: var(--gold-600); }

/* Kartlar */
.dcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 12px; }
.dcard .dtitle { font-weight: 700; font-size: .98rem; color: var(--ink-900); text-decoration: none; display: block; }
.dcard .dtitle:hover { color: var(--gold-600); }
.dmeta { color: var(--ink-500); font-size: .8rem; display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 6px; }
.dno { color: var(--ink-500); font-size: .72rem; letter-spacing: .4px; }
.flagchip { background: var(--bg); border-radius: 8px; padding: 2px 9px; font-size: .8rem; font-weight: 600; }

.badge-soft { border-radius: 8px; padding: 3px 10px; font-size: .72rem; font-weight: 700; display: inline-block; }
.bs-navy  { background: #E8EDF8; color: var(--navy-900); }
.bs-warn  { background: #FBEFE0; color: var(--warn); }
.bs-gold  { background: var(--gold-100); color: var(--gold-600); }
.bs-ok    { background: #E2F3EA; color: var(--ok); }
.bs-mute  { background: #EDEFF4; color: var(--ink-500); }
.bs-danger{ background: #F9E4E1; color: var(--danger); }

.btn-gold { background: var(--gold-500); border: none; color: var(--navy-900); font-weight: 700; }
.btn-gold:hover { background: var(--gold-600); color: #fff; }
.btn-outline-navy { border: 1.5px solid var(--navy-900); color: var(--navy-900); font-weight: 600; }
.btn-outline-navy:hover { background: var(--navy-900); color: #fff; }

.statcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; text-align: center; }
.statcard .v { font-size: 1.5rem; font-weight: 800; color: var(--navy-900); }
.statcard .l { font-size: .74rem; color: var(--ink-500); font-weight: 600; }

.section-h { font-weight: 800; font-size: .95rem; margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.chart-box { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.chart-box canvas { max-height: 230px; }

.ai-hint { background: var(--gold-100); border: 1px dashed var(--gold-500); border-radius: 10px;
  padding: 8px 12px; font-size: .8rem; color: var(--gold-600); font-weight: 600; }
.lock-note { background: #EDF1FA; border-radius: 10px; padding: 10px 14px; font-size: .85rem; color: var(--navy-700); }
.sla-row { background: #FDF3F1 !important; }

.filterbar { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.filterbar .form-select, .filterbar .form-control { min-width: 130px; font-size: .85rem; }
.table-sm td, .table-sm th { font-size: .84rem; vertical-align: middle; }
a { color: var(--navy-700); }
.min-w-0 { min-width: 0; }

/* === Codex görsel dili: sağ ray + görsel kartlar (ui-design-notes §2) === */
.rail-grid { display: grid; gap: 18px; }
@media (min-width: 1100px) { .rail-grid { grid-template-columns: 1fr 300px; align-items: start; } }
.grid-cards { display: grid; gap: 12px; }
@media (min-width: 768px)  { .grid-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1280px) { .grid-cards { grid-template-columns: 1fr 1fr 1fr; } }

.dcard.cx { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.dvisual { position: relative; height: 92px; display: flex; align-items: center; justify-content: center; }
.dvemoji { font-size: 2.3rem; opacity: .95; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.dvflag { position: absolute; top: 8px; left: 8px; background: rgba(255,255,255,.93); border-radius: 8px;
  padding: 2px 9px; font-size: .74rem; font-weight: 700; color: var(--ink-900); }
.dvstar { position: absolute; top: 6px; right: 8px; background: rgba(255,255,255,.93); border: none;
  border-radius: 8px; padding: 1px 9px; font-size: .95rem; color: var(--gold-600); }
.dvchip { position: absolute; bottom: 8px; right: 8px; }
.dbody { padding: 11px 14px 13px; display: flex; flex-direction: column; flex: 1; }
.dbody .dtitle { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.dmeta-rows { font-size: .77rem; color: var(--ink-500); display: grid; gap: 2px; margin-top: 6px; }

.sv-0 { background: linear-gradient(135deg, #33415F, #1B2A4A); }
.sv-1 { background: linear-gradient(135deg, #7A4E9E, #4A2C66); }   /* tekstil */
.sv-2 { background: linear-gradient(135deg, #C96F2B, #8C4A14); }   /* gıda */
.sv-3 { background: linear-gradient(135deg, #4E6E8E, #2C4258); }   /* makine */
.sv-4 { background: linear-gradient(135deg, #A08A3C, #6E5E22); }   /* inşaat */
.sv-5 { background: linear-gradient(135deg, #8A5A3B, #5C3A24); }   /* mobilya */
.sv-6 { background: linear-gradient(135deg, #3A8A8C, #226062); }   /* kimya */
.sv-7 { background: linear-gradient(135deg, #5F8C3A, #3E6022); }   /* tarım */
.sv-8 { background: linear-gradient(135deg, #46648C, #2C4060); }   /* hizmet */

.rail-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 14px; }
.rail-item { display: flex; gap: 8px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--ink-900); }
.rail-item:last-child { border-bottom: none; }
.rail-title { font-size: .8rem; font-weight: 600; line-height: 1.3; flex: 1; }
.rank-no { width: 22px; height: 22px; min-width: 22px; border-radius: 7px; background: var(--gold-100);
  color: var(--gold-600); font-weight: 800; font-size: .75rem; display: flex; align-items: center; justify-content: center; }
.cta-panel { background: linear-gradient(150deg, var(--navy-900), var(--navy-700)); color: #fff;
  border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }

/* Modal (Bootstrap JS yok — hafif overlay) */
.mb2b-modal { position: fixed; inset: 0; background: rgba(13,20,40,.55); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 14px; }
.mb2b-modal-card { background: var(--card); border-radius: 16px; padding: 20px; width: 100%; max-width: 480px;
  max-height: 90dvh; overflow-y: auto; box-shadow: 0 24px 60px rgba(10,18,40,.4); }

/* Mesajlaşma */
.msg-list { max-height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.msg { border-radius: 12px; padding: 8px 12px; max-width: 85%; font-size: .85rem; }
.msg-uye { background: var(--bg); align-self: flex-start; }
.msg-gm { background: var(--gold-100); align-self: flex-end; }
.msg-time { font-size: .65rem; color: var(--ink-500); text-align: right; margin-top: 2px; }
.pe-none { pointer-events: none; }

/* === Codex 1:1 — topbar arama, avatar, sidebar promo, özet listesi, harita === */
.brand-b2b { background: var(--gold-500); color: var(--navy-900); font-weight: 800; font-size: .78rem;
  padding: 2px 10px; border-radius: 6px; letter-spacing: 1px; }
.sidebar-brand { flex-direction: column; align-items: flex-start; gap: 4px; }
.side-promo { background: var(--navy-700); border-radius: 14px; padding: 14px; margin: 10px 4px 12px; color: #dde4f2; }
.side-promo-emoji { font-size: 1.6rem; margin-bottom: 6px; }

.topsearch { flex: 1; max-width: 420px; background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; padding: 7px 12px; display: flex; align-items: center; gap: 8px; }
.topsearch input { border: none; outline: none; background: transparent; width: 100%; font-size: .86rem; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--gold-500); color: var(--navy-900);
  font-weight: 800; font-size: .82rem; display: flex; align-items: center; justify-content: center; }

.ozet-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.ozet-row:last-child { border-bottom: none; }
.ozet-ico { width: 32px; height: 32px; border-radius: 9px; background: var(--gold-100); display: flex;
  align-items: center; justify-content: center; font-size: .95rem; }
.ozet-label { flex: 1; font-size: .8rem; color: var(--ink-500); font-weight: 600; }
.ozet-val { font-weight: 800; font-size: 1.05rem; color: var(--navy-900); }

.map-box canvas { max-height: 250px; }

/* Onay kutusu (GM) */
.approve-panel { background: #FFF9EC; border: 1px solid var(--gold-500); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 16px; }
.approve-row { display: flex; gap: 12px; align-items: center; justify-content: space-between;
  padding: 10px 0; border-top: 1px dashed var(--gold-500); }
.approve-row:first-of-type { border-top: none; }
.approve-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 575px) { .approve-row { flex-direction: column; align-items: stretch; } .approve-actions { justify-content: stretch; } .approve-actions .btn { flex: 1; } }
.mb2b-toast { position: fixed; bottom: 78px; left: 50%; transform: translateX(-50%); z-index: 300;
  background: var(--navy-900); color: #fff; padding: 11px 20px; border-radius: 10px; font-size: .88rem;
  font-weight: 600; box-shadow: 0 10px 30px rgba(10,18,40,.4); max-width: 90vw; text-align: center; }
@media (min-width: 992px) { .mb2b-toast { bottom: 28px; } }

/* Sezgisel form: ikonlu seçim kartları (yemekhaneci wizard'dan) + chip ülke seçici */
.choice-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
@media (min-width: 560px) { .choice-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 992px) { .choice-grid { grid-template-columns: repeat(4, 1fr); } }
.choice-card { border: 2px solid var(--line); border-radius: 12px; padding: 12px 8px; cursor: pointer;
  background: #fafbfd; text-align: center; transition: .12s; display: flex; flex-direction: column;
  align-items: center; gap: 5px; font: inherit; }
.choice-card:hover { border-color: var(--gold-500); background: #fff; }
.choice-card.selected { border-color: var(--navy-900); background: var(--gold-100); }
.choice-card .cc-ico { font-size: 1.5rem; line-height: 1; }
.choice-card .cc-label { font-size: .8rem; font-weight: 600; color: var(--ink-900); line-height: 1.2; }

.chip-wrap { display: flex; flex-wrap: wrap; gap: 7px; max-height: 168px; overflow-y: auto; padding: 2px; }
.chip { border: 1.5px solid var(--line); border-radius: 20px; padding: 6px 13px; font-size: .84rem;
  cursor: pointer; background: #fafbfd; transition: .12s; font: inherit; white-space: nowrap; }
.chip:hover { border-color: var(--gold-500); }
.chip.on { border-color: var(--navy-900); background: var(--navy-900); color: #fff; font-weight: 600; }

/* Eşleşme skoru rozeti (üye kartı — Fable farkı) */
.match-chip { font-size: .68rem; font-weight: 800; padding: 2px 8px; border-radius: 7px; white-space: nowrap; }
.match-chip.m-hi { background: #E2F3EA; color: var(--ok); }
.match-chip.m-mid { background: var(--gold-100); color: var(--gold-600); }
.match-chip.m-lo { background: #EDEFF4; color: var(--ink-500); }
.homefilters { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 16px; }
@media (min-width: 768px) { .homefilters { grid-template-columns: repeat(4, 1fr); } }
.homefilters .form-select { background-color: var(--card); font-size: .85rem; }
.see-all { margin-left: auto; font-size: .78rem; font-weight: 700; color: var(--gold-600); text-decoration: none; }
