/* ============================================================
   Sinerji Team CRM — app.css
   Mobile-first, hafif, framework yok.
   ============================================================ */

:root {
  /* Marka */
  --navy:        #0f2c4d;
  --navy-600:    #16406b;
  --navy-400:    #2f6094;
  --brand:       #2563eb;
  --brand-600:   #1d4fd8;

  /* Zemin & yüzey */
  --bg:          #f4f6f9;
  --surface:     #ffffff;
  --surface-2:   #f8fafc;
  --border:      #e3e8ef;
  --border-2:    #d3dae6;

  /* Metin */
  --text:        #1b2733;
  --text-soft:   #56637a;
  --text-mute:   #8a94a6;

  /* Durum */
  --ok:          #15803d;
  --ok-bg:       #dcfce7;
  --warn:        #b45309;
  --warn-bg:     #fef3c7;
  --danger:      #b91c1c;
  --danger-bg:   #fee2e2;
  --info:        #1d4ed8;
  --info-bg:     #dbeafe;
  --purple:      #6d28d9;
  --purple-bg:   #ede9fe;

  --radius:      12px;
  --radius-sm:   8px;
  --shadow:      0 1px 2px rgba(16,32,55,.06), 0 6px 20px rgba(16,32,55,.06);
  --shadow-sm:   0 1px 2px rgba(16,32,55,.08);
  --sidebar-w:   248px;
  --font:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.25; }

/* ---------- Yerleşim ---------- */
.layout { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--navy);
  color: #eaf0f7;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform .22s ease;
  z-index: 60;
}
.sidebar.is-open { transform: translateX(0); }

.sidebar__brand {
  display: flex; align-items: center; gap: .7rem;
  padding: 1.1rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: relative;
}
.sidebar__brand::after {
  content: ""; position: absolute; left: 1.1rem; right: 1.1rem; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--brand), transparent);
}
.brand__mark {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(155deg, var(--navy-400), var(--brand) 55%, var(--navy-600));
  color: #fff;
  font-weight: 800; font-size: 16px; letter-spacing: -1px;
  box-shadow: 0 3px 10px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.3);
}
.brand__mark i { font-style: normal; opacity: .68; }
.brand__name { font-weight: 800; font-size: 1.1rem; line-height: 1.25; display: flex; flex-direction: column; color: #fff; }
.brand__name small {
  font-weight: 800; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase;
  color: #93c5fd; margin-top: .1rem;
}

.sidebar__nav { flex: 1; overflow-y: auto; padding: .6rem; }
.sidebar__nav-group {
  position: relative;
  margin: .35rem 0 .65rem;
  padding: 0 0 .35rem 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar__nav-heading {
  position: absolute;
  inset: 0 auto .35rem 0;
  width: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  margin: 0;
  padding: .2rem 0;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  border-right: 2px solid var(--brand);
  border-radius: 4px 0 0 4px;
  background: rgba(37,99,235,.14);
  color: #fff;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
  line-height: 1.2;
  text-transform: uppercase;
}
.sidebar__nav-heading-mobile { display: none; }
.sidebar__nav-heading-desktop { display: inline; }
.sidebar__nav-group--account > .sidebar__nav-heading {
  bottom: 0;
}
.sidebar__nav a {
  display: flex; align-items: center; gap: .7rem;
  padding: .7rem .8rem;
  border-radius: var(--radius-sm);
  color: #cdd8e6;
  font-weight: 500;
  margin-bottom: 2px;
}
.sidebar__nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.sidebar__nav a.is-active {
  background: rgba(255,255,255,.12);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--brand);
}
.nav-ic { width: 1.3em; text-align: center; }
@media (max-width: 959px) {
  .sidebar__nav a[href$="/cb-documents.php"] {
    font-size: .78rem;
    white-space: nowrap;
  }
}

.sidebar__nav-branch { margin-bottom: 2px; }
.sidebar__nav-branch-link { margin-bottom: 0; }
.sidebar__nav-sub {
  display: flex; flex-direction: column;
  margin: 0 0 .3rem 1.1rem;
  padding-left: .6rem;
  border-left: 1px solid rgba(255,255,255,.1);
}
.sidebar__nav-sub a { padding: .5rem .7rem; font-size: .87rem; font-weight: 450; color: #a9b7c9; margin-bottom: 0; }
.sidebar__nav-sub a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar__nav-sub a.is-active {
  background: rgba(255,255,255,.1);
  color: #fff;
  box-shadow: inset 2px 0 0 var(--brand);
}

.sidebar__foot { padding: .8rem; border-top: 1px solid rgba(255,255,255,.08); }
.userchip { display: flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.userchip__meta { display: flex; flex-direction: column; min-width: 0; }
.userchip__meta strong { font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userchip__meta small { font-size: .75rem; color: #93c5fd; }

.avatar {
  width: 34px; height: 34px; flex: none;
  border-radius: 50%; overflow: hidden;
  background: var(--navy-400); color: #fff;
  display: grid; place-items: center;
  font-size: .8rem; font-weight: 700;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-photo { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.profile-photo__avatar { width: 64px; height: 64px; font-size: 1.3rem; }
.profile-photo__actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.profile-photo__actions form { display: flex; align-items: center; gap: .4rem; }
.profile-photo__actions input[type="file"] { max-width: 190px; font-size: .8rem; }

.photo-cell { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; min-width: 160px; }
.photo-cell__form { display: flex; align-items: center; gap: .3rem; }
.photo-cell__form input[type="file"] { max-width: 120px; font-size: .72rem; }

/* ---------- Özet: karşılama ve günün sözü ---------- */
.welcome-head { margin-bottom: 1rem; }
.welcome-head__top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.welcome-head__top h2 { margin: 0; }
.welcome-head__meta { display: flex; flex-direction: column; align-items: flex-end; gap: .15rem; }
.welcome-head__cb-tag {
  font-weight: 700; font-style: italic; color: #a87f0a;
}
.welcome-head__cb-tag--inline { margin-left: .3rem; font-size: .92rem; white-space: nowrap; }
.welcome-head__cb-tag--stacked { display: none; }
@media (max-width: 480px) {
  .welcome-head__cb-tag--inline { display: none; }
  .welcome-head__cb-tag--stacked { display: block; font-size: .72rem; text-align: right; }
}
.welcome-quote {
  margin: .8rem 0 0;
  padding: .65rem 1rem;
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: linear-gradient(100deg, rgba(37,99,235,.11), rgba(255,255,255,.72));
  color: var(--navy-600);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.08rem;
  font-style: italic;
  line-height: 1.5;
  letter-spacing: .01em;
}
@media (max-width: 480px) {
  .welcome-quote {
    margin: .5rem 0 0;
    padding: .35rem .6rem;
    font-size: .58rem;
    line-height: 1.3;
  }
}

.sidebar__scrim {
  position: fixed; inset: 0;
  background: rgba(9,20,35,.5);
  z-index: 55;
}

.main { display: flex; flex-direction: column; min-height: 100vh; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: .75rem;
  padding: .55rem .9rem;
  min-height: 56px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding-top: calc(.55rem + env(safe-area-inset-top));
}
.topbar > * { flex-shrink: 0; }
.topbar .topbar__search { flex-shrink: 1; }
.notif__btn { line-height: 1; }
.topbar__title { font-size: 1.05rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.topbar__actions { display: flex; align-items: center; gap: .5rem; }
.topbar__actions .btn { white-space: nowrap; }

/* Global arama */
.search-toggle { flex: none; }
.topbar__search {
  position: absolute; top: 100%; left: 0; right: 0;
  display: none; padding: .5rem .9rem;
  background: var(--surface); border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm); z-index: 45;
}
.topbar__search.is-open { display: block; }
.topbar__search input {
  width: 100%; font: inherit; padding: .5rem .7rem;
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  background: var(--surface-2); min-height: 38px;
}
.topbar__search input:focus { outline: none; border-color: var(--brand); background: var(--surface); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.search-dd {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  max-height: 60vh; overflow-y: auto; z-index: 50; padding: .3rem;
}
.search-dd__group { font-size: .7rem; font-weight: 700; text-transform: uppercase; color: var(--text-mute); padding: .5rem .6rem .2rem; }
.search-dd a { display: block; padding: .5rem .6rem; border-radius: var(--radius-sm); color: var(--text); }
.search-dd a:hover, .search-dd a.is-active { background: var(--surface-2); text-decoration: none; }
.search-dd a strong { display: block; font-size: .9rem; }
.search-dd a small { color: var(--text-mute); font-size: .78rem; }
.search-dd__more { display: block; text-align: center; padding: .5rem; font-size: .82rem; font-weight: 600; }
.search-dd__empty { padding: .8rem .6rem; color: var(--text-mute); font-size: .85rem; }

@media (max-width: 720px) {
  .topbar__title { font-size: .98rem; }
}
@media (max-width: 520px) {
  .topbar__cta-txt { display: none; }
}
@media (min-width: 960px) {
  .search-toggle { display: none; }
  .topbar__search {
    position: relative; top: auto; left: auto; right: auto;
    display: block; padding: 0; background: none;
    border: 0; box-shadow: none;
    flex: 0 1 300px; margin-left: auto; min-width: 0;
  }
  .topbar__title { flex: 0 1 auto; }
}

/* Bildirim merkezi */
.notif { position: relative; }
.notif__btn { position: relative; font-size: 1.05rem; }
.notif__badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: #fff;
  font-size: .62rem; font-weight: 800; line-height: 1;
  padding: 2px 4px; border-radius: 999px; min-width: 15px; text-align: center;
}
.notif__badge[hidden], .match-feature[hidden], .commercial-needs[hidden] { display: none !important; }
.notif__panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: min(340px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  max-height: 70vh; overflow-y: auto; z-index: 50;
}
.notif__head { padding: .7rem .9rem; border-bottom: 1px solid var(--border); font-weight: 700; font-size: .9rem; }
.notif__read-all { display:block; width:100%; padding:.55rem .9rem; border:0; border-bottom:1px solid var(--border); background:transparent; color:var(--brand); text-align:right; font:inherit; font-size:.78rem; cursor:pointer; }
.notif__read-all:hover { background:var(--surface-2,#f6f7f9); }
.notif__read-all:disabled { opacity:.6; cursor:wait; }
.notif__empty { padding: 1.5rem 1rem; text-align: center; color: var(--text-mute); font-size: .88rem; }
.notif__item { display: flex; gap: .6rem; padding: .65rem .9rem; border-bottom: 1px solid var(--border); color: var(--text); }
.notif__item:hover { background: var(--surface-2); text-decoration: none; }
.notif__item strong { display: block; font-size: .86rem; font-weight: 600; }
.notif__item small { color: var(--text-mute); font-size: .78rem; }
.notif__item--danger { border-left: 3px solid var(--danger); }
.notif__ic { flex: none; }

.iconbtn {
  border: 1px solid var(--border-2);
  background: var(--surface);
  border-radius: var(--radius-sm);
  width: 40px; height: 40px;
  font-size: 1.1rem; cursor: pointer;
  display: grid; place-items: center;
}

.content { flex: 1; padding: 1rem .9rem 5rem; max-width: 1180px; width: 100%; margin: 0 auto; }
.pagefoot { padding: 1rem; text-align: center; color: var(--text-mute); font-size: .8rem; }

/* ---------- Sayfalama (numaralı) ---------- */
.pager {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .3rem; margin-top: 1rem;
}
.pager__step, .pager__num {
  min-width: 36px; height: 36px; padding: 0 .55rem;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font-size: .85rem; font-weight: 600; line-height: 1;
}
.pager__step:hover, .pager__num:hover { background: var(--surface-2); text-decoration: none; }
.pager__num.is-active {
  background: var(--navy); color: #fff; border-color: var(--navy); pointer-events: none;
}
.pager__step.is-disabled { opacity: .4; pointer-events: none; }
.pager__gap { padding: 0 .15rem; color: var(--text-mute); }

/* ---------- Mobil alt menü ---------- */
.mobile-nav { display: none; }
@media (max-width: 959px), (display-mode: standalone) {
  body:has(.mobile-nav) { --mobile-nav-height: calc(64px + env(safe-area-inset-bottom, 0px)); }
  body:has(.mobile-nav) .main { padding-bottom: var(--mobile-nav-height); }
  html:has(.mobile-nav) { scroll-padding-bottom: calc(80px + env(safe-area-inset-bottom, 0px)); }
  .mobile-nav {
    position: fixed; inset: auto 0 0; z-index: 50;
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
    min-height: var(--mobile-nav-height);
    padding: 4px max(6px, env(safe-area-inset-right, 0px)) calc(4px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left, 0px));
    background: var(--surface); border-top: 1px solid var(--border);
    box-shadow: 0 -4px 18px rgba(16,32,55,.06);
  }
  .mobile-nav__item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; min-height: 55px; padding: 4px 2px; border: 0; border-radius: 10px;
    background: transparent; color: var(--text-soft); font: inherit;
    font-size: 11px; font-weight: 600; cursor: pointer; text-align: center;
  }
  .mobile-nav__icon { font-size: 24px; line-height: 26px; }
  .mobile-nav__item:hover { background: var(--surface-2); text-decoration: none; }
  .mobile-nav__item.is-active, .mobile-nav__item[aria-expanded="true"] { background: var(--info-bg); color: var(--navy); }
  .mobile-nav__item:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
  body:has(.mobile-nav) .fab { bottom: calc(var(--mobile-nav-height) + 1rem); z-index: 51; }
  body:has(.mobile-nav) .toast-wrap { bottom: calc(var(--mobile-nav-height) + 1rem); }
}

/* Kurulu PWA: marka renkleri ve geniş pencerede kenar menüyle uyum. */
@media (display-mode: standalone) {
  .mobile-nav {
    background: var(--navy);
    border-top-color: rgba(255,255,255,.15);
    box-shadow: 0 -4px 18px rgba(16,32,55,.16);
  }
  .mobile-nav__item { color: #eaf0f7; }
  .mobile-nav__item:hover { background: rgba(255,255,255,.1); }
  .mobile-nav__item.is-active,
  .mobile-nav__item[aria-expanded="true"] { background: var(--brand); color: #fff; }
  .mobile-nav__item:focus-visible { outline-color: var(--brand); }
}
@media (display-mode: standalone) and (min-width: 960px) {
  .mobile-nav { left: var(--sidebar-w); grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #mobileMenuToggle { display: none; }
}

/* ---------- Masaüstü ---------- */
@media (min-width: 960px) {
  .sidebar { transform: none; }
  .sidebar__brand { padding-top: .5rem; padding-bottom: .5rem; flex-shrink: 0; }
  .sidebar__foot { padding: .4rem .8rem; flex-shrink: 0; }
  .sidebar__foot .userchip { margin-bottom: .25rem; }
  .sidebar__foot .btn--sm { min-height: 32px; padding-top: .2rem; padding-bottom: .2rem; }
  .sidebar__nav { padding: .4rem; }
  .sidebar__nav-group {
    margin: 0 0 .4rem;
    padding: 0 0 .4rem 1.5rem;
  }
  .sidebar__nav-heading {
    inset: 0 auto .4rem 0;
  }
  .sidebar__nav a {
    min-height: 32px;
    padding: .3rem .45rem;
    gap: .45rem;
    margin-bottom: 1px;
  }
  .sidebar__nav .nav-ic { flex-shrink: 0; }
  .sidebar__nav-branch { margin-bottom: 1px; }
  .sidebar__nav-sub { margin: 0 0 .15rem .7rem; padding-left: .4rem; }
  .sidebar__nav-sub a { min-height: 28px; padding: .2rem .45rem; margin-bottom: 0; }
  .sidebar__scrim { display: none !important; }
  .main { margin-left: var(--sidebar-w); }
  .iconbtn#menuToggle { display: none; }
  .content { padding: 1.5rem 2rem 3rem; }
  .fab { display: none !important; }
}

/* ---------- Kartlar ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
  margin-bottom: 1rem;
}
.card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: .6rem; margin-bottom: .8rem;
}
.card__head h2, .card__head h3 { margin: 0; font-size: 1rem; }
.card--pad-lg { padding: 1.3rem; }
.muted { color: var(--text-soft); }
.small { font-size: .85rem; }
.tiny { font-size: .78rem; }

/* ---------- Grid ---------- */
.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: 1fr; }
.grid.cols-3 { grid-template-columns: 1fr; }
.grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) {
  .grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
  .grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 960px) {
  .grid.cols-3.wide-1 { grid-template-columns: 2fr 1fr; }
}

/* ---------- Çevrimiçi ekip ---------- */
.onlinebar { display: flex; align-items: center; gap: .6rem .9rem; flex-wrap: wrap; padding: .7rem 1rem; }
.onlinebar__label { font-weight: 700; font-size: .85rem; white-space: nowrap; }
.onlinebar__list { display: flex; flex-wrap: wrap; gap: .4rem; flex: 1; }
.onlinebar__count { font-size: .78rem; color: var(--text-mute); white-space: nowrap; }
.online-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  padding: .25rem .6rem; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: .8rem; font-weight: 600;
}
.online-chip.is-me { background: var(--ok-bg); border-color: #b7e4c7; color: #14532d; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; box-shadow: 0 0 0 3px rgba(21,128,61,.15); }
.onlinebar__list:empty::after { content: "Şu an kimse çevrimiçi değil"; color: var(--text-mute); font-size: .82rem; }

/* ---------- Sinerji Team sayfası ---------- */
.team-head {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  padding: .725rem 1.4rem;
  border-color: #dce4ed;
  background: linear-gradient(115deg, #fff 0%, #f7f9fc 62%, #eaf1fb 100%);
}
.team-head::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--brand); }
.team-partners {
  display: grid;
  /* Match visible logo heights: wide Kobi artwork and padded TİGADER artwork. */
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.65fr) minmax(0, 1.35fr) minmax(0, 1fr);
  /* Scale logos and spacing together to keep the band about 42% shorter. */
  align-items: center; gap: clamp(4.64px, 1.16vw, 13.92px); width: min(58%, 348px);
}
.team-partners img { display: block; width: 100%; height: auto; object-fit: contain; }
.team-presence { text-align: center; margin: .65rem 0 0; }
.team-level__heading > span {
  color: var(--navy-600); font-size: .67rem; font-weight: 800; letter-spacing: .14em;
}
.team-online-count { color: var(--ok); font-weight: 600; }
.team-level { margin-top: 1.6rem; }
.team-level:not(.team-level--members) { margin-bottom: 2.5rem; }
.team-level__heading { text-align: center; margin-bottom: .85rem; }
.team-level__title { margin: .15rem 0 0; text-align: center; color: var(--navy); font-size: 1.35rem; }
.team-level--members { margin-top: 0; padding-top: 1.35rem; border-top: 1px solid var(--border); }
.team-level--members + .team-level--members { margin-top: 1.6rem; }
.team-level__heading--members { text-align: left; margin-bottom: .15rem; }
.team-level__heading--members .team-level__title { text-align: left; }
.team-level--leadership { margin-bottom: 2.5rem; }
.team-level--leadership .team-level__heading--members,
.team-level--leadership .team-level__title { text-align: center; }
.team-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem; margin-top: 1rem;
}
.team-grid--leaders {
  grid-template-columns: repeat(2, minmax(0, 230px));
  width: min(100%, 480px);
  justify-content: center;
  margin-left: auto;
  margin-right: auto;
  margin-top: 0;
}
.team-card {
  position: relative; overflow: hidden; min-width: 0;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: .45rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.1rem .9rem; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.team-card:hover { transform: translateY(-2px); border-color: var(--border-2); box-shadow: var(--shadow); }
.team-card__cb-badge {
  position: absolute; top: .55rem; left: .55rem; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: .1rem; line-height: 1;
}
.team-card__cb-badge-icon { width: 26px; height: 26px; fill: #d4af37; filter: drop-shadow(0 1px 1px rgba(15,44,77,.25)); }
.team-card__cb-badge-label {
  font-size: .58rem; font-weight: 700; color: var(--navy); white-space: nowrap;
  background: #fff; padding: .08rem .32rem; border-radius: 6px; box-shadow: var(--shadow-sm);
}
.team-grid--leaders .team-card { border-color: #cfe0fb; padding: 1.35rem 1rem 1.1rem; }
.team-grid--leaders .team-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, transparent, var(--brand), transparent); }
.team-card__avatar { position: relative; width: 76px; height: 76px; font-size: 1.5rem; }
.team-grid--leaders .team-card__avatar { width: 88px; height: 88px; font-size: 1.7rem; box-shadow: 0 0 0 4px #e5eefc; border-radius: 50%; }
.team-card__avatar .chat__dot { width: 14px; height: 14px; }
.team-card__name { font-size: .95rem; }
.team-card__state { font-size: .78rem; color: var(--text-mute); }
.team-card__state.is-on { color: var(--ok); font-weight: 600; }
.team-card .btn { margin-top: .2rem; width: 100%; }
@media (max-width: 480px) {
  .team-grid--leaders { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
  .team-head { padding: .58rem 1rem .58rem 1.2rem; }
  .team-grid--leaders .team-card { padding: 1rem .55rem .85rem; }
  .team-grid--leaders .team-card__avatar { width: 68px; height: 68px; font-size: 1.4rem; }
  .team-grid--leaders .team-card__name { font-size: .88rem; }
}

/* ---------- İstatistik kartları ---------- */
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  box-shadow: var(--shadow-sm);
}
.stat__label { font-size: .8rem; color: var(--text-soft); display: flex; align-items: center; gap: .4rem; }
.stat__num { font-size: 1.7rem; font-weight: 700; color: var(--navy); margin-top: .2rem; }
.stat--accent { border-left: 3px solid var(--brand); }
.stat--warn .stat__num { color: var(--warn); }
.stat--danger .stat__num { color: var(--danger); }
.stat__sub {
  margin-top: .45rem; padding-top: .45rem;
  border-top: 1px dashed var(--border);
  font-size: .74rem; line-height: 1.5; color: var(--text-soft);
  display: flex; flex-wrap: wrap; gap: .2rem .55rem;
}
.stat__sub b { color: var(--navy); font-weight: 700; }
.stat__link {
  display: inline-block; margin-top: .5rem;
  font-size: .78rem; font-weight: 600; color: var(--brand);
}
a.stat { text-decoration: none; }
a.stat:hover { border-color: var(--border-2); box-shadow: var(--shadow); }

/* ---------- Özet: işlem hacmi dağılımı ---------- */
.volume-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.volume-cards .volume-card { margin-bottom: 0; }
.volume-cards .volume-card__headline { display: block; }
.volume-cards .volume-card__link { display: inline-block; padding-top: .45rem; }
.volume-card {
  display: block; margin-bottom: 1rem; padding: 1.05rem 1.15rem;
  background: var(--surface);
  background: linear-gradient(115deg, var(--surface), color-mix(in srgb, var(--brand) 10%, var(--surface)));
  border: 1px solid var(--border); border-left: 4px solid var(--brand); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); color: var(--text); text-decoration: none;
}
.volume-card:hover { border-color: var(--border-2); box-shadow: var(--shadow); }
.volume-card__headline { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.volume-card__label { color: var(--text-soft); font-size: .82rem; font-weight: 600; }
.volume-card__total { color: var(--navy); font-size: clamp(1.6rem, 4vw, 2.3rem); font-weight: 750; letter-spacing: -.02em; margin-top: .15rem; }
.volume-card__link { color: var(--brand); font-size: .8rem; font-weight: 700; white-space: nowrap; padding-top: .3rem; }
.volume-card__bar { display: flex; overflow: hidden; height: 14px; margin: .9rem 0 .7rem; background: var(--surface-2); border-radius: 99px; }
.volume-card__segment { min-width: 3px; transition: opacity .2s; }
.volume-card__segment:hover { opacity: .75; }
.volume-card__segment.is-satilik, .volume-card__dot.is-satilik { background: #1d6fa5; }
.volume-card__segment.is-kiralik, .volume-card__dot.is-kiralik { background: #4c9c6f; }
.volume-card__segment.is-devren, .volume-card__dot.is-devren { background: #d18b2c; }
.volume-card__segment.is-devren_satilik, .volume-card__dot.is-devren_satilik { background: #8a5bb8; }
.volume-card__legend { display: flex; flex-wrap: wrap; gap: .55rem 1.3rem; color: var(--text-soft); font-size: .92rem; }
.volume-card__legend span { display: inline-flex; align-items: center; gap: .32rem; }
.volume-card__legend b { color: var(--navy); font-size: 1.04em; }
.volume-card__dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.volume-card--mine { border-left-color: var(--navy); }
@media (max-width: 860px) {
  .volume-cards { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .volume-card__headline { display: block; }
  .volume-card__link { display: inline-block; padding-top: .45rem; }
}

/* ---------- Son aktiviteler akışı ---------- */
.activity { list-style: none; margin: 0; padding: 0; }
.activity__item {
  display: flex; gap: .6rem; align-items: flex-start;
  padding: .5rem 0; border-bottom: 1px solid var(--border);
}
.activity__item:last-child { border-bottom: 0; }
.activity__ic { flex: none; font-size: 1rem; line-height: 1.4; }
.activity__body { min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.activity__body a { color: inherit; }
.activity__time { font-size: .72rem; color: var(--text-mute); }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: inherit; font-weight: 600;
  padding: .6rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 42px;
  transition: background .15s, border-color .15s, opacity .15s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-600); }
.btn--brand { background: var(--brand); color: #fff; }
.btn--brand:hover { background: var(--brand-600); }
.btn--ghost { background: transparent; border-color: var(--border-2); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); }
.btn--danger { background: var(--danger-bg); color: var(--danger); border-color: #f3c6c6; }
.btn--danger:hover { background: #fbd5d5; }
.btn--success { background: var(--ok-bg); color: var(--ok); border-color: #b7e4c7; }
.btn--sm { min-height: 36px; padding: .4rem .75rem; font-size: .85rem; }
.btn--lg { min-height: 50px; padding: .85rem 1.4rem; font-size: 1.02rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-loading, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Sidebar footer butonu */
.sidebar .btn--ghost { border-color: rgba(255,255,255,.25); color: #eaf0f7; }
.sidebar .btn--ghost:hover { background: rgba(255,255,255,.1); }

/* ---------- Formlar ---------- */
.field { margin-bottom: 1rem; }
.field > label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: .35rem; }
.field .hint { font-size: .78rem; color: var(--text-mute); margin-top: .3rem; }
.input, .field input, .field select, .field textarea {
  width: 100%;
  font: inherit;
  padding: .7rem .8rem;
  border: 1px solid var(--border-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  min-height: 44px;
}
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: .8rem; margin-top: .3rem; }
.form-row { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .form-row.two { grid-template-columns: 1fr 1fr; } }

/* input + yan buton (ör. adres → Haritada aç) */
.input-with-btn { display: flex; gap: .5rem; align-items: stretch; }
.input-with-btn input { flex: 1 1 auto; min-width: 0; }
.input-with-btn .btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 460px) {
  .input-with-btn { flex-wrap: wrap; }
  .input-with-btn .btn { width: 100%; }
}
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin: 0 0 1rem; }
legend { font-weight: 700; padding: 0 .4rem; color: var(--navy); }
.checkbox { display: flex; align-items: center; gap: .5rem; }
.checkbox input { width: auto; min-height: auto; }

/* Randevu katılımcı seçimi */
.appt-people {
  display: grid; grid-template-columns: 1fr 1fr; gap: .35rem .8rem;
  max-height: 168px; overflow-y: auto;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: .6rem .7rem; background: var(--surface-2);
}
.appt-people .checkbox { font-size: .9rem; }
@media (max-width: 560px) { .appt-people { grid-template-columns: 1fr; } }

/* ---------- Tablolar ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); border: 1px solid var(--border); }
table.data { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .9rem; }
table.data th, table.data td { padding: .7rem .8rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.data th { background: var(--surface-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft); }
table.data tbody tr:last-child td, table.data tr:last-child td { border-bottom: none; }
table.data tr:hover td { background: var(--surface-2); }
table.data a { font-weight: 600; }

/* ---------- Rozetler / etiketler ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .74rem; font-weight: 700;
  background: var(--surface-2); color: var(--text-soft);
  border: 1px solid var(--border);
}
.badge--lead        { background: #eef2f7; color: #475569; border-color: #dbe2ec; }
.badge--contacted   { background: var(--info-bg); color: var(--info); border-color: #bfd6fb; }
.badge--interested  { background: #eef2f7; color: #475569; border-color: #dbe2ec; }
.badge--showing     { background: var(--info-bg); color: var(--info); border-color: #bfd6fb; }
.badge--offer       { background: var(--warn-bg); color: var(--warn); border-color: #f5d68a; }
.badge--negotiation { background: var(--purple-bg); color: var(--purple); border-color: #d6c8f5; }
.badge--won         { background: var(--ok-bg); color: var(--ok); border-color: #b7e4c7; }
.badge--lost        { background: var(--danger-bg); color: var(--danger); border-color: #f3c6c6; }
.badge--waiting     { background: var(--warn-bg); color: var(--warn); border-color: #f5d68a; }
.badge--has_time    { background: var(--info-bg); color: var(--info); border-color: #bfd6fb; }
.badge--will_return { background: var(--purple-bg); color: var(--purple); border-color: #d6c8f5; }

.badge--low    { background: #eef2f7; color: #475569; }
.badge--normal { background: var(--info-bg); color: var(--info); }
.badge--high   { background: var(--warn-bg); color: var(--warn); }
.badge--urgent { background: var(--danger-bg); color: var(--danger); }

.badge--pending     { background: #eef2f7; color: #475569; }
.badge--in_progress { background: var(--info-bg); color: var(--info); }
.badge--done        { background: var(--ok-bg); color: var(--ok); }
.badge--scheduled   { background: var(--info-bg); color: var(--info); }
.badge--progress    { background: var(--warn-bg); color: var(--warn); }
.badge--expired     { background: #f1f5f9; color: #475569; }
.badge--cancelled   { background: var(--danger-bg); color: var(--danger); }

.badge--role { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- Uyarılar ---------- */
.alert {
  padding: .8rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  border: 1px solid transparent;
  font-size: .9rem;
}
.alert--success { background: var(--ok-bg); color: #14532d; border-color: #b7e4c7; }
.alert--error   { background: var(--danger-bg); color: #7f1d1d; border-color: #f3c6c6; }
.alert--info    { background: var(--info-bg); color: #1e3a8a; border-color: #bfd6fb; }

/* ---------- Boş durum ---------- */
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--text-mute); }
.empty__ic { font-size: 2.4rem; }
.empty h3 { color: var(--text-soft); margin-top: .6rem; }

/* ---------- Arama çubuğu ---------- */
.searchbar { display: grid; gap: .6rem; margin-bottom: 1rem; grid-template-columns: 1fr; }
@media (min-width: 720px) { .searchbar { grid-template-columns: 2fr 1fr 1fr auto; align-items: end; } }
.searchbar .field { margin: 0; }

/* ---------- Müşteri kartları (mobil) ---------- */
.cust-list { display: grid; gap: .7rem; }
.cust-card {
  display: flex; gap: .8rem; align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem;
  box-shadow: var(--shadow-sm);
}
.cust-card:hover { border-color: var(--border-2); text-decoration: none; }
.cust-card__body { flex: 1; min-width: 0; }
.cust-card__name { font-weight: 700; color: var(--text); }
.cust-card__meta { font-size: .82rem; color: var(--text-soft); display: flex; flex-wrap: wrap; gap: .1rem .8rem; margin-top: .15rem; }
.cust-card__tags { margin-top: .5rem; display: flex; flex-wrap: wrap; gap: .3rem; }

/* Toplu seçim */
.cust-row { display: flex; align-items: flex-start; gap: .5rem; }
.cust-row .cust-card { flex: 1; }
.cust-check { margin-top: 1.1rem; width: 18px; height: 18px; flex: none; }

/* Toplu işlem araç çubuğu — liste başında, normal akışta (yüzen kutu değil) */
.listbar {
  display: flex; align-items: center; gap: .5rem .9rem; flex-wrap: wrap;
  margin-bottom: .6rem; padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.bulkbar {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  margin-left: auto;
}
.bulkbar[hidden] { display: none; }
.bulkbar.is-idle { opacity: .55; }
.bulkbar .input { min-height: 34px; padding: .2rem .5rem; }
.bulkbar__count { font-size: .85rem; font-weight: 600; white-space: nowrap; color: var(--text-mute); }
.bulkbar__count b { font-size: 1rem; color: var(--text); }

/* ---------- Hızlı aksiyonlar ---------- */
.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin: 1rem 0; }
@media (min-width: 560px) { .quick-actions { grid-template-columns: repeat(6, 1fr); } }
.quick-actions a {
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
  padding: .5rem .3rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-size: .7rem; font-weight: 600;
  text-align: center;
}
.quick-actions a:hover { background: var(--surface-2); text-decoration: none; border-color: var(--border-2); }
.quick-actions .qa-ic { font-size: 1.05rem; }

/* ---------- Zaman çizelgesi ---------- */
.timeline { position: relative; margin: 0; padding: 0 0 0 1.4rem; list-style: none; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--border-2); }
.timeline__item { position: relative; padding-bottom: 1.1rem; }
.timeline__item::before {
  content: ""; position: absolute; left: -1.4rem; top: 3px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--brand);
}
.timeline__item.is-task::before { border-color: var(--navy-400); }
.timeline__item.is-event::before { border-color: var(--purple); }
.timeline__date { font-size: .78rem; color: var(--text-mute); font-weight: 700; }
.timeline__title { font-weight: 600; margin-top: .1rem; }
.timeline__note { color: var(--text-soft); font-size: .9rem; white-space: pre-wrap; margin-top: .2rem; }

/* ---------- Bilgi ızgarası (key/value) ---------- */
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; margin: 1rem 0; }
.meta-grid__item { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .8rem; min-width: 0; }
.meta-grid__item--wide { grid-column: 1 / -1; }
.meta-grid__label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft); }
.meta-grid__value { margin-top: .15rem; font-size: .95rem; color: var(--text); word-break: break-word; }
@media (max-width: 560px) { .meta-grid { grid-template-columns: 1fr; } }

/* ---------- Görüşme kartı ---------- */
.interaction {
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  padding: .8rem .9rem;
  margin-bottom: .7rem;
  background: var(--surface);
}
.interaction__head { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; font-size: .82rem; color: var(--text-soft); margin-bottom: .35rem; }
.interaction__seq { font-weight: 800; color: var(--navy); }
.interaction__note { white-space: pre-wrap; }
.interaction__foot { margin-top: .5rem; font-size: .82rem; color: var(--text-soft); border-top: 1px dashed var(--border-2); padding-top: .4rem; }

/* ---------- Sekmeler ---------- */
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; overflow-x: auto; }
.tabs button {
  font: inherit; font-weight: 600;
  background: none; border: none; cursor: pointer;
  padding: .6rem .8rem;
  color: var(--text-soft);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.tabs button.is-active { color: var(--navy); border-bottom-color: var(--brand); }
.tabs .taba {
  font-weight: 600; padding: .6rem .8rem; color: var(--text-soft);
  border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs .taba:hover { text-decoration: none; color: var(--navy); }
.tabs .taba.is-active { color: var(--navy); border-bottom-color: var(--brand); }
.tabpane[hidden] { display: none; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
@media (min-width: 640px) { .modal { align-items: center; } }
.modal__scrim { position: absolute; inset: 0; background: rgba(9,20,35,.55); }
.modal__box {
  position: relative;
  background: var(--surface);
  width: 100%; max-width: 520px;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 1.1rem;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow);
}
@media (min-width: 640px) { .modal__box { border-radius: var(--radius); } }
.modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.modal__head h3 { margin: 0; }
.modal__close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: var(--text-soft); line-height: 1; }

/* ---------- Toast ---------- */
.toast-wrap { position: fixed; left: 0; right: 0; bottom: 1rem; z-index: 90; display: flex; flex-direction: column; align-items: center; gap: .5rem; pointer-events: none; padding: 0 1rem; }
.toast {
  pointer-events: auto;
  background: var(--navy); color: #fff;
  padding: .7rem 1rem; border-radius: var(--radius-sm);
  box-shadow: var(--shadow); font-size: .9rem;
  max-width: 420px;
  animation: toastIn .2s ease;
}
.toast--ok { background: var(--ok); }
.toast--err { background: var(--danger); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } }

/* ---------- FAB (mobil hızlı ekle) ---------- */
.fab { position: fixed; right: 1rem; bottom: calc(1rem + env(safe-area-inset-bottom)); z-index: 70; }
.fab__toggle {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--navy); color: #fff;
  border: none; font-size: 1.8rem; line-height: 1;
  box-shadow: var(--shadow); cursor: pointer;
  transition: transform .2s;
}
.fab.is-open .fab__toggle { transform: rotate(45deg); }
.fab__menu {
  position: absolute; right: 0; bottom: 68px;
  display: flex; flex-direction: column; gap: .4rem;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: .18s;
}
.fab.is-open .fab__menu { opacity: 1; transform: none; pointer-events: auto; }
.fab__menu a {
  background: var(--surface); color: var(--text);
  padding: .6rem .9rem; border-radius: 999px;
  box-shadow: var(--shadow); font-size: .85rem; font-weight: 600;
  white-space: nowrap;
}

/* ---------- Login ---------- */
.auth {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 1.5rem;
  background: var(--bg);
}
.auth__row { display: flex; justify-content: center; }
.auth__stack {
  display: flex; flex-direction: column; align-items: center;
  gap: 1.3rem;
  width: 100%; max-width: 440px;
}

.auth__card {
  width: 100%; max-width: 440px;
  background: linear-gradient(160deg, var(--navy) 0%, #071a30 100%);
  border-radius: 16px;
  padding: 1.6rem;
  box-shadow: 0 20px 60px rgba(15,44,77,.18);
}

/* Logo "kart"ı: farklı en-boy oranlı logoları aynı görsel kutuya oturtur */
.auth__logo-tile {
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  padding: .5rem .6rem;
}
.auth__logo-tile img { display: block; object-fit: contain; }

/* Mobil/dar ekran: Ali Yücer üstte, diğer 4 logo kutunun altında sırayla */
.auth__top-logo { display: flex; justify-content: center; }
.auth__top-logo .auth__logo-tile { padding: .5rem 1.1rem; }
.auth__top-logo img {
  height: 34px; width: auto; max-width: 260px;
  /* logonun kendi görseli sola yaslı; görsel ağırlığını ortalamak için hafif kaydırma */
  margin-left: 18px;
}

.auth__bottom-logos { display: flex; flex-wrap: wrap; justify-content: center; gap: .7rem; }
.auth__bottom-logos img { width: 88px; height: 50px; }

.auth__side { display: none; }

.auth__brand { display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.auth__brand .brand__mark { width: 40px; height: 40px; font-size: 16px; }
.auth h1 { font-size: 1.3rem; margin: 0; color: #fff; }
.auth .sub { color: rgba(255,255,255,.72); font-size: .88rem; margin-bottom: 1.2rem; }
.auth .field > label { color: #fff; }
.auth .checkbox { color: rgba(255,255,255,.85); }
.auth .field input {
  background: #fff;
  color: var(--text);
  border-color: rgba(255,255,255,.3);
}
.auth .field input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,.28);
}
.auth__foot { margin-top: 1rem; text-align: center; font-size: .85rem; }
.auth__foot a { color: #fff; text-decoration: underline; }

/* Masaüstü: logo sütunları ile kutu arasındaki boşluk (gap) ile
   sütunların dış kenara olan boşluğu (padding) eşit tutulur. */
@media (min-width: 960px) {
  .auth__top-logo, .auth__bottom-logos { display: none; }
  .auth__row {
    align-items: center;
    gap: 6.5rem;
    padding: 0 6.5rem;
  }
  .auth__side { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
  .auth__side--right { justify-content: center; }
  .auth__side .auth__logo-tile { padding: .75rem .95rem; }
  .auth__side img { width: 145px; height: 80px; }
  .auth__side--right img { width: 195px; height: 80px; }

  /* Masaüstünde sayfa geniş, bilgi kutusu (giriş kartı) küçük kalmasın diye hafif büyütme */
  .auth__stack { max-width: 680px; }
  .auth__card { max-width: 680px; padding: 2.8rem; }
  .auth h1 { font-size: 1.7rem; }
  .auth .sub { font-size: 1.02rem; }
}

/* ---------- Yardımcılar ---------- */
.row-between { display: flex; align-items: center; justify-content: space-between; gap: .6rem; flex-wrap: wrap; }
.stack > * + * { margin-top: .6rem; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.divider { height: 1px; background: var(--border); margin: 1rem 0; }
.kv { display: grid; grid-template-columns: minmax(90px, auto) 1fr; gap: .3rem .8rem; font-size: .9rem; }
.kv dt { color: var(--text-soft); }
.kv dd { margin: 0; }
.pill-link { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .6rem; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); font-size: .82rem; font-weight: 600; color: var(--text); }
.pill-link:hover { background: var(--border); text-decoration: none; }

/* ---------- Grafikler (SVG) ---------- */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart-label { font-size: 12px; fill: var(--text-soft); }
.chart-value { font-size: 12px; font-weight: 700; fill: var(--text); }
.chart-value .chart-sub, .chart-sub { font-size: 10px; font-weight: 500; fill: var(--text-mute); }
.chart-axis { font-size: 10px; fill: var(--text-mute); }
.chart-grid { stroke: var(--border); stroke-width: 1; }

.chart-legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; margin-top: .6rem; font-size: .8rem; color: var(--text-soft); }
.chart-legend--col { flex-direction: column; gap: .35rem; }
.chart-legend span { display: flex; align-items: center; gap: .4rem; }
.chart-legend i { width: 11px; height: 11px; border-radius: 3px; flex: none; display: inline-block; }
.chart-legend b { color: var(--text); }

.chart-donut-wrap { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.chart-donut { width: 150px; height: 150px; flex: none; }
.chart-donut-num { font-size: 20px; font-weight: 800; fill: var(--navy); }

.progress-row { margin-bottom: .9rem; }
.progress-row__head { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: .3rem; }
.progress-row__val { color: var(--text-soft); }
.progress-row__val b { color: var(--navy); }
.progress-track { height: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; transition: width .3s; }

/* ---------- Portföy kartları ---------- */
.pf-card { padding: .9rem 1rem; margin-bottom: 0; }
.pf-card--expired  { border-left: 3px solid var(--danger); }
.pf-card--expiring { border-left: 3px solid var(--warn); }
.pf-card--completed, .pf-card--cancelled { opacity: .72; }
.pf-meta { display: flex; flex-wrap: wrap; gap: .2rem .9rem; margin-top: .5rem; font-size: .82rem; color: var(--text-soft); }
.pf-meta strong { color: var(--text); }
.pf-meta em { font-style: normal; }

.badge--pf-active     { background: var(--info-bg); color: var(--info); }
.badge--pf-processing { background: var(--purple-bg); color: var(--purple); }
.badge--pf-expiring   { background: var(--warn-bg); color: var(--warn); }
.badge--pf-expired    { background: var(--danger-bg); color: var(--danger); }
.badge--pf-completed  { background: var(--ok-bg); color: var(--ok); }
.badge--pf-cancelled  { background: #eef2f7; color: #64748b; }

/* ---------- Takvim ---------- */
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; justify-content: space-between; margin-bottom: .8rem; }
.cal-nav { display: flex; gap: .3rem; }
.cal-views { display: flex; gap: .3rem; }
.cal-label { font-size: 1rem; }
.cal-grid--7 { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--border); gap: 1px; }
.cal-head { background: var(--surface-2); text-align: center; font-size: .72rem; font-weight: 700; color: var(--text-soft); padding: .4rem 0; text-transform: uppercase; }
.cal-cell { position: relative; background: var(--surface); min-width: 0; min-height: 84px; padding: .3rem; display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.cal-cell.is-out { background: var(--surface-2); color: var(--text-mute); }
.cal-cell.is-today { box-shadow: inset 0 0 0 2px var(--brand); }
.cal-cell__open { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; cursor: pointer; }
.cal-cell__open:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.cal-cell__n { position: relative; z-index: 1; font-size: .75rem; font-weight: 700; color: var(--text-soft); }
.cal-cell.is-today .cal-cell__n { color: var(--brand); }
.cal-cell__events { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cal-ev {
  display: flex; align-items: center; min-width: 0; font-size: .7rem; line-height: 1.3;
  padding: 1px 4px; border-radius: 4px;
  background: var(--info-bg); color: var(--info);
  white-space: nowrap; overflow: hidden;
}
.cal-ev__compact { display: none; flex: none; }
.cal-ev__label { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cal-ev:hover { text-decoration: none; opacity: .85; }
.cal-ev--task { background: var(--warn-bg); color: var(--warn); }
.cal-ev--interaction { background: var(--purple-bg); color: var(--purple); }
.cal-ev--event { background: var(--info-bg); color: var(--info); }
.cal-ev--appointment { background: #fdf3dd; color: #8a6d1d; font-weight: 700; }
.cal-more { font-size: .68rem; color: var(--text-mute); }
.cal-day { display: flex; flex-direction: column; gap: .5rem; }
.cal-day__row { display: flex; gap: .7rem; align-items: center; padding: .5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.cal-day__time { font-weight: 700; font-size: .8rem; color: var(--text-soft); width: 64px; flex: none; }
@media (max-width: 560px) {
  #calendar { min-width: 0; }
  .cal-toolbar { gap: .45rem; }
  .cal-nav, .cal-views, .cal-label { min-width: 0; }
  .cal-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .cal-grid--7 { width: 100%; }
  .cal-head { min-width: 0; padding: .35rem 0; font-size: .64rem; }
  .cal-cell { min-height: 64px; padding: .25rem .18rem; overflow: hidden; }
  .cal-cell__n { font-size: .72rem; line-height: 1.1; }
  .cal-ev { width: 100%; font-size: .6rem; padding: 1px 3px; }
}

@media (max-width: 380px) {
  .cal-head { font-size: .58rem; }
  .cal-cell { min-height: 56px; padding: .22rem .12rem; }
  .cal-cell__n { font-size: .68rem; }
  .cal-ev { justify-content: center; height: 11px; padding: 1px; border-radius: 999px; }
  .cal-ev__label { display: none; }
  .cal-ev__compact { display: block; font-size: .58rem; line-height: 1; }
  .cal-more { font-size: .58rem; line-height: 1; text-align: center; }
}

.is-done .interaction__note, .is-done td:not(:first-child) { opacity: .55; }
tr.is-done td { text-decoration: line-through; text-decoration-color: var(--text-mute); }

/* ---------- Mesajlar ---------- */
.msgbtn { position: relative; text-decoration: none; }
.msgbtn:hover { text-decoration: none; }

.chat {
  display: flex;
  gap: .8rem;
  height: calc(100vh - 190px);
  min-height: 380px;
}
.chat__list {
  flex: none;
  width: 264px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat__list-head { padding: .7rem .9rem; border-bottom: 1px solid var(--border); font-weight: 700; font-size: .9rem; }
#chatPeers { overflow-y: auto; flex: 1; }

.chat__peer {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .8rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}
.chat__peer:hover { background: var(--surface-2); text-decoration: none; }
.chat__peer.is-active { background: var(--info-bg); }
.chat__peer .avatar { position: relative; }
.chat__peer-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.chat__peer-meta strong { font-size: .88rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__peer-meta small { font-size: .76rem; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__peer-badge {
  flex: none; background: var(--danger); color: #fff;
  font-size: .66rem; font-weight: 800; line-height: 1;
  padding: 2px 5px; border-radius: 999px; min-width: 16px; text-align: center;
}
.chat__dot {
  position: absolute; right: -1px; bottom: -1px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--text-mute); border: 2px solid var(--surface);
}
.chat__dot.is-on { background: var(--ok); }

.chat__pane {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}
.chat__pane-head {
  display: flex; align-items: center; gap: .6rem;
  padding: .6rem .9rem; border-bottom: 1px solid var(--border);
}
.chat__pane-head .avatar { position: relative; }
.chat__pane-head strong { display: block; font-size: .92rem; }
.chat__pane-head small { font-size: .76rem; }

.chat__placeholder {
  margin: auto; text-align: center; color: var(--text-mute); padding: 2rem;
}
.chat__placeholder-ic { font-size: 2.4rem; margin-bottom: .5rem; }

.chat__scroll {
  flex: 1; overflow-y: auto;
  padding: .9rem;
  display: flex; flex-direction: column; gap: .4rem;
  background: var(--bg);
}
.chat__day { text-align: center; margin: .5rem 0; }
.chat__day span {
  font-size: .72rem; color: var(--text-mute);
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 2px 10px; border-radius: 999px;
}
.chat__msg { max-width: 78%; align-self: flex-start; }
.chat__msg.is-mine { align-self: flex-end; text-align: right; }
.chat__bubble {
  display: inline-block; text-align: left;
  padding: .5rem .75rem; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: .9rem; line-height: 1.4;
  white-space: pre-wrap; word-break: break-word;
}
.chat__msg.is-mine .chat__bubble {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.chat__msg time { display: block; font-size: .68rem; color: var(--text-mute); margin-top: 2px; }

.chat__compose {
  display: flex; gap: .5rem; align-items: flex-end;
  padding: .6rem .7rem; border-top: 1px solid var(--border);
  background: var(--surface);
}
.chat__compose textarea {
  flex: 1; resize: none; min-height: 40px; max-height: 140px;
  padding: .5rem .7rem; border: 1px solid var(--border-2);
  border-radius: var(--radius-sm); font: inherit; font-size: .9rem;
}
.chat__compose .btn { flex: none; }

@media (max-width: 760px) {
  .chat { flex-direction: column; height: auto; }
  .chat__list { width: auto; max-height: 34vh; }
  .chat__pane { min-height: 62vh; }
}

@media print {
  .sidebar, .topbar, .mobile-nav, .fab, .pagefoot, .btn, .searchbar { display: none !important; }
  .main { margin: 0; }
  .content { padding: 0; }
  .card { box-shadow: none; border-color: #ccc; }
}

/* Management: shares the CRM palette and remains usable on narrow screens. */
.management-nav{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1.25rem}
.management-hero{display:flex;justify-content:space-between;align-items:center;gap:1.5rem;padding:1.75rem;border:1px solid var(--border);border-radius:16px;background:linear-gradient(120deg,#eaf3f8,#f8fafc);margin-bottom:1rem;color:#0f2c4d}
.management-hero h2{font-size:1.8rem;line-height:1.2;margin:.4rem 0}
.management-hero p{margin:.5rem 0 0;color:#506579}
.management-eyebrow{font-size:.7rem;font-weight:700;letter-spacing:.14em}
.management-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1rem}
.management-number{display:block;font-size:2rem;line-height:1.4;margin-top:.3rem}
.management-row{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.9rem 0;border-bottom:1px solid var(--border);overflow-wrap:anywhere}
.management-row:last-child{border-bottom:0}
.management-body{white-space:pre-wrap;overflow-wrap:anywhere}
@media(max-width:700px){.management-hero{align-items:flex-start;flex-direction:column;padding:1.2rem}.management-hero h2{font-size:1.5rem}.management-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:.6rem}.management-nav .btn{white-space:normal}.management-row{gap:.6rem}}

/* Dashboard action cards use the existing card, button and muted palette. */
.home-actions__list{display:grid;gap:.65rem}
.home-action{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.8rem 0;border-top:1px solid var(--border);min-width:0}
.home-action__body{min-width:0;overflow-wrap:anywhere}
.home-action h4{font:inherit;font-weight:700;margin:0 0 .25rem}
.home-action p{margin:.2rem 0;overflow-wrap:anywhere}
.home-action__controls{display:flex;align-items:center;justify-content:flex-end;gap:.45rem;flex-wrap:wrap;flex:0 1 auto}
.home-action__controls .btn{white-space:normal;text-align:center}
.home-action a:focus-visible,.home-action button:focus-visible,.home-action input:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
@media(max-width:700px){.home-action{align-items:flex-start;flex-direction:column}.home-action__controls{justify-content:flex-start;width:100%}.home-action__controls .btn{max-width:100%}}

/* User management */
.users-page { min-width: 0; max-width: 100%; }
.users-create summary { min-height: 44px; align-content: center; }
.users-page .form-row { grid-template-columns: minmax(0, 1fr); }
.users-page .field { min-width: 0; }
.users-heading { flex-wrap: wrap; margin-top: 1.5rem; }
.users-heading p { margin: .35rem 0 0; }
.users-list { min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.user-card { min-width: 0; margin: 0; }
.user-card + .user-card { border-top: 1px solid var(--border); }
.user-card__summary { display: flex; align-items: center; gap: .65rem; min-height: 60px; padding: .5rem .85rem; cursor: pointer; list-style: none; }
.user-card__summary::-webkit-details-marker { display: none; }
.user-card__summary:hover, .user-card[open] > .user-card__summary { background: var(--surface-2); }
.user-card__summary:focus-visible { outline: 2px solid var(--brand); outline-offset: -3px; }
.user-card__summary .user-card__avatar { width: 32px; height: 32px; flex: 0 0 32px; font-size: .75rem; }
.user-card__name { flex: 1 1 180px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; }
.user-card__email { flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-soft); font-size: .8rem; }
.user-card__role { flex: 0 0 90px; font-size: .75rem; color: var(--text-soft); white-space: nowrap; }
.user-card__summary .badge { flex: 0 0 auto; white-space: nowrap; font-size: .7rem; }
.user-card__chevron { flex: 0 0 16px; color: var(--text-soft); text-align: center; }
.user-card[open] > .user-card__summary .user-card__chevron { transform: rotate(180deg); }
.user-card__details { display: grid; grid-template-columns: minmax(0, 1fr); gap: .85rem; padding: 1rem; border-top: 1px solid var(--border); }
.user-card__section { min-width: 0; overflow-wrap: anywhere; }
.user-card__label { font-size: .78rem; font-weight: 600; color: var(--text-soft); margin-bottom: .45rem; }
.user-card__form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; min-width: 0; }
.user-card__form .input { flex: 1 1 100%; min-width: 0; max-width: 100%; }
.user-card .photo-cell { min-width: 0; gap: .5rem; }
.user-card .photo-cell__form { flex-wrap: wrap; max-width: 100%; gap: .5rem; }
.user-card .photo-cell__form input[type="file"] { min-width: 0; max-width: 100%; width: 100%; font-size: .85rem; }
.users-page .btn { min-height: 44px; white-space: normal; max-width: 100%; }
.users-page :is(input, select):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
@media (min-width: 640px) {
  .users-page .form-row.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-card__details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-card__section:last-child { grid-column: 1 / -1; border-top: 1px solid var(--border); padding-top: 1rem; }
}
@media (min-width: 1200px) {
  .user-card__details { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 639px) {
  .user-card__section + .user-card__section { border-top: 1px solid var(--border); padding-top: .8rem; }
  .users-page :is(input, select) { font-size: 1rem; }
}

@media (max-width: 639px) {
  .user-card__summary { gap: .4rem; min-height: 56px; padding: .45rem .5rem; }
  .user-card__email { display: none; }
  .user-card__role { flex-basis: auto; font-size: .65rem; }
  .user-card__name { font-size: .8rem; }
  .user-card__summary .user-card__avatar { width: 26px; height: 26px; flex-basis: 26px; font-size: .65rem; }
  .user-card__summary .badge { padding: .2rem .35rem; font-size: .65rem; }
  .user-card__chevron { flex-basis: 12px; }
}

/* ---------- Ayarlar sayfaları: bağımsız iki sütun (kartlar esnemez, altta boşluk kalmaz) ---------- */
.settings-layout { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); align-items: start; }
.settings-col { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.settings-col > .card { margin: 0; }
.settings-layout + .card { margin-top: 1rem; }
.settings-col .card > :last-child { margin-bottom: 0; }
.settings-col .card > form:last-child > :last-child,
.settings-col .card > form:last-child > .field:last-child { margin-bottom: 0; }
@media (min-width: 900px) {
  .settings-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Approved Sinerji Team identity — team-blue-20260919. */
.brand__mark{background:#0f2c4d;box-shadow:none;overflow:hidden;letter-spacing:normal}
.brand__mark img{display:block;width:100%;height:100%;object-fit:contain}
.sidebar__brand .brand__name{color:#fff;font-size:1rem;letter-spacing:.015em}
.sidebar__brand .brand__name small{color:#fff;opacity:.8}
.auth__brand{background:#0f2c4d;color:#fff;padding:12px;border-radius:12px}
.auth__brand h1,.auth__brand .sub{color:#fff}
