/* ==========================================================================
   DorukCRM — stylesheet
   Hand-authored rather than generated: there is no Node toolchain in this
   project, so a build-step CSS framework would be a dependency the runtime
   cannot satisfy.
   ========================================================================== */

:root {
  --bg:            #f0f2f5;
  --surface:       #ffffff;
  --surface-2:     #f7f8fa;
  --surface-3:     #eef0f3;
  --border:        #e3e6ea;
  --border-strong: #cdd3da;

  --text:          #111b21;
  --text-muted:    #667781;
  --text-faint:    #8696a0;

  --brand:         #128c7e;
  --brand-dark:    #075e54;
  --brand-light:   #dcf8c6;
  --accent:        #25d366;

  --danger:        #d92d20;
  --danger-bg:     #fef3f2;
  --warning:       #b54708;
  --warning-bg:    #fffaeb;
  --success:       #067647;
  --success-bg:    #ecfdf3;
  --info:          #175cd3;
  --info-bg:       #eff8ff;

  --radius:        10px;
  --radius-sm:     6px;
  --radius-lg:     14px;
  --shadow-sm:     0 1px 2px rgba(16, 24, 40, .06);
  --shadow:        0 4px 12px rgba(16, 24, 40, .08);
  --shadow-lg:     0 12px 32px rgba(16, 24, 40, .12);

  --sidebar-w:     236px;
  --list-w:        360px;
  --header-h:      60px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:            #0b141a;
    --surface:       #111b21;
    --surface-2:     #182229;
    --surface-3:     #202c33;
    --border:        #222d34;
    --border-strong: #2f3b43;

    --text:          #e9edef;
    --text-muted:    #8696a0;
    --text-faint:    #667781;

    --brand:         #00a884;
    --brand-dark:    #005c4b;
    --brand-light:   #005c4b;

    --danger-bg:     #2a1614;
    --warning-bg:    #2a2114;
    --success-bg:    #10241c;
    --info-bg:       #10202e;
  }
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

/* --------------------------------------------------------------------------
   Icon sizing safety net.

   icon() emits inline SVG with a viewBox and deliberately no width/height, so
   size is a CSS decision. But an SVG with neither is not "as big as its box" —
   it falls back to the replaced-element default of 300x150 and wrecks whatever
   contains it. Every container therefore needs a rule, and forgetting one is
   invisible until someone opens the page.

   This is that rule for everything not covered below: an icon is sized to the
   text it sits with, and never grows past its box.
   -------------------------------------------------------------------------- */
svg {
  width: 1.15em;
  height: 1.15em;
  max-width: 100%;
  flex-shrink: 0;
  vertical-align: middle;
}

h1, h2, h3, h4 { margin: 0 0 .5rem; font-weight: 600; line-height: 1.3; }
h1 { font-size: 1.375rem; }
h2 { font-size: 1.125rem; }
h3 { font-size: 1rem; }
p  { margin: 0 0 .75rem; }

/* --- application shell ---------------------------------------------------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar__brand {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: 0 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: .9375rem;
  letter-spacing: -.01em;
  flex-shrink: 0;
}

/* Logo kendi zeminini ve köşe yuvarlamasını taşıyor; kutuya arka plan
   verilirse markanın lacivertinin üstüne ikinci bir renk biner. */
.sidebar__logo img { width: 30px; height: 30px; display: block; border-radius: 8px; }
.sidebar__logo {
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.sidebar__nav { padding: .75rem .625rem; flex: 1; overflow-y: auto; }

.nav-item {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .5rem .625rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 2px;
}
.nav-item:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
.nav-item--active { background: var(--brand); color: #fff; }
.nav-item--active:hover { background: var(--brand); color: #fff; }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #04231a;
  font-size: .6875rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
}
.nav-item--active .nav-badge { background: rgba(255,255,255,.25); color: #fff; }

.sidebar__footer {
  border-top: 1px solid var(--border);
  padding: .75rem;
  flex-shrink: 0;
}

.user-chip { display: flex; align-items: center; gap: .5rem; min-width: 0; }
.user-chip__avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-muted);
  display: grid; place-items: center;
  font-weight: 700; font-size: .75rem;
  flex-shrink: 0;
}
.user-chip__meta { min-width: 0; flex: 1; }
.user-chip__name { font-weight: 600; font-size: .8125rem; }
.user-chip__org  { font-size: .75rem; color: var(--text-muted); }
.user-chip__name, .user-chip__org { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

.topbar {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.25rem;
  flex-shrink: 0;
}
.topbar h1 { margin: 0; font-size: 1.0625rem; }
.topbar__spacer { flex: 1; }

.content { flex: 1; overflow-y: auto; padding: 1.25rem; }
.content--flush { padding: 0; overflow: hidden; }

/* --- cards & panels ------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card__header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .75rem;
}
.card__header > svg { width: 18px; height: 18px; color: var(--text-muted); }
.card__title { font-weight: 600; font-size: .9375rem; margin: 0; }
.card__body { padding: 1.25rem; }
.card__footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius) var(--radius);
}

.grid { display: grid; gap: 1rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.stat { padding: 1rem 1.25rem; }
.stat__label { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.stat__value { font-size: 1.75rem; font-weight: 700; line-height: 1.2; margin-top: .25rem; }
.stat__hint  { font-size: .75rem; color: var(--text-faint); margin-top: .125rem; }

/* --- buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .5rem .875rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  font-size: .8125rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s ease, opacity .12s ease;
}
.btn:hover  { text-decoration: none; filter: brightness(.97); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); }
.btn--danger  { background: var(--danger); color: #fff; }
.btn--ghost   { background: transparent; border-color: var(--border-strong); color: var(--text-muted); }
.btn--ghost:hover { background: var(--surface-3); color: var(--text); }
.btn--lg { padding: .75rem 1.25rem; font-size: .9375rem; }
.btn--block { width: 100%; }

/* --- forms ---------------------------------------------------------------- */
.field { margin-bottom: 1rem; }
.label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  margin-bottom: .375rem;
  color: var(--text);
}
.input, .textarea, .select {
  width: 100%;
  padding: .5625rem .75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: .875rem;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.textarea { resize: vertical; min-height: 76px; }
.help { font-size: .75rem; color: var(--text-muted); margin-top: .375rem; }
.field-error { font-size: .75rem; color: var(--danger); margin-top: .375rem; }

/* --- badges & pills ------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3125rem;
  padding: .1875rem .5rem;
  border-radius: 999px;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  background: var(--surface-3);
  color: var(--text-muted);
  white-space: nowrap;
}
.badge--success { background: var(--success-bg); color: var(--success); }
.badge--danger  { background: var(--danger-bg);  color: var(--danger); }
.badge--warning { background: var(--warning-bg); color: var(--warning); }
.badge--info    { background: var(--info-bg);    color: var(--info); }
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* --- alerts --------------------------------------------------------------- */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  margin-bottom: 1rem;
  font-size: .875rem;
  display: flex;
  gap: .625rem;
  align-items: flex-start;
}
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert--error   { background: var(--danger-bg);  border-color: color-mix(in srgb, var(--danger) 25%, transparent);  color: var(--danger); }
.alert--success { background: var(--success-bg); border-color: color-mix(in srgb, var(--success) 25%, transparent); color: var(--success); }
.alert--warning { background: var(--warning-bg); border-color: color-mix(in srgb, var(--warning) 25%, transparent); color: var(--warning); }
.alert--info    { background: var(--info-bg);    border-color: color-mix(in srgb, var(--info) 25%, transparent);    color: var(--info); }

/* --- tables --------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .875rem; }
.table th {
  text-align: left;
  font-size: .6875rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  font-weight: 700;
  padding: .625rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  white-space: nowrap;
}
.table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-2); }

/* --- definition rows (settings) ------------------------------------------ */
.dl { display: grid; grid-template-columns: minmax(160px, 200px) 1fr; }
.dl > dt {
  padding: .75rem 0;
  color: var(--text-muted);
  font-size: .8125rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
}
.dl > dd {
  padding: .75rem 0;
  margin: 0;
  font-size: .875rem;
  border-bottom: 1px solid var(--border);
  word-break: break-word;
}
.dl > dt:last-of-type, .dl > dd:last-of-type { border-bottom: none; }

.mono { font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; font-size: .8125rem; }

/* --- inbox layout --------------------------------------------------------- */
.inbox {
  display: grid;
  grid-template-columns: var(--list-w) 1fr;
  height: 100%;
  overflow: hidden;
  background: var(--surface);
}

.thread-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; }

.thread-list__head { padding: .75rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.thread-list__search { position: relative; }
.thread-list__search .input { padding-left: 2.125rem; background: var(--surface-2); }
.thread-list__search svg {
  position: absolute; left: .6875rem; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-faint); pointer-events: none;
}

.thread-tabs { display: flex; gap: .25rem; margin-top: .625rem; }
.thread-tab {
  flex: 1;
  padding: .375rem .5rem;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}
.thread-tab--active { background: var(--surface-3); color: var(--text); }

.thread-list__items { flex: 1; overflow-y: auto; }

.thread {
  display: flex;
  gap: .75rem;
  padding: .75rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  min-width: 0;
}
.thread:hover { background: var(--surface-2); }
.thread--active { background: var(--surface-3); }
.thread--active:hover { background: var(--surface-3); }

.avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-muted);
  display: grid; place-items: center;
  font-weight: 700; font-size: .875rem;
  flex-shrink: 0;
  text-transform: uppercase;
}
.avatar--sm { width: 34px; height: 34px; font-size: .75rem; }

.thread__body { min-width: 0; flex: 1; }
.thread__top { display: flex; align-items: baseline; gap: .5rem; }
.thread__name { font-weight: 600; font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.thread__time { font-size: .6875rem; color: var(--text-faint); flex-shrink: 0; }
.thread__phone { font-size: .75rem; color: var(--text-faint); }
.thread__bottom { display: flex; align-items: center; gap: .5rem; margin-top: .125rem; }
.thread__preview {
  font-size: .8125rem; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.thread__unread {
  background: var(--accent); color: #04231a;
  font-size: .6875rem; font-weight: 700;
  min-width: 19px; height: 19px; padding: 0 5px;
  border-radius: 999px;
  display: grid; place-items: center;
  flex-shrink: 0;
}

/* --- conversation panel --------------------------------------------------- */
.chat { display: flex; flex-direction: column; min-width: 0; background: var(--bg); }

.chat__head {
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .75rem;
  padding: 0 1rem;
  flex-shrink: 0;
}
.chat__title { font-weight: 600; font-size: .9375rem; }
.chat__sub   { font-size: .75rem; color: var(--text-muted); }
.chat__actions { margin-left: auto; display: flex; gap: .5rem; align-items: center; }

.chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.25rem .5rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.day-sep { text-align: center; margin: 1rem 0 .75rem; }
.day-sep span {
  background: var(--surface-3); color: var(--text-muted);
  font-size: .6875rem; font-weight: 600;
  padding: .25rem .75rem; border-radius: 999px;
}

.bubble {
  max-width: min(70%, 560px);
  padding: .5rem .625rem .375rem;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  align-self: flex-start;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  position: relative;
}
.bubble--out { align-self: flex-end; background: var(--brand-light); }
.bubble__text { white-space: pre-wrap; font-size: .875rem; }
.bubble__meta {
  display: flex; align-items: center; justify-content: flex-end;
  gap: .3125rem; margin-top: .125rem;
  font-size: .625rem; color: var(--text-faint);
}
.bubble__media { border-radius: var(--radius-sm); overflow: hidden; margin-bottom: .375rem; }
.bubble__media img, .bubble__media video { display: block; max-width: 100%; height: auto; }
.bubble__file {
  display: flex; align-items: center; gap: .5rem;
  padding: .5rem; background: rgba(0,0,0,.04);
  border-radius: var(--radius-sm); margin-bottom: .375rem;
}
.bubble__echo {
  font-size: .625rem; font-weight: 700; text-transform: uppercase;
  color: var(--text-faint); letter-spacing: .04em; margin-bottom: .125rem;
}
.bubble--failed { border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); }
.bubble__error { font-size: .6875rem; color: var(--danger); margin-top: .25rem; }

.tick { display: inline-flex; }
.tick svg { width: 15px; height: 15px; }
.tick--read { color: #53bdeb; }

.chat__composer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: .75rem 1rem;
  flex-shrink: 0;
}
.composer-row { display: flex; gap: .625rem; align-items: flex-end; }
.composer-row .textarea {
  min-height: 42px; max-height: 160px;
  border-radius: 20px; padding: .625rem 1rem;
  background: var(--surface-2);
}

.composer-locked {
  background: var(--warning-bg);
  border: 1px solid color-mix(in srgb, var(--warning) 25%, transparent);
  color: var(--warning);
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .8125rem;
}

/* --- empty states --------------------------------------------------------- */
.empty {
  display: grid;
  place-items: center;
  height: 100%;
  text-align: center;
  padding: 2rem;
}
.empty__inner { max-width: 380px; }
.empty__icon {
  width: 64px; height: 64px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-faint);
  display: grid; place-items: center;
}
.empty__icon svg { width: 30px; height: 30px; }
.empty h3 { margin-bottom: .375rem; }
.empty p { color: var(--text-muted); font-size: .875rem; }

/* --- auth screen ---------------------------------------------------------- */
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: var(--bg);
}
.auth__card {
  width: 100%; max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
}
/* Giriş ekranında tam logo kullanılıyor: hem işaret hem kelime. Başlık
   metni buradan kaldırıldı, çünkü logo adı zaten taşıyor. */
.auth__logo {
  display: grid; place-items: center;
  margin: 0 auto 1.25rem;
}
.auth__logo img { width: 190px; max-width: 70%; height: auto; display: block; }
.auth__title { text-align: center; margin-bottom: .25rem; }
.auth__sub { text-align: center; color: var(--text-muted); font-size: .875rem; margin-bottom: 1.5rem; }

/* --- connect screen ------------------------------------------------------- */
.connect { max-width: 720px; margin: 0 auto; }
.connect__hero { text-align: center; padding: 2rem 1.5rem; }
.connect__icon {
  width: 72px; height: 72px;
  border-radius: 20px;
  background: var(--brand);
  color: #fff;
  display: grid; place-items: center;
  margin: 0 auto 1.25rem;
}
.connect__icon svg { width: 38px; height: 38px; }

/* --------------------------------------------------------------------------
   Connect screen
   -------------------------------------------------------------------------- */

.connect__lede {
  max-width: 46ch;
  margin: 0 auto 1.5rem;
  color: var(--text-muted);
  font-size: .9375rem;
}

.connect__meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin-top: 1rem;
  font-size: .75rem;
  color: var(--text-faint);
}
.connect__meta span { display: inline-flex; align-items: center; gap: .375rem; }
.connect__meta svg { width: 14px; height: 14px; }

/* Prerequisites. Presented before the button, because the flow needs a phone
   in hand and finding that out halfway through means starting over. */
.prereq { list-style: none; margin: 0; padding: 0; display: grid; gap: .625rem; }
.prereq li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: .75rem;
  align-items: start;
  font-size: .875rem;
}
.prereq li > svg {
  width: 18px; height: 18px;
  color: var(--brand);
  margin-top: .125rem;
}
.prereq strong { display: block; font-weight: 600; }
.prereq span small { color: var(--text-muted); font-size: .8125rem; }

/* The flow crosses two devices, and that is the part people get lost in:
   half of it happens in this browser, half on the phone. Splitting the
   columns says so before they start. */
.flow {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}
.flow__col { background: var(--surface); padding: 1rem 1.125rem 1.25rem; }
.flow__where {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .875rem;
}
.flow__where svg { width: 15px; height: 15px; }
.flow ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.flow li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: .625rem;
  align-items: start;
  font-size: .875rem;
  line-height: 1.45;
}
.flow li b {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-muted);
  display: grid; place-items: center;
  font-size: .6875rem; font-weight: 700;
}
.flow li small { display: block; color: var(--text-muted); font-size: .8125rem; }

/* What survives the connection and what does not. This is consent material,
   not fine print: after coexistence the customer loses group chats, broadcast
   lists and more on their own phone. Hiding it behind a disclosure triangle
   would be the wrong call. */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.compare__col { background: var(--surface); padding: 1rem 1.125rem 1.25rem; }
.compare__head {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8125rem;
  font-weight: 700;
  margin-bottom: .75rem;
}
.compare__head svg { width: 16px; height: 16px; }
.compare__col--keep .compare__head { color: var(--success); }
.compare__col--lose .compare__head { color: var(--warning); }
.compare ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4375rem; }
/* İşaret ile metin ayrı sütunlarda: uzun bir madde ikinci satıra taştığında
   devamı çizginin altına değil, metnin hizasına gelsin. */
.compare li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .4375rem;
  font-size: .8125rem;
  line-height: 1.45;
  color: var(--text-muted);
}
.compare li::before { content: "—"; color: var(--text-faint); }
.compare__col--keep li { color: var(--text); }

.limits {
  margin-top: .875rem;
  padding-top: .875rem;
  border-top: 1px solid var(--border);
  font-size: .8125rem;
  color: var(--text-muted);
}

/* Setup state. The operator cannot fix server configuration from this screen,
   so the technical keys are secondary to knowing what is missing and who acts. */
.setup-missing {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  margin-top: .625rem;
}
.setup-missing code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .6875rem;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  padding: .1875rem .4375rem;
}

@media (max-width: 720px) {
  .flow, .compare { grid-template-columns: 1fr; }
}

.steps { list-style: none; padding: 0; margin: 1.5rem 0 0; counter-reset: step; }
.steps li {
  display: flex; gap: .875rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: .875rem;
}
.steps li:last-child { border-bottom: none; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  width: 24px; height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--surface-3);
  color: var(--text-muted);
  display: grid; place-items: center;
  font-weight: 700; font-size: .75rem;
}

/* --- flash toasts --------------------------------------------------------- */
.toasts {
  position: fixed;
  top: 1rem; right: 1rem;
  z-index: 60;
  display: flex; flex-direction: column; gap: .5rem;
  max-width: 380px;
}
.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-muted);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: .75rem 1rem;
  font-size: .875rem;
  animation: toast-in .18s ease-out;
}
.toast--error   { border-left-color: var(--danger); }
.toast--success { border-left-color: var(--success); }
.toast--warning { border-left-color: var(--warning); }
@keyframes toast-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }

/* --- misc ----------------------------------------------------------------- */
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.small { font-size: .8125rem; }
.tiny  { font-size: .75rem; }
.strong { font-weight: 600; }
.row { display: flex; align-items: center; gap: .625rem; }
.row--between { justify-content: space-between; }
.stack > * + * { margin-top: 1rem; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.hidden { display: none !important; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.conn-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.conn-dot--live { background: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.conn-dot--down { background: var(--text-faint); }

@media (max-width: 1024px) {
  .app { grid-template-columns: 64px 1fr; }
  .sidebar__brand span, .nav-item span, .user-chip__meta { display: none; }
  .sidebar__brand, .nav-item { justify-content: center; }
  .inbox { grid-template-columns: 300px 1fr; }
}
@media (max-width: 720px) {
  .inbox { grid-template-columns: 1fr; }
  .inbox--thread-open .thread-list { display: none; }
  .inbox:not(.inbox--thread-open) .chat { display: none; }
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* --- ayarlar modülü ------------------------------------------------------- */
/* Alt menü kenar çubuğunun değil sayfanın parçası: kenar çubuğu modüller
   arasında, bu menü modülün bölümleri arasında gezinir. */

.subnav {
  display: flex;
  gap: .25rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.subnav__item {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .625rem .875rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: .875rem;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.subnav__item svg { width: 16px; height: 16px; }
.subnav__item:hover { color: var(--text); }

.subnav__item--active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.subnav__item:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.settings-row {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: 1rem 1.125rem;
  border-bottom: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
}

.settings-row:last-child { border-bottom: none; }
.settings-row:hover { background: var(--surface-2); }

.settings-row:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.settings-row__icon {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  background: var(--surface-3);
  color: var(--brand);
  display: grid; place-items: center;
  flex-shrink: 0;
}

.settings-row__icon svg { width: 19px; height: 19px; }

.settings-row__body { display: flex; flex-direction: column; gap: .125rem; min-width: 0; }
.settings-row__title { font-weight: 600; font-size: .9375rem; }
.settings-row__sub { color: var(--text-muted); font-size: .8125rem; line-height: 1.45; }
