/**
 * Nil Bilişim Minimalist ERP Tasarım Sistemi (Adım 207)
 * İlham: İş Takibi Yalın Arayüz Dili + Nil Bilişim Resmi Logo Paleti
 * Ana Renkler: Process Cyan (#009fe3), Kurumsal Mavi (#0082bd), Koyu Mavi (#006da0), Logo Lacivert (#0b4f78)
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

html.theme-filocrm {
  --font-sans: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Nil Bilişim Birleşik Web & Mobil Kurumsal Palet (Açık Tema - Buz Mavisi Dil) */
  --color-primary: #0082bd;
  --color-primary-dark: #006da0;
  --color-navy: #0b4f78;
  --color-accent: #009fe3;
  --color-accent-hover: #0088c4;
  --color-accent-light: #eaf5fd;
  --color-accent-border: #cbe5f6;

  --color-bg-body: #f4f7fb;
  --color-bg-card: #ffffff;
  --color-surface-soft: #f8fbfe;
  --color-border: #e1eaf3;
  --color-border-input: #dbe5f0;

  --color-ink: #0f172a;
  --color-secondary: #5d6f82;
  --color-muted: #8a99a8;

  --color-table-header: #f4f8fc;
  --color-table-header-ink: #5e7184;
  --color-table-row-border: #edf2f8;
  --color-table-hover: #f0f7fe;

  --primary: #0082bd;
  --primary-hover: #006da0;
  --primary-dark: #0b4f78;
}

html.theme-filocrm.dark,
html.theme-filocrm[data-theme="dark"] {
  --color-primary: #009fe3;
  --color-primary-dark: #38bdf8;
  --color-navy: #7dd3fc;
  --color-accent: #38bdf8;
  --color-accent-hover: #009fe3;
  --color-accent-light: #173047;
  --color-accent-border: #254b6d;

  --color-bg-body: #101822;
  --color-bg-card: #172230;
  --color-surface-soft: #131e2a;
  --color-border: #273647;
  --color-border-input: #34475c;

  --color-ink: #e2ecf5;
  --color-secondary: #98adbf;
  --color-muted: #6e8397;

  --color-table-header: #14202d;
  --color-table-header-ink: #96acc0;
  --color-table-row-border: #223142;
  --color-table-hover: #1c2b3b;
}

/* ==========================================================================
   1. Gövde, Tipografi & Sayısal Hizalama
   ========================================================================== */

html.theme-filocrm body {
  color: var(--color-ink);
  background: linear-gradient(180deg, #ebf4fc 0%, #f4f7fb 190px, #f5f7fb 100%) !important;
  background-color: var(--color-bg-body) !important;
  font-family: var(--font-sans) !important;
  letter-spacing: -0.014em;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.theme-filocrm.dark body,
html.theme-filocrm[data-theme="dark"] body {
  background: #0b131e !important;
}

html.theme-filocrm main {
  background: linear-gradient(180deg, #ebf4fc 0%, #f4f7fb 190px, #f5f7fb 100%) !important;
  background-color: var(--color-bg-body) !important;
}

html.theme-filocrm.dark main,
html.theme-filocrm[data-theme="dark"] main {
  background: #0b131e !important;
}

html.theme-filocrm main > header,
html.theme-filocrm main > div > header {
  background: rgba(255, 255, 255, 0.78) !important;
  backdrop-filter: blur(10px);
  border-color: #e1ebf4 !important;
}

html.theme-filocrm.dark main > header,
html.theme-filocrm.dark main > div > header,
html.theme-filocrm[data-theme="dark"] main > header,
html.theme-filocrm[data-theme="dark"] main > div > header {
  background: rgba(18, 29, 42, 0.88) !important;
  border-color: var(--color-border) !important;
}

html.theme-filocrm h1,
html.theme-filocrm h2,
html.theme-filocrm h3,
html.theme-filocrm h4 {
  font-family: var(--font-sans) !important;
  letter-spacing: -0.022em;
  font-weight: 800;
}

html.theme-filocrm .tabular-nums,
html.theme-filocrm [id^="kpi-"],
html.theme-filocrm .font-mono,
html.theme-filocrm td {
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   2. Birleşik Yumuşak Kurumsal Buton Sistemi (Web & Mobil Aynı Dil)
   ========================================================================== */

/* Nötr / İkincil Butonlar */
html.theme-filocrm .admin-3d-button:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]):not([class*="nil-pop-"]),
html.theme-filocrm button.admin-3d-button:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]):not([class*="nil-pop-"]),
html.theme-filocrm a.admin-3d-button:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]):not([class*="nil-pop-"]),
html.theme-filocrm button.bg-slate-100:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]):not([class*="nil-pop-"]),
html.theme-filocrm a.bg-slate-100:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]):not([class*="nil-pop-"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 12px !important;
  color: #24374b !important;
  border: 1px solid #dce6f1 !important;
  background: #ffffff !important;
  box-shadow: 0 1px 3px rgba(15, 35, 55, 0.04) !important;
  text-shadow: none !important;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease, box-shadow 0.14s ease !important;
}

html.theme-filocrm .admin-3d-button:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]):not([class*="nil-pop-"]):hover,
html.theme-filocrm button.bg-slate-100:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]):not([class*="nil-pop-"]):hover,
html.theme-filocrm a.bg-slate-100:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]):not([class*="nil-pop-"]):hover {
  color: #006da0 !important;
  border-color: #b7daf0 !important;
  background: #f0f8fd !important;
  box-shadow: 0 2px 6px rgba(0, 118, 173, 0.08) !important;
  transform: none !important;
}

html.theme-filocrm.dark .admin-3d-button:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]):not([class*="nil-pop-"]),
html.theme-filocrm.dark button.bg-slate-100:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]):not([class*="nil-pop-"]),
html.theme-filocrm.dark a.bg-slate-100:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]):not([class*="nil-pop-"]) {
  color: #d4e2ef !important;
  border: 1px solid #324458 !important;
  background: #1c2a3a !important;
  box-shadow: none !important;
}

html.theme-filocrm.dark .admin-3d-button:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]):not([class*="nil-pop-"]):hover,
html.theme-filocrm.dark button.bg-slate-100:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]):not([class*="nil-pop-"]):hover,
html.theme-filocrm.dark a.bg-slate-100:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]):not([class*="nil-pop-"]):hover {
  background: #233447 !important;
  border-color: #3f6b8c !important;
  color: #7dd3fc !important;
}

/* Primary Kurumsal Butonlar (Okyanus Mavisi Degrade #009fe3 -> #0072b5) */
html.theme-filocrm .admin-3d-button-primary:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]):not([class*="nil-pop-"]),
html.theme-filocrm button.bg-blue-600:not(#ft-app *):not(#detailDialog *):not(#mobile-bottom-nav *):not([class*="nil-mob-"]):not([class*="nil-pop-"]),
html.theme-filocrm a.bg-blue-600:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]):not([class*="nil-pop-"]),
html.theme-filocrm button.bg-blue-700:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]):not([class*="nil-pop-"]),
html.theme-filocrm a.bg-blue-700:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]):not([class*="nil-pop-"]),
html.theme-filocrm button.bg-slate-900:not(.filtre-btn-tur):not(.filtre-btn-durum):not(.drawer-tab-btn):not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]):not([class*="nil-pop-"]),
html.theme-filocrm a.bg-slate-900:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]):not([class*="nil-pop-"]),
html.theme-filocrm .btn-primary:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]):not([class*="nil-pop-"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 12px !important;
  color: #ffffff !important;
  border: 0 !important;
  background: linear-gradient(135deg, #009fe3 0%, #0072b5 100%) !important;
  box-shadow: 0 3px 10px rgba(0, 118, 173, 0.22) !important;
  text-shadow: none !important;
  cursor: pointer;
  text-decoration: none;
  transition: filter 0.14s ease, box-shadow 0.14s ease !important;
}

html.theme-filocrm .admin-3d-button-primary:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]):not([class*="nil-pop-"]):hover,
html.theme-filocrm button.bg-blue-600:not(#ft-app *):not(#detailDialog *):not(#mobile-bottom-nav *):not([class*="nil-mob-"]):not([class*="nil-pop-"]):hover,
html.theme-filocrm a.bg-blue-600:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]):not([class*="nil-pop-"]):hover,
html.theme-filocrm button.bg-slate-900:not(.filtre-btn-tur):not(.filtre-btn-durum):not(.drawer-tab-btn):not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]):not([class*="nil-pop-"]):hover,
html.theme-filocrm a.bg-slate-900:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]):not([class*="nil-pop-"]):hover,
html.theme-filocrm .btn-primary:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]):not([class*="nil-pop-"]):hover {
  color: #ffffff !important;
  background: linear-gradient(135deg, #0086c4 0%, #005f98 100%) !important;
  box-shadow: 0 4px 12px rgba(0, 118, 173, 0.28) !important;
  transform: none !important;
}

/* Soft Blue Butonlar (Nil Açık Mavi) */
html.theme-filocrm a.bg-blue-50:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]),
html.theme-filocrm button.bg-blue-50:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 12px !important;
  color: #006da0 !important;
  border: 1px solid #cbe5f6 !important;
  background: #eaf5fc !important;
  box-shadow: none !important;
  transition: background-color 0.14s ease, border-color 0.14s ease !important;
}

html.theme-filocrm a.bg-blue-50:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):hover,
html.theme-filocrm button.bg-blue-50:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):hover {
  background: #daf0fc !important;
  border-color: #a6d5f2 !important;
  color: #0b4f78 !important;
  transform: none !important;
}

html.theme-filocrm.dark a.bg-blue-50:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]),
html.theme-filocrm.dark button.bg-blue-50:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]) {
  color: #7dd3fc !important;
  border-color: #254b6d !important;
  background: #173047 !important;
}

html.theme-filocrm.dark a.bg-blue-50:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):hover,
html.theme-filocrm.dark button.bg-blue-50:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):hover {
  background: #1e3d59 !important;
}

/* Başarı / Excel Butonları (Yumuşak Zümrüt) */
html.theme-filocrm .admin-3d-button-success:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]),
html.theme-filocrm button.bg-emerald-600:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]),
html.theme-filocrm a.bg-emerald-600:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]),
html.theme-filocrm button.bg-green-600:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]),
html.theme-filocrm a.bg-green-600:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 12px !important;
  color: #ffffff !important;
  border: 0 !important;
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
  box-shadow: 0 3px 10px rgba(22, 163, 74, 0.2) !important;
  text-shadow: none !important;
  cursor: pointer;
  transition: filter 0.14s ease !important;
}

html.theme-filocrm .admin-3d-button-success:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]):hover,
html.theme-filocrm button.bg-emerald-600:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]):hover,
html.theme-filocrm a.bg-emerald-600:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]):hover {
  background: linear-gradient(135deg, #15803d 0%, #166534 100%) !important;
  transform: none !important;
}

/* Tehlike / Silme Butonları (Yumuşak Kırmızı) */
html.theme-filocrm .admin-3d-button-danger:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]),
html.theme-filocrm button.bg-rose-600:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]),
html.theme-filocrm a.bg-rose-600:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]),
html.theme-filocrm button.bg-red-600:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]),
html.theme-filocrm a.bg-red-600:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 12px !important;
  color: #ffffff !important;
  border: 0 !important;
  background: linear-gradient(135deg, #e11d48 0%, #be123c 100%) !important;
  box-shadow: 0 3px 10px rgba(225, 29, 72, 0.2) !important;
  text-shadow: none !important;
  cursor: pointer;
  transition: filter 0.14s ease !important;
}

html.theme-filocrm .admin-3d-button-danger:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]):hover,
html.theme-filocrm button.bg-rose-600:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]):hover,
html.theme-filocrm a.bg-rose-600:not(#ft-app *):not(#detailDialog *):not([class*="rounded-full"]):not([class*="nil-mob-"]):hover {
  background: linear-gradient(135deg, #be123c 0%, #9f1239 100%) !important;
  transform: none !important;
}

/* Kurumsal Lacivert / İndigo Butonlar */
html.theme-filocrm button.bg-indigo-600:not(#ft-app *):not(#detailDialog *),
html.theme-filocrm a.bg-indigo-600:not(#ft-app *):not(#detailDialog *) {
  color: #ffffff !important;
  border: 0 !important;
  background: linear-gradient(135deg, #3574b5 0%, #1c4b7d 100%) !important;
  box-shadow: 0 3px 10px rgba(36, 93, 153, 0.2) !important;
  border-radius: 12px !important;
  font-weight: 700;
  transition: filter 0.14s ease !important;
}

html.theme-filocrm button.bg-indigo-600:not(#ft-app *):not(#detailDialog *):hover,
html.theme-filocrm a.bg-indigo-600:not(#ft-app *):not(#detailDialog *):hover {
  background: linear-gradient(135deg, #245d99 0%, #173d66 100%) !important;
  transform: none !important;
}

html.theme-filocrm main > header button,
html.theme-filocrm main > header a,
html.theme-filocrm main > div > header button,
html.theme-filocrm main > div > header a,
html.theme-filocrm main > .sticky button.bg-emerald-600,
html.theme-filocrm main > .sticky a.bg-emerald-600,
html.theme-filocrm main > .sticky button.bg-blue-600,
html.theme-filocrm main > .sticky a.bg-blue-600,
html.theme-filocrm main > .sticky a.bg-indigo-600,
html.theme-filocrm main > div > .sticky a.bg-blue-600,
html.theme-filocrm main > div > .sticky a.bg-indigo-600 {
  white-space: nowrap !important;
}

/* Hap butonlar (rounded-full) yuvarlak kalır */
html.theme-filocrm a.rounded-full,
html.theme-filocrm button.rounded-full,
html.theme-filocrm .rounded-full {
  border-radius: 9999px !important;
}

/* Güneş / Ay Tema Hapı (İş Takibi Üst Bar Düğmesi) */
html.theme-filocrm .nil-theme-pill {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: #eef2f6;
  border: 1px solid #dce4ec;
  border-radius: 18px;
  min-height: 30px;
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

@media (max-width: 1023px) {
  html.theme-filocrm .nil-theme-pill,
  .nil-theme-pill {
    display: none !important;
  }
}

html.theme-filocrm .nil-theme-pill:hover {
  border-color: #b7daf0;
}

html.theme-filocrm .nil-theme-pill > span {
  width: 26px;
  height: 24px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8b9bad;
  transition: background-color 0.14s ease, color 0.14s ease;
}

html.theme-filocrm .nil-theme-pill .sun-icon {
  background: #ffffff;
  color: #c28e3a;
  box-shadow: 0 1px 3px rgba(15, 35, 55, 0.08);
}

html.theme-filocrm.dark .nil-theme-pill,
html.theme-filocrm[data-theme="dark"] .nil-theme-pill {
  background: #172331;
  border-color: #324458;
}

html.theme-filocrm.dark .nil-theme-pill .sun-icon,
html.theme-filocrm[data-theme="dark"] .nil-theme-pill .sun-icon {
  background: transparent;
  color: #7c92a6;
  box-shadow: none;
}

html.theme-filocrm.dark .nil-theme-pill .moon-icon,
html.theme-filocrm[data-theme="dark"] .nil-theme-pill .moon-icon {
  background: #223b52;
  color: #7dd3fc;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   3. Sol Menü & Tıklayınca Aşağı Doğru Açılan Akordiyon Mimarisi
   ========================================================================== */

html.theme-filocrm #app-sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
  border-right: 1px solid #e1ebf4 !important;
}

html.theme-filocrm.dark #app-sidebar {
  background: #101a26 !important;
  border-right: 1px solid var(--color-border) !important;
}

/* Aşağı Doğru Yumuşak Açılır Menü Paneli */
html.theme-filocrm #app-sidebar .nil-acc-body {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.22s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.18s ease;
}

html.theme-filocrm #app-sidebar .nil-acc-body.is-open {
  grid-template-rows: 1fr;
  opacity: 1;
}

html.theme-filocrm #app-sidebar .nil-acc-inner {
  overflow: hidden;
  padding-top: 2px;
}

html.theme-filocrm #app-sidebar .nil-acc-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.52rem 0.7rem;
  border-radius: 12px;
  font-size: 0.80rem;
  font-weight: 600;
  color: #33475b;
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

html.theme-filocrm #app-sidebar .nil-acc-trigger:hover {
  background-color: #eef6fd;
  color: #0b4f78;
}

html.theme-filocrm #app-sidebar .nil-acc-trigger.is-active-group {
  background-color: #edf6fd;
  color: #0072b5;
  border-color: #d3e9f9;
  font-weight: 700;
}

html.theme-filocrm.dark #app-sidebar .nil-acc-trigger {
  color: #b4c5d6;
}

html.theme-filocrm.dark #app-sidebar .nil-acc-trigger:hover {
  background-color: #1b2a38;
  color: #e2ecf5;
}

html.theme-filocrm.dark #app-sidebar .nil-acc-trigger.is-active-group {
  background-color: #172b3e;
  color: #7dd3fc;
  border-color: #254563;
}

/* Sol Menü Linkleri (Mobil Aktif Sekme Diliyle Birebir Uyumlu) */
html.theme-filocrm #app-sidebar .sidebar-link {
  font-family: var(--font-sans);
  font-weight: 550;
  font-size: 0.785rem;
  color: #55687b;
  border-radius: 12px;
  border: 1px solid transparent !important;
  padding: 0.46rem 0.7rem;
  transition: background-color 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

html.theme-filocrm.dark #app-sidebar .sidebar-link {
  color: #98adbf;
}

html.theme-filocrm #app-sidebar .sidebar-link:hover {
  background-color: #eef6fd !important;
  color: #006da0 !important;
}

html.theme-filocrm.dark #app-sidebar .sidebar-link:hover {
  background-color: #1b2a38 !important;
  color: #7dd3fc !important;
}

html.theme-filocrm #app-sidebar .sidebar-link.active,
html.theme-filocrm #app-sidebar a.active {
  background: #eaf5fd !important;
  color: #0072b5 !important;
  border: 1px solid #cde6fa !important;
  font-weight: 700 !important;
  box-shadow: 0 1px 4px rgba(0, 118, 173, 0.08) !important;
}

html.theme-filocrm #app-sidebar .sidebar-link.active i,
html.theme-filocrm #app-sidebar .sidebar-link.active svg {
  color: #0082bd !important;
}

html.theme-filocrm.dark #app-sidebar .sidebar-link.active,
html.theme-filocrm.dark #app-sidebar a.active {
  background: #173047 !important;
  color: #7dd3fc !important;
  border: 1px solid #264c6e !important;
}

html.theme-filocrm.dark #app-sidebar .sidebar-link.active i,
html.theme-filocrm.dark #app-sidebar .sidebar-link.active svg {
  color: #38bdf8 !important;
}

/* ==========================================================================
   4. İş Takibi Stili Ferah ERP Tabloları (Koyu Lacivert Başlık Yok)
   ========================================================================== */

html.theme-filocrm table:not(#ft-app *):not(#detailDialog *):not(.no-global-table) {
  font-family: var(--font-sans);
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

html.theme-filocrm table:not(#ft-app *):not(#detailDialog *):not(.no-global-table) thead {
  background: var(--color-table-header) !important;
  color: var(--color-table-header-ink) !important;
}

html.theme-filocrm table:not(#ft-app *):not(#detailDialog *):not(.no-global-table) thead th {
  background: var(--color-table-header) !important;
  color: var(--color-table-header-ink) !important;
  font-size: 0.6875rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 11px 15px !important;
  border-bottom: 1px solid var(--color-border) !important;
  vertical-align: middle;
}

html.theme-filocrm table:not(#ft-app *):not(#detailDialog *):not(.no-global-table) thead th span,
html.theme-filocrm table:not(#ft-app *):not(#detailDialog *):not(.no-global-table) thead th i,
html.theme-filocrm table:not(#ft-app *):not(#detailDialog *):not(.no-global-table) thead th svg,
html.theme-filocrm table:not(#ft-app *):not(#detailDialog *):not(.no-global-table) thead th div {
  color: var(--color-table-header-ink) !important;
}

html.theme-filocrm table:not(#ft-app *):not(#detailDialog *):not(.no-global-table) thead th:hover,
html.theme-filocrm table:not(#ft-app *):not(#detailDialog *):not(.no-global-table) thead th:hover span,
html.theme-filocrm table:not(#ft-app *):not(#detailDialog *):not(.no-global-table) thead th:hover i,
html.theme-filocrm table:not(#ft-app *):not(#detailDialog *):not(.no-global-table) thead th:hover svg {
  color: var(--color-primary-dark) !important;
}

html.theme-filocrm table:not(#ft-app *):not(#detailDialog *):not(.no-global-table) thead th input[type="checkbox"] {
  accent-color: #009fe3;
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  vertical-align: middle;
}

html.theme-filocrm table:not(#ft-app *):not(#detailDialog *):not(.no-global-table) tbody tr {
  border-bottom: 1px solid var(--color-table-row-border);
  background-color: transparent;
  transition: background-color 0.12s ease;
}

html.theme-filocrm table:not(#ft-app *):not(#detailDialog *):not(.no-global-table) tbody tr:nth-child(even) {
  background-color: transparent;
}

html.theme-filocrm table:not(#ft-app *):not(#detailDialog *):not(.no-global-table) tbody tr:hover,
html.theme-filocrm .table-row-hover:hover {
  background-color: var(--color-table-hover) !important;
}

html.theme-filocrm table:not(#ft-app *):not(#detailDialog *):not(.no-global-table) tbody td {
  font-size: 0.765rem;
  font-variant-numeric: tabular-nums;
  padding: 12px 15px;
  border-bottom: 1px solid var(--color-table-row-border);
  vertical-align: middle;
}

html.theme-filocrm table:not(#ft-app *):not(#detailDialog *):not(.no-global-table) tbody tr:last-child td {
  border-bottom: 0;
}

/* ==========================================================================
   5. Kartlar, Paneller, Formlar & İç Sekmeler
   ========================================================================== */

html.theme-filocrm .admin-card,
html.theme-filocrm .stat-box,
html.theme-filocrm main .bg-white:not(#ft-app *):not(#detailDialog *):not(button):not(a) {
  border-color: var(--color-border);
}

html.theme-filocrm .admin-card,
html.theme-filocrm main .rounded-2xl.bg-white:not(#ft-app *):not(#detailDialog *):not([class*="nil-mob-"]):not([class*="nil-pop-"]):not([class*="nil-desk-"]) {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 17px;
  box-shadow: 0 3px 12px rgba(15, 35, 55, 0.04);
}

html.theme-filocrm.dark .admin-card,
html.theme-filocrm.dark .bg-slate-900:not(#ft-app *):not(#detailDialog *),
html.theme-filocrm.dark .bg-slate-850:not(#ft-app *):not(#detailDialog *) {
  background-color: var(--color-bg-card) !important;
  border-color: var(--color-border) !important;
}

html.theme-filocrm .stat-box {
  border-radius: 16px !important;
  border: 1px solid var(--color-border) !important;
  box-shadow: 0 2px 8px rgba(15, 35, 55, 0.03) !important;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

html.theme-filocrm .stat-box:hover {
  border-color: #b7daf0 !important;
  box-shadow: 0 4px 14px rgba(0, 130, 189, 0.08) !important;
  transform: none;
}

/* Form Elemanları (Birleşik Yumuşak Çerçeve) */
html.theme-filocrm input[type="text"]:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *),
html.theme-filocrm input[type="email"]:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *),
html.theme-filocrm input[type="password"]:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *),
html.theme-filocrm input[type="number"]:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *),
html.theme-filocrm input[type="tel"]:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *),
html.theme-filocrm input[type="date"]:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *),
html.theme-filocrm input[type="time"]:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *),
html.theme-filocrm input[type="datetime-local"]:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *),
html.theme-filocrm input[type="search"]:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *),
html.theme-filocrm input[type="url"]:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *),
html.theme-filocrm select:not(#ft-app *):not(#detailDialog *):not(.nil-mob-status-pill):not(.sd-bare-select):not(.se-bare-select),
html.theme-filocrm textarea:not(#ft-app *):not(#detailDialog *):not(.sd-bare-textarea):not(.se-bare-textarea),
html.theme-filocrm .admin-input:not(#ft-app *):not(#detailDialog *) {
  border: 1px solid var(--color-border-input) !important;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  background-color: #f8fbfe;
  color: var(--color-ink);
  box-shadow: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

html.theme-filocrm.dark input[type="text"]:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *),
html.theme-filocrm.dark input[type="email"]:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *),
html.theme-filocrm.dark input[type="password"]:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *),
html.theme-filocrm.dark input[type="number"]:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *),
html.theme-filocrm.dark input[type="tel"]:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *),
html.theme-filocrm.dark input[type="date"]:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *),
html.theme-filocrm.dark input[type="time"]:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *),
html.theme-filocrm.dark input[type="search"]:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *),
html.theme-filocrm.dark input[type="url"]:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *),
html.theme-filocrm.dark select:not(#ft-app *):not(#detailDialog *):not(.nil-mob-status-pill):not(.sd-bare-select):not(.se-bare-select),
html.theme-filocrm.dark textarea:not(#ft-app *):not(#detailDialog *):not(.sd-bare-textarea):not(.se-bare-textarea) {
  background-color: #131e2a !important;
  border-color: var(--color-border-input) !important;
  color: var(--color-ink) !important;
}

html.theme-filocrm input:not([class*="bg-transparent"]):not(#ft-app *):not(#detailDialog *):focus,
html.theme-filocrm select:not(#ft-app *):not(#detailDialog *):not(.sd-bare-select):not(.se-bare-select):focus,
html.theme-filocrm textarea:not(#ft-app *):not(#detailDialog *):not(.sd-bare-textarea):not(.se-bare-textarea):focus {
  border-color: var(--color-accent) !important;
  box-shadow: 0 0 0 3px rgba(0, 159, 227, 0.16) !important;
  outline: none !important;
}

/* Sayfa İçi Takvim & Kart Yüzeyleri */
html.theme-filocrm .takvim-gun-kutu {
  min-height: 118px;
  background-color: var(--color-bg-card);
  transition: background-color 0.14s ease, box-shadow 0.14s ease;
}

html.theme-filocrm .takvim-gun-kutu:hover {
  background-color: var(--color-table-hover) !important;
  box-shadow: inset 0 0 0 1px var(--color-accent-border);
}

html.theme-filocrm .takvim-kalem-kart {
  border-radius: 7px;
  font-size: 0.70rem;
  font-weight: 600;
  padding: 0.25rem 0.45rem;
  transition: background-color 0.14s ease;
  box-shadow: none;
}

html.theme-filocrm #kpi-toplam-gelir,
html.theme-filocrm #kpi-toplam-gider,
html.theme-filocrm #kpi-net-denge {
  font-family: var(--font-sans);
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}

/* Rozetler (.admin-badge) */
html.theme-filocrm .admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 9999px;
  font-weight: 650;
  font-size: 0.72rem;
  padding: 0.22rem 0.65rem;
  line-height: 1;
  letter-spacing: 0.015em;
}

html.theme-filocrm .admin-badge-primary { background: #eaf5fc; color: #006da0; }
html.theme-filocrm .admin-badge-success { background: #e8f5ed; color: #28754b; }
html.theme-filocrm .admin-badge-warning { background: #fff5df; color: #8a6117; }
html.theme-filocrm .admin-badge-danger  { background: #fff0f1; color: #b82737; }
html.theme-filocrm .admin-badge-teal    { background: #e8f6f5; color: #166a65; }

/* Kaydırma Çubukları & Seçim */
html.theme-filocrm ::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

html.theme-filocrm ::-webkit-scrollbar-track {
  background: transparent;
}

html.theme-filocrm ::-webkit-scrollbar-thumb {
  background: #cdd7e2;
  border-radius: 9999px;
}

html.theme-filocrm ::-webkit-scrollbar-thumb:hover {
  background: #9eb0c2;
}

html.theme-filocrm.dark ::-webkit-scrollbar-thumb {
  background: #304256;
}

html.theme-filocrm.dark ::-webkit-scrollbar-thumb:hover {
  background: #435b75;
}

html.theme-filocrm ::selection {
  background-color: rgba(0, 159, 227, 0.22) !important;
  color: #0b4f78 !important;
}

html.theme-filocrm .border-b-2.border-blue-600,
html.theme-filocrm .border-b-2.border-indigo-600 {
  border-color: #009fe3 !important;
  color: #006da0 !important;
}

/* Sayfa İçi Modül Pill / Sekme Şeritleri (İş Takibi .chip / .nav-button Uyumu) */
html.theme-filocrm main > .flex-shrink-0.z-10.border-b a {
  border-radius: 9px !important;
  font-weight: 600 !important;
  border: 1px solid transparent;
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

html.theme-filocrm main > .flex-shrink-0.z-10.border-b a[class*="bg-emerald-500"],
html.theme-filocrm main > .flex-shrink-0.z-10.border-b a[class*="bg-blue-600"],
html.theme-filocrm main > .flex-shrink-0.z-10.border-b a[class*="bg-rose-600"],
html.theme-filocrm main > .flex-shrink-0.z-10.border-b a[class*="bg-amber-600"],
html.theme-filocrm main > .flex-shrink-0.z-10.border-b a[class*="bg-purple-600"],
html.theme-filocrm main > .flex-shrink-0.z-10.border-b a[class*="bg-teal-600"] {
  background: #eaf5fc !important;
  color: #006da0 !important;
  border-color: #cbe5f6 !important;
  box-shadow: none !important;
}

html.theme-filocrm.dark main > .flex-shrink-0.z-10.border-b a[class*="bg-emerald-500"],
html.theme-filocrm.dark main > .flex-shrink-0.z-10.border-b a[class*="bg-blue-600"],
html.theme-filocrm.dark main > .flex-shrink-0.z-10.border-b a[class*="bg-rose-600"],
html.theme-filocrm.dark main > .flex-shrink-0.z-10.border-b a[class*="bg-amber-600"],
html.theme-filocrm.dark main > .flex-shrink-0.z-10.border-b a[class*="bg-purple-600"],
html.theme-filocrm.dark main > .flex-shrink-0.z-10.border-b a[class*="bg-teal-600"] {
  background: #173047 !important;
  color: #7dd3fc !important;
  border-color: #254b6d !important;
}

/* ==========================================================================
   6. Laptop (1024px - 1535px) Uyum Optimizasyonu
   ========================================================================== */

@media (min-width: 1024px) and (max-width: 1535px) {
  #app-sidebar,
  aside#app-sidebar {
    width: 224px !important;
    min-width: 224px !important;
    max-width: 224px !important;
    flex-basis: 224px !important;
  }

  #app-sidebar .sidebar-link {
    font-size: 0.74rem !important;
    padding: 0.36rem 0.55rem !important;
    gap: 0.45rem !important;
  }

  #app-sidebar .nil-acc-trigger {
    font-size: 0.75rem !important;
    padding: 0.42rem 0.55rem !important;
  }

  main > .p-6:not(#ft-app),
  main > .p-8:not(#ft-app),
  main > .lg\:p-8:not(#ft-app),
  main .p-6.lg\:p-8:not(#ft-app),
  main > div.p-6.lg\:p-8:not(#ft-app),
  main > div.p-6:not(#ft-app),
  main > div.p-8:not(#ft-app),
  main > div.px-8:not(#ft-app),
  main > div.py-6:not(#ft-app),
  .flex-1.overflow-auto.px-8.py-6 {
    padding-left: 1.15rem !important;
    padding-right: 1.15rem !important;
    padding-top: 0.95rem !important;
    padding-bottom: 0.95rem !important;
  }

  main header.px-6:not(#ft-app *),
  main header.lg\:px-8:not(#ft-app *),
  main header.p-6:not(#ft-app *),
  main header.py-5:not(#ft-app *),
  main header.px-8:not(#ft-app *) {
    padding-left: 1.15rem !important;
    padding-right: 1.15rem !important;
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  html.theme-filocrm table:not(#ft-app *):not(#detailDialog *):not(.no-global-table) thead th {
    padding: 8px 10px !important;
    font-size: 0.65rem !important;
  }

  html.theme-filocrm table:not(#ft-app *):not(#detailDialog *):not(.no-global-table) tbody td {
    padding: 8px 10px !important;
    font-size: 0.72rem !important;
  }

  html.theme-filocrm .admin-3d-button:not(#ft-app *):not(#detailDialog *),
  html.theme-filocrm .admin-3d-button-primary:not(#ft-app *):not(#detailDialog *),
  html.theme-filocrm .admin-3d-button-success:not(#ft-app *):not(#detailDialog *),
  html.theme-filocrm .admin-3d-button-danger:not(#ft-app *):not(#detailDialog *) {
    padding: 0.38rem 0.72rem !important;
    font-size: 0.72rem !important;
  }
}

@media print {
  #app-sidebar,
  #mobile-bottom-nav,
  #floatingAiContainer,
  .nil-theme-pill,
  #global-top-center-search {
    display: none !important;
  }
  body,
  main {
    background: #ffffff !important;
    overflow: visible !important;
  }
}

/* Mobil Alt Bar & Saha Arayüzü Garanti Stilleri (iOS Safari + Tailwind CDN Uyum) */
#mobile-bottom-nav .nil-mobile-fab {
  width: 3rem !important;
  height: 3rem !important;
  border-radius: 1rem !important;
  background-color: #0082bd !important;
  color: #ffffff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: 0 8px 18px rgba(0, 130, 189, 0.35) !important;
  border: 2px solid #ffffff !important;
}

html.theme-filocrm.dark #mobile-bottom-nav .nil-mobile-fab {
  border-color: #141f2b !important;
  box-shadow: 0 8px 18px rgba(0, 159, 227, 0.3) !important;
}

#mobile-bottom-nav .nil-mobile-fab svg,
#mobile-bottom-nav .nil-mobile-fab i {
  color: #ffffff !important;
  stroke: #ffffff !important;
}

@media (max-width: 767px) {
  .nil-scroll-strip {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .nil-scroll-strip::-webkit-scrollbar {
    display: none;
  }
  .nil-pill-nowrap {
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
  .nil-touch-compact {
    min-height: 0 !important;
  }
}

@media (min-width: 640px) {
  html.theme-filocrm .sm\:hidden {
    display: none !important;
  }
}

@media (min-width: 768px) {
  html.theme-filocrm .md\:hidden {
    display: none !important;
  }
}
