/* Arı CRM — MyBasicCRM şablonu (orijinal renk ve tasarım kimliği korunur) */
:root {
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --app-max-width: 1380px;

  /* Geriye Dönük Uyumluluk (Legacy Temel Değişkenler - MyBasic Varsayılanı) */
  --bar: #3b5998;
  --bar-ink: #ffffff;
  --side: #5f7ec4;
  --side-on: #3b5998;
  --side-on-ink: #ffffff;
  --bg: #f3f5fa;
  --card: #ffffff;
  --ink: #1c2230;
  --quiet: #667085;
  --line: #c9d2e6;
  --soft: #e6eaf4;
  --label: #a8554f;
  --link: #3b5998;
  --accent: #ffd400;
  --accent-ink: #0d0d0d;
  --accent-text: #806a00;
  --bad: #b3392f;
  --ok: #2f7d4f;
  --chip: #e9edf7;
  --head: #f3f5fa;
  --fab2: #6f8fd8;

  /* Semantik Katman & Yüzey Tokenları (Radix & Shadcn Standardı) */
  --surface-page: var(--bg);
  --surface-card: var(--card);
  --surface-subtle: var(--soft);
  --surface-elevated: var(--card);
  --surface-overlay: rgba(15, 23, 42, 0.6);

  /* Panel & Çerçeve Uyumluluğu */
  --panel-bg: var(--card);
  --panel-subtle: var(--soft);
  --border: var(--line);
  --border-subtle: var(--line);
  --border-strong: #94a3b8;
  --border-focus: var(--link, var(--bar));

  /* Tipografi & Kontrast */
  --text-primary: var(--ink);
  --text-secondary: var(--quiet);
  --text-muted: #94a3b8;
  --text-inverse: #ffffff;
  --muted: var(--quiet);

  /* Renk & Vurgu */
  --color-accent: var(--accent);
  --color-accent-ink: var(--accent-ink);
  --color-accent-soft: rgba(255, 212, 0, 0.16);
  --color-focus-ring: rgba(59, 89, 152, 0.25);

  /* Durum Renkleri */
  --status-success: var(--ok);
  --status-warning: var(--accent);
  --status-danger: var(--bad);
  --status-info: #3b82f6;

  /* Geometri & Radius */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-pill: 9999px;
  --radius-component: 8px;
}
* {
  box-sizing: border-box;
}
html {
  touch-action: manipulation;
  -webkit-text-size-adjust: 100%;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  font:
    14px/1.5 -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    system-ui,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  color: var(--ink);
}
a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  text-decoration: none;
  filter: brightness(1.1);
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
.top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(48px + var(--safe-top));
  padding-top: var(--safe-top);
  padding-left: calc(16px + var(--safe-left));
  padding-right: calc(16px + var(--safe-right));
  background: var(--bar);
  color: var(--bar-ink, #fff);
  display: flex;
  align-items: center;
  gap: 14px;
  z-index: 20;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.top .burger {
  background: none;
  border: 0;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  opacity: 0.85;
  transition: opacity 0.15s, background 0.15s;
}
.top .burger:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}
.top .logo {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.4px;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 2px;
}
.top .logo b {
  color: var(--accent);
}
/* Arama kutusu ortadaki sütunun sol kenarıyla aynı hizada durur (--sw: yan menü, --cw: sütun genişliği).
   Şirket adı uzunsa kutu adın üstüne binmez: --lw logonun sağ kenarıdır (client/app.js shell() içinde ölçülür).
   Sağda asistan, takvim ve hesap düğmelerine yer kalsın diye genişlik daralır. */
:root {
  --app-max-width: 1380px;
}
.top {
  --sw: 224px;
  --cw: var(--app-max-width);
  --rw: 0px;
}
.top.wide {
  --cw: var(--app-max-width);
}
body.noside .top {
  --sw: 0px;
}
body.side-collapsed .top {
  --sw: 64px;
}
.top .search {
  --sx: max(var(--lw, 170px), calc(var(--sw) + 16px + max(0px, (100% - var(--sw) - var(--rw) - 32px - var(--cw)) / 2)));
  position: absolute;
  left: var(--sx);
  width: clamp(160px, calc(100% - var(--sx) - 340px), 360px);
  min-width: 0;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 0 12px;
  height: 32px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: all 0.15s ease;
}
.top .search:focus-within {
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25), 0 2px 8px rgba(0, 0, 0, 0.1);
}
.top .search input {
  border: 0;
  outline: 0;
  background: none;
  width: 100%;
  color: #0f172a;
  padding: 0 8px;
  font-size: 13px;
}
.top .search span {
  color: #64748b;
  font-size: 14px;
}
/* Gelişmiş Kullanıcı Profil & Hesap Menüsü Dropdown (2026 Admin Suite) */
.user-menu-wrap {
  position: relative;
  margin-left: auto;
  display: flex;
  align-items: center;
}
.user-menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 24px;
  padding: 4px 14px 4px 5px;
  color: #fff;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 13.5px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.user-menu-btn:hover,
.user-menu-wrap.open .user-menu-btn {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}
.u-avatar-top {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink, #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
  position: relative;
  letter-spacing: -0.5px;
}
.u-status-dot {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  border: 1.5px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1), 0 0 5px rgba(16, 185, 129, 0.7);
}
.u-status-dot.lg {
  width: 11px;
  height: 11px;
  border: 2px solid var(--card);
  bottom: 1px;
  right: 1px;
}
.user-menu-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.user-menu-chevron {
  font-size: 11px;
  opacity: 0.8;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  margin-left: 1px;
}
.user-menu-wrap.open .user-menu-chevron {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 300px;
  max-width: calc(100vw - 20px);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 16px 36px -6px rgba(0, 0, 0, 0.2), 0 6px 16px rgba(0, 0, 0, 0.08);
  padding: 8px 0 10px;
  z-index: 1000;
  animation: ddSlideDown 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes ddSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
.user-dd-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px 12px;
  background: var(--soft);
  margin: -8px 0 6px;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
  border-bottom: 1px solid var(--line);
}
.user-dd-header .u-avatar {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink, #ffffff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
}
.user-dd-meta {
  flex: 1;
  min-width: 0;
}
.user-dd-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.user-dd-handle {
  font-size: 12px;
  color: var(--quiet);
  margin-top: 2px;
}
.user-dd-handle code {
  background: transparent;
  padding: 0;
  color: var(--quiet);
  font-size: 11.5px;
}
.user-dd-role {
  margin-top: 5px;
}

/* Hızlı Tema Seçici Bar (Dropdown İçi) */
.user-dd-theme-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 14px 10px;
}
.user-dd-theme-title {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--quiet);
}
.user-dd-theme-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: var(--soft);
  padding: 4px;
  border-radius: 8px;
  border: 1px solid var(--line);
}
.theme-pill {
  border: 0;
  background: transparent;
  padding: 6px 4px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--quiet);
  cursor: pointer;
  transition: all 0.12s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
}
.theme-pill:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
}
.theme-pill.active {
  background: var(--card);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.user-dd-links {
  display: flex;
  flex-direction: column;
  padding: 2px 8px;
  gap: 2px;
}
.user-dd-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--ink);
  text-decoration: none;
  transition: all 0.14s ease;
  cursor: pointer;
}
.user-dd-item:hover {
  background: var(--soft);
  color: var(--link);
  transform: translateX(2px);
}
.user-dd-icon {
  font-size: 16px;
  width: 22px;
  text-align: center;
  flex-shrink: 0;
}
.user-dd-item-text {
  flex: 1;
  min-width: 0;
}
.user-dd-item-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
}
.user-dd-item-sub {
  font-size: 11px;
  color: var(--quiet);
  margin-top: 2px;
}
.user-dd-arrow {
  font-size: 15px;
  color: var(--quiet);
  opacity: 0.6;
  font-weight: 600;
  transition: transform 0.12s ease;
}
.user-dd-item:hover .user-dd-arrow {
  opacity: 1;
  color: var(--link);
  transform: translateX(2px);
}

.user-dd-sep {
  height: 1px;
  background: var(--line);
  margin: 6px 0;
}
.user-dd-footer {
  padding: 2px 8px 0;
}
.user-dd-logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  color: var(--bad);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.14s ease;
  cursor: pointer;
}
.user-dd-logout:hover {
  background: #fef2f2;
  color: #dc2626;
  transform: translateX(2px);
}
:root[data-theme='dark'] .user-dd-logout:hover {
  background: rgba(239, 68, 68, 0.18);
  color: #fca5a5;
}

/* ==============================================================================
   CRM İnteraktif Profil & Hızlı İşlem Modalları (2026 Admin Suite)
   ============================================================================== */
.crm-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: modalFadeIn 0.15s ease-out;
}
@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.crm-modal-dialog {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  width: 480px;
  max-width: 100%;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPop {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}
.crm-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: var(--soft);
}
.crm-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.crm-modal-icon {
  font-size: 22px;
}
.crm-modal-title b {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.crm-modal-sub {
  font-size: 12px;
  color: var(--quiet);
  margin-top: 2px;
}
.crm-modal-close {
  background: none;
  border: none;
  font-size: 22px;
  line-height: 1;
  color: var(--quiet);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.15s ease;
}
.crm-modal-close:hover {
  background: var(--line);
  color: var(--ink);
}
.crm-modal-body {
  padding: 22px;
}
.crm-form-group {
  margin-bottom: 16px;
}
.crm-form-group label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
.crm-form-group label .req {
  color: var(--bad);
}
.crm-form-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.crm-form-optional {
  font-size: 11px;
  color: var(--quiet);
}
.crm-form-hint {
  font-size: 11.5px;
  color: var(--quiet);
  margin-top: 5px;
}
.crm-modal-divider {
  height: 1px;
  background: var(--line);
  margin: 18px 0;
}
.crm-form-msg {
  min-height: 20px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 12px;
}
.crm-form-msg.ok {
  color: var(--good);
}
.crm-form-msg.err {
  color: var(--bad);
}
.crm-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.side {
  position: fixed;
  top: calc(48px + var(--safe-top));
  bottom: 0;
  left: 0;
  width: 224px;
  background: var(--side);
  padding: 12px 10px calc(12px + var(--safe-bottom)) calc(10px + var(--safe-left));
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 15;
  transition: width 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
}
.side a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.82);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 2px;
  font-weight: 550;
  font-size: 13px;
  text-decoration: none;
  background: transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.side a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  transform: translateX(2px);
}
.side a.on {
  background: var(--side-on);
  color: var(--side-on-ink, #fff);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}
.side a .ic {
  width: 18px;
  text-align: center;
  font-size: 15px;
  flex-shrink: 0;
}
.side .add {
  background: var(--accent) !important;
  color: var(--accent-ink, #fff) !important;
  justify-content: center;
  margin-top: 10px;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.side .add:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.side .sep {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 10px 4px;
  flex-shrink: 0;
}
.side-group-sep {
  display: flex;
  align-items: center;
  margin: 14px 4px 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.side-group-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.42);
  padding: 0 4px;
  white-space: nowrap;
}
.side a .side-text-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.side a .side-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side a .side-sub-dev {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffd400;
  margin-top: 2px;
  line-height: 1;
}
.side a:hover .side-sub-dev {
  color: #ffe14d;
}
.side a.on .side-sub-dev {
  color: var(--side-on-ink, #0c0f17);
  opacity: 0.75;
}

/* Sidemenu Alt Barı & Daralt/Genişlet Butonu */
.side-footer {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.side-collapse-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
  outline: none;
  user-select: none;
}
.side-collapse-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateX(1px);
}
.side-collapse-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.side-collapse-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.15s ease;
}

/* ==========================================================================
   Daraltılmış Menü Modu (Collapsed Sidemenu Rail)
   ========================================================================== */
body.side-collapsed .side {
  width: 64px;
  padding: 12px 6px calc(12px + var(--safe-bottom)) calc(6px + var(--safe-left));
}
body.side-collapsed .side a {
  justify-content: center;
  padding: 9px 0;
  gap: 0;
  position: relative;
}
body.side-collapsed .side a span:not(.ic) {
  display: none;
}
body.side-collapsed .side a .side-badge-dev {
  display: none;
}
body.side-collapsed .side a .ic {
  width: 24px;
  font-size: 16px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.side-collapsed .side .side-group-sep {
  margin: 10px 4px 6px;
  padding-top: 8px;
  justify-content: center;
}
body.side-collapsed .side .side-group-title {
  display: none;
}
body.side-collapsed .side .sep {
  margin: 8px 4px;
}
body.side-collapsed .side .add {
  padding: 10px 0;
  font-size: 0;
  position: relative;
}
body.side-collapsed .side .add::before {
  content: '＋';
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  display: block;
}
body.side-collapsed .side-footer {
  padding-top: 8px;
}
body.side-collapsed .side-collapse-btn {
  justify-content: center;
  padding: 8px 0;
  position: relative;
}
body.side-collapsed .side-collapse-btn .side-collapse-text {
  display: none;
}
body.side-collapsed .side-collapse-btn .side-collapse-icon {
  transform: rotate(180deg);
}

/* Daraltılmış Modda Yüzen İpuçları (Floating Tooltips) */
body.side-collapsed .side a:hover::after,
body.side-collapsed .side .add:hover::after,
body.side-collapsed .side-collapse-btn:hover::after {
  content: attr(data-title);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: var(--ink, #0f172a);
  color: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  z-index: 1000;
  animation: sideTipFade 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
body.side-collapsed .side a:hover::before,
body.side-collapsed .side .add:hover::before,
body.side-collapsed .side-collapse-btn:hover::before {
  content: '';
  position: absolute;
  left: calc(100% + 4px);
  top: 50%;
  transform: translateY(-50%);
  border: 4px solid transparent;
  border-right-color: var(--ink, #0f172a);
  pointer-events: none;
  z-index: 1000;
}
@keyframes sideTipFade {
  from { opacity: 0; transform: translateY(-50%) translateX(-4px); }
  to { opacity: 1; transform: translateY(-50%) translateX(0); }
}

body.noside .side {
  transform: translateX(-100%);
}
main {
  margin: calc(48px + var(--safe-top)) 0 0 224px;
  padding: 20px 24px calc(90px + var(--safe-bottom));
  padding-left: calc(24px + var(--safe-left));
  padding-right: calc(24px + var(--safe-right));
  transition: margin-left 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
body.side-collapsed main {
  margin-left: 64px;
}
body.noside main {
  margin-left: 0;
}
.col,
.col.wide {
  max-width: var(--app-max-width, 1380px);
  width: 100%;
  margin: 0 auto;
}
@media (max-width: 900px) {
  .side {
    transform: translateX(-100%);
    width: 240px;
    box-shadow: none;
    top: calc(48px + var(--safe-top));
  }
  body.side-open .side,
  body.side-open.noside .side {
    transform: none;
    box-shadow: 4px 0 16px rgba(0, 0, 0, 0.3);
  }
  body.side-collapsed .side {
    width: 240px !important;
    padding: 12px 10px calc(12px + var(--safe-bottom)) calc(10px + var(--safe-left)) !important;
  }
  body.side-collapsed .side a {
    justify-content: flex-start !important;
    padding: 8px 12px !important;
    gap: 10px !important;
  }
  body.side-collapsed .side a span:not(.ic) {
    display: inline !important;
  }
  body.side-collapsed .side a .side-badge-dev {
    display: inline-block !important;
  }
  body.side-collapsed .side .side-group-title {
    display: block !important;
  }
  body.side-collapsed .side-footer {
    display: none !important;
  }
  body.side-collapsed .side a:hover::after,
  body.side-collapsed .side a:hover::before {
    display: none !important;
  }
  main,
  body.noside main,
  body.side-collapsed main {
    margin-left: 0 !important;
    margin-top: calc(48px + var(--safe-top));
    padding: 16px 14px calc(80px + var(--safe-bottom));
    padding-left: calc(14px + var(--safe-left));
    padding-right: calc(14px + var(--safe-right));
  }
  body.side-open .shade {
    display: block;
  }
  .shade {
    position: fixed;
    inset: calc(48px + var(--safe-top)) 0 0 0;
  }
  .top .search {
    position: relative;
    left: auto;
    width: auto;
    flex: 0 1 340px;
  }
  .top .who {
    font-size: 0;
  }
  .top .who a {
    font-size: 13px;
  }
}
.shade {
  display: none;
  position: fixed;
  inset: 44px 0 0 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 14;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 8px;
}
.panel {
  background: var(--card);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(20, 30, 60, 0.12);
  padding: 12px;
  margin-bottom: 12px;
  position: relative;
  overflow: visible;
}
.panel:has(.smart-select.is-open) {
  z-index: 100;
}
.panel:has(.smart-select),
.panel:has(.filters),
.panel:has(.ss-panel),
.filters,
.smart-select,
.pipeline-toolbar,
.fp-header,
.dhead {
  overflow: visible !important;
}
.ptitle {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  margin: 2px 2px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ptitle .right {
  margin-left: auto;
  font-weight: 600;
  font-size: 13px;
  text-transform: none;
  color: var(--quiet);
}
h1 {
  font-size: 19px;
  margin: 0 0 10px;
}
h2 {
  font-size: 15px;
  margin: 0 0 8px;
}
.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.quiet {
  color: var(--quiet);
}
.small {
  font-size: 12px;
}
input,
select,
textarea {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: var(--radius-sm, 6px);
  padding: 7px 9px;
  width: 100%;
}
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--color-focus-ring, rgba(59, 89, 152, 0.25));
  border-color: var(--border-focus, var(--bar));
}
textarea {
  min-height: 70px;
  resize: vertical;
}
/* Aktivite notu: gelen e-posta gibi uzun metinler için geniş; JS içeriğe göre uzatır (wireActForm) */
textarea.act-note {
  min-height: 160px;
  max-height: 70vh;
  line-height: 1.5;
}
@media (max-width: 640px) {
  textarea.act-note {
    min-height: 220px;
  }
}
label {
  display: block;
  font-size: 12px;
  color: var(--label);
  margin: 8px 0 3px;
}
.btn {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--radius-sm, 6px);
  padding: 7px 14px;
  cursor: pointer;
  white-space: nowrap;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  transition: all 0.15s ease;
}
.btn:hover {
  background: var(--soft);
  text-decoration: none;
}
.btn.primary {
  background: var(--bar);
  border-color: var(--bar);
  color: var(--bar-ink, #fff);
}
.btn.orange {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.btn.danger {
  color: var(--bad);
}
.btn.sm {
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 500;
}
.chip {
  display: inline-block;
  background: var(--chip);
  border-radius: 4px;
  padding: 1px 8px;
  font-size: 12px;
  margin: 2px 4px 2px 0;
}
.err {
  color: var(--bad);
  margin-top: 8px;
}
.warn {
  border: 1px solid var(--accent);
  background: #fffbe0;
  border-radius: 8px;
  padding: 10px;
  margin: 10px 0;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 6px;
}
.tile {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  background: var(--card);
  color: var(--ink);
}
.tile .num {
  font-size: 26px;
  font-weight: 700;
  color: var(--bar);
}
.tile .cap {
  font-size: 13px;
  margin-top: 2px;
}
.tile table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
  text-align: left;
}
.tile td {
  padding: 2px 0;
  border: 0;
}
.tile td:last-child {
  text-align: right;
  font-weight: 700;
}
@media (max-width: 640px) {
  .tiles {
    grid-template-columns: 1fr;
  }
}
.feed {
  list-style: none;
  margin: 0;
  padding: 0;
}
.it {
  display: flex;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 7px;
  background: var(--card);
  color: var(--ink);
}
.it.new {
  animation: flash 2.5s ease-out;
}
@keyframes flash {
  from {
    background: var(--soft);
  }
  to {
    background: var(--card);
  }
}
.it .ico {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #8a6a5c;
  align-self: center;
}
.it .body {
  flex: 1;
  min-width: 0;
}
.it .head {
  font-size: 14px;
}
.it .more {
  margin-top: 3px;
  font-size: 13.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.it .more.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.it .extra {
  display: none;
  margin-top: 4px;
}
.it.open .extra {
  display: block;
}
.it.open .more.clamp {
  display: block;
}
.it .foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 5px;
}
.it .tog {
  background: none;
  border: 0;
  color: var(--accent-text, var(--accent));
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0 6px;
  font-weight: 700;
}
.it.open .tog {
  transform: rotate(180deg);
}
.it .meta {
  margin-left: auto;
  background: var(--chip);
  border-radius: 4px;
  padding: 2px 10px;
  font-size: 12px;
  white-space: nowrap;
}
.it .meta b {
  color: var(--link);
  font-weight: 600;
}
.it .chg {
  font-size: 13.5px;
}
.it .del {
  background: none;
  border: 0;
  color: var(--bad);
  cursor: pointer;
  font-size: 12px;
}
.cc {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin-bottom: 8px;
  cursor: pointer;
}
.cc:hover {
  border-color: var(--bar);
  box-shadow: 0 1px 4px rgba(59, 89, 152, 0.18);
}
.cc .nm {
  padding: 8px 12px 2px;
  font-weight: 600;
  font-size: 14.5px;
}
.cc .in {
  display: flex;
  gap: 12px;
  padding: 4px 12px 8px;
}
.cc .ico {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: #fdf1c7;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}
.cc .kv {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 16px;
  min-width: 0;
}
.cc .kv div {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.cc .kv small {
  display: block;
  color: var(--label);
  font-size: 11px;
}
.cc .ft {
  margin: 0 12px 8px auto;
  width: max-content;
  max-width: calc(100% - 24px);
  background: var(--chip);
  border-radius: 4px;
  padding: 2px 10px;
  font-size: 12px;
}
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.filters > * {
  min-width: 0;
}
.filters input[type='text'],
.filters input[type='search'],
.filters #q {
  flex: 1 1 260px;
  min-width: 220px;
  box-sizing: border-box;
}
.filters select,
.filters .smart-select {
  flex: 0 1 auto;
  min-width: 170px;
  max-width: 320px;
}
.filters .btn.orange,
.filters a.btn {
  margin-left: auto;
  flex: 0 0 auto;
  white-space: nowrap;
}
@media (max-width: 768px) {
  .filters {
    gap: 8px;
  }
  .filters input[type='text'],
  .filters input[type='search'],
  .filters #q,
  .filters select,
  .filters .smart-select,
  .filters .btn.orange,
  .filters a.btn {
    flex: 1 1 100%;
    min-width: 100%;
    max-width: 100%;
    margin-left: 0;
  }
}
.dhead {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--head, #dfe5f1);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  padding: 10px 14px;
}
.dhead h1 {
  margin: 0;
  font-size: 18px;
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.dhead .id {
  color: var(--quiet);
  font-weight: 600;
  font-size: 13px;
}
.dhead .x {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bar);
  text-decoration: none;
  font-size: 15px;
}
.dbody {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0 0 10px 10px;
  padding: 14px;
  margin-bottom: 12px;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
  align-items: start;
}
@media (max-width: 700px) {
  .two {
    grid-template-columns: 1fr;
  }
}
.fs {
  border: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 6px 0 0 0;
  margin: 0 0 6px;
  padding: 0 6px 6px 10px;
  min-height: 42px;
  min-width: 0;
}
.fs legend {
  color: var(--label);
  font-size: 12.5px;
  padding: 0 5px;
  margin-left: -2px;
}
.fs .v {
  font-size: 15px;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.fs .n {
  color: var(--label);
  font-size: 12px;
  display: inline-block;
  width: 20px;
}
.halves {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 10px;
}
.fgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 0 14px;
  align-items: start;
}
h2.section {
  grid-column: 1/-1;
  margin: 16px 0 0;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
details summary {
  cursor: pointer;
}
.multi .item {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}
.multi.chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.multi.chips .chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 13px;
}
.multi.chips .chip a {
  text-decoration: none;
  color: inherit;
  opacity: 0.6;
}
.multi.chips .chip a:hover {
  opacity: 1;
}
.multi.chips select,
.multi.chips .smart-select {
  width: auto;
  min-width: 220px;
}
.fabs {
  position: fixed;
  right: 28px;
  bottom: 22px;
  display: flex;
  gap: 10px;
  z-index: 18;
}
.fab {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 0;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.fab:hover {
  filter: brightness(1.07);
  text-decoration: none;
}
.fab.blue {
  background: var(--fab2, #6f8fd8);
  color: #fff;
}
.fabmenu {
  position: fixed;
  right: 28px;
  bottom: 80px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  z-index: 19;
  min-width: 180px;
  padding: 4px;
}
.fabmenu button,
.fabmenu a {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--ink);
  border-radius: 5px;
}
.fabmenu button:hover,
.fabmenu a:hover {
  background: var(--soft);
  text-decoration: none;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid var(--soft);
  vertical-align: top;
}
th {
  font-size: 12px;
  color: var(--quiet);
  font-weight: 600;
}
pre.detail {
  white-space: pre-wrap;
  font-size: 11.5px;
  margin: 0;
  max-height: 120px;
  overflow: auto;
  color: var(--quiet);
}
.login {
  max-width: 340px;
  margin: 14vh auto;
  text-align: left;
}
.login .logo {
  font-weight: 800;
  font-size: 28px;
  color: var(--bar);
  text-align: center;
  margin-bottom: 8px;
}
.login .logo b {
  color: var(--accent-text, var(--accent));
}
.sres {
  position: absolute;
  top: 36px;
  left: 0;
  width: min(460px, 92vw);
  max-height: 70vh;
  overflow: auto;
  background: var(--card);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  padding: 4px;
  z-index: 30;
}
.sres .sh {
  font-size: 11px;
  color: var(--label);
  text-transform: uppercase;
  padding: 6px 8px 2px;
}
.sres a {
  display: block;
  padding: 6px 8px;
  border-radius: 5px;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sres a:hover,
.sres a:focus {
  background: var(--soft);
  text-decoration: none;
}
.sres a small {
  color: var(--quiet);
  margin-left: 6px;
}
.sres a.all {
  color: var(--link);
  font-weight: 600;
  border-top: 1px solid var(--soft);
  margin-top: 4px;
}
a.tile {
  display: block;
  color: inherit;
}
a.tile:hover {
  border-color: var(--bar);
  text-decoration: none;
  box-shadow: 0 1px 4px rgba(59, 89, 152, 0.18);
}
.cc .nm a {
  color: var(--ink);
}
.cc .nm a:hover {
  color: var(--link);
}
.wa {
  font-size: 12px;
  background: #e6f6ec;
  color: #1d7a43;
  border-radius: 4px;
  padding: 1px 7px;
  margin-left: 6px;
}
.it .meta a {
  text-decoration: none;
}
.chip a {
  margin-left: 4px;
  font-weight: 700;
}

/* Ana sayfa, müşteri ve aktivite sayfaları: solda içerik, sağda kayıtlı raporlar */
.homegrid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 12px;
  align-items: start;
}
.homegrid > aside {
  position: sticky;
  top: 54px;
  max-height: calc(100vh - 64px);
  overflow: auto;
}
.replist {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: rep;
}
.replist li {
  counter-increment: rep;
  position: relative;
  padding: 7px 4px 7px 26px;
  border-bottom: 1px solid var(--line, #e5e7eb);
}
.replist li::before {
  content: counter(rep);
  position: absolute;
  left: 4px;
  top: 7px;
  font-size: 11px;
  color: #999;
}
.replist a {
  display: block;
  text-decoration: none;
  font-weight: 600;
}
.replist li.on a {
  color: var(--accent-text, var(--accent));
}
.replist a:hover {
  text-decoration: underline;
}
@media (max-width: 1100px) {
  .homegrid {
    grid-template-columns: minmax(0, 1fr);
  }
  .homegrid > aside {
    position: static;
    max-height: none;
  }
}

/* Claude asistanı: sağda açılır-kapanır sohbet sütunu (client/assistant.js). Geniş ekranda sayfa sola kayar, dar ekranda üstüne açılır. */
.top .aibtn {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  border-radius: 14px;
  padding: 3px 11px;
  font-size: 13px;
  cursor: pointer;
  margin-left: auto;
  white-space: nowrap;
}
.top .aibtn:hover,
.top .aibtn.on {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.top .aibtn + .who {
  margin-left: 0;
}
/* Takvim kısayolu (üst çubuk, hesap menüsünün solunda): MyBasicCRM'deki gibi ızgara simgesi + "Takvim" yazısı */
.top .calbtn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 12px;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: var(--bar-ink, #fff);
  background: transparent;
  white-space: nowrap;
  flex: none;
}
.top .calbtn .cal-ic {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex: none;
}
.top .calbtn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.top .calbtn.on {
  background: rgba(0, 0, 0, 0.15);
}
.top .calbtn + .aibtn,
.top .calbtn + .who {
  margin-left: 0;
}
@media (max-width: 760px) {
  .top .calbtn {
    padding: 0 9px;
  }
  .top .calbtn .cal-t {
    display: none;
  }
}
@media (max-width: 480px) {
  .top .calbtn {
    display: none;
  }
  .top .calbtn + .aibtn,
  .top .calbtn + .who {
    margin-left: auto;
  }
}
#aiside {
  position: fixed;
  top: 44px;
  right: 0;
  bottom: 0;
  width: var(--aw, 380px);
  max-width: 100vw;
  background: var(--card);
  border-left: 1px solid var(--line);
  box-shadow: -2px 0 8px rgba(20, 30, 60, 0.12);
  z-index: 18;
  display: none;
  flex-direction: column;
}
body.ai-open #aiside {
  display: flex;
}
.aihead {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
.aihead b {
  margin-right: auto;
}
.aix {
  background: none;
  border: 0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: var(--quiet);
  padding: 0 4px;
}
.aimsgs {
  flex: 1;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.aim {
  padding: 8px 11px;
  border-radius: 10px;
  max-width: 92%;
  overflow-wrap: anywhere;
}
.aim.me {
  align-self: flex-end;
  background: var(--link);
  color: #fff;
}
.aim.ai {
  align-self: flex-start;
  background: var(--soft);
}
.aim.bad {
  align-self: flex-start;
  background: #fbe9e7;
  color: var(--bad);
}
.aim.wait {
  color: var(--quiet);
  font-style: italic;
}
.aim code {
  background: rgba(0, 0, 0, 0.06);
  padding: 0 3px;
  border-radius: 3px;
}
.ainote {
  color: var(--quiet);
  background: var(--soft);
  border-radius: 10px;
  padding: 10px 12px;
}
.aiex {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
}
.aiform {
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}
.airow {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.aiattach {
  padding: 6px 9px;
  cursor: pointer;
}
.aifiles,
.aimfiles {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.aifiles:not(:empty) {
  margin-bottom: 6px;
}
.aimfiles {
  margin-bottom: 4px;
}
.aichip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  background: var(--chip);
  color: var(--ink);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.aichip img {
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 4px;
}
.aichip small {
  color: var(--quiet);
}
.aichip button {
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--quiet);
  font-size: 15px;
  line-height: 1;
  padding: 0 2px;
}
#aiside.drop {
  outline: 3px dashed var(--accent);
  outline-offset: -6px;
}
.aiform textarea {
  flex: 1;
  resize: none;
  min-height: 44px;
  max-height: 160px;
}
@media (min-width: 1101px) {
  body.ai-open main {
    margin-right: 380px;
  }
  body.ai-open .top {
    --rw: 380px;
  }
}
/* ==============================================================================
   Ayarlar — Modern Sektörel & SRE Bilgi Kartları Tasarım Sistemi
   ============================================================================== */
.col:has(.sec-head) {
  display: flex;
  flex-direction: column;
}
.col:has(.sec-head) > * {
  order: 10;
}
.sec-head {
  order: -10 !important;
  background: linear-gradient(135deg, #ffffff 0%, #f6f9fc 100%);
  border: 1px solid var(--line, #c9d2e6);
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 2px 8px rgba(28, 34, 48, 0.04);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 14px;
}
.sec-kpi-grid {
  order: -9 !important;
}
.sec-tabs {
  order: -8 !important;
}
.sec-tab-pane {
  order: -7 !important;
}
.sec-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.sec-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.sec-badge.gold {
  background: #fffbe0;
  color: #806a00;
  border-color: #fff0a0;
}
.sec-badge.pg {
  background: #f0f9ff;
  color: #0369a1;
  border-color: #bae6fd;
}
.sec-badge.live {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.sec-badge.super {
  background: #fdf4ff;
  color: #86198f;
  border-color: #f0abfc;
  font-weight: 700;
}
.sec-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 3px;
  letter-spacing: -0.01em;
}
.sec-desc {
  font-size: 12.5px;
  color: var(--quiet);
  margin: 0;
}

/* Sektörel KPI Bento Şeridi */
.sec-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.sec-kpi-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.sec-kpi-card:hover {
  transform: translateY(-2px);
  border-color: var(--link);
  box-shadow: 0 6px 16px rgba(59, 89, 152, 0.08);
}
.sec-kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.sec-kpi-card.c-crm::before { background: linear-gradient(90deg, #ffd400, #ffe14d); }
.sec-kpi-card.c-pg::before { background: linear-gradient(90deg, #0064a5, #38bdf8); }
.sec-kpi-card.c-host::before { background: linear-gradient(90deg, #10b981, #34d399); }
.sec-kpi-card.c-store::before { background: linear-gradient(90deg, #6366f1, #818cf8); }

.sec-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.sec-kpi-icon {
  font-size: 18px;
  line-height: 1;
}
.sec-kpi-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--soft);
  color: var(--ink);
}
.sec-kpi-val {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 3px;
}
.sec-kpi-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sec-kpi-sub2 {
  font-size: 11px;
  color: var(--quiet);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Segmented Navigation Tab Bar */
.sec-tabs {
  display: flex;
  gap: 6px;
  background: var(--soft);
  padding: 5px;
  border-radius: 10px;
  border: 1px solid var(--line);
  margin-bottom: 14px;
  overflow-x: auto;
}
.sec-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.sec-tab-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}
.sec-tab-btn.active {
  background: var(--card);
  color: var(--bar, #3b5998);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(28, 34, 48, 0.08);
}
.sec-tab-pill {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--bar);
  font-weight: 600;
}
.sec-tab-pane {
  display: none;
}
.sec-tab-pane.active {
  display: block;
  animation: tabFade 0.2s ease;
}
@keyframes tabFade {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* SRE Telemetri Bento Grid & Cards */
.sre-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.sre-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}
.sre-card:hover {
  border-color: var(--link);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.sre-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--soft);
  margin-bottom: 10px;
}
.sre-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
}
.sre-card-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
}
.sre-card-badge.ok { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }
.sre-card-badge.warn { background: #fff6c2; color: #806a00; border: 1px solid #fff0a0; }
.sre-card-badge.bad { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

.sre-kv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  font-size: 12px;
}
.sre-kv.single {
  grid-template-columns: 1fr;
}
.sre-kv-item {
  min-width: 0;
}
.sre-kv-item label {
  display: block;
  font-size: 11px;
  color: var(--quiet);
  margin-bottom: 2px;
  font-weight: 500;
}
.sre-kv-item span {
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

/* Progress bar */
.sre-bar-wrap {
  margin-top: 5px;
  background: #f1f5f9;
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
  position: relative;
}
.sre-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}
.sre-bar-fill.ok { background: linear-gradient(90deg, #10b981, #059669); }
.sre-bar-fill.warn { background: linear-gradient(90deg, #ffd400, #806a00); }
.sre-bar-fill.bad { background: linear-gradient(90deg, #ef4444, #dc2626); }

.sre-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
  font-size: 11px;
  color: var(--quiet);
}

/* Canlı Pulse Dot */
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5);
  animation: pulse-ring 2s infinite;
}
.pulse-dot.warn {
  background: #ffd400;
  box-shadow: 0 0 0 0 rgba(255, 212, 0, 0.5);
}
.pulse-dot.bad {
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Kullanıcı Tablosu ve Form İyileştirmeleri */
.u-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.u-table th {
  background: #f8fafc;
  padding: 8px 10px;
  font-weight: 600;
  color: #475569;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.u-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.u-table tr:hover td {
  background: #f8fafc;
}
.u-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  font-weight: 700;
  font-size: 10.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
  vertical-align: middle;
}

/* Geriye dönük uyumluluk sınıfları */
.sysgrid { display: none; }
.sysdot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.sysdot.ok { background: #10b981; }
.sysdot.warn { background: #ffd400; }
.sysdot.bad { background: #ef4444; }

/* ==============================================================================
   Kullanıcı Profil & Site Tercihleri Tasarım Sistemi (Ultra Max Premium)
   ============================================================================== */
.pref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 10px;
}
.pref-card {
  margin-bottom: 0 !important;
  display: flex;
  flex-direction: column;
}
.pref-user-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  background: var(--soft);
  border-radius: 10px;
  border: 1px solid var(--line);
}
.u-avatar.lg {
  width: 44px;
  height: 44px;
  font-size: 18px;
  background: linear-gradient(135deg, var(--bar) 0%, #1e40af 100%);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.pref-user-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
}
.pref-user-meta {
  font-size: 12px;
  color: var(--quiet);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* Canlı Tema Seçici Kartları */
.theme-selector-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.theme-option {
  border: 2px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--card);
  text-align: left;
}
.theme-option:hover {
  transform: translateY(-2px);
  border-color: var(--link);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.theme-option.active {
  border-color: #ffd400;
  background: rgba(255, 212, 0, 0.05);
  box-shadow: 0 0 0 2px rgba(255, 212, 0, 0.2);
}
.theme-preview {
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}
.theme-preview .tp-bar {
  height: 14px;
}
.theme-preview .tp-body {
  flex: 1;
  display: flex;
}
.theme-preview .tp-side {
  width: 22px;
}
.theme-preview .tp-content {
  flex: 1;
}

.theme-preview-ari .tp-bar { background: #0d0d0d; border-bottom: 2px solid #ffd400; }
.theme-preview-ari .tp-side { background: #161616; }
.theme-preview-ari .tp-content { background: #fafaf7; }

.theme-preview-mybasic .tp-bar { background: #3b5998; }
.theme-preview-mybasic .tp-side { background: #5f7ec4; }
.theme-preview-mybasic .tp-content { background: #f3f5fa; }

.theme-preview-dark .tp-bar { background: #0d121f; border-bottom: 2px solid #ffd400; }
.theme-preview-dark .tp-side { background: #131b2e; }
.theme-preview-dark .tp-content { background: #090d16; }

.theme-preview-emerald .tp-bar { background: #064e3b; border-bottom: 2px solid #10b981; }
.theme-preview-emerald .tp-side { background: #065f46; }
.theme-preview-emerald .tp-content { background: #f0fdf4; }

.theme-preview-sapphire .tp-bar { background: #0f172a; border-bottom: 2px solid #2563eb; }
.theme-preview-sapphire .tp-side { background: #1e293b; }
.theme-preview-sapphire .tp-content { background: #f8fafc; }

.theme-preview-burgundy .tp-bar { background: #4c0519; border-bottom: 2px solid #e11d48; }
.theme-preview-burgundy .tp-side { background: #881337; }
.theme-preview-burgundy .tp-content { background: #fff1f2; }

.theme-preview-custom .tp-bar { background: #0f172a; border-bottom: 2px solid var(--accent, #ffd400); }
.theme-preview-custom .tp-side { background: #1e293b; }
.theme-preview-custom .tp-content { background: var(--bg, #f8fafc); }

.theme-option-info {
  margin-top: 8px;
}
.theme-option-info b {
  display: block;
  font-size: 12px;
  color: var(--ink);
}
.theme-option-info span {
  display: block;
  font-size: 11px;
  color: var(--quiet);
}

/* Özel Tema Stüdyosu (Customizer Controls) */
.custom-theme-studio {
  margin-top: 14px;
  padding: 14px 16px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.custom-studio-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.custom-studio-head b {
  font-size: 13.5px;
  color: var(--ink);
}
.custom-swatches-grid {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.theme-swatch-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: all 0.15s ease;
  padding: 0;
}
.theme-swatch-btn:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.theme-swatch-btn.active {
  transform: scale(1.18);
  box-shadow: 0 0 0 2px var(--ink);
}
.theme-custom-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.theme-custom-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.theme-custom-group label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--quiet);
}

/* ==============================================================================
   Ana Dashboard — Ultra Max Premium Bento KPI & Hero Tasarım Sistemi (2026 Standards)
   ============================================================================== */
.dash-hero-banner {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dash-hero-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.dash-badges-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.dash-hero-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin: 0;
  line-height: 1.2;
}
.dash-hero-desc {
  font-size: 13.5px;
  color: var(--quiet);
  margin: 0;
}
.dash-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.dash-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.dash-action-btn:hover {
  background: var(--soft);
  border-color: var(--link);
  color: var(--link);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}
.dash-action-btn.primary {
  background: var(--accent);
  color: var(--accent-ink, #ffffff);
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(255, 212, 0, 0.25);
}
.dash-action-btn.primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 212, 0, 0.35);
}

#tiles {
  display: block;
  width: 100%;
}
.dash-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 18px;
  width: 100%;
}
.dash-hero-grid.no-fair {
  grid-template-columns: repeat(3, 1fr);
}
.dash-fair-only[hidden],
.dash-not-fair[hidden] {
  display: none !important;
}
@media (max-width: 1200px) {
  .dash-hero-grid,
  .dash-hero-grid.no-fair {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-hero-grid.no-fair > :last-child {
    grid-column: span 2;
  }
}
@media (max-width: 640px) {
  .dash-hero-grid,
  .dash-hero-grid.no-fair {
    grid-template-columns: 1fr;
  }
  .dash-hero-grid.no-fair > :last-child {
    grid-column: auto;
  }
}

.dash-hero-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}
.dash-hero-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.07);
}
.dash-hero-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3.5px;
}
.dash-hero-card.gold::before { background: linear-gradient(90deg, #ffd400, #ffe14d); }
.dash-hero-card.blue::before { background: linear-gradient(90deg, #2563eb, #60a5fa); }
.dash-hero-card.green::before { background: linear-gradient(90deg, #10b981, #34d399); }
.dash-hero-card.purple::before { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }

.dash-kpi-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.dash-kpi-lbl {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--quiet);
}
.dash-kpi-icon {
  font-size: 18px;
}
.dash-kpi-val {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--ink);
  line-height: 1.1;
}
.dash-kpi-unit {
  font-size: 15px;
  font-weight: 500;
  color: var(--quiet);
  margin-left: 2px;
}
.dash-kpi-sub {
  font-size: 12.5px;
  color: var(--quiet);
  margin-top: 6px;
  line-height: 1.35;
}
.dash-kpi-progress {
  margin-top: 12px;
}
.dash-bar-bg {
  height: 6px;
  background: var(--soft);
  border-radius: 3px;
  overflow: hidden;
}
.dash-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s ease;
}
.dash-bar-fill.gold { background: linear-gradient(90deg, #ffd400, #ffe14d); }
.dash-bar-fill.green { background: linear-gradient(90deg, #10b981, #34d399); }

.dash-kpi-footer {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--quiet);
  font-weight: 500;
}
.dash-kpi-arrow {
  font-size: 14px;
  font-weight: 700;
  color: var(--link);
  transition: transform 0.15s ease;
}
.dash-hero-card:hover .dash-kpi-arrow {
  transform: translateX(3px);
}
.dash-kpi-pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 8px;
  background: var(--soft);
  color: var(--ink);
}
.dash-kpi-pill.green {
  background: #dcfce7;
  color: #15803d;
}

.dash-team-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 6px;
}
.dash-team-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--soft);
  font-size: 12.5px;
}
.dash-team-badge {
  font-weight: 700;
  color: var(--link);
  background: var(--card);
  padding: 2px 7px;
  border-radius: 8px;
  font-size: 11px;
  border: 1px solid var(--line);
}

.dash-breakdown-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.dash-breakdown-lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--quiet);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.dash-type-chip {
  font-size: 12px;
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--ink);
}

.dash-feed-panel {
  border-radius: 14px;
  padding: 20px 22px;
}
.dash-feed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.dash-feed-title-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.dash-feed-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dash-feed-caption {
  font-size: 12px;
  color: var(--quiet);
}
.dash-feed-filters {
  display: flex;
  gap: 8px;
  align-items: center;
}
.dash-filter-select {
  width: auto !important;
  font-size: 12.5px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--card);
  border: 1px solid var(--line);
}

.btn-shopify-soft {
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  padding: 0 20px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-shopify-soft:hover {
  background: var(--card);
  border-color: var(--link);
  color: var(--link);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.05);
}

/* ==============================================================================
   Arı CRM — SOTA Evrensel Mobil & Çapraz Cihaz Uyumluluk Standardı (SSOT / USTA)
   ============================================================================== */

/* Tablo & Liste Yatay Kaydırma Kapsülleme */
.crm-table-wrap,
.tbl-wrap,
.table-responsive {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* iOS Safari Otomatik Zoom Engeli (font-size < 16px olunca zoom yapar) */
@media (max-width: 768px) {
  input,
  select,
  textarea,
  .top .search input,
  .crm-modal-dialog input,
  .crm-modal-dialog select,
  .crm-modal-dialog textarea {
    font-size: 16px !important;
  }
}

/* Küçük Ekranlar & Mobil Cihazlar (<= 640px) */
@media (max-width: 640px) {
  .top {
    gap: 8px;
    padding-left: calc(10px + var(--safe-left));
    padding-right: calc(10px + var(--safe-right));
  }
  .top .logo {
    font-size: 16.5px;
    letter-spacing: -0.3px;
  }
  .top .search {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 135px;
    padding: 0 8px;
    height: 30px;
  }
  .top .search input {
    font-size: 16px !important;
    padding: 0 4px;
  }
  .top .search span {
    font-size: 12px;
  }
  .top .aibtn {
    padding: 3px 8px;
    font-size: 12px;
    border-radius: 12px;
  }
  .user-menu-btn {
    padding: 3px 6px;
    gap: 5px;
  }
  .user-menu-name {
    display: none; /* Mobilde taşmayı önler, sadece avatar ve ok gösterilir */
  }
  .user-dropdown-menu {
    width: calc(100vw - 20px);
    max-width: 320px;
    right: 0;
  }
  .sre-grid {
    grid-template-columns: 1fr;
  }
  .sec-kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr));
  }
  .crm-modal-dialog {
    border-radius: 14px;
  }
  .crm-modal-header,
  .crm-modal-body {
    padding: 16px;
  }
}

/* ==========================================================================
   SmartSelect — Arama & Hızlı Filtreleme Destekli Açılır Liste (3 Tema Uyumlu)
   ========================================================================== */
.smart-select {
  display: inline-block;
  position: relative;
  font-family: inherit;
  font-size: 13px;
  vertical-align: middle;
  min-width: 140px;
}
.smart-select.is-open {
  z-index: 1050 !important;
}
/* Koşullu alanlar: gizlenen alan ve seçim kutusu, kendi display kuralı olsa da görünmez */
.smart-select[hidden],
[data-fkey][hidden],
.act-due[hidden] {
  display: none !important;
}
/* Aktivite sonucuna ya da türüne göre açılan alanlar */
.act-cond:empty {
  display: none;
}
.act-cond {
  margin-top: 8px;
}
.filters .smart-select {
  min-width: 160px;
}
.col form .smart-select {
  width: 100%;
}
.smart-select.is-disabled {
  opacity: 0.6;
  pointer-events: none;
}

/* Tetikleyici Buton */
.ss-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--input-bg, #fff);
  color: var(--text, #1e293b);
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.4;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  user-select: none;
}
.ss-trigger:hover {
  border-color: var(--accent, #ffd400);
}
.ss-trigger:focus,
.smart-select.is-open .ss-trigger {
  outline: none;
  border-color: var(--accent, #ffd400);
  box-shadow: 0 0 0 3px rgba(255, 212, 0, 0.18);
}
.ss-trigger-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ss-trigger-arrow {
  font-size: 11px;
  color: var(--muted, #64748b);
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
}
.smart-select.is-open .ss-trigger-arrow {
  transform: rotate(180deg);
  color: var(--accent-text, var(--accent));
}

/* Açılır Panel */
.ss-panel {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: 380px;
  background: var(--panel-bg, #ffffff);
  color: var(--text, #1e293b);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  box-shadow: 0 14px 34px -4px rgba(0, 0, 0, 0.22), 0 8px 18px -6px rgba(0, 0, 0, 0.14);
  z-index: 99999;
  flex-direction: column;
  overflow: hidden;
  animation: ssFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.smart-select.open-up .ss-panel {
  top: auto;
  bottom: calc(100% + 4px);
  animation: ssFadeInUp 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes ssFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ssFadeInUp {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Arama Kutusu */
.ss-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: var(--panel-subtle, rgba(0, 0, 0, 0.02));
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.ss-search-icon {
  font-size: 12px;
  opacity: 0.6;
  flex-shrink: 0;
}
.ss-search-input {
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  padding: 5px 8px;
  font-size: 12px;
  border-radius: 5px;
  border: 1px solid var(--border, #cbd5e1);
  background: var(--input-bg, #fff);
  color: var(--text, #0f172a);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ss-search-input:focus {
  border-color: var(--accent, #ffd400);
  box-shadow: 0 0 0 2px rgba(255, 212, 0, 0.15);
}

/* Liste — Akıllı Yükseklik ve Belirgin Ergonomik Scrollbar */
.ss-list {
  max-height: min(75vh, 650px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px;
  scrollbar-width: thin;
  scrollbar-color: #ffd400 rgba(0, 0, 0, 0.08);
}
.ss-list::-webkit-scrollbar {
  width: 9px;
}
.ss-list::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  margin: 4px 0;
}
.ss-list::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
  min-height: 36px;
  transition: background 0.15s ease;
}
.ss-list::-webkit-scrollbar-thumb:hover {
  background: var(--accent, #ffd400);
}

/* Liste Öğesi */
.ss-item {
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text, #1e293b);
  transition: background 0.1s ease, color 0.1s ease;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}
.ss-item * {
  pointer-events: none;
}
.ss-item:hover,
.ss-item.is-highlighted {
  background: rgba(255, 212, 0, 0.12);
  color: var(--accent-text, var(--accent));
}
.ss-item:active {
  background: rgba(255, 212, 0, 0.22);
}
.ss-item.is-selected {
  font-weight: 600;
  background: rgba(255, 212, 0, 0.18);
  color: var(--accent-text, var(--accent));
}
.ss-item.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Eşleşme Vurgusu */
.ss-match {
  color: #806a00;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 700;
}

/* Grup ve Boş Durum */
.ss-group-label {
  padding: 6px 10px 2px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted, #64748b);
}
.ss-empty {
  padding: 16px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--muted, #64748b);
}

/* Sektörel Rozetler (Badges) */
.ss-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  line-height: 1.3;
}
.ss-badge.green {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.ss-badge.yellow {
  background: rgba(255, 212, 0, 0.15);
  color: #806a00;
  border: 1px solid rgba(255, 212, 0, 0.3);
}
.ss-badge.red {
  background: rgba(239, 68, 68, 0.15);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.ss-badge.gold {
  background: rgba(128, 106, 0, 0.15);
  color: #806a00;
  border: 1px solid rgba(128, 106, 0, 0.3);
}

/* --- Tema Özel Ayarlamaları (Dark & MyBasic) --- */
[data-theme="dark"] .smart-select .ss-trigger {
  background: #1e293b;
  color: #f1f5f9;
  border-color: #334155;
}
[data-theme="dark"] .smart-select .ss-panel {
  background: #0f172a;
  color: #f1f5f9;
  border-color: #334155;
  box-shadow: 0 14px 32px -4px rgba(0, 0, 0, 0.6), 0 8px 16px -6px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .smart-select .ss-search-wrap {
  background: #1e293b;
  border-bottom-color: #334155;
}
[data-theme="dark"] .smart-select .ss-search-input {
  background: #0f172a;
  color: #f8fafc;
  border-color: #334155;
}
[data-theme="dark"] .ss-list {
  scrollbar-color: #ffd400 #1e293b;
}
[data-theme="dark"] .ss-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] .ss-list::-webkit-scrollbar-thumb {
  background: #475569;
}
[data-theme="dark"] .ss-list::-webkit-scrollbar-thumb:hover {
  background: #ffd400;
}
[data-theme="dark"] .ss-item {
  color: #e2e8f0;
}
[data-theme="dark"] .ss-item:hover,
[data-theme="dark"] .ss-item.is-highlighted {
  background: rgba(255, 212, 0, 0.22);
  color: #ffe14d;
}
[data-theme="dark"] .ss-item.is-selected {
  background: rgba(255, 212, 0, 0.3);
  color: #fff0a0;
}
[data-theme="dark"] .ss-match {
  color: #ffe14d;
}

/* ==========================================================================
   Satış Hunisi & Kanban Pipeline Stilleri (Pipedrive Standardı / 3 Tema Uyumlu)
   ========================================================================== */
.pipeline-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  padding-bottom: 24px;
}
.pipeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.pipeline-title-wrap h2 {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--bar, #1e293b);
}
.pipeline-subtitle {
  font-size: 13px;
  color: var(--muted, #64748b);
}
.pipeline-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 12px 16px;
  background: var(--panel-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
}
.pipeline-filters {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.pf-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pf-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #64748b);
}
.pipeline-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.pm-card {
  display: flex;
  flex-direction: column;
  background: var(--panel-subtle, rgba(0, 0, 0, 0.03));
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  padding: 6px 12px;
  min-width: 120px;
}
.pm-card.highlight {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}
.pm-card.highlight .pm-val {
  color: #059669;
}
.pm-lbl {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted, #64748b);
}
.pm-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--text, #1e293b);
  margin-top: 2px;
}

/* Kanban Tahtası */
.kanban-board {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  min-height: calc(100vh - 260px);
  align-items: stretch;
}
.kanban-board::-webkit-scrollbar {
  height: 8px;
}
.kanban-board::-webkit-scrollbar-thumb {
  background: var(--border, #cbd5e1);
  border-radius: 4px;
}
.kanban-col {
  flex: 0 0 270px;
  width: 270px;
  background: var(--panel-subtle, rgba(241, 245, 249, 0.7));
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 240px);
}
.kc-header {
  padding: 10px 12px;
  background: var(--panel-bg, #ffffff);
  border-top: 3px solid #3b82f6;
  border-bottom: 1px solid var(--border, #e2e8f0);
  border-radius: 7px 7px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kc-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kc-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #1e293b);
}
.kc-prob {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
}
.kc-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted, #64748b);
}
.kc-total {
  font-weight: 600;
  color: var(--text, #1e293b);
}
.kc-weighted {
  font-size: 11px;
  color: var(--muted, #64748b);
}
.kc-weighted b {
  color: var(--accent-text, var(--accent));
}
.kc-cards {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
  min-height: 80px;
  transition: background 0.15s ease;
}
.kc-cards.drag-over {
  background: rgba(255, 212, 0, 0.12);
  border: 1px dashed var(--accent, #ffd400);
  border-radius: 6px;
}

/* Kanban Kartı */
.kanban-card {
  background: var(--panel-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  padding: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  cursor: grab;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  border-color: var(--accent, #ffd400);
}
.kanban-card.is-dragging {
  opacity: 0.4;
  cursor: grabbing;
}
.kcard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.kcard-cust {
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kcard-cust a {
  color: var(--bar, #1e293b);
  text-decoration: none;
}
.kcard-cust a:hover {
  text-decoration: underline;
  color: var(--accent-text, var(--accent));
}
.kcard-stale {
  font-size: 10px;
  color: #dc2626;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
  font-weight: 600;
}
.kcard-name {
  font-size: 13px;
  color: var(--text, #334155);
  line-height: 1.3;
}
.kcard-fair {
  font-size: 11px;
  color: var(--muted, #64748b);
}
.kcard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid var(--border, #f1f5f9);
}
.kcard-amount {
  font-size: 13px;
  font-weight: 700;
  color: #059669;
}
.kcard-owner {
  display: flex;
  align-items: center;
}
.kcard-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent, #ffd400);
  color: var(--accent-ink, #0d0d0d);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.kcard-lost-reason {
  font-size: 11px;
  color: #dc2626;
  background: rgba(239, 68, 68, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Tema Uyumu */
[data-theme="dark"] .pipeline-toolbar,
[data-theme="dark"] .kc-header,
[data-theme="dark"] .kanban-card {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}
[data-theme="dark"] .kanban-col {
  background: #0f172a;
  border-color: #334155;
}
[data-theme="dark"] .pm-card {
  background: #0f172a;
  border-color: #334155;
}
[data-theme="dark"] .kcard-cust a,
[data-theme="dark"] .pipeline-title-wrap h2,
[data-theme="dark"] .pm-val,
[data-theme="dark"] .kc-title {
  color: #f8fafc;
}
[data-theme="dark"] .kcard-name {
  color: #cbd5e1;
}

/* ==========================================================================
   İnteraktif Fuar Salon & Stant Krokisi Stilleri (Floor Plan Engine)
   ========================================================================== */
.floorplan-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
.fp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.fp-title-wrap h2 {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--bar, #1e293b);
}
.fp-subtitle {
  font-size: 13px;
  color: var(--muted, #64748b);
}
.fp-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.fp-sel-group {
  display: flex;
  align-items: center;
  gap: 6px;
}
.fp-sel-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted, #64748b);
}
.fp-zoom-btns {
  display: flex;
  align-items: center;
  gap: 4px;
}
.fp-legend-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 16px;
  background: var(--panel-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  flex-wrap: wrap;
  font-size: 12px;
}
.fp-leg-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.fp-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}
.fp-dot.green { background: #10b981; }
.fp-dot.yellow { background: #ffd400; }
.fp-dot.red { background: #ef4444; }
.fp-dot.purple { background: #8b5cf6; }
.fp-dot.gray { background: #94a3b8; }

.fp-workspace {
  display: flex;
  gap: 16px;
  position: relative;
  min-height: 580px;
  height: calc(100vh - 270px);
}
.fp-canvas-wrap {
  flex: 1;
  background: var(--panel-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  cursor: grab;
  user-select: none;
}
.fp-svg {
  width: 100%;
  height: 100%;
}
.fp-booth-group {
  cursor: pointer;
  transition: transform 0.15s ease;
}
.fp-booth-group:hover .fp-booth-rect {
  fill-opacity: 0.45;
  stroke-width: 3;
}

/* Stant Detay Çekmecesi (Drawer) */
.fp-drawer {
  width: 320px;
  background: var(--panel-bg, #ffffff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 16px rgba(0, 0, 0, 0.08);
  animation: fpSlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
}
@keyframes fpSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
.fpd-header {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.fpd-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--bar, #1e293b);
}
.btn-close {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  color: var(--muted, #64748b);
}
.fpd-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  overflow-y: auto;
}
.fpd-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text, #334155);
}
.fpd-item.locked {
  background: rgba(139, 92, 246, 0.1);
  padding: 4px 8px;
  border-radius: 4px;
  color: #7c3aed;
}
.fpd-lbl {
  color: var(--muted, #64748b);
}
.fpd-price {
  font-size: 15px;
  color: #059669;
}
.fpd-note {
  font-size: 12px;
  color: var(--muted, #64748b);
  background: var(--panel-subtle, rgba(0, 0, 0, 0.03));
  padding: 6px 10px;
  border-radius: 4px;
  margin-top: 4px;
}
.fp-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}
.fp-badge.green { background: rgba(16, 185, 129, 0.15); color: #059669; }
.fp-badge.yellow { background: rgba(255, 212, 0, 0.15); color: #806a00; }
.fp-badge.red { background: rgba(239, 68, 68, 0.15); color: #dc2626; }
.fpd-footer {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border, #e2e8f0);
}
.fpd-footer .btn {
  width: 100%;
}

/* Tema Uyumu */
[data-theme="dark"] .fp-legend-bar,
[data-theme="dark"] .fp-canvas-wrap,
[data-theme="dark"] .fp-drawer {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}
[data-theme="dark"] .fp-title-wrap h2,
[data-theme="dark"] .fpd-header h3 {
  color: #f8fafc;
}
[data-theme="dark"] .fpd-item {
  color: #cbd5e1;
}

/* Floorplan Yönetim & Düzenleme İyileştirmeleri */
.fp-actions-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.fp-sub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.fp-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13px;
  transition: all 0.15s ease;
}
.fp-mode-btn.active {
  background: #ffd400 !important;
  color: #ffffff !important;
  border-color: #806a00 !important;
  box-shadow: 0 0 0 2px rgba(255, 212, 0, 0.25);
}
.fpd-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  width: 100%;
}
.fp-calc-total {
  display: flex;
  align-items: center;
  height: 38px;
  padding: 0 12px;
  background: var(--panel-subtle, rgba(0, 0, 0, 0.03));
  border: 1px dashed var(--border, #cbd5e1);
  border-radius: 6px;
  font-weight: 700;
  color: #059669;
  font-size: 15px;
}
.crm-form-row {
  display: flex;
  gap: 12px;
}
.crm-form-row > .crm-form-group {
  flex: 1;
}
.fp-booth-group.edit-mode {
  cursor: move;
}
.fp-booth-group.edit-mode:hover .fp-booth-rect {
  stroke: #ffd400;
  stroke-width: 2.5;
  stroke-dasharray: 4 2;
}
.fp-booth-group.is-dragging {
  opacity: 0.85;
  cursor: grabbing;
}




/* Aktivite kartı tıklanınca aktivite detayı açılır */
.it[data-act] {
  cursor: pointer;
}
.it[data-act]:hover {
  border-color: var(--accent, #ffd400);
}

/* Çok şirketli kurulum: deneme şeridi ve şirketler paneli */
.tscroll { overflow-x: auto; max-width: 100%; }
.trial-banner { margin: 0 0 12px; padding: 8px 12px; border-radius: 8px; font-size: 13px; background: rgba(255, 212, 0, 0.12); border: 1px solid rgba(255, 212, 0, 0.4); }
.trial-banner.soon { background: rgba(220, 38, 38, 0.1); border-color: rgba(220, 38, 38, 0.45); }
.tenants-tbl input[type='date'], .tenants-tbl input[name='note'] { max-width: 150px; font-size: 12px; }
.tenants-tbl td { vertical-align: middle; }
.plan-pill { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; background: rgba(100, 116, 139, 0.15); }
.plan-pill.deneme { background: rgba(255, 212, 0, 0.18); }
.plan-pill.odendi, .plan-pill.ucretsiz { background: rgba(22, 163, 74, 0.16); }
.plan-pill.suresi_doldu { background: rgba(220, 38, 38, 0.16); }
.social-cfg { display: grid; gap: 8px; max-width: 640px; }
.social-cfg label { display: grid; gap: 3px; font-weight: 600; }
.social-cfg input, .social-cfg textarea { font-weight: 400; width: 100%; box-sizing: border-box; }
.social-cfg textarea { font-family: monospace; font-size: 11px; }
.social-cfg fieldset { border: 1px solid var(--line, #e2e8f0); border-radius: 8px; padding: 8px 12px 12px; display: grid; gap: 8px; }
.social-cfg legend { font-weight: 700; padding: 0 4px; }
.social-cfg code { word-break: break-all; }

/* Abonelik ve ödeme (client/billing.js): havale bilgisi, ödeme bildirimi formu; kilit ekranında da kullanılır */
.pay-box { border: 1px solid var(--line, #e2e8f0); border-radius: 10px; padding: 12px 14px; background: var(--soft, #f8fafc); text-align: left; }
.pay-method { font-weight: 700; margin-bottom: 8px; }
.pay-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 0; border-top: 1px dashed var(--line, #e2e8f0); font-size: 13px; }
.pay-row > span { min-width: 92px; color: var(--quiet, #64748b); }
.pay-row > b { flex: 1 1 220px; word-break: break-word; }
.pay-iban { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 0.04em; }
.pay-note { margin-top: 8px; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; background: rgba(255, 212, 0, 0.14); border: 1px solid rgba(255, 212, 0, 0.45); }
.pay-open { margin-top: 10px; }
.pay-open[hidden], .pay-form[hidden] { display: none; }
.pay-form { margin-top: 10px; text-align: left; }
.pay-form label { display: block; font-size: 12.5px; margin-bottom: 8px; }
.pay-form input, .pay-form textarea { width: 100%; box-sizing: border-box; margin-top: 3px; }
.pay-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.pay-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pay-ok { margin-top: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13px; color: #15803d; background: rgba(21, 128, 61, 0.08); border: 1px solid rgba(21, 128, 61, 0.3); }
.pay-item { padding: 6px 0; border-top: 1px solid var(--line, #e2e8f0); font-size: 13px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.lk-pay { margin: 12px 0; }
.lk-pay .pay-grid { grid-template-columns: 1fr; }
@media (max-width: 640px) {
  .pay-grid { grid-template-columns: 1fr; }
}

/* Mesajlar (client/messages.js): WhatsApp, Instagram ve Messenger kutusu. Menü satırı yalnız entegrasyon açıkken görünür. */
#side-menu a[href='#/mesajlar']:not(.meta-on) {
  display: none;
}
#side-menu a[href='#/mesajlar'] {
  position: relative;
}
.mx-badge {
  display: inline-block;
  min-width: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--bad);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  margin-left: auto;
}
#side-menu a .mx-badge {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
}
.mx {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  height: calc(100vh - 120px);
  min-height: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.mx-list {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  min-height: 0;
}
.mx-tools {
  padding: 10px;
  border-bottom: 1px solid var(--soft);
}
.mx-tools input {
  width: 100%;
}
.mx-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.mx-chip {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 14px;
  padding: 3px 10px;
  font-size: 12px;
  cursor: pointer;
}
.mx-chip.on {
  background: var(--side-on);
  border-color: var(--side-on);
  color: var(--side-on-ink);
}
.mx-threads {
  overflow-y: auto;
  flex: 1;
}
.mx-th {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--soft);
  color: var(--ink);
  text-decoration: none;
}
.mx-th:hover {
  background: var(--head);
}
.mx-th.on {
  background: var(--chip);
}
.mx-th.unread b {
  font-weight: 800;
}
.mx-ch {
  font-size: 16px;
  flex: none;
}
.mx-th-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.mx-th-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.mx-th-top b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mx-th-time {
  color: var(--quiet);
  font-size: 11px;
  flex: none;
}
.mx-th-text {
  color: var(--quiet);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mx-conv {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.mx-head {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.mx-h-main {
  min-width: 0;
}
.mx-back {
  display: none;
}
.mx-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mx-msg {
  max-width: 72%;
  padding: 7px 10px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--soft);
  align-self: flex-start;
  overflow-wrap: anywhere;
}
.mx-msg.out {
  align-self: flex-end;
  background: var(--chip);
}
.mx-text {
  white-space: pre-wrap;
}
.mx-meta {
  font-size: 11px;
  color: var(--quiet);
  text-align: right;
  margin-top: 2px;
}
.mx-tick.read {
  color: #2b8be6;
}
.mx-tick.failed {
  color: var(--bad);
}
.mx-img {
  display: block;
  max-width: 100%;
  max-height: 280px;
  border-radius: 6px;
}
.mx-msg audio {
  max-width: 100%;
}
.mx-day {
  text-align: center;
  margin: 6px 0;
}
.mx-day span {
  background: var(--card);
  border: 1px solid var(--soft);
  border-radius: 10px;
  padding: 2px 10px;
  font-size: 11px;
  color: var(--quiet);
}
.mx-note {
  margin: 0;
  padding: 8px 14px;
  font-size: 12px;
  background: #fff6db;
  color: #6b5200;
  border-top: 1px solid var(--line);
}
.mx-reply {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--line);
  align-items: flex-end;
}
.mx-reply textarea {
  flex: 1;
  resize: none;
  min-height: 42px;
  max-height: 160px;
}
#mxe .err {
  margin: 0 10px 8px;
}
.mx-pick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--head);
}
.mx-chk {
  display: flex;
  gap: 6px;
  align-items: center;
  font-weight: 400;
}
.mx-chk input {
  width: auto;
}
.mx-empty {
  padding: 24px;
  color: var(--quiet);
  text-align: center;
}
.mx-pickone {
  margin: auto;
}
.mx-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mx-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.mx-row input {
  flex: 1;
  min-width: 0;
}
.mx-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mx-sub {
  font-weight: 700;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--soft);
}
.mx-help {
  margin-top: 10px;
  font-size: 13px;
}
.mx-help ol {
  padding-left: 20px;
}
@media (max-width: 760px) {
  .mx {
    grid-template-columns: minmax(0, 1fr);
    height: calc(100vh - 110px - var(--safe-bottom));
  }
  .mx-list {
    border-right: 0;
  }
  .mx.has-conv .mx-list,
  .mx:not(.has-conv) .mx-conv {
    display: none;
  }
  .mx-back {
    display: inline-block;
  }
  .mx-msg {
    max-width: 86%;
  }
  .mx-grid {
    grid-template-columns: 1fr;
  }
}
#metap .ok {
  color: var(--ok);
}

/* ==============================================================================
   Takvim (#/takvim, client/calendar.js) — aylık / haftalık görev ve aktivite görünümü
   ============================================================================== */
.cal-head .cal-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cal-nav {
  display: flex;
  gap: 4px;
}
.cal-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.2px;
  flex: 1 1 auto;
}
.cal-seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.cal-seg button {
  border: 0;
  background: var(--card);
  color: inherit;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
}
.cal-seg.sm button {
  padding: 4px 10px;
  font-size: 12px;
}
.cal-seg button + button {
  border-left: 1px solid var(--line);
}
.cal-seg button.on {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}
.cal-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
}
.cal-filters select {
  width: auto;
  max-width: 260px;
}
.cal-sw {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  margin: 0;
  cursor: pointer;
}
.cal-legend {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cal-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-left: 6px;
}
.cal-dot.late,
.cal-ev.late,
.cal-row.late {
  --ev: #dc2626;
}
.cal-dot.todo,
.cal-ev.todo,
.cal-row.todo {
  --ev: var(--accent);
}
.cal-dot.done,
.cal-ev.done,
.cal-row.done {
  --ev: #16a34a;
}
.cal-dot {
  background: var(--ev);
}
.cal-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 12px;
  align-items: start;
}
.cal-main {
  min-width: 0;
}
.cal-grid-panel {
  padding: 0;
  overflow: hidden;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.cal-dh {
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-bottom: 1px solid var(--line);
}
.cal-grid.hafta .cal-dh {
  display: none;
}
.cal-cell {
  min-height: 110px;
  padding: 4px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  min-width: 0;
  transition: background 0.12s;
}
.cal-grid.hafta .cal-cell {
  min-height: 360px;
}
.cal-cell:nth-child(7n) {
  border-right: 0;
}
.cal-cell:hover {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.cal-cell.is-wkend {
  background: color-mix(in srgb, var(--line) 18%, transparent);
}
.cal-cell.is-out {
  opacity: 0.45;
}
.cal-cell.is-sel {
  box-shadow: inset 0 0 0 2px var(--accent);
}
.cal-cell-h {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.cal-num {
  font-weight: 700;
  font-size: 13px;
  min-width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.cal-cell.is-today .cal-num {
  background: var(--accent);
  color: var(--accent-ink);
}
.cal-wd {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}
.cal-count {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
  border-radius: 9px;
  background: var(--bg);
  color: var(--muted);
}
.cal-count.late {
  background: #fee2e2;
  color: #b91c1c;
}
.cal-evs {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cal-ev {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  line-height: 1.3;
  padding: 2px 5px;
  border-radius: 5px;
  border-left: 3px solid var(--ev);
  background: color-mix(in srgb, var(--ev) 12%, var(--card));
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.cal-ev:hover {
  background: color-mix(in srgb, var(--ev) 24%, var(--card));
}
.cal-ev-ic {
  flex: none;
  font-size: 11px;
}
.cal-ev-t {
  flex: none;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.cal-ev-x {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-grid.hafta .cal-ev {
  flex-wrap: wrap;
  align-items: baseline;
  padding: 4px 6px;
}
.cal-grid.hafta .cal-ev-x {
  flex: 1 1 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  font-weight: 600;
}
.cal-ev-sub {
  flex: 1 1 100%;
  font-size: 11px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-more {
  border: 0;
  background: none;
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  padding: 1px 5px;
  cursor: pointer;
}
.cal-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.cal-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 7px 6px;
  border-left: 3px solid var(--ev);
  border-radius: 6px;
  margin-bottom: 6px;
  background: color-mix(in srgb, var(--ev) 7%, var(--card));
}
.cal-row-main {
  flex: 1 1 auto;
  display: flex;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.cal-row-body {
  min-width: 0;
  font-size: 13px;
}
.cal-row-meta,
.cal-row-note {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.cal-row-note {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.cal-row-cust {
  flex: none;
  text-decoration: none;
}
.cal-side {
  position: sticky;
  top: calc(60px + var(--safe-top));
  max-height: calc(100vh - 80px);
  overflow: auto;
}
@media (max-width: 1100px) {
  .cal-wrap {
    grid-template-columns: minmax(0, 1fr);
  }
  .cal-side {
    position: static;
    max-height: none;
  }
}
/* Telefon: ayda hücrede yalnız sayı rozeti, ayrıntı alttaki gün panelinde; haftada günler alt alta */
@media (max-width: 760px) {
  .cal-title {
    order: -1;
    flex-basis: 100%;
    font-size: 17px;
  }
  .cal-filters select {
    flex: 1 1 140px;
    max-width: none;
  }
  .cal-grid.ay .cal-cell {
    min-height: 54px;
    padding: 3px 2px;
  }
  .cal-grid.ay .cal-evs {
    display: none;
  }
  .cal-grid.ay .cal-cell-h {
    flex-direction: column;
    gap: 2px;
  }
  .cal-grid.ay .cal-count {
    margin-left: 0;
  }
  .cal-dh {
    padding: 6px 2px;
    text-align: center;
    font-size: 11px;
  }
  .cal-grid.hafta {
    grid-template-columns: minmax(0, 1fr);
  }
  .cal-grid.hafta .cal-cell {
    min-height: 0;
    border-right: 0;
  }
  .cal-grid.hafta .cal-ev-x {
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}
