/* ═══════════════════════════════════════════════════════════
   CRM — Newu panel tasarım dili (ui2)
   Notlar: docs/TASARIM-NOTLARI.md

   Bileşenler `.ui2` (body) altında: Tailwind CDN'in preflight'ı
   ([type='button'] gibi) onları ezemesin. Tailwind yardımcıları da
   `important: '.ui2'` ile aynı özgüllükte üretiliyor ve CDN stili
   <head>'in sonuna eklendiği için bileşenleri ezebiliyor
   (`input input-sm pl-9`, `button-sm px-2`…).
   ═══════════════════════════════════════════════════════════ */

:root {
  --page-bg: #f3f4f6;
  --card-bg: #ffffff;
  --card-border: #e5e7eb;

  --primary: #004dc8;
  --primary-deep: #00309e;
  --primary-subtle: #e7f0fd;

  --sidebar: #0d0d0d;
  --sidebar-on: #303036;

  --rail-w: 72px;
  --side-panel-w: 220px;
  --side-w: calc(var(--rail-w) + var(--side-panel-w));
  --head-h: 112px;

  /* Eski sınıfların okuduğu değişkenler */
  --accent: var(--primary);
  --accent2: var(--primary-deep);
  --sidebar-w: var(--side-w);
}

html { height: 100%; }
body.ui2 {
  min-height: 100%;
  margin: 0;
  background: var(--page-bg);
  color: #6b7280;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════════════════
   Kabuk
   ═══════════════════════════════════════════════════════════ */

.ui2 .layout { display: flex; min-height: 100vh; }

/* ── Kenar menü: ikon şeridi + kategori menüsü ── */
.ui2 .sidebar {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 50;
  display: flex; width: var(--side-w);
  background: var(--sidebar); color: #a3a3a3;
}

.ui2 .side-rail {
  flex: none; width: var(--rail-w);
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 0 16px;
  border-right: 1px solid rgba(255,255,255,.07);
}
/* Logo: geniş görselin soldaki "İSA" işareti kare kutuda */
.ui2 .rail-logo {
  display: flex; align-items: center; justify-content: flex-start;
  width: 40px; height: 40px; margin-bottom: 26px; overflow: hidden;
  border-radius: 10px; background: #1c1c1f; padding-left: 3px;
  transition: opacity .12s;
}
/* İşaret görselin soldaki 131/399'u: 22px yükseklikte ~34px — kutuya sığar */
.ui2 .rail-logo img { display: block; height: 22px; width: auto; max-width: none; }
.ui2 .rail-logo:hover { opacity: .85; }

.ui2 .rail-cats {
  flex: 1; min-height: 0; overflow-y: auto;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  scrollbar-width: none;
}
.ui2 .rail-cats::-webkit-scrollbar { display: none; }

.ui2 .rail-btn {
  position: relative; flex: none;
  display: flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; padding: 0;
  border: 1px solid transparent; border-radius: 8px;
  background: transparent; color: #8a8a90; font-size: 16px;
  cursor: pointer; text-decoration: none;
  transition: background-color .12s, color .12s;
}
.ui2 .rail-btn:hover { background: rgba(255,255,255,.06); color: #e4e4e7; }
.ui2 .rail-btn.is-active { background: #2a2a2f; border-color: rgba(255,255,255,.06); color: #fff; }
.ui2 .rail-btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.ui2 .rail-dot {
  position: absolute; top: 8px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: #3b82f6; box-shadow: 0 0 0 2px var(--sidebar);
}

.ui2 .rail-foot { flex: none; display: flex; flex-direction: column; align-items: center; gap: 14px; padding-top: 12px; }
.ui2 .rail-user { position: relative; }
.ui2 .rail-user > summary { list-style: none; }
.ui2 .rail-user > summary::-webkit-details-marker { display: none; }
.ui2 .rail-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--primary); color: #fff;
  font-size: 13px; font-weight: 600; cursor: pointer;
  box-shadow: 0 0 0 2px rgba(255,255,255,.12);
  transition: box-shadow .12s;
}
.ui2 .rail-avatar:hover, .ui2 .rail-user[open] .rail-avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.35); }

.ui2 .user-dropdown {
  position: absolute; left: calc(100% + 12px); bottom: 0; z-index: 60; min-width: 220px;
  padding: 6px; background: #fff; color: #111827;
  border: 1px solid #e5e7eb; border-radius: 8px;
  box-shadow: 0 10px 30px -12px rgba(17,24,39,.25);
}
.ui2 .user-dropdown-head { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 6px; }
.ui2 .user-dropdown-head strong { font-size: 13.5px; font-weight: 600; color: #111827; }
.ui2 .user-dropdown-head span { font-size: 12px; color: #6b7280; }
.ui2 .user-dropdown-sep { height: 1px; margin: 4px 0; background: #f3f4f6; }
.ui2 .user-dropdown-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 6px;
  color: #111827; font-size: 13.5px; font-weight: 500; text-decoration: none;
}
.ui2 .user-dropdown-item i { width: 16px; text-align: center; color: #6b7280; }
.ui2 .user-dropdown-item:hover { background: #f3f4f6; }
.ui2 .user-dropdown-item.is-danger, .ui2 .user-dropdown-item.is-danger i { color: #ef4444; }
.ui2 .user-dropdown-item.is-danger:hover { background: #fef2f2; }

/* Kategori menüsü */
.ui2 .side-panel { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ui2 .side-head {
  flex: none; height: 62px;
  display: flex; align-items: center; gap: 11px;
  padding: 0 16px; border-bottom: 1px solid rgba(255,255,255,.07);
}
.ui2 .side-head-avatar {
  flex: none; display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.22); color: #fff;
  font-size: 12px; font-weight: 600;
}
.ui2 .side-head-meta { min-width: 0; }
.ui2 .side-head-name { font-size: 13.5px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui2 .side-head-org { margin-top: 2px; font-size: 12px; color: #8b8fa5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ui2 .sidebar-nav {
  flex: 1; min-height: 0; overflow-y: auto; padding: 14px 10px;
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent;
}
.ui2 .side-cat { display: flex; flex-direction: column; gap: 3px; }
.ui2 .side-cat[hidden] { display: none; }
.ui2 .side-cat-title { padding: 2px 12px 10px; font-size: 15px; font-weight: 600; letter-spacing: -.005em; color: #fff; }
.ui2 .side-heading {
  padding: 14px 12px 6px;
  font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #6f6f78;
}
.ui2 .side-cat-title + .side-heading { padding-top: 2px; }

.ui2 .nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 7px;
  color: #f4f4f5; font-size: 14px; font-weight: 500; text-decoration: none;
  transition: background-color .12s, color .12s;
}
.ui2 .nav-item:hover { background: rgba(255,255,255,.06); }
.ui2 .nav-item.active, .ui2 .nav-item.is-active {
  background: var(--sidebar-on); color: #fff; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}
.ui2 .nav-item.active:hover, .ui2 .nav-item.is-active:hover { background: #3a3a42; }
.ui2 .nav-icon { flex: none; width: 17px; text-align: center; font-size: 15px; color: #fff; }
.ui2 .nav-badge {
  margin-left: auto; min-width: 20px; padding: 0 6px;
  border-radius: 9999px; background: rgba(255,255,255,.12); color: #fff;
  font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
}

/* ── İçerik çerçevesi ── */
.ui2 .main { flex: 1; min-width: 0; margin-left: var(--side-w); padding: 8px; display: flex; flex-direction: column; }
.ui2 .ui2-frame { flex: 1; display: flex; flex-direction: column; min-height: calc(100vh - 16px); background: var(--page-bg); border-radius: 8px; }

.ui2 .head-stack { position: sticky; top: 8px; z-index: 40; flex: none; }
/* Yapışkan yığının üstündeki 8px boşluk: kayan içerik orada görünmesin */
.ui2 .head-stack::before {
  content: ""; position: absolute; z-index: -1;
  left: 0; right: 0; top: -8px; height: 16px;
  background: var(--page-bg); pointer-events: none;
}

.ui2 .appbar {
  display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 24px;
  background: #fff; border-bottom: 1px solid #f3f4f6; border-radius: 8px 8px 0 0;
}
.ui2 .appbar-org { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.ui2 .appbar-name { font-size: 14px; font-weight: 600; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui2 .appbar-sub { padding: 2px 8px; border-radius: 6px; background: #f3f4f6; color: #4b5563; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ui2 .appbar-tools { display: flex; align-items: center; gap: 6px; flex: none; margin-left: auto; }

.ui2 .appbar-search { position: relative; display: flex; align-items: center; }
.ui2 .appbar-search input {
  width: 300px; height: 40px; padding: 0 44px 0 14px;
  border: 1px solid #e5e7eb; border-radius: 10px; background: #fff;
  font: inherit; font-size: 14px; color: #111827; transition: border-color .15s, box-shadow .15s;
}
.ui2 .appbar-search input::placeholder { color: #9ca3af; }
.ui2 .appbar-search input:hover { border-color: #d1d5db; }
.ui2 .appbar-search input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-subtle); }
.ui2 .appbar-search button {
  position: absolute; right: 4px;
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 7px; background: #f3f4f6; color: #6b7280; font-size: 13px;
}
.ui2 .appbar-search button:hover { color: #111827; }

.ui2 .appbar-icon {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 8px; color: #4b5563; font-size: 17px; text-decoration: none;
}
.ui2 .appbar-icon:hover { background: rgba(0,0,0,.05); color: #111827; }
.ui2 .appbar-badge {
  position: absolute; top: 3px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 9999px; background: #ef4444; color: #fff; box-shadow: 0 0 0 2px #fff;
  font-size: 11px; font-weight: 600; line-height: 1;
}

.ui2 .menu-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  width: 38px; height: 38px; padding: 0 10px; margin-left: -8px; border-radius: 8px;
}
.ui2 .menu-toggle span { display: block; height: 2px; border-radius: 2px; background: #111827; }
.ui2 .menu-toggle:hover { background: rgba(0,0,0,.05); }

.ui2 .topbar {
  display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 24px;
  background: #fff; border-bottom: 1px solid var(--card-border);
}
.ui2 .topbar-title { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 700; color: #111827; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui2 .tb-sub { font-size: 13px; color: #6b7280; }

.ui2 .content { width: 100%; max-width: 1440px; padding: 24px 32px 40px; }

/* ── Mobil çekmece ── */
.ui2 .mobile-overlay { display: none; position: fixed; inset: 0; z-index: 45; background: rgba(17,24,39,.4); }
.ui2 .mobile-overlay.active { display: block; }
.ui2 .mobile-menu-toggle { display: none; }

@media (max-width: 900px) {
  .ui2 .sidebar { transform: translateX(-100%); transition: transform .25s ease; }
  .ui2 .sidebar.mobile-open { transform: translateX(0); }
  .ui2 .main { margin-left: 0; padding: 0; }
  .ui2 .ui2-frame { border-radius: 0; min-height: 100vh; }
  .ui2 .head-stack { top: 0; }
  .ui2 .head-stack::before { display: none; }
  .ui2 .appbar { border-radius: 0; padding: 0 12px 0 16px; }
  .ui2 .menu-toggle { display: flex; }
  .ui2 .topbar { padding: 0 16px; }
  .ui2 .content { padding: 18px 16px 32px; }
  .ui2 .user-dropdown { left: 0; bottom: calc(100% + 8px); }
}
@media (max-width: 1100px) { .ui2 .appbar-search input { width: 220px; } }
@media (max-width: 640px) {
  .ui2 .appbar-sub, .ui2 .tb-sub { display: none; }
  .ui2 .appbar-search input { width: 40px; padding: 0; border-color: transparent; color: transparent; cursor: pointer; }
  .ui2 .appbar-search input:focus { position: absolute; right: 0; z-index: 2; width: calc(100vw - 32px); padding: 0 44px 0 14px; color: #111827; cursor: text; }
  .ui2 .appbar-search input::placeholder { color: transparent; }
  .ui2 .appbar-search input:focus::placeholder { color: #9ca3af; }
  .ui2 .appbar-search button { z-index: 3; pointer-events: none; background: transparent; font-size: 15px; color: #4b5563; }
}

/* ═══════════════════════════════════════════════════════════
   Bileşenler
   ═══════════════════════════════════════════════════════════ */

/* Tipografi */
.ui2 h4 { margin: 0; font-size: 1.375rem; line-height: 1.3; font-weight: 700; color: #111827; letter-spacing: -.01em; }
.ui2 h5 { margin: 0; font-size: 1.0625rem; line-height: 1.4; font-weight: 700; color: #111827; }
.ui2 h6 { margin: 0; font-size: .9375rem; line-height: 1.4; font-weight: 600; color: #111827; }
.ui2 .heading-text { color: #111827; }

/* Kart */
.ui2 .card { position: relative; background: var(--card-bg); border-radius: 8px; }
.ui2 .card-border { border: 1px solid var(--card-border); }
.ui2 .card-body { padding: 1.25rem; }
.ui2 .card-header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: 1rem 1.25rem; border-bottom: 1px solid #e5e7eb; }
.ui2 .card-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: .5rem;
  padding: .875rem 1.25rem; border-top: 1px solid #e5e7eb; background: #f9fafb;
  border-radius: 0 0 8px 8px;
}
/* Başlık şeridi: gri zeminli, ince çerçeveli başlık */
.ui2 .card-strip > .card-header {
  margin: .375rem .375rem 0; padding: .625rem calc(1.25rem - .375rem - 1px); min-height: 2.875rem;
  background: var(--page-bg); border: 1px solid var(--card-border); border-radius: 6px;
}

/* KPI kartı (iki tonlu) */
.ui2 .kpi { display: block; min-width: 0; padding: 4px; border: 1px solid #e5e7eb; border-radius: 8px; background: #f3f4f6; transition: background-color .15s, border-color .15s; }
.ui2 a.kpi:hover { border-color: #d1d5db; background: rgba(229,231,235,.7); }
.ui2 .kpi-main { padding: 1rem; background: #fff; border-radius: 8px; border-bottom: 1px solid #e5e7eb; }
.ui2 .kpi-foot { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .375rem .5rem .25rem; font-size: .75rem; }

/* İkon kutusu */
.ui2 .icon-box {
  display: inline-flex; flex: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border: 1px solid #d1d5db; border-radius: 8px;
  background: #fff; color: #111827; font-size: 15px;
}

/* Rozet */
.ui2 .tag {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .125rem .5rem; border: 1px solid #e5e7eb; border-radius: 9999px;
  font-size: .75rem; line-height: 1.25rem; font-weight: 600; white-space: nowrap; color: #111827;
}
.ui2 .tag > i { font-size: .6875rem; }
.ui2 .tag-success, .ui2 .tag-warning, .ui2 .tag-error, .ui2 .tag-info, .ui2 .tag-primary, .ui2 .tag-muted,
.ui2 .tag-cold, .ui2 .tag-warm, .ui2 .tag-hot { border-color: transparent; padding: .125rem .625rem; }
.ui2 .tag-success { background: #ecfdf5; color: #047857; }
.ui2 .tag-warning { background: #fffbeb; color: #b45309; }
.ui2 .tag-error   { background: #fef2f2; color: #dc2626; }
.ui2 .tag-info    { background: #eff6ff; color: #1d4ed8; }
.ui2 .tag-primary { background: var(--primary-subtle); color: var(--primary); }
.ui2 .tag-muted   { background: #f3f4f6; color: #4b5563; }
.ui2 .tag-cold    { background: #eff6ff; color: #1d4ed8; }
.ui2 .tag-warm    { background: #fffbeb; color: #b45309; }
.ui2 .tag-hot     { background: #fef2f2; color: #dc2626; }

/* Düğme */
.ui2 .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .375rem;
  font-size: .875rem; font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.ui2 .button:disabled, .ui2 .button.is-disabled { opacity: .5; cursor: default; pointer-events: none; }
.ui2 .button-sm { height: 2rem; padding: 0 .75rem; font-size: .8125rem; border-radius: 6px; }
.ui2 .button-md { height: 2.25rem; padding: 0 1rem; border-radius: 8px; }
.ui2 .button-lg { height: 2.75rem; padding: 0 1.25rem; font-size: .9375rem; border-radius: 8px; }
.ui2 .button-solid { background: var(--primary); color: #fff; border: 1px solid var(--primary); }
.ui2 .button-solid:hover { background: var(--primary-deep); border-color: var(--primary-deep); }
.ui2 .button-default { background: #fff; color: #111827; border: 1px solid #d1d5db; }
.ui2 .button-default:hover { background: #f9fafb; }
.ui2 .button-plain { background: transparent; color: #4b5563; border: 1px solid transparent; }
.ui2 .button-plain:hover { background: #f3f4f6; color: #111827; }
.ui2 .button-danger { background: #ef4444; color: #fff; border: 1px solid #ef4444; }
.ui2 .button-danger:hover { background: #dc2626; border-color: #dc2626; }
.ui2 .button-danger-plain { background: transparent; color: #ef4444; border: 1px solid transparent; }
.ui2 .button-danger-plain:hover { background: #fef2f2; }
.ui2 .button-icon { width: 2.25rem; padding: 0; }
.ui2 .button-icon.button-sm { width: 2rem; }
.ui2 .button:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-subtle); }

/* Düğme görünümlü select */
.ui2 .select-btn {
  appearance: none; -webkit-appearance: none;
  height: 2.25rem; padding: 0 2.25rem 0 .875rem;
  border: 1px solid #d1d5db; border-radius: 8px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23111827' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .75rem center;
  font: inherit; font-size: .875rem; font-weight: 600; color: #111827; cursor: pointer;
}
.ui2 .select-btn:hover { background-color: #f9fafb; }
.ui2 .select-btn:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-subtle); }

/* Form */
.ui2 .form-item { display: flex; flex-direction: column; gap: .375rem; min-width: 0; }
.ui2 .form-label { display: block; margin: 0; font-size: .875rem; font-weight: 600; color: #111827; }
.ui2 .form-label .req { margin-left: 2px; color: #ef4444; }
.ui2 .form-help { margin: 0; font-size: .75rem; line-height: 1.45; color: #6b7280; }
.ui2 .form-error { margin: 0; font-size: .75rem; color: #ef4444; }

.ui2 .input,
.ui2 .form-input, .ui2 .form-select, .ui2 .form-textarea {
  display: block; width: 100%; height: 2.5rem; padding: 0 .875rem;
  border: 1px solid #d1d5db; border-radius: 8px; background: #fff;
  font: inherit; font-size: .875rem; color: #111827;
  transition: border-color .15s, box-shadow .15s;
}
.ui2 .input::placeholder, .ui2 .form-input::placeholder, .ui2 .form-textarea::placeholder { color: #9ca3af; }
.ui2 .input:hover, .ui2 .form-input:hover, .ui2 .form-select:hover, .ui2 .form-textarea:hover { border-color: #9ca3af; }
.ui2 .input:focus, .ui2 .form-input:focus, .ui2 .form-select:focus, .ui2 .form-textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-subtle);
}
.ui2 .input:disabled, .ui2 .input[readonly], .ui2 .form-input:disabled, .ui2 .form-input[readonly] { background: #f9fafb; color: #6b7280; }
.ui2 .input-sm { height: 2.25rem; }
.ui2 textarea.input, .ui2 .form-textarea { height: auto; min-height: 6rem; padding: .625rem .875rem; line-height: 1.55; resize: vertical; }
.ui2 select.input, .ui2 .form-select {
  appearance: none; -webkit-appearance: none; padding-right: 2.25rem; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right .75rem center;
}
.ui2 select.input[multiple], .ui2 select.form-select[multiple] { height: auto; padding: .375rem; background-image: none; }
.ui2 input[type="color"].input { padding: .25rem; }
.ui2 input[type="file"].input { height: auto; padding: .5rem .875rem; }

.ui2 .input-group { display: flex; align-items: stretch; }
.ui2 .input-group > .input { border-radius: 0; }
.ui2 .input-group > :first-child { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.ui2 .input-group > :last-child { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.ui2 .input-addon { display: inline-flex; align-items: center; padding: 0 .75rem; border: 1px solid #d1d5db; background: #f9fafb; color: #6b7280; font-size: .875rem; white-space: nowrap; }
.ui2 .input-group > .input-addon:first-child { border-right: 0; }
.ui2 .input-group > .input-addon:last-child { border-left: 0; }

.ui2 .checkbox, .ui2 .radio { flex: none; width: 1rem; height: 1rem; accent-color: var(--primary); cursor: pointer; }
.ui2 .check-label { display: inline-flex; align-items: flex-start; gap: .5rem; font-size: .875rem; color: #374151; cursor: pointer; }
.ui2 .check-label .checkbox, .ui2 .check-label .radio { margin-top: .1875rem; }

/* Anahtar */
.ui2 .switch-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.ui2 .switcher {
  position: relative; flex: none; display: inline-flex; align-items: center;
  width: 2.5rem; height: 1.375rem; border-radius: 9999px; background: #e5e7eb;
  cursor: pointer; transition: background-color .2s;
}
.ui2 .switcher input { position: absolute; width: 0; height: 0; opacity: 0; }
.ui2 .switcher-toggle { position: absolute; left: .1875rem; width: 1rem; height: 1rem; border-radius: 9999px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .2s; }
.ui2 .switcher.switcher-checked, .ui2 .switcher:has(input:checked) { background: var(--primary); }
.ui2 .switcher.switcher-checked .switcher-toggle, .ui2 .switcher:has(input:checked) .switcher-toggle { transform: translateX(1.125rem); }
.ui2 .switcher:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--primary-subtle); }
.ui2 .switcher:has(input:disabled) { opacity: .5; cursor: default; }

/* Uzun formların yapışkan kaydet çubuğu */
.ui2 .form-actions {
  position: sticky; bottom: 0; z-index: 15;
  display: flex; align-items: center; justify-content: flex-end; gap: .5rem;
  margin-top: 1rem; padding: .75rem 1.25rem;
  background: rgba(255,255,255,.96); border: 1px solid #e5e7eb; border-radius: 8px;
  box-shadow: 0 -6px 16px -12px rgba(17,24,39,.25);
}

/* Tablo */
.ui2 .overflow-x-auto { position: relative; }
.ui2 .table-default { width: 100%; border-collapse: collapse; font-size: .875rem; }
.ui2 .table-default :where(thead th) {
  padding: .75rem 1rem; text-align: left; white-space: nowrap;
  font-size: .75rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: #6b7280;
  border-bottom: 1px solid #e5e7eb; background: transparent;
}
.ui2 .table-default :where(tbody td) { padding: .875rem 1rem; border-top: 1px solid #f3f4f6; color: #4b5563; vertical-align: middle; }
.ui2 .table-default tbody tr:first-child td { border-top: 0; }
.ui2 .table-default.table-hover tbody tr:hover td { background: #f9fafb; }
.ui2 .table-default.table-compact thead th { padding: .5rem; }
.ui2 .table-default.table-compact tbody td { padding: .5rem; }
.ui2 .table-default th.text-right, .ui2 .table-default td.text-right { text-align: right; }
.ui2 .table-default th.text-center, .ui2 .table-default td.text-center { text-align: center; }
.ui2 .cell-title { display: block; font-weight: 500; color: #111827; text-decoration: none; }
.ui2 a.cell-title:hover { color: var(--primary); }
.ui2 .cell-sub { display: block; margin-top: .125rem; font-size: .75rem; color: #6b7280; }

/* Sekmeler */
.ui2 .tab-nav { display: flex; gap: 1.5rem; border-bottom: 1px solid #e5e7eb; overflow-x: auto; scrollbar-width: none; }
.ui2 .tab-nav::-webkit-scrollbar { display: none; }
.ui2 .tab-nav-item {
  display: inline-flex; align-items: center; gap: .375rem;
  padding: .875rem 0; margin-bottom: -1px; border-bottom: 2px solid transparent;
  font-size: .875rem; font-weight: 600; color: #6b7280; white-space: nowrap; text-decoration: none; cursor: pointer;
}
.ui2 .tab-nav-item:hover { color: #111827; }
.ui2 .tab-nav-item.is-active, .ui2 .tab-nav-item.active { color: #111827; border-bottom-color: var(--primary); }
.ui2 .tab-count { padding: 0 .4375rem; border-radius: 9999px; background: #f3f4f6; font-size: .6875rem; line-height: 1.125rem; color: #4b5563; }
.ui2 .tab-nav-item.is-active .tab-count, .ui2 .tab-nav-item.active .tab-count { background: var(--primary-subtle); color: var(--primary); }
.ui2 .page-tabs { padding: 0 1.25rem; background: #fff; border: 1px solid var(--card-border); border-radius: 8px; }
.ui2 .page-tabs > .tab-nav { border-bottom: 0; }

.ui2 .segment { display: inline-flex; padding: .125rem; border: 1px solid #e5e7eb; border-radius: 8px; background: #f3f4f6; }
.ui2 .segment-item {
  display: inline-flex; align-items: center; gap: .375rem; height: 2rem; padding: 0 .75rem;
  border-radius: 6px; font-size: .8125rem; font-weight: 600; color: #6b7280; white-space: nowrap; text-decoration: none; cursor: pointer;
}
.ui2 .segment-item:hover { color: #111827; }
.ui2 .segment-item.is-active, .ui2 .segment-item.active { background: #fff; color: #111827; box-shadow: 0 1px 2px rgba(17,24,39,.08); }

/* Uyarı */
.ui2 .alert { display: flex; align-items: flex-start; gap: .625rem; padding: .75rem 1rem; border: 1px solid transparent; border-radius: 8px; font-size: .875rem; line-height: 1.5; }
.ui2 .alert > i { margin-top: .1875rem; }
.ui2 .alert-info    { background: #eff6ff; color: #1d4ed8; border-color: #dbeafe; }
.ui2 .alert-success { background: #ecfdf5; color: #047857; border-color: #d1fae5; }
.ui2 .alert-warning { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.ui2 .alert-error   { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

/* Boş durum */
.ui2 .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; padding: 2.5rem 1rem; text-align: center; color: #6b7280; font-size: .875rem; }
.ui2 .empty-state > i { margin-bottom: .25rem; font-size: 1.5rem; color: #d1d5db; }
.ui2 .empty-state strong { font-size: .9375rem; font-weight: 600; color: #111827; }

/* Avatar */
.ui2 .avatar {
  display: inline-flex; flex: none; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; border-radius: 9999px; overflow: hidden;
  background: #f3f4f6; color: #4b5563; font-size: .75rem; font-weight: 700; text-transform: uppercase;
}
.ui2 .avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Açılır menü */
.ui2 .dropdown { position: relative; }
.ui2 .dropdown > summary { list-style: none; cursor: pointer; }
.ui2 .dropdown > summary::-webkit-details-marker { display: none; }
.ui2 .dropdown-menu {
  position: absolute; right: 0; top: calc(100% + .375rem); z-index: 30; min-width: 12rem; padding: .375rem;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 10px 30px -12px rgba(17,24,39,.25);
}
.ui2 .dropdown-item { display: flex; width: 100%; align-items: center; gap: .5rem; padding: .5rem .625rem; border-radius: 6px; font-size: .875rem; color: #374151; text-align: left; text-decoration: none; }
.ui2 .dropdown-item:hover { background: #f3f4f6; color: #111827; }
.ui2 .dropdown-item.is-danger { color: #ef4444; }
.ui2 .dropdown-sep { height: 1px; margin: .375rem 0; background: #e5e7eb; }

/* İlerleme çubuğu */
.ui2 .progress, .ui2 .progress-bar { height: 6px; border-radius: 9999px; background: #f3f4f6; overflow: hidden; }
.ui2 .progress-fill { height: 100%; border-radius: 9999px; background: var(--primary); transition: width .6s ease; }

/* İskelet */
.ui2 .skeleton {
  display: inline-block; height: .875em; min-width: 4rem; border-radius: .25rem;
  background: linear-gradient(90deg, #f3f4f6 25%, #e9eaee 37%, #f3f4f6 63%); background-size: 400% 100%;
  animation: ui2-skel 1.4s ease infinite; color: transparent !important;
}
@keyframes ui2-skel { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Sayfalama (partials/pagination.ejs) */
.ui2 .pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; padding: .875rem 1.25rem; border-top: 1px solid #e5e7eb; font-size: .8125rem; }
.ui2 .pager-links { display: flex; align-items: center; gap: .25rem; }
.ui2 .pager-link { display: inline-flex; align-items: center; justify-content: center; min-width: 2rem; height: 2rem; padding: 0 .5rem; border-radius: 6px; font-weight: 600; color: #4b5563; text-decoration: none; }
.ui2 .pager-link:hover { background: #f3f4f6; color: #111827; }
.ui2 .pager-link.is-active { background: var(--primary); color: #fff; }
.ui2 .pager-link.is-disabled { opacity: .4; pointer-events: none; }
.ui2 .pager-gap { padding: 0 .25rem; color: #9ca3af; }

/* ═══════════════════════════════════════════════════════════
   Uyumluluk — eski sınıflar (JS'in bastığı HTML'de kalmış olabilir)
   Yeni işaretlemede kullanma; docs/TASARIM-NOTLARI.md §5.
   ═══════════════════════════════════════════════════════════ */
.ui2 .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .375rem;
  height: 2.25rem; padding: 0 1rem; border: 1px solid #d1d5db; border-radius: 8px;
  background: #fff; color: #111827; font-size: .875rem; font-weight: 600; line-height: 1;
  white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.ui2 .btn:hover { background: #f9fafb; }
.ui2 .btn-sm { height: 2rem; padding: 0 .75rem; font-size: .8125rem; border-radius: 6px; }
.ui2 .btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.ui2 .btn-primary:hover { background: var(--primary-deep); border-color: var(--primary-deep); }
.ui2 .btn-secondary, .ui2 .btn-outline { background: #fff; border-color: #d1d5db; color: #111827; }
.ui2 .btn-danger { background: #ef4444; border-color: #ef4444; color: #fff; }
.ui2 .btn-danger:hover { background: #dc2626; border-color: #dc2626; }
.ui2 .btn:disabled { opacity: .5; cursor: default; }

.ui2 .form-group { margin-bottom: 1rem; }
.ui2 .form-group > .form-label { margin-bottom: .375rem; }

.ui2 .status {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .125rem .625rem; border-radius: 9999px; background: #f3f4f6; color: #4b5563;
  font-size: .75rem; line-height: 1.25rem; font-weight: 600; white-space: nowrap;
}

.ui2 .stat-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid #d1d5db; border-radius: 8px; background: #fff; color: #111827; }

.ui2 .table-wrapper { overflow-x: auto; background: #fff; border: 1px solid var(--card-border); border-radius: 8px; }

.ui2 .modal {
  display: none; position: fixed; inset: 0; z-index: 100;
  align-items: center; justify-content: center; padding: 1rem;
  background: rgba(17,24,39,.4);
}
.ui2 .modal.active { display: flex; }
.ui2 .modal-content {
  display: flex; flex-direction: column; width: 100%; max-width: 600px; max-height: 90vh;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 8px;
  box-shadow: 0 20px 40px -16px rgba(17,24,39,.3);
}
.ui2 .modal-header { flex-shrink: 0; padding: 1rem 1.25rem; border-bottom: 1px solid #e5e7eb; }
.ui2 .modal-body { overflow-y: auto; max-height: calc(90vh - 140px); padding: 1.25rem; }
.ui2 .modal-footer { flex-shrink: 0; display: flex; justify-content: flex-end; gap: .5rem; padding: .875rem 1.25rem; border-top: 1px solid #e5e7eb; background: #f9fafb; border-radius: 0 0 8px 8px; }

/* Animasyon yok: eski sınıflar görünür kalsın */
.ui2 .fade-up { opacity: 1; animation: none; }

/* Kaydırma çubuğu */
.ui2 ::-webkit-scrollbar { width: 8px; height: 8px; }
.ui2 ::-webkit-scrollbar-track { background: transparent; }
.ui2 ::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 9999px; border: 2px solid transparent; background-clip: padding-box; }
.ui2 ::-webkit-scrollbar-thumb:hover { background-color: #9ca3af; }

/* ═══════════════════════════════════════════════════════════
   F1 menü — appbar "Kanal sağlığı" rozeti (layouts/main)
   ═══════════════════════════════════════════════════════════ */
.ui2 .f1-health { gap: 6px; white-space: nowrap; text-decoration: none; }
.ui2 a.f1-health:hover { filter: brightness(.97); }
.ui2 .f1-health .fa-circle { font-size: 7px; }
.ui2 .f1-health-short { display: none; }
@media (max-width: 640px) {
  .ui2 .f1-health-text { display: none; }
  .ui2 .f1-health-short { display: inline; }
}
