/* ============================================================
   Z-CRM  •  Kurumsal Operasyon Paneli
   Tasarım sistemi (mor / aydınlık + koyu tema)
   ============================================================ */
:root {
  --bg: #f4f5fa;
  --bg-2: #eef0f7;
  --surface: #ffffff;
  --surface-soft: #fafbff;
  --surface-2: #f6f7fc;
  --text: #1f2236;
  --text-soft: #5b5f73;
  --muted: #9296ab;
  --label: #a8acbe;
  --line: #ecedf3;
  --line-soft: #f1f2f7;

  --primary: #6c4df6;
  --primary-strong: #5a3de0;
  --primary-soft: #efeafe;
  --brand-1: #8b6df6;
  --brand-2: #6c4df6;
  --accent: #7c5cfc;

  --danger: #f1556c;
  --warning: #ff9f43;
  --success: #22c08a;

  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 11px;
  --shadow-soft: 0 6px 24px rgba(31, 34, 54, 0.05);
  --shadow-strong: 0 18px 44px rgba(31, 34, 54, 0.10);
  --shadow-pop: 0 12px 32px rgba(108, 77, 246, 0.28);
  --font-sans: "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Inter", "Helvetica Neue", Arial, sans-serif;
  --page-max: 1320px;
}

html[data-theme="dark"] {
  --bg: #0f1117;
  --bg-2: #0c0e14;
  --surface: #1a1c27;
  --surface-soft: #1e2030;
  --surface-2: #21232f;
  --text: #eceef6;
  --text-soft: #b6b9c8;
  --muted: #7e8298;
  --label: #6b6f84;
  --line: #272a37;
  --line-soft: #23262f;
  --primary-soft: #2a2547;
  --shadow-soft: 0 6px 24px rgba(0, 0, 0, 0.35);
  --shadow-strong: 0 18px 44px rgba(0, 0, 0, 0.5);
}

* { box-sizing: border-box; }

html {
  margin: 0;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body { margin: 0; min-height: 100%; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  background:
    radial-gradient(900px circle at 100% -10%, rgba(108, 77, 246, 0.06), transparent 42%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

.zcrm-toast-host {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1200;
  width: min(360px, calc(100vw - 24px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.zcrm-toast {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr 20px;
  gap: 12px;
  align-items: start;
  padding: 14px 14px 14px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(14px);
  transform: translateY(-8px) scale(0.98);
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: auto;
  overflow: hidden;
}

.zcrm-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.zcrm-toast.hide {
  opacity: 0;
  transform: translateY(-8px) scale(0.98);
}

.zcrm-toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 18px 0 0 18px;
}

.zcrm-toast-success::before { background: var(--success); }
.zcrm-toast-error::before { background: var(--danger); }
.zcrm-toast-warning::before { background: var(--warning); }
.zcrm-toast-info::before { background: var(--primary); }

.zcrm-toast-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.zcrm-toast-success .zcrm-toast-icon {
  background: rgba(34, 192, 138, 0.12);
  color: var(--success);
}

.zcrm-toast-error .zcrm-toast-icon {
  background: rgba(241, 85, 108, 0.12);
  color: var(--danger);
}

.zcrm-toast-warning .zcrm-toast-icon {
  background: rgba(255, 159, 67, 0.14);
  color: var(--warning);
}

.zcrm-toast-info .zcrm-toast-icon {
  background: rgba(108, 77, 246, 0.12);
  color: var(--primary);
}

.zcrm-toast-content {
  min-width: 0;
}

.zcrm-toast-title {
  font-size: 0.83rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
}

.zcrm-toast-message {
  font-size: 0.79rem;
  line-height: 1.5;
  color: var(--text-soft);
  word-break: break-word;
}

.zcrm-toast-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 2px;
  line-height: 1;
  cursor: pointer;
}

.zcrm-toast-close:hover {
  color: var(--text);
}

.zcrm-toast-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(148, 163, 184, 0.14);
}

.zcrm-toast-progress::after {
  content: "";
  position: absolute;
  inset: 0;
  transform-origin: left center;
  animation: zcrm-toast-progress 4.2s linear forwards;
}

.zcrm-toast-success .zcrm-toast-progress::after { background: var(--success); }
.zcrm-toast-error .zcrm-toast-progress::after { background: var(--danger); }
.zcrm-toast-warning .zcrm-toast-progress::after { background: var(--warning); }
.zcrm-toast-info .zcrm-toast-progress::after { background: var(--primary); }

@keyframes zcrm-toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.045em;
  font-weight: 800;
}

h5, h6 {
  font-family: var(--font-display);
  letter-spacing: -0.025em;
  font-weight: 700;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-strong); }

.min-w-0 { min-width: 0; }

.zcrm-confirm-modal .modal-content {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 26px;
  background:
    radial-gradient(180px circle at 90% 0%, rgba(241, 85, 108, 0.13), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,255,0.98));
  box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
  padding: 22px;
  text-align: center;
}

.zcrm-confirm-icon {
  width: 62px;
  height: 62px;
  margin: 4px auto 14px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(241, 85, 108, 0.12);
  color: var(--danger);
  font-size: 1.35rem;
  box-shadow: inset 0 0 0 1px rgba(241, 85, 108, 0.12);
}

.zcrm-confirm-modal-info .modal-content {
  background:
    radial-gradient(180px circle at 90% 0%, rgba(108, 77, 246, 0.14), transparent 58%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,255,0.98));
}

.zcrm-confirm-icon-info {
  background: rgba(108, 77, 246, 0.12);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px rgba(108, 77, 246, 0.14);
}

.zcrm-confirm-modal .modal-body {
  padding: 0;
}

.zcrm-confirm-title {
  margin: 0 0 8px;
  color: var(--text);
  font-size: 1.08rem;
  font-weight: 850;
}

.zcrm-confirm-message {
  width: min(390px, 100%);
  margin: 0 auto 20px;
  color: var(--text-soft);
  font-size: .86rem;
  line-height: 1.55;
}

.zcrm-confirm-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.zcrm-confirm-actions .btn {
  min-width: 120px;
  border-radius: 14px;
  font-weight: 800;
}

@media (max-width: 767px) {
  .zcrm-toast-host {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

/* ============================================================
   Shell
   ============================================================ */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr; }

.app-sidebar {
  display: flex;
  flex-direction: column;
  padding: 22px 16px 16px;
  color: var(--text);
  background: var(--surface);
  border-right: 1px solid var(--line);
}

.app-sidebar.mobile { min-height: calc(100vh - 56px); }

/* ---------- Brand ---------- */
.sidebar-header { display: grid; gap: 14px; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  padding: 0 4px;
}

.brand-logo-wrap {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  box-shadow: var(--shadow-pop);
  flex-shrink: 0;
  overflow: hidden;
}

.brand-logo {
  max-width: 38px;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-with-image {
  align-items: center;
  justify-content: flex-start;
  padding: 0 2px;
}

.brand-full-logo {
  display: block;
  width: min(176px, 100%);
  height: auto;
  object-fit: contain;
}

.brand-text { display: grid; gap: 1px; }
.brand-text strong { color: var(--text); font-size: 0.98rem; font-weight: 800; line-height: 1.1; }
.brand-text span { color: var(--muted); font-size: 0.72rem; }

.brand-caption {
  display: grid;
  gap: 2px;
  padding: 4px;
}
.brand-caption strong { color: var(--text); font-size: 1.45rem; font-weight: 800; font-family: var(--font-display); }
.brand-caption span { color: var(--muted); font-size: 0.8rem; }

/* ---------- Nav ---------- */
.app-nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 2px;
}

/* Collapsible nav groups */
.nav-group { border: 0; }
.nav-group + .nav-group { margin-top: 2px; }

.nav-group > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 9px 4px 3px;
  padding: 7px 10px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--label);
  font-weight: 700;
  border-radius: 10px;
  user-select: none;
  transition: color 0.15s, background 0.15s;
}
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-group > summary:hover { color: var(--text-soft); background: var(--surface-2); }
.nav-chevron { flex-shrink: 0; opacity: 0.65; transition: transform 0.2s ease; }
.nav-group[open] > summary { color: var(--text-soft); }
.nav-group[open] > summary .nav-chevron { transform: rotate(180deg); }
.nav-group-body { display: flex; flex-direction: column; gap: 2px; padding: 1px 0 6px; }

.app-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  color: var(--text-soft);
  border-radius: 11px;
  padding: 9px 12px;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: background 0.16s ease, color 0.16s ease;
}
.app-nav .nav-link .nav-ico { flex-shrink: 0; opacity: 0.6; transition: opacity 0.16s ease; }
.app-nav .nav-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-nav .nav-link:hover {
  background: var(--surface-2);
  color: var(--text);
}
.app-nav .nav-link:hover .nav-ico { opacity: 0.9; }

.app-nav .nav-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  box-shadow: var(--shadow-pop);
}
.app-nav .nav-link.active .nav-ico { opacity: 1; }

/* ---------- Sidebar footer / profile ---------- */
.sidebar-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.sidebar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: linear-gradient(135deg, #cdbafe, #6c4df6);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.92rem;
  flex-shrink: 0;
  position: relative;
}
.sidebar-avatar::after {
  content: "";
  position: absolute;
  bottom: -1px; right: -1px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--success);
  border: 2px solid var(--surface);
}
.sidebar-footer .meta { display: grid; gap: 1px; }
.sidebar-footer .meta strong { color: var(--text); font-size: 0.85rem; font-weight: 700; }
.sidebar-footer .meta small { color: var(--muted); font-size: 0.74rem; }

/* ============================================================
   Main / Topbar
   ============================================================ */
.app-main { min-width: 0; display: flex; flex-direction: column; }

.app-topbar {
  margin: 14px 14px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-menu-btn { padding-inline: 0.7rem; }
.topbar-title-wrap { min-width: 0; }

.app-topbar h1 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-topbar p {
  margin: 3px 0 0;
  font-size: 0.84rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right { flex-shrink: 0; display: flex; align-items: center; gap: 10px; }

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 8px 13px;
  color: var(--muted);
  width: 210px;
}
.topbar-search input {
  border: 0; outline: 0; background: transparent;
  font-family: var(--font-sans); font-size: 0.85rem; color: var(--text);
  width: 100%;
}

.topbar-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.topbar-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--text-soft);
  cursor: pointer;
  position: relative;
  transition: background 0.18s;
}

/* ============================================================
   Sidebar Refresh
   ============================================================ */
.app-nav-modern {
  gap: 4px;
}

.app-nav-modern .nav-link {
  border-radius: 12px;
  padding: 10px 12px;
}

.nav-section-label {
  margin: 14px 8px 6px;
  color: var(--label);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-promo-card {
  margin-top: 18px;
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(108, 77, 246, 0.08), rgba(108, 77, 246, 0.03)),
    var(--surface);
  border: 1px solid rgba(108, 77, 246, 0.12);
  display: grid;
  gap: 9px;
}

.sidebar-promo-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
}

.sidebar-promo-card p {
  margin: 0;
  font-size: 0.79rem;
  color: var(--text-soft);
  line-height: 1.5;
}

.sidebar-promo-card a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
}

/* ============================================================
   Dashboard Feed
   ============================================================ */
.dashboard-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.dashboard-hero h2 {
  margin: 0;
  font-size: 1.7rem;
  font-weight: 800;
}

.dashboard-hero p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.dashboard-modern-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.95fr);
  gap: 18px;
}

.dashboard-feed-column,
.dashboard-side-column {
  display: grid;
  gap: 16px;
  align-content: start;
}

.feed-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.feed-section-head h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 800;
}

.feed-section-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.feed-section-head a {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.feed-filter-chip {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.feed-composer-card {
  padding: 18px;
}

.feed-composer {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.feed-avatar,
.feed-avatar-brand,
.feed-comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.82rem;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
}

.feed-avatar-brand {
  box-shadow: var(--shadow-pop);
}

.feed-composer-input {
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  padding: 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
}

.feed-composer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.feed-composer-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
}

.feed-composer-actions .feed-publish-btn {
  margin-left: auto;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  border-color: transparent;
}

.feed-card {
  padding: 18px;
}

.feed-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.feed-user {
  display: flex;
  gap: 12px;
  align-items: center;
}

.feed-user-line {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.feed-user-line strong {
  color: var(--text);
  font-size: 0.92rem;
}

.feed-time {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

.feed-more-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 0.2em;
}

.feed-entity-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.feed-entity-icon,
.summary-stat-icon,
.quick-action-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--primary-soft);
  position: relative;
}

.feed-entity-icon::before,
.summary-stat-icon::before,
.quick-action-icon::before {
  content: "";
  position: absolute;
  inset: 11px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
}

.feed-icon-customer::before,
.summary-stat-icon.customer::before { background: linear-gradient(135deg, #7d77ff, #5f53ff); }
.feed-icon-offer::before,
.summary-stat-icon.offer::before { background: linear-gradient(135deg, #43c881, #20ad67); }
.feed-icon-opportunity::before,
.summary-stat-icon.opportunity::before { background: linear-gradient(135deg, #64a5ff, #4778ff); }
.feed-icon-payment::before,
.summary-stat-icon.payment::before { background: linear-gradient(135deg, #ffb648, #ff9248); }
.feed-icon-document::before { background: linear-gradient(135deg, #64a5ff, #4778ff); }
.feed-icon-task::before { background: linear-gradient(135deg, #42c2a6, #19a47e); }

.feed-entity-main {
  min-width: 0;
}

.feed-entity-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.feed-entity-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}

.feed-entity-subtitle {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.feed-entity-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.75rem;
}

.feed-entity-amount {
  color: var(--text);
  font-weight: 800;
  font-size: 0.95rem;
}

.feed-badge,
.priority-pill,
.type-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.feed-badge.customer { background: #edf1ff; color: #4963ff; }
.feed-badge.offer { background: #eaf8ee; color: #20ad67; }
.feed-badge.opportunity { background: #eef5ff; color: #4377ff; }
.feed-badge.payment { background: #fff2df; color: #d87d11; }
.feed-badge.document { background: #eef5ff; color: #4377ff; }
.feed-badge.task { background: #e8fbf5; color: #1a9d76; }
.feed-badge.danger { background: #fff0f0; color: #dc2626; }
.feed-badge.success { background: #e8fbf5; color: #1a9d76; }
.feed-badge.info { background: var(--primary-soft); color: var(--primary-strong); }

.feed-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.feed-card-actions form {
  margin: 0;
}

.feed-action-btn {
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.83rem;
  font-weight: 700;
  padding: 0;
}

.feed-action-btn.active {
  color: var(--primary);
}

.feed-comments {
  margin-top: 12px;
  display: grid;
  gap: 10px;
}

.feed-comment {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
}

.feed-comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  font-size: 0.74rem;
}

.feed-comment-body {
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.feed-comment-body strong {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.feed-comment-body p {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

.feed-comment-body span {
  display: inline-block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
}

.feed-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.side-summary-card,
.side-list-card,
.side-actions-card {
  padding: 18px;
}

.summary-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.summary-stat-box {
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  display: grid;
  gap: 8px;
}

.summary-stat-box strong {
  font-size: 1.35rem;
  line-height: 1;
}

.summary-stat-box span {
  color: var(--muted);
  font-size: 0.8rem;
}

.summary-stat-box.revenue {
  grid-column: span 2;
}

.side-finance-metric {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.side-finance-metric div {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.side-finance-metric span {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}

.side-finance-metric strong {
  display: block;
  margin-top: 6px;
  font-size: 1rem;
}

.exchange-widget {
  margin-top: 14px;
  border: 1px solid rgba(124, 92, 255, .16);
  border-radius: 20px;
  background:
    radial-gradient(circle at 12% 12%, rgba(124, 92, 255, .16), transparent 28%),
    linear-gradient(135deg, rgba(247, 250, 255, .98), rgba(255, 255, 255, .98));
  padding: 14px;
  box-shadow: 0 18px 42px rgba(78, 91, 146, .08);
}

.exchange-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.exchange-widget-head strong {
  display: block;
  color: var(--text);
  font-size: .88rem;
  font-weight: 900;
}

.exchange-widget-head span,
.exchange-widget-row span,
.exchange-widget-empty {
  color: var(--muted);
  font-size: .72rem;
}

.exchange-refresh-btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(124, 92, 255, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .9);
  color: #6246ea;
  display: inline-grid;
  place-items: center;
  transition: .18s ease;
}

.exchange-refresh-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(98, 70, 234, .16);
}

.exchange-refresh-btn.is-loading i {
  animation: exchangeSpin .8s linear infinite;
}

@keyframes exchangeSpin {
  to { transform: rotate(360deg); }
}

.exchange-widget-list {
  display: grid;
  gap: 10px;
}

.exchange-widget-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(226, 232, 240, .95);
  padding: 11px;
  position: relative;
  overflow: hidden;
}

.exchange-widget-row::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #94a3b8;
}

.exchange-widget-row.up::before { background: #16a34a; }
.exchange-widget-row.down::before { background: #dc2626; }
.exchange-widget-row.flat::before { background: #64748b; }

.exchange-currency-icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(124, 92, 255, .18), rgba(71, 120, 255, .12));
  color: #6246ea;
  font-size: .72rem;
  font-weight: 950;
  letter-spacing: .03em;
}

.exchange-widget-row.up .exchange-currency-icon {
  background: linear-gradient(135deg, rgba(22, 163, 74, .16), rgba(34, 197, 94, .08));
  color: #15803d;
}

.exchange-widget-row.down .exchange-currency-icon {
  background: linear-gradient(135deg, rgba(220, 38, 38, .14), rgba(248, 113, 113, .08));
  color: #b91c1c;
}

.exchange-currency-main {
  min-width: 0;
}

.exchange-currency-top {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.exchange-currency-top strong {
  display: block;
  color: var(--text);
  font-size: .86rem;
  font-weight: 900;
}

.exchange-currency-top span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exchange-rate-main {
  margin-top: 3px;
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 950;
  letter-spacing: -.03em;
}

.exchange-currency-main small {
  color: var(--muted);
  font-size: .68rem;
}

.exchange-widget-values {
  display: grid;
  gap: 3px;
  text-align: right;
}

.exchange-change {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  font-weight: 850;
}

.exchange-change.up { color: #15803d; }
.exchange-change.down { color: #b91c1c; }
.exchange-change.flat { color: #64748b; }

.exchange-change em {
  font-style: normal;
  color: inherit;
  opacity: .82;
}

.exchange-date {
  font-size: .68rem !important;
}

.exchange-widget-source {
  margin-top: 9px;
  color: var(--muted);
  font-size: .68rem;
  line-height: 1.35;
}

@media (max-width: 520px) {
  .exchange-widget-row {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .exchange-widget-values {
    grid-column: 1 / -1;
    text-align: left;
    padding-left: 51px;
  }

  .exchange-change {
    justify-content: flex-start;
  }
}

.offer-exchange-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(124, 92, 255, .16);
  border-radius: 18px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(124, 92, 255, .08), rgba(255, 255, 255, .98));
}

.offer-exchange-card div {
  display: grid;
  gap: 2px;
}

.offer-exchange-card span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 750;
}

.offer-exchange-card strong {
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 900;
}

.offer-exchange-card small {
  color: var(--muted);
  text-align: right;
}

.offer-document-currency-options {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  border: 1px solid rgba(226, 232, 240, .95);
  border-radius: 18px;
  background: rgba(248, 250, 255, .72);
  padding: 14px 16px;
}

.offer-document-currency-options > div {
  display: grid;
  gap: 2px;
  margin-right: auto;
}

.offer-document-currency-options strong {
  color: var(--text);
  font-size: .84rem;
  font-weight: 850;
}

.offer-document-currency-options span {
  color: var(--muted);
  font-size: .74rem;
}

.offer-document-currency-options .form-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(226, 232, 240, .95);
  cursor: pointer;
  user-select: none;
}

.offer-document-currency-options .form-check-input {
  float: none;
  margin: 0;
  flex: 0 0 auto;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.offer-document-currency-options .form-check-label {
  cursor: pointer;
}

.side-list {
  display: grid;
  gap: 10px;
}

.side-list-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.side-list-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.side-list-main strong {
  display: block;
  color: var(--text);
  font-size: 0.88rem;
}

.side-list-main span,
.side-list-main small,
.side-list-meta small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  margin-top: 3px;
}

.side-list-meta {
  text-align: right;
}

.priority-pill.high { background: #fff1ef; color: #f1556c; }
.priority-pill.medium { background: #fff4df; color: #e8951f; }
.priority-pill.low { background: #edf4ff; color: #4d80ff; }

.type-pill.meeting { background: #f0ebff; color: #6c4df6; }
.type-pill.call { background: #e8fbf5; color: #1a9d76; }
.type-pill.mail { background: #fff2df; color: #d87d11; }
.type-pill.info { background: #edf1ff; color: #4963ff; }

.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-action-box {
  padding: 14px;
  border-radius: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.quick-action-box strong {
  color: var(--text);
  font-size: 0.86rem;
}

.quick-action-box span {
  color: var(--muted);
  font-size: 0.76rem;
}

@media (max-width: 1199px) {
  .dashboard-modern-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .dashboard-hero h2 {
    font-size: 1.35rem;
  }

  .feed-entity-card,
  .feed-comment-form {
    grid-template-columns: 1fr;
  }

  .summary-stat-grid,
  .quick-action-grid,
  .side-finance-metric {
    grid-template-columns: 1fr;
  }

  .summary-stat-box.revenue {
    grid-column: span 1;
  }

  .feed-composer-actions .feed-publish-btn {
    margin-left: 0;
  }

  .side-list-item {
    flex-direction: column;
  }

  .side-list-meta {
    text-align: left;
  }
}
.topbar-icon-btn:hover { background: var(--surface-2); color: var(--text); }
.topbar-icon-btn .notif-badge {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  background: var(--danger);
  color: #fff;
  border-radius: 9px;
  font-size: 0.62rem;
  font-weight: 700;
  display: grid;
  place-items: center;
  border: 2px solid var(--surface);
}
html[data-theme="dark"] .topbar-icon-btn .ic-sun { display: none; }
.topbar-icon-btn .ic-moon { display: none; }
html[data-theme="dark"] .topbar-icon-btn .ic-moon { display: block; }

/* Topbar user menu */
.topbar-user .user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 5px 10px 5px 5px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  transition: background 0.16s, border-color 0.16s;
}
.topbar-user .user-chip:hover { background: var(--surface-2); border-color: var(--line); color: var(--text); }
.user-chip-avatar {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, #cdbafe, #6c4df6);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.82rem;
  flex-shrink: 0;
}
.user-chip-meta { flex-direction: column; align-items: flex-start; line-height: 1.1; }
.user-chip-meta strong { font-size: 0.82rem; font-weight: 700; color: var(--text); }
.user-chip-meta small { font-size: 0.7rem; color: var(--muted); }
.topbar-user .dropdown-menu {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 6px;
  background: var(--surface);
  min-width: 210px;
}
.topbar-user .dropdown-item { border-radius: 9px; padding: 9px 12px; font-size: 0.86rem; font-weight: 600; color: var(--text-soft); }
.topbar-user .dropdown-item:hover { background: var(--surface-2); color: var(--text); }
.topbar-user form { margin: 0; }
.topbar-user form .dropdown-item { width: 100%; text-align: left; background: transparent; border: 0; }

.app-content { padding: 14px; }
.app-content-inner { max-width: var(--page-max); margin: 0 auto; }

/* ============================================================
   Page head + KPI
   ============================================================ */
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.page-head h3 { margin: 0; font-size: 1.5rem; font-weight: 800; }
.page-head p { margin: 5px 0 0; color: var(--muted); font-size: 0.9rem; }

.kpi-card {
  height: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  transition: transform 0.12s, box-shadow 0.18s;
}

.kpi-card .kpi-label { color: var(--muted); font-size: 0.82rem; font-weight: 600; }
.kpi-card .kpi-value {
  font-size: clamp(1.5rem, 1.6vw, 1.9rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.dashboard-grid { display: grid; gap: 16px; }
.dashboard-grid.two { grid-template-columns: 1fr; }

/* ============================================================
   Cards / containers
   ============================================================ */
.content-card,
.card,
.table-responsive,
.alert,
dl,
form,
.list-group { border-radius: var(--radius-md); }

.content-card,
.card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 20px;
}

.card-header {
  background: var(--surface-soft);
  border-bottom: 1px solid var(--line);
  font-weight: 800;
  color: var(--text);
  padding: 14px 16px;
}

.summary-tile {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  padding: 12px;
}
.summary-tile .label { color: var(--muted); font-size: 0.8rem; }
.summary-tile .value { color: var(--text); font-weight: 800; font-size: 1rem; }

/* ============================================================
   Tables
   ============================================================ */
.table-responsive {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  padding: 8px;
  overflow: auto;
}

.table { --bs-table-bg: transparent; margin-bottom: 0; color: var(--text); }

.table thead th {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  border-bottom-width: 1px;
  white-space: nowrap;
}

.table > :not(caption) > * > * {
  border-color: var(--line-soft);
  vertical-align: middle;
  padding: 0.78rem 0.7rem;
  color: var(--text-soft);
}

.table tbody tr:hover { background: var(--surface-2); }

.table-actions { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

/* ============================================================
   Forms
   ============================================================ */
.form-section-title {
  margin-bottom: 12px;
  font-size: 1.02rem;
  color: var(--text);
  letter-spacing: -0.01em;
  text-transform: none;
  font-weight: 800;
  font-family: var(--font-display);
}

.form-label { color: var(--text-soft); font-size: 0.9rem; font-weight: 700; margin-bottom: 0.34rem; }

.form-control,
.form-select {
  border-radius: 11px;
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--text);
  padding: 0.6rem 0.78rem;
}

.form-control::placeholder { color: var(--muted); }

.form-control:focus,
.form-select:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 0.2rem rgba(108, 77, 246, 0.16);
}

.ts-wrapper.form-select,
.ts-wrapper.single,
.ts-wrapper.multi {
  padding: 0 !important;
  border: 0 !important;
  min-height: 38px;
  height: auto !important;
  background: transparent !important;
  box-shadow: none !important;
}

.ts-wrapper .ts-control {
  min-height: 38px;
  border: 1px solid var(--line) !important;
  border-radius: 9px !important;
  background: var(--surface-2) !important;
  color: var(--text) !important;
  padding: 0.46rem 2.1rem 0.46rem 0.7rem !important;
  font-size: 0.85rem !important;
  box-shadow: inset 0 0 0 1px transparent !important;
  cursor: text;
}

.ts-wrapper:not(.focus) .ts-control,
.ts-wrapper.form-select:not(.focus) .ts-control {
  border-color: var(--line) !important;
  box-shadow: inset 0 0 0 1px var(--line) !important;
}

.ts-wrapper.disabled .ts-control,
.ts-wrapper.readonly .ts-control {
  background: #eef1f6 !important;
  opacity: 1 !important;
}

.ts-wrapper.focus .ts-control {
  border-color: var(--primary) !important;
  background: var(--surface) !important;
  box-shadow: 0 0 0 0.2rem rgba(108, 77, 246, 0.16) !important;
}

.ts-wrapper.single .ts-control::after {
  content: "\f107";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  font-size: 0.78rem;
}

.ts-dropdown {
  border: 1px solid var(--line) !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow-strong) !important;
  overflow: hidden !important;
  font-size: 0.85rem !important;
  z-index: 3055 !important;
  background: var(--surface) !important;
}

.ts-dropdown .ts-dropdown-content {
  max-height: 260px !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}

.ts-dropdown .option,
.ts-dropdown .no-results,
.ts-dropdown .create {
  padding: 8px 11px !important;
  color: var(--text) !important;
  background: var(--surface) !important;
}

.ts-dropdown .active {
  background: rgba(108, 77, 246, 0.1) !important;
  color: var(--primary-strong) !important;
}

.ts-wrapper.multi .ts-control > div {
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary-strong);
  font-weight: 700;
  padding: 3px 8px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn { border-radius: 11px; font-weight: 600; padding: 0.5rem 0.95rem; }

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  border: none;
  box-shadow: var(--shadow-pop);
}
.btn-primary:hover { color: #ffffff; box-shadow: 0 14px 36px rgba(108, 77, 246, 0.38); }

.btn-success { border: none; background: linear-gradient(135deg, var(--success), #16a06f); }

.btn-outline-primary {
  color: var(--primary-strong);
  border-color: rgba(108, 77, 246, 0.4);
  background: var(--surface);
}
.btn-outline-primary:hover {
  color: var(--primary-strong);
  background: var(--primary-soft);
  border-color: rgba(108, 77, 246, 0.7);
}

.btn-outline-secondary { color: var(--text-soft); border-color: var(--line); background: var(--surface); }
.btn-outline-secondary:hover { color: var(--text); border-color: var(--muted); background: var(--surface-2); }

.btn-outline-danger { color: var(--danger); border-color: rgba(241, 85, 108, 0.45); background: var(--surface); }
.btn-outline-danger:hover { color: #fff; border-color: var(--danger); background: var(--danger); }

.badge { border-radius: 999px; padding: 0.4em 0.72em; font-weight: 700; }
.badge.bg-primary { background: linear-gradient(135deg, var(--brand-1), var(--brand-2)) !important; }

.sticky-actions {
  position: static;
  z-index: 3;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.alert { border: 1px solid rgba(255, 159, 67, 0.35); background: rgba(255, 159, 67, 0.1); color: #9a5a12; }
html[data-theme="dark"] .alert { color: #ffce99; }

.list-group-item { border-color: var(--line-soft); background: transparent; color: var(--text-soft); }

.empty-state { text-align: center; color: var(--muted); padding: 18px; }

/* ============================================================
   Misc components (preserved)
   ============================================================ */
.bank-cell { display: flex; align-items: center; gap: 10px; }
.bank-logo {
  width: 28px; height: 28px; border-radius: 7px; object-fit: contain;
  background: #fff; border: 1px solid var(--line); padding: 3px; flex-shrink: 0;
}

.total-box {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 800;
  padding: 10px 13px;
}
html[data-theme="dark"] .total-box { color: #d8ccff; }

.offer-lines-table input { min-width: 90px; }
.offer-line-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
}
.offer-line-name-wrap .line-name { min-width: 180px; }
.quick-catalog-add {
  white-space: nowrap;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.42rem 0.72rem;
}
.line-catalog-hint {
  display: block;
  margin-top: 5px;
  font-size: 0.72rem;
}
.offer-lines-toolbar {
  display: flex; gap: 10px; flex-wrap: wrap;
  justify-content: space-between; align-items: center; margin-bottom: 10px;
}

.text-muted { color: var(--muted) !important; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  color: #10233f;
}

.status-Draft { background: #eceef3; color: #5b5f73; }
.status-Sent { background: #e9f0fe; color: #2f5fd0; }
.status-Accepted { background: #e6f8f1; color: #138a63; }
.status-Rejected { background: #fde8eb; color: #c33651; }
.status-ConvertedToSale { background: #efeafe; color: #6c4df6; }
.status-PaymentReceived { background: #e6f8f1; color: #138a63; }
.status-Invoiced { background: #e9f0fe; color: #3a52b8; }

.priority-Low { background: #e6f8f1; color: #138a63; }
.priority-Medium { background: #e9f0fe; color: #2f5fd0; }
.priority-High { background: #fff2e4; color: #b5710f; }
.priority-Critical { background: #fde8eb; color: #c33651; }

.mobile-sidebar { --bs-offcanvas-width: 300px; background: transparent; }
.mobile-sidebar .offcanvas-header { background: var(--surface); color: var(--text); }
.mobile-sidebar .offcanvas-body { background: transparent; }

/* ============================================================
   Login  •  modern split layout
   ============================================================ */
.login-page { margin: 0; }

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 46%) 1fr;
  background: linear-gradient(180deg, var(--bg), var(--bg-2));
}

.login-left {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  background:
    radial-gradient(720px circle at 0% 0%, rgba(108, 77, 246, 0.10), transparent 46%),
    radial-gradient(680px circle at 100% 100%, rgba(124, 92, 252, 0.08), transparent 48%),
    linear-gradient(180deg, var(--surface-soft), var(--bg));
}

.login-panel {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: var(--shadow-strong);
  padding: 34px 34px 30px;
}

/* brand bar */
.login-brandbar { display: flex; align-items: center; justify-content: center; gap: 13px; margin-bottom: 30px; }
.login-logo-tile {
  width: 50px; height: 50px; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  display: grid; place-items: center; box-shadow: var(--shadow-pop);
  overflow: hidden; flex-shrink: 0;
}
.login-logo-tile img { width: 40px; height: auto; object-fit: contain; }
.login-logo-tile-wide {
  width: 132px;
  height: 62px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.login-logo-tile-wide img {
  width: 112px;
  max-height: 54px;
}
.login-logo-tile-center {
  width: min(280px, 100%);
  height: 132px;
  margin: 0 auto;
}
.login-logo-tile-center img {
  width: min(235px, 88%);
  max-height: 112px;
}
.login-brandbar-text { display: grid; gap: 1px; }
.login-brandbar-text strong { font-size: 1rem; font-weight: 800; color: var(--text); }
.login-brandbar-text span { font-size: 0.74rem; color: var(--muted); }

/* heading */
.login-head { margin-bottom: 24px; }
.login-eyebrow {
  display: inline-block;
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--primary);
  background: var(--primary-soft);
  padding: 5px 11px; border-radius: 999px; margin-bottom: 14px;
}
.login-head h1 { margin: 0 0 8px; font-size: 1.85rem; font-weight: 800; letter-spacing: -0.03em; }
.login-head p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }

/* form */
.login-form { display: grid; gap: 16px; }
.login-field { display: grid; gap: 7px; }
.login-field .form-label { margin-bottom: 0; font-size: 0.85rem; font-weight: 700; color: var(--text-soft); }
.login-label-row { display: flex; align-items: center; justify-content: space-between; }
.login-forgot { font-size: 0.8rem; font-weight: 600; color: var(--primary); }
.login-forgot:hover { color: var(--primary-strong); }

.login-input {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 0 14px;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.login-input:focus-within {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 0.2rem rgba(108, 77, 246, 0.14);
}
.login-input > svg { width: 19px; height: 19px; color: var(--muted); flex-shrink: 0; }
.login-input input {
  flex: 1; border: 0; outline: 0; background: transparent;
  padding: 13px 0; font-family: var(--font-sans); font-size: 0.95rem; color: var(--text);
}
.login-input input::placeholder { color: var(--muted); }
.login-eye {
  border: 0; background: transparent; cursor: pointer; padding: 4px;
  color: var(--muted); display: grid; place-items: center;
}
.login-eye svg { width: 19px; height: 19px; }
.login-eye:hover, .login-eye.is-on { color: var(--primary); }

.login-row { display: flex; align-items: center; justify-content: space-between; }
.login-form .form-check-input { width: 1.05em; height: 1.05em; margin-top: 0.15em; border-color: var(--line); }
.login-form .form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
.login-form .form-check-label { font-size: 0.88rem; color: var(--text-soft); font-weight: 600; }

.login-alert {
  border: 1px solid rgba(241, 85, 108, 0.3);
  background: rgba(241, 85, 108, 0.08);
  color: #c33651; border-radius: 12px; padding: 10px 13px;
  font-size: 0.86rem; font-weight: 600;
}
.login-alert:empty { display: none; }

.login-submit {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px; font-size: 0.98rem; font-weight: 700; margin-top: 2px;
}
.login-submit svg { width: 18px; height: 18px; transition: transform .18s; }
.login-submit:hover svg { transform: translateX(3px); }

.login-footnote {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 22px; padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.8rem; font-weight: 600;
}
.login-footnote svg { width: 15px; height: 15px; color: var(--success); }

.login-copy { margin-top: 22px; color: var(--muted); font-size: 0.78rem; }

/* right hero */
.login-right {
  position: relative; min-height: 100vh; overflow: hidden;
  display: flex; align-items: center;
}
.login-right-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(620px circle at 18% 22%, rgba(160, 130, 255, 0.45), transparent 55%),
    radial-gradient(560px circle at 88% 82%, rgba(74, 50, 180, 0.55), transparent 55%),
    linear-gradient(150deg, #5b3ee0 0%, #6c4df6 42%, #3b2a8c 100%);
}
.login-right-bg::before,
.login-right-bg::after {
  content: ""; position: absolute; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.16);
}
.login-right-bg::before { width: 460px; height: 460px; top: -120px; right: -120px; }
.login-right-bg::after { width: 300px; height: 300px; bottom: -90px; left: -70px; background: rgba(255,255,255,0.05); border: 0; }

.login-right-content {
  position: relative; z-index: 1;
  color: #f3f0ff;
  padding: clamp(36px, 5vw, 72px);
  max-width: 620px;
}
.login-hero-badge {
  display: inline-block; font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.05em; color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 22px;
  backdrop-filter: blur(4px);
}
.login-right-content h2 {
  margin: 0 0 14px; font-size: clamp(1.9rem, 2.8vw, 2.9rem);
  font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; color: #fff;
}
.login-right-content > p {
  margin: 0 0 30px; max-width: 480px;
  font-size: clamp(0.98rem, 1.2vw, 1.1rem); line-height: 1.6;
  color: rgba(243, 240, 255, 0.86);
}

.login-features { list-style: none; padding: 0; margin: 0 0 34px; display: grid; gap: 15px; }
.login-features li {
  display: flex; align-items: center; gap: 13px;
  font-size: 0.98rem; font-weight: 600; color: #f3f0ff;
}
.lf-ico {
  width: 28px; height: 28px; border-radius: 9px; flex-shrink: 0;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: grid; place-items: center; color: #fff;
}
.lf-ico svg { width: 15px; height: 15px; }

.login-stats {
  display: flex; gap: 14px; flex-wrap: wrap;
  padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.login-stat { display: grid; gap: 2px; }
.login-stat strong { font-size: 1.5rem; font-weight: 800; color: #fff; line-height: 1; }
.login-stat span { font-size: 0.8rem; color: rgba(243, 240, 255, 0.78); }

/* ============================================================
   Responsive
   ============================================================ */
@media (min-width: 992px) {
  .app-shell { grid-template-columns: 268px minmax(0, 1fr); }
  .app-sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 18px 18px; }
  .app-topbar { margin: 20px 26px 0; padding: 14px 18px; }
  .app-topbar h1 { font-size: 1.45rem; }
  .app-content { padding: 22px 26px 32px; }
  .sticky-actions { position: sticky; bottom: 10px; }
  .dashboard-grid.two { grid-template-columns: 2fr 1fr; }
  .content-card:hover,
  .card:hover,
  .kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-strong); }
}

@media (max-width: 1200px) {
  .table-responsive { padding: 6px; }
  .table { min-width: 760px; }
  .topbar-search { width: 160px; }
}

@media (max-width: 991.98px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-right { display: none; }
  .login-left { min-height: 100vh; padding: 18px; }
  .app-topbar p { display: none; }
  .topbar-search { display: none; }
  .topbar-chip { display: none; }
  .app-content { padding-bottom: 22px; }
}

@media (max-width: 767.98px) {
  .app-content { padding: 12px; }
  .app-topbar { margin: 10px 10px 0; padding: 10px 12px; }
  .topbar-right .btn-primary { display: none; }
  .page-head .btn { width: 100%; }
  .dashboard-grid, .row { --bs-gutter-x: 0.8rem; --bs-gutter-y: 0.8rem; }
  .content-card, .card { padding: 14px; }
  .form-control, .form-select { padding: 0.56rem 0.7rem; }
  .btn { padding: 0.46rem 0.78rem; }
  .table { min-width: 700px; }
  .table > :not(caption) > * > * { padding: 0.66rem 0.58rem; }
  .offer-lines-toolbar { align-items: stretch; }
  .offer-lines-toolbar .btn,
  .offer-lines-toolbar .form-control,
  .offer-lines-toolbar .form-select { width: 100%; }
  .offer-line-name-wrap {
    align-items: stretch;
    flex-direction: column;
    min-width: 220px;
  }
  .offer-line-name-wrap .line-name { min-width: 100%; }
  .quick-catalog-add { width: 100%; }
}

/* ============================================================
   Teklif şablonu sürükle-bırak kurucu
   ============================================================ */
.builder-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.builder-palette { position: sticky; top: 14px; }
.builder-canvas { display: flex; flex-direction: column; gap: 10px; min-height: 80px; }
.builder-empty {
  text-align: center; color: var(--muted); padding: 28px;
  border: 2px dashed var(--line); border-radius: 12px; margin-top: 10px;
}
.builder-block {
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-soft); padding: 10px 12px;
  transition: box-shadow 0.15s, border-color 0.15s, opacity 0.15s;
}
.builder-block:hover { box-shadow: var(--shadow-soft); }
.builder-block.dragging { opacity: 0.45; border-color: var(--primary); }
.builder-block-head { display: flex; align-items: center; gap: 8px; }
.builder-block-head strong { font-size: 0.85rem; }
.builder-grip { cursor: grab; color: var(--muted); font-weight: 700; letter-spacing: -2px; }
.builder-block-actions { margin-left: auto; display: flex; gap: 4px; }
.builder-block-actions button {
  width: 26px; height: 26px; border: 1px solid var(--line);
  background: var(--surface); border-radius: 7px; cursor: pointer;
  color: var(--text-soft); line-height: 1; font-size: 0.85rem;
}
.builder-block-actions button:hover { background: var(--surface-2); color: var(--text); }
.builder-block-actions .bb-del:hover { color: var(--danger); border-color: var(--danger); }
.builder-block-body { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.builder-field { display: flex; flex-direction: column; gap: 3px; font-size: 0.72rem; color: var(--muted); font-weight: 600; }
.builder-field span { padding-left: 2px; }
.builder-field-wide { grid-column: span 2; }
.builder-field .form-control-color { width: 100%; height: 34px; padding: 3px; }
.builder-upload-group { display: grid; gap: 6px; }
.builder-upload-group small { font-size: 0.72rem; font-weight: 600; }
.builder-block-note { margin-top: 6px; font-size: 0.78rem; color: var(--muted); font-style: italic; }
.token-btn { font-size: 0.7rem; padding: 2px 7px; }

@media (max-width: 991.98px) {
  .builder-grid { grid-template-columns: 1fr; }
  .builder-palette { position: static; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============================================================
   Profesyonel teklif şablonu ekranları
   ============================================================ */
.quote-template-list { display: grid; gap: 14px; }
.quote-template-card {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  border: 1px solid rgba(124, 92, 255, 0.12);
}
.quote-template-card-main { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.quote-template-card-icon {
  width: 46px; height: 46px; border-radius: 16px;
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 0.82rem; letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--primary), #9f4664);
  box-shadow: 0 12px 26px rgba(124, 92, 255, 0.2);
  flex: 0 0 auto;
}
.quote-template-card h4 { margin: 0; font-size: 1rem; font-weight: 800; }
.quote-template-card p { margin: 6px 0 3px; color: var(--muted); font-size: 0.88rem; }
.quote-template-card-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.quote-template-empty {
  min-height: 280px; display: grid; place-items: center; text-align: center;
  background:
    radial-gradient(circle at top left, rgba(124, 92, 255, 0.12), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(247,250,255,0.92));
}
.quote-template-empty > div { max-width: 520px; }
.quote-template-empty-icon {
  display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 20px;
  margin-bottom: 14px; color: #fff; font-size: 1.8rem; font-weight: 800;
  background: linear-gradient(135deg, var(--primary), #22c55e);
}
.quote-template-empty h4 { font-weight: 800; margin-bottom: 8px; }
.quote-template-empty p { color: var(--muted); }
.quote-template-form-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.quote-template-builder-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.08), rgba(34, 197, 94, 0.06));
}
.quote-template-builder-head strong { display: block; font-weight: 800; }
.quote-template-builder-head span { display: block; color: var(--muted); font-size: 0.86rem; margin-top: 2px; }
.quote-template-legacy-preview {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  background: linear-gradient(135deg, rgba(159, 70, 100, 0.08), rgba(255, 255, 255, 0.96));
}
.builder-grid {
  grid-template-columns: 260px minmax(360px, 1fr) minmax(360px, 42%);
  gap: 18px;
}
.builder-preview-wrap { position: sticky; top: 14px; }
.builder-preview-shell {
  border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background: #eef2f8; box-shadow: inset 0 1px 0 rgba(255,255,255,.7);
}
.builder-preview-toolbar {
  display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding: 10px 12px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.86);
}
.builder-preview-toolbar span { font-weight: 800; font-size: 0.84rem; }
.builder-preview-toolbar small { color: var(--muted); font-size: 0.72rem; }
.builder-preview {
  display: block; width: 100%; min-height: 680px; border: 0; background: #fff;
  transform-origin: top center;
}

@media (max-width: 1399.98px) {
  .builder-grid { grid-template-columns: 250px minmax(0, 1fr); }
  .builder-preview-wrap { position: static; grid-column: 1 / -1; }
  .builder-preview { min-height: 560px; }
}

@media (max-width: 991.98px) {
  .quote-template-card { align-items: stretch; flex-direction: column; }
  .quote-template-card-actions { justify-content: flex-start; }
  .quote-template-builder-head, .quote-template-legacy-preview { align-items: stretch; flex-direction: column; }
  .quote-template-form-toolbar .btn { flex: 1 1 160px; }
}

/* ============================================================
   Fine Tune  •  smaller type + legacy sidebar + real icons
   ============================================================ */
body { font-size: 14.5px; }

.app-sidebar {
  padding: 18px 14px 14px;
}

.brand-logo-mark {
  color: #fff;
  font-size: 1.1rem;
  font-weight: 800;
  font-family: var(--font-display);
}

.brand-logo-wrap {
  width: 42px;
  height: 42px;
}

.brand-text strong { font-size: 0.95rem; }
.brand-text span { font-size: 0.7rem; }

.app-nav-legacy {
  gap: 2px;
}

.app-nav .nav-link {
  padding: 8px 11px;
  font-size: 0.82rem;
}

.app-nav .nav-link .nav-ico {
  width: 16px;
  text-align: center;
  opacity: 0.72;
}

.nav-section-label {
  margin: 15px 8px 6px;
  font-size: 0.66rem;
}

.sidebar-promo-card {
  padding: 14px;
}

.sidebar-promo-title { font-size: 0.88rem; }
.sidebar-promo-card p { font-size: 0.75rem; }
.sidebar-promo-card a {
  min-height: 36px;
  font-size: 0.78rem;
}

.sidebar-footer .meta strong { font-size: 0.8rem; }
.sidebar-footer .meta small { font-size: 0.7rem; }

.app-topbar {
  margin: 12px 12px 0;
  padding: 10px 12px;
}

.app-topbar h1 { font-size: 1.15rem; }
.app-topbar p { font-size: 0.78rem; }

.topbar-search {
  width: 390px;
  padding: 7px 11px;
}

.topbar-search input {
  font-size: 0.82rem;
}

.topbar-search-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 28px;
  padding: 0 8px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.topbar-icon-btn {
  width: 38px;
  height: 38px;
  font-size: 0.92rem;
}

.topbar-user .user-chip {
  padding: 4px 9px 4px 4px;
}

.user-chip-avatar {
  width: 32px;
  height: 32px;
  font-size: 0.78rem;
}

.user-chip-meta strong { font-size: 0.78rem; }
.user-chip-meta small { font-size: 0.68rem; }

.app-content { padding: 12px; }

.dashboard-hero {
  display: none;
}

.dashboard-modern-grid {
  grid-template-columns: minmax(0, 1.52fr) minmax(380px, 1.08fr);
  gap: 14px;
}

.feed-section-head {
  margin-bottom: 12px;
}

.feed-section-head h3 { font-size: 1rem; }
.feed-section-head p { font-size: 0.78rem; }

.feed-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feed-toolbar-btn {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 0.77rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.feed-toolbar-btn.icon {
  width: 34px;
  padding: 0;
  justify-content: center;
}

.feed-composer-card,
.feed-card,
.side-summary-card,
.side-list-card,
.side-actions-card {
  padding: 15px;
}

.feed-avatar,
.feed-avatar-brand,
.feed-comment-avatar {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  font-size: 0.78rem;
}

.feed-composer {
  grid-template-columns: 38px minmax(0, 1fr);
}

.feed-composer-input {
  min-height: 48px;
  padding: 0 14px;
  border-radius: 13px;
  font-size: 0.82rem;
}

.feed-composer-actions a {
  min-height: 32px;
  padding: 0 11px;
  font-size: 0.76rem;
  gap: 7px;
}

.feed-user-line { font-size: 0.82rem; }
.feed-user-line strong { font-size: 0.86rem; }
.feed-time { font-size: 0.72rem; }
.feed-more-btn { font-size: 0.88rem; letter-spacing: 0; }

.feed-card-head {
  margin-bottom: 11px;
}

.feed-entity-card {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  padding: 11px 12px;
  border-radius: 15px;
}

.feed-entity-icon,
.summary-stat-icon,
.quick-action-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}

.feed-entity-icon::before,
.summary-stat-icon::before,
.quick-action-icon::before {
  inset: 0;
  border-radius: inherit;
  opacity: 0.12;
}

.feed-entity-icon::after,
.summary-stat-icon::after,
.quick-action-icon::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 1rem;
}

.feed-icon-customer::after,
.summary-stat-icon.customer::after { content: "\f0c0"; color: #6c4df6; }
.feed-icon-offer::after,
.summary-stat-icon.offer::after { content: "\f15c"; color: #20ad67; }
.feed-icon-opportunity::after,
.summary-stat-icon.opportunity::after { content: "\f201"; color: #4778ff; }
.feed-icon-payment::after,
.summary-stat-icon.payment::after { content: "\f53d"; color: #d87d11; }
.feed-icon-document::after { content: "\f15b"; color: #4778ff; }
.feed-icon-task::after { content: "\f058"; color: #1a9d76; }

.feed-entity-title { font-size: 0.9rem; }
.feed-entity-subtitle { font-size: 0.78rem; }
.feed-entity-meta { font-size: 0.71rem; }
.feed-entity-amount { font-size: 0.88rem; }

.feed-badge,
.priority-pill,
.type-pill {
  min-height: 24px;
  padding: 0 9px;
  font-size: 0.68rem;
}

.feed-action-btn {
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.feed-card-actions {
  margin-top: 10px;
}

.feed-comment-avatar {
  font-size: 0.7rem;
}

.feed-comment-body strong,
.feed-comment-body p {
  font-size: 0.78rem;
}

.feed-comment-body span {
  font-size: 0.69rem;
}

.dashboard-feed-column,
.dashboard-side-column {
  gap: 14px;
}

.summary-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.summary-stat-box {
  min-height: 134px;
  padding: 12px 11px;
  border-radius: 15px;
  gap: 7px;
}

.summary-stat-box strong { font-size: 1.2rem; }
.summary-stat-box span { font-size: 0.74rem; }

.summary-stat-box.revenue {
  grid-column: span 1;
}

.side-finance-metric span,
.side-list-main span,
.side-list-main small,
.side-list-meta small,
.quick-action-box span {
  font-size: 0.72rem;
}

.side-finance-metric strong { font-size: 0.92rem; }
.side-list-main strong { font-size: 0.82rem; }

.side-list-item {
  padding: 10px 0;
}

.quick-action-box {
  padding: 12px;
  border-radius: 15px;
  gap: 8px;
}

.quick-action-box strong { font-size: 0.8rem; }

.quick-action-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.quick-action-icon.feed-icon-customer::after { content: "\f234"; color: #6c4df6; }
.quick-action-icon.feed-icon-offer::after { content: "\f15c"; color: #20ad67; }
.quick-action-icon.feed-icon-task::after { content: "\f044"; color: #1a9d76; }
.quick-action-icon.feed-icon-document::after { content: "\f0ae"; color: #4778ff; }

.sidebar-promo-card {
  padding: 16px 14px 14px;
  gap: 10px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(108, 77, 246, 0.07), rgba(108, 77, 246, 0.02)),
    linear-gradient(180deg, #ffffff, #faf8ff);
}

.sidebar-promo-visual {
  position: relative;
  height: 104px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(108, 77, 246, 0.05), rgba(108, 77, 246, 0.01));
  overflow: hidden;
}

.promo-bar {
  position: absolute;
  bottom: 18px;
  width: 14px;
  border-radius: 10px;
  background: rgba(108, 77, 246, 0.1);
}

.promo-bar.bar-1 { left: 22px; height: 42px; }
.promo-bar.bar-2 { left: 48px; height: 58px; }
.promo-bar.bar-3 { left: 74px; height: 34px; }

.promo-line {
  position: absolute;
  left: 18px;
  right: 14px;
  bottom: 26px;
  height: 54px;
}

.promo-line::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0 6%, #7b61ff 6% 8%, transparent 8% 28%, #7b61ff 28% 30%, transparent 30% 52%, #7b61ff 52% 54%, transparent 54% 77%, #7b61ff 77% 79%, transparent 79%);
  clip-path: polygon(0 78%, 22% 52%, 42% 64%, 64% 34%, 82% 47%, 100% 8%, 100% 20%, 82% 57%, 64% 44%, 42% 74%, 22% 62%, 0 88%);
  opacity: 0.95;
}

.promo-line::after {
  content: "\f061";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  right: 0;
  top: 2px;
  color: #7b61ff;
  font-size: 0.9rem;
}

.settings-shortcut-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.shortcut-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(108, 77, 246, 0.04), rgba(108, 77, 246, 0.01));
  box-shadow: var(--shadow-soft);
  color: var(--text);
}

.shortcut-card:hover {
  color: var(--text);
  border-color: rgba(108, 77, 246, 0.16);
  transform: translateY(-1px);
}

.shortcut-card strong {
  font-size: 0.95rem;
  font-weight: 800;
}

.shortcut-card small {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.shortcut-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1rem;
}

.agenda-day-card {
  padding: 18px 20px;
}

.agenda-day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.agenda-day-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.agenda-list {
  display: grid;
  gap: 12px;
}

.agenda-item {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.agenda-time {
  display: grid;
  align-content: start;
  gap: 2px;
  color: var(--text-soft);
}

.agenda-time strong {
  font-size: 0.95rem;
  color: var(--text);
}

.agenda-time small,
.agenda-meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.agenda-body {
  display: grid;
  gap: 12px;
}

.agenda-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
}

.agenda-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 5px;
}

.agenda-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (min-width: 1200px) {
  .app-sidebar { position: sticky; top: 0; height: 100vh; padding: 20px 14px 14px; }
  .app-topbar { margin: 16px 20px 0; padding: 11px 14px; }
  .topbar-search { width: 320px; }
}

@media (max-width: 991px) {
  .topbar-search-shortcut { display: none; }
  .summary-stat-grid,
  .quick-action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agenda-item {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   COMPACT CONTENT  •  içerik alanını sidebar ölçeğine indir
   (yalnızca içerik bileşenleri; sidebar/topbar korunur)
   ============================================================ */

/* Page head */
.page-head { margin-bottom: 14px; gap: 10px; }
.page-head h3 { font-size: 1.18rem; letter-spacing: -0.02em; }
.page-head p { font-size: 0.79rem; margin-top: 3px; }

/* Cards */
.content-card,
.card { padding: 15px; border-radius: 13px; }
.card-header { padding: 11px 14px; font-size: 0.86rem; }
.form-section-title { font-size: 0.9rem; margin-bottom: 11px; }

/* KPI / summary tiles */
.kpi-card { padding: 15px; border-radius: 13px; }
.kpi-card .kpi-label { font-size: 0.74rem; }
.kpi-card .kpi-value { font-size: clamp(1.25rem, 1.3vw, 1.5rem); }
.kpi-card small { font-size: 0.72rem; }
.summary-tile { padding: 10px 11px; border-radius: 10px; }
.summary-tile .label { font-size: 0.72rem; }
.summary-tile .value { font-size: 0.95rem; }

/* Tables — modern & compact */
.table-responsive { padding: 6px; border-radius: 13px; }
.table thead th {
  font-size: 0.66rem;
  padding: 0.5rem 0.62rem;
  background: var(--surface-soft);
  letter-spacing: 0.04em;
}
.table > :not(caption) > * > * {
  padding: 0.52rem 0.62rem;
  font-size: 0.82rem;
}
.table tbody tr { transition: background 0.12s; }
.table-actions { gap: 5px; }
.table .btn,
.table-actions .btn { padding: 0.28rem 0.58rem; font-size: 0.74rem; border-radius: 8px; }

/* Forms — compact */
.form-label { font-size: 0.78rem; font-weight: 600; margin-bottom: 0.26rem; }
.form-control,
.form-select {
  padding: 0.46rem 0.7rem;
  font-size: 0.85rem;
  border-radius: 9px;
  min-height: 38px;
}
textarea.form-control { min-height: auto; }
.form-control-sm,
.form-select-sm { min-height: 32px; font-size: 0.8rem; padding: 0.3rem 0.55rem; }
.input-group-text { font-size: 0.82rem; border-radius: 9px; background: var(--surface-2); border-color: var(--line); }
.form-check-label { font-size: 0.85rem; }
.form-check-input { margin-top: 0.18em; }

/* Buttons — compact */
.btn { padding: 0.42rem 0.85rem; font-size: 0.83rem; border-radius: 9px; }
.btn-sm { padding: 0.28rem 0.6rem; font-size: 0.76rem; border-radius: 8px; }
.btn-lg { padding: 0.6rem 1.1rem; font-size: 0.95rem; }

/* Badges */
.badge { font-size: 0.7rem; padding: 0.36em 0.62em; }

/* Alerts — compact */
.alert { padding: 0.66rem 0.9rem; font-size: 0.84rem; border-radius: 11px; margin-bottom: 14px; }

/* Modals — modern */
.modal-content { border-radius: 15px; border: 1px solid var(--line); box-shadow: var(--shadow-strong); }
.modal-header { padding: 13px 18px; border-bottom: 1px solid var(--line); }
.modal-title { font-size: 1.02rem; font-weight: 800; }
.modal-body { padding: 18px; font-size: 0.88rem; }
.modal-footer { padding: 12px 18px; border-top: 1px solid var(--line); gap: 6px; }

/* Dropdowns */
.dropdown-menu { font-size: 0.85rem; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow-strong); padding: 6px; }
.dropdown-item { border-radius: 8px; padding: 7px 11px; }

/* Pagination & tabs */
.pagination .page-link { border-radius: 9px; margin: 0 2px; font-size: 0.82rem; border-color: var(--line); color: var(--text-soft); }
.pagination .page-item.active .page-link { background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); border-color: transparent; }
.nav-tabs { border-bottom: 1px solid var(--line); gap: 2px; }
.nav-tabs .nav-link { font-size: 0.85rem; border: 0; border-radius: 9px 9px 0 0; color: var(--text-soft); padding: 0.5rem 0.85rem; }
.nav-tabs .nav-link.active { color: var(--primary-strong); background: var(--surface); border-bottom: 2px solid var(--primary); }

/* Sticky actions bar compact */
.sticky-actions { padding: 10px; border-radius: 12px; }

@media (max-width: 767px) {
  .page-head h3 { font-size: 1.08rem; }
  .content-card, .card { padding: 13px; }
  .table > :not(caption) > * > * { padding: 0.5rem 0.5rem; }
}

/* ═══════════════════════════════════════════════════════════
   NOTIFICATION & MESSAGE BADGE
   ═══════════════════════════════════════════════════════════ */
.topbar-badge-wrap { position: relative; }
.topbar-badge {
  position: absolute;
  top: 2px; right: 2px;
  min-width: 16px; height: 16px;
  font-size: 0.6rem; font-weight: 700;
  background: var(--brand-1); color: #fff;
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--topbar-bg, #fff);
  line-height: 1;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════
   MESSAGING MODULE
   ═══════════════════════════════════════════════════════════ */
.msg-layout {
  display: flex;
  min-height: 520px;
}
.msg-sidebar {
  width: 200px;
  flex-shrink: 0;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 20px 16px;
  gap: 4px;
}
.msg-sidebar-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  border-radius: 12px;
  margin-bottom: 14px;
  color: #fff;
}
.msg-unread-count { font-size: 2rem; font-weight: 800; line-height: 1; }
.msg-unread-label { font-size: 0.7rem; opacity: 0.8; margin-top: 2px; }

.msg-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.msg-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--text-soft);
  font-size: 0.83rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.msg-nav-link i { width: 16px; text-align: center; }
.msg-nav-link:hover { background: var(--hover-bg); color: var(--text); }
.msg-nav-link.active { background: var(--brand-soft); color: var(--brand-1); font-weight: 600; }
.msg-nav-badge {
  margin-left: auto;
  background: var(--brand-1); color: #fff;
  border-radius: 20px; padding: 1px 7px;
  font-size: 0.65rem; font-weight: 700;
}
.msg-compose-btn-wrap { margin-top: 16px; }

.msg-list-area { flex: 1; overflow: hidden; }
.msg-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  transition: background 0.12s;
}
.msg-row:hover { background: var(--hover-bg); }
.msg-row.unread { background: color-mix(in srgb, var(--brand-1) 4%, transparent); }
.msg-row-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 0.72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.msg-row-avatar.brand { background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); color: #fff; }

.msg-row-body {
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: inherit;
}
.msg-row-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.msg-row-sender { font-size: 0.85rem; color: var(--text); }
.msg-row-time { font-size: 0.72rem; color: var(--text-soft); flex-shrink: 0; }
.msg-row-subject {
  font-size: 0.84rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--text);
  margin-top: 2px;
}
.msg-row.unread .msg-row-subject { color: var(--brand-1); }
.msg-row-preview { font-size: 0.78rem; color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-row-del { flex-shrink: 0; opacity: 0; transition: opacity 0.15s; }
.msg-row:hover .msg-row-del { opacity: 1; }

.msg-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 280px; color: var(--text-soft);
}
.msg-empty i { font-size: 3rem; margin-bottom: 12px; opacity: 0.3; }
.msg-empty p { font-size: 0.88rem; }

/* Message detail */
.msg-detail-head {
  display: flex; gap: 16px; align-items: flex-start;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 24px;
}
.msg-detail-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  font-size: 0.9rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.msg-detail-from { font-size: 0.88rem; color: var(--text); }
.msg-detail-from strong { color: var(--brand-1); }
.msg-detail-time { font-size: 0.8rem; margin-top: 4px; }
.msg-detail-body {
  font-size: 0.9rem; line-height: 1.7; color: var(--text);
  min-height: 120px;
  padding: 20px;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--line);
}
.msg-detail-actions { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; }

/* ═══════════════════════════════════════════════════════════
   EMAIL SETTINGS PAGE
   ═══════════════════════════════════════════════════════════ */
.card-section-head {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.card-section-head i { font-size: 1.1rem; }

.smtp-guide { display: flex; flex-direction: column; gap: 12px; }
.smtp-guide-step {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 0.82rem; color: var(--text);
}
.step-num {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  font-size: 0.7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.smtp-guide-step code {
  background: var(--surface-2); border-radius: 4px;
  padding: 1px 5px; font-size: 0.78rem;
}

/* Feed checkbox */
.form-check-feed {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 16px 12px 42px;
  margin: 4px 0;
  font-size: 0.84rem;
}
.form-check-feed .form-check-input { margin-left: -26px; margin-top: 2px; }

/* Ghost danger btn */
.btn-ghost-danger { background: transparent; border: none; color: var(--text-soft); padding: 4px 7px; }
.btn-ghost-danger:hover { color: #dc2626; background: #fee2e2; }

/* ═══════════════════════════════════════════════════════════
   HOMEPAGE FEED IMPROVEMENTS
   ═══════════════════════════════════════════════════════════ */
.feed-quick-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 12px 0 4px;
  border-top: 1px solid var(--line);
  margin-top: 12px;
}
.feed-quick-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-soft);
  text-decoration: none;
  transition: all 0.15s;
}
.feed-quick-btn:hover {
  background: var(--brand-soft);
  color: var(--brand-1);
  border-color: var(--brand-1);
  text-decoration: none;
}
.feed-quick-btn i { font-size: 0.82rem; }

/* Quick link grid (side column) */
.quick-link-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.quick-link-card {
  position: relative;
  min-width: 0;
}
.quick-link-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 500;
  transition: all 0.15s;
  min-height: 74px;
  justify-content: center;
}
.quick-link-item i { font-size: 1.1rem; color: var(--brand-1); }
.quick-link-item:hover {
  background: var(--brand-soft);
  border-color: var(--brand-1);
  color: var(--brand-1);
  text-decoration: none;
}
.quick-link-item span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-link-add-btn {
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--brand-1) 22%, var(--line));
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 24px rgba(124,92,255,.22);
  transition: transform .16s ease, box-shadow .16s ease;
}
.quick-link-add-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(124,92,255,.28);
}
.quick-link-remove-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  margin: 0;
  opacity: 0;
  transform: scale(.85);
  pointer-events: none;
  transition: opacity .15s ease, transform .15s ease;
}
.quick-link-card:hover .quick-link-remove-btn,
.quick-link-card:focus-within .quick-link-remove-btn {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.quick-link-remove-btn {
  width: 22px;
  height: 22px;
  border: 1px solid #fecdd3;
  border-radius: 999px;
  background: #fff1f2;
  color: #e11d48;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  box-shadow: 0 10px 22px rgba(225,29,72,.18);
}
.quick-link-remove-btn:hover {
  background: #e11d48;
  border-color: #e11d48;
  color: #fff;
}
.quick-link-empty {
  grid-column: 1 / -1;
}
.quick-link-modal {
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(15,23,42,.18);
  overflow: hidden;
}
.quick-link-modal .modal-header {
  padding: 22px 24px;
  align-items: flex-start;
  background: linear-gradient(135deg, rgba(255,255,255,.98), rgba(248,250,255,.96));
}
.quick-link-modal .modal-title {
  margin: 0;
  color: var(--text);
  font-weight: 850;
}
.quick-link-modal .modal-header p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: .88rem;
}
.quick-link-modal .modal-body {
  padding: 22px 24px 24px;
}
.quick-link-picker-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-height: min(62vh, 560px);
  overflow-y: auto;
  padding-right: 4px;
}
.quick-link-picker-grid::-webkit-scrollbar {
  width: 7px;
}
.quick-link-picker-grid::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 999px;
}
.quick-link-picker-form {
  margin: 0;
}
.quick-link-picker-item {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.96);
  text-align: left;
  color: var(--text);
  transition: all .16s ease;
  cursor: pointer;
}
.quick-link-picker-item:hover {
  border-color: color-mix(in srgb, var(--brand-1) 45%, var(--line));
  background: var(--brand-soft);
  transform: translateY(-1px);
}
.quick-link-picker-item.selected {
  border-color: color-mix(in srgb, var(--brand-1) 58%, var(--line));
  background: color-mix(in srgb, var(--brand-1) 8%, #fff);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand-1) 18%, transparent);
}
.quick-link-checkbox {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}
.quick-link-picker-content {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}
.quick-link-picker-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: color-mix(in srgb, var(--brand-1) 12%, #fff);
  color: var(--brand-1);
}
.quick-link-picker-item strong,
.quick-link-picker-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-link-picker-item strong {
  font-size: .9rem;
  font-weight: 780;
}
.quick-link-picker-item small {
  margin-top: 2px;
  color: var(--text-soft);
  font-size: .76rem;
}
.quick-link-checkmark {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  background: #fff;
  transition: all .16s ease;
}
.quick-link-picker-item.selected .quick-link-checkmark {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 10px 22px rgba(124,92,255,.22);
}
.quick-link-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
}
.quick-link-save-status {
  margin-right: auto;
  color: var(--text-soft);
  font-size: .82rem;
}
.quick-link-save-status.success {
  color: #059669;
}
.quick-link-save-status.error {
  color: #e11d48;
}
.quick-link-save-btn {
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  box-shadow: 0 14px 28px rgba(124,92,255,.22);
}
.quick-link-saving {
  opacity: .7;
  pointer-events: none;
}
.quick-link-item-removing {
  opacity: .55;
  transform: scale(.98);
}
.quick-link-temp-empty {
  grid-column: 1 / -1;
}
/* Legacy selector kept for older cached markup. */
.quick-link-picker-item > .fa-plus {
  width: 30px;
  height: 30px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
}
@media (max-width: 767.98px) {
  .quick-link-picker-grid {
    grid-template-columns: 1fr;
    max-height: 58vh;
  }
  .quick-link-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Billing explainer banner */
.billing-explainer {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 18px;
  background: color-mix(in srgb, var(--primary) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 0.84rem;
  line-height: 1.5;
}
.billing-explainer-icon {
  font-size: 1.2rem;
  color: var(--primary);
  flex-shrink: 0;
  margin-top: 2px;
}
.billing-explainer strong { display: block; margin-bottom: 3px; font-size: 0.86rem; color: var(--text); }
.billing-explainer span { color: var(--text-soft); }

/* ═══════════════════════════════════════════════════════════
   REPORTS PAGE
   ═══════════════════════════════════════════════════════════ */
.kpi-icon-wrap {
  font-size: 1.2rem;
  margin-bottom: 8px;
  opacity: 0.6;
}
.kpi-card.kpi-positive .kpi-icon-wrap { color: #16a34a; }
.kpi-card.kpi-negative .kpi-icon-wrap { color: #dc2626; }
.kpi-sub {
  font-size: 0.72rem;
  color: var(--text-soft);
  margin-top: 4px;
}

.expense-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-soft);
}
.expense-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.sales-rep-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.sales-rep-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff;
  font-size: 0.72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sales-rep-body { flex: 1; min-width: 0; }
.sales-rep-name { font-size: 0.84rem; }

/* ═══════════════════════════════════════════════════════════
   NOTIFICATION LIST
   ═══════════════════════════════════════════════════════════ */
.notif-list { display: flex; flex-direction: column; }
.notif-row {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  transition: background 0.12s;
}
.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: var(--hover-bg); }
.notif-row.unread { background: color-mix(in srgb, var(--brand-1) 4%, transparent); }

.notif-icon-wrap {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; flex-shrink: 0;
}
.notif-icon-task { background: #eff6ff; color: #2563eb; }
.notif-icon-payment { background: #fff7ed; color: #ea580c; }
.notif-icon-sales { background: #f0fdf4; color: #16a34a; }
.notif-icon-invite { background: #faf5ff; color: #7c3aed; }
.notif-icon-system { background: color-mix(in srgb, var(--brand-1) 10%, transparent); color: var(--brand-1); }

.notif-content { flex: 1; min-width: 0; }
.notif-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 4px; }
.notif-title-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notif-title { font-size: 0.85rem; color: var(--text); }
.notif-type-pill {
  font-size: 0.68rem; font-weight: 600;
  background: var(--surface-2); color: var(--text-soft);
  border-radius: 20px; padding: 1px 8px;
}
.notif-unread-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-1); flex-shrink: 0;
}
.notif-time { font-size: 0.72rem; color: var(--text-soft); flex-shrink: 0; }
.notif-body { font-size: 0.8rem; color: var(--text-soft); margin: 0 0 4px; }
.notif-meta { display: flex; align-items: center; gap: 12px; font-size: 0.75rem; color: var(--text-soft); }
.notif-link { color: var(--brand-1); text-decoration: none; font-weight: 500; }
.notif-link:hover { text-decoration: underline; }

.notif-actions { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; }

.notif-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 200px; color: var(--text-soft);
}
.notif-empty i { font-size: 2.5rem; opacity: 0.3; margin-bottom: 12px; }

/* Extra small button */
.btn-xs { padding: 3px 7px; font-size: 0.72rem; border-radius: 7px; }

/* ═══════════════════════════════════════════════════════════
   COMPACT FEED CARDS + DATE FILTER + PAGINATION
   ═══════════════════════════════════════════════════════════ */

/* Compact feed card */
.feed-card-compact { padding: 12px 14px !important; margin-bottom: 8px !important; border-radius: 10px !important; }
.feed-card-compact .feed-card-head { margin-bottom: 8px; }
.feed-avatar-sm { width: 30px !important; height: 30px !important; font-size: 0.66rem !important; }
.feed-card-compact .feed-user { gap: 8px; }
.feed-card-compact .feed-user-line { font-size: 0.8rem; }
.feed-card-compact .feed-time { font-size: 0.7rem; }

.feed-entity-compact { padding: 8px 10px !important; border-radius: 8px !important; gap: 8px !important; }
.feed-entity-compact .feed-entity-icon { width: 28px !important; height: 28px !important; }
.feed-entity-compact .feed-entity-title { font-size: 0.82rem !important; }
.feed-entity-compact .feed-entity-subtitle { font-size: 0.74rem !important; }
.feed-entity-compact .feed-entity-amount { font-size: 0.82rem !important; }

.feed-card-actions-compact { padding: 6px 0 0 !important; gap: 8px !important; }
.feed-card-actions-compact .feed-action-btn { font-size: 0.75rem !important; padding: 3px 8px !important; }

.feed-comments-compact { padding: 8px 0 0 !important; gap: 6px !important; }
.feed-comments-compact .feed-comment-avatar { width: 24px !important; height: 24px !important; font-size: 0.6rem !important; }
.feed-comments-compact .feed-comment-body strong { font-size: 0.76rem; }
.feed-comments-compact .feed-comment-body p { font-size: 0.76rem !important; margin: 1px 0 !important; }

.feed-comment-form-compact { display: flex !important; gap: 6px; padding-top: 6px; border-top: 1px solid var(--line); }
.feed-comment-form-compact input { flex: 1; }

/* Date filter */
.feed-date-filter { margin: 10px 0 8px; }
.feed-date-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.feed-date-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.feed-date-input-wrap i {
  position: absolute;
  left: 8px;
  color: var(--text-soft);
  font-size: 0.8rem;
  pointer-events: none;
  z-index: 1;
}
.feed-date-input-wrap input { padding-left: 26px !important; width: 150px; }
.feed-date-active-label {
  font-size: 0.75rem;
  color: var(--text-soft);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Feed pagination */
.feed-pagination {
  display: flex;
  align-items: center;
  gap: 4px;
  justify-content: center;
  padding: 12px 0 4px;
}
.feed-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  border: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
  background: var(--surface);
}
.feed-page-btn:hover:not(.disabled) { background: var(--brand-soft); border-color: var(--brand-1); color: var(--brand-1); }
.feed-page-btn.active { background: linear-gradient(135deg, var(--brand-1), var(--brand-2)); border-color: transparent; color: #fff; }
.feed-page-btn.disabled { opacity: 0.35; cursor: not-allowed; }
.feed-page-info { font-size: 0.75rem; color: var(--text-soft); margin-left: 4px; }

/* Empty feed state */
.feed-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-soft);
}
.feed-empty-state i { font-size: 2.5rem; opacity: 0.25; display: block; margin-bottom: 10px; }
.feed-empty-state strong { font-size: 0.9rem; color: var(--text); display: block; margin-bottom: 4px; }
.feed-empty-state p { font-size: 0.8rem; }

/* Flatpickr customizations */
.flatpickr-calendar { border-radius: 12px !important; box-shadow: var(--shadow-strong) !important; border: 1px solid var(--line) !important; }
.flatpickr-day.selected, .flatpickr-day.selected:hover { background: var(--brand-1) !important; border-color: var(--brand-1) !important; }
.flatpickr-day:hover { background: var(--brand-soft) !important; }

/* ═══════════════════════════════════════════════════════════
   CUSTOMER INDEX — avatar + table
   ═══════════════════════════════════════════════════════════ */
.cust-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff; font-size: 0.7rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   CUSTOMER 360 DETAIL PAGE
   ═══════════════════════════════════════════════════════════ */
.cust360-hero-avatar {
  width: 52px; height: 52px; border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
  color: #fff; font-size: 1rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* KPI row */
.cust360-kpi-row {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.cust360-kpi {
  flex: 1; min-width: 110px;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
}
.cust360-kpi i { font-size: 1.1rem; opacity: 0.75; }
.cust360-kpi span { font-size: 1.05rem; font-weight: 800; display: block; line-height: 1.1; }
.cust360-kpi small { font-size: 0.7rem; color: var(--text-soft); }

/* Tabs */
.cust360-tabs {
  border-bottom: 2px solid var(--line);
  gap: 2px;
}
.cust360-tabs .nav-link {
  border: none; border-radius: 8px 8px 0 0;
  font-size: 0.82rem; font-weight: 500;
  color: var(--text-soft); padding: 8px 14px;
  display: flex; align-items: center; gap: 5px;
}
.cust360-tabs .nav-link.active {
  color: var(--brand-1); background: transparent;
  border-bottom: 2px solid var(--brand-1);
  font-weight: 600;
}
.cust360-tabs .nav-link:hover:not(.active) { background: var(--hover-bg); color: var(--text); }

.tab-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; border-radius: 20px;
  background: var(--brand-soft); color: var(--brand-1);
  font-size: 0.65rem; font-weight: 700; padding: 0 5px;
}
.tab-badge.warn { background: #fef3c7; color: #92400e; }

.cust360-tab-content { outline: none; }

/* Tab card header */
.tab-card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  gap: 8px; flex-wrap: wrap;
}
.tab-card-head strong { font-size: 0.88rem; }

/* Tab pager row */
.tab-pager {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 16px; border-top: 1px solid var(--line);
  font-size: 0.78rem;
  min-height: 44px;
}

/* Info definition list */
.info-dl { margin: 0; display: grid; grid-template-columns: 110px 1fr; gap: 4px 12px; font-size: 0.83rem; }
.info-dl dt { color: var(--text-soft); font-weight: 500; align-self: start; padding-top: 2px; }
.info-dl dd { margin: 0; color: var(--text); word-break: break-word; }
.info-dl a { color: var(--brand-1); text-decoration: none; }
.info-dl a:hover { text-decoration: underline; }

/* Health bar */
.health-bar-wrap { height: 7px; background: var(--surface-2); border-radius: 20px; overflow: hidden; }
.health-bar { height: 100%; border-radius: 20px; transition: width .4s; }

/* Risk notes */
.risk-note { font-size: 0.78rem; color: var(--text-soft); margin-top: 4px; }

/* Timeline */
.cust360-timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item {
  display: flex; gap: 14px; position: relative;
  padding-bottom: 16px;
}
.tl-item:not(:last-child)::before {
  content: ''; position: absolute;
  left: 7px; top: 20px; bottom: 0; width: 2px;
  background: var(--line);
}
.tl-dot {
  width: 16px; height: 16px; border-radius: 50%; flex-shrink: 0;
  margin-top: 3px; border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--line);
}
.dot-green { background: #16a34a; }
.dot-blue { background: #2563eb; }
.dot-red { background: #dc2626; }
.dot-purple { background: #7c3aed; }
.dot-gray { background: #94a3b8; }

.tl-body { flex: 1; min-width: 0; }
.tl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.tl-type { font-size: 0.72rem; font-weight: 600; color: var(--text-soft); text-transform: uppercase; letter-spacing: .04em; }
.tl-date { font-size: 0.72rem; color: var(--text-soft); flex-shrink: 0; }
.tl-title { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.tl-detail { font-size: 0.78rem; color: var(--text-soft); margin-top: 1px; }
.tl-amount { font-size: 0.82rem; font-weight: 700; margin-top: 2px; }

/* ═══════════════════════════════════════════════════════════
   BREADCRUMB BAR
   ═══════════════════════════════════════════════════════════ */
.breadcrumb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 14px;
  flex-wrap: wrap;
}

.bc-nav { flex: 1; min-width: 0; }

.bc-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
}

.bc-item {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
}

.bc-link {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 500;
  padding: 3px 6px;
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}
.bc-link:hover {
  background: var(--hover-bg);
  color: var(--text);
  text-decoration: none;
}

.bc-sep {
  color: var(--line);
  padding: 0 2px;
  font-size: 0.6rem;
}

.bc-current {
  color: var(--text);
  font-weight: 600;
  padding: 3px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 260px;
}

.bc-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   CUSTOMER 360 — compact actions bar (replaces page-head)
   ═══════════════════════════════════════════════════════════ */
.cust360-actions-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 0 14px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.cust360-actions-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-soft);
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.cust360-actions-meta a {
  color: var(--text-soft);
  text-decoration: none;
  transition: color 0.12s;
}
.cust360-actions-meta a:hover { color: var(--brand-1); }

/* ═══════════════════════════════════════════════════════════
   CUSTOMER MAP
   ═══════════════════════════════════════════════════════════ */
.map-tooltip {
  background: var(--surface) !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  box-shadow: var(--shadow-strong) !important;
  color: var(--text) !important;
  font-size: .78rem !important;
  padding: 6px 10px !important;
}
.map-tooltip::before { display: none !important; }
.leaflet-popup-content-wrapper { border-radius: 12px !important; box-shadow: var(--shadow-strong) !important; }

/* ============================================================
   Collapsible application sidebar
   ============================================================ */
.brand-compact-mark { display: none; }

.desktop-sidebar-toggle {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text-soft);
  background: var(--surface-2);
  box-shadow: 0 4px 14px rgba(31, 34, 54, 0.04);
  transition: color .16s ease, border-color .16s ease, background .16s ease, transform .16s ease;
}

.desktop-sidebar-toggle:hover {
  color: var(--brand-1);
  border-color: color-mix(in srgb, var(--brand-1) 28%, var(--line));
  background: color-mix(in srgb, var(--brand-1) 7%, var(--surface));
}

.desktop-sidebar-toggle:active { transform: scale(.94); }
.desktop-sidebar-toggle:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand-1) 20%, transparent); outline-offset: 2px; }
.topbar-menu-btn { display: inline-flex; align-items: center; gap: 7px; }

.sidebar-hover-label {
  position: fixed;
  z-index: 1095;
  max-width: 240px;
  padding: 9px 12px;
  border: 1px solid color-mix(in srgb, var(--brand-1) 20%, var(--line));
  border-radius: 10px;
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 97%, transparent);
  box-shadow: 0 12px 30px rgba(31, 34, 54, .16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: .76rem;
  font-weight: 750;
  line-height: 1.25;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(5px, -50%) scale(.96);
  transform-origin: left center;
  transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}

.sidebar-hover-label::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -5px;
  width: 9px;
  height: 9px;
  border-left: 1px solid color-mix(in srgb, var(--brand-1) 20%, var(--line));
  border-bottom: 1px solid color-mix(in srgb, var(--brand-1) 20%, var(--line));
  background: var(--surface);
  transform: translateY(-50%) rotate(45deg);
}

.sidebar-hover-label.show {
  opacity: 1;
  visibility: visible;
  transform: translate(0, -50%) scale(1);
}

@media (min-width: 992px) {
  .app-shell {
    transition: grid-template-columns .26s cubic-bezier(.2, .8, .2, 1);
  }

  .app-sidebar:not(.mobile) {
    min-width: 0;
    overflow-x: hidden;
    transition: padding .26s ease;
  }

  html.zcrm-sidebar-collapsed .app-shell,
  .app-shell.sidebar-collapsed {
    --page-max: 1480px;
    grid-template-columns: 76px minmax(0, 1fr);
  }

  html.zcrm-sidebar-collapsed .app-sidebar:not(.mobile),
  .app-shell.sidebar-collapsed > .app-sidebar:not(.mobile) {
    padding-right: 10px;
    padding-left: 10px;
  }

  html.zcrm-sidebar-collapsed .app-sidebar:not(.mobile) .sidebar-header,
  .app-shell.sidebar-collapsed > .app-sidebar:not(.mobile) .sidebar-header {
    justify-items: center;
  }

  html.zcrm-sidebar-collapsed .app-sidebar:not(.mobile) .brand,
  .app-shell.sidebar-collapsed > .app-sidebar:not(.mobile) .brand {
    width: 46px;
    height: 46px;
    padding: 0;
    justify-content: center;
  }

  html.zcrm-sidebar-collapsed .app-sidebar:not(.mobile) .brand-full-logo,
  .app-shell.sidebar-collapsed > .app-sidebar:not(.mobile) .brand-full-logo {
    display: none;
  }

  html.zcrm-sidebar-collapsed .app-sidebar:not(.mobile) .brand-compact-mark,
  .app-shell.sidebar-collapsed > .app-sidebar:not(.mobile) .brand-compact-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-1), var(--brand-2));
    box-shadow: 0 10px 24px color-mix(in srgb, var(--brand-1) 28%, transparent);
    font-size: 1.28rem;
    font-weight: 850;
    letter-spacing: -.05em;
  }

  html.zcrm-sidebar-collapsed .app-sidebar:not(.mobile) .app-nav,
  .app-shell.sidebar-collapsed > .app-sidebar:not(.mobile) .app-nav {
    align-items: center;
    padding-right: 0;
    overflow-x: hidden;
  }

  html.zcrm-sidebar-collapsed .app-sidebar:not(.mobile) .nav-section-label,
  .app-shell.sidebar-collapsed > .app-sidebar:not(.mobile) .nav-section-label {
    width: 30px;
    height: 1px;
    min-height: 1px;
    margin: 13px auto 7px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    background: var(--line);
    font-size: 0;
  }

  html.zcrm-sidebar-collapsed .app-sidebar:not(.mobile) .app-nav .nav-link,
  .app-shell.sidebar-collapsed > .app-sidebar:not(.mobile) .app-nav .nav-link {
    width: 44px;
    min-width: 44px;
    height: 42px;
    min-height: 42px;
    margin-inline: auto;
    padding: 0;
    justify-content: center;
    gap: 0;
    border-radius: 12px;
  }

  html.zcrm-sidebar-collapsed .app-sidebar:not(.mobile) .app-nav .nav-link span,
  .app-shell.sidebar-collapsed > .app-sidebar:not(.mobile) .app-nav .nav-link span {
    display: none;
  }

  html.zcrm-sidebar-collapsed .app-sidebar:not(.mobile) .app-nav .nav-link .nav-ico,
  .app-shell.sidebar-collapsed > .app-sidebar:not(.mobile) .app-nav .nav-link .nav-ico {
    width: auto;
    margin: 0;
    font-size: .98rem;
    opacity: .78;
  }

  html.zcrm-sidebar-collapsed .app-sidebar:not(.mobile) .sidebar-footer,
  .app-shell.sidebar-collapsed > .app-sidebar:not(.mobile) .sidebar-footer {
    width: 48px;
    min-width: 48px;
    margin-inline: auto;
    padding: 4px;
    justify-content: center;
    border-radius: 14px;
  }

  html.zcrm-sidebar-collapsed .app-sidebar:not(.mobile) .sidebar-footer .meta,
  .app-shell.sidebar-collapsed > .app-sidebar:not(.mobile) .sidebar-footer .meta {
    display: none;
  }

  html.zcrm-sidebar-collapsed .desktop-sidebar-toggle,
  .app-shell.sidebar-collapsed .desktop-sidebar-toggle {
    color: var(--brand-1);
    border-color: color-mix(in srgb, var(--brand-1) 25%, var(--line));
    background: color-mix(in srgb, var(--brand-1) 8%, var(--surface));
  }
}

@media (max-width: 991.98px) {
  .app-sidebar.mobile .brand-compact-mark { display: none !important; }
}

/* Support portal */
.support-portal-hero {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid #e3e5f0;
  border-radius: 22px;
  background: linear-gradient(120deg, #fff 0%, #faf9ff 65%, #f1edff 100%);
  box-shadow: 0 18px 48px rgba(37, 40, 66, .07);
}
.support-portal-hero::after { content:""; position:absolute; right:-70px; top:-100px; width:260px; height:260px; border-radius:50%; border:46px solid rgba(117,78,255,.055); pointer-events:none; }
.support-portal-hero-icon,.support-form-icon,.support-detail-symbol { width:54px; height:54px; display:grid; place-items:center; flex:0 0 auto; border-radius:17px; color:#fff; font-size:1.2rem; background:linear-gradient(135deg,#8a67ff,#6847ef); box-shadow:0 12px 25px rgba(104,71,239,.25); }
.support-eyebrow { display:block; color:#7553f4; font-size:.7rem; line-height:1; font-weight:800; letter-spacing:.08em; text-transform:uppercase; }
.support-portal-hero h2,.support-form-head h2,.support-detail-hero h2 { margin:7px 0 5px; color:#202338; font-size:clamp(1.2rem,2vw,1.65rem); font-weight:750; letter-spacing:-.025em; }
.support-portal-hero p,.support-form-head p,.support-detail-hero p { margin:0; color:#777e94; font-size:.84rem; }
.support-portal-hero-actions { position:relative; z-index:1; display:flex; align-items:center; gap:12px; }
.support-total { display:flex; flex-direction:column; padding-right:14px; color:#8a90a4; font-size:.68rem; text-align:right; }
.support-total strong { color:#24283a; font-size:1.15rem; }
.support-filter-panel { display:flex; align-items:end; gap:12px; margin:16px 0; padding:16px; border:1px solid #e4e6ef; border-radius:18px; background:#fff; box-shadow:0 10px 32px rgba(37,40,66,.045); }
.support-filter-panel label { display:block; margin-bottom:6px; color:#72788d; font-size:.72rem; font-weight:750; }
.support-filter-main { flex:1 1 440px; }.support-filter-status { flex:0 1 240px; }
.support-search-input { position:relative; }.support-search-input i { position:absolute; left:14px; top:50%; transform:translateY(-50%); color:#a0a5b8; font-size:.8rem; }
.support-search-input input { width:100%; min-height:42px; padding:9px 14px 9px 39px; border:1px solid #dfe2ec; border-radius:12px; outline:0; background:#f9faff; color:#25293b; font-size:.82rem; transition:.2s; }
.support-search-input input:focus { border-color:#8768f9; background:#fff; box-shadow:0 0 0 3px rgba(117,83,244,.1); }
.support-ticket-list { overflow:hidden; border:1px solid #e3e5ee; border-radius:20px; background:#fff; box-shadow:0 14px 40px rgba(37,40,66,.05); }
.support-ticket-row { display:grid; grid-template-columns:auto minmax(0,1fr) auto minmax(145px,auto) auto; align-items:center; gap:15px; padding:17px 19px; border-bottom:1px solid #eff0f5; color:inherit; text-decoration:none; transition:background .18s,transform .18s; }
.support-ticket-row:last-child { border-bottom:0; }.support-ticket-row:hover { color:inherit; background:#faf9ff; }
.support-ticket-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:13px; background:#f0edff; color:#7655f5; }.support-ticket-icon.resolved { background:#e8f8f1; color:#16a36c; }.support-ticket-icon.critical { background:#fff0f2; color:#e5485d; }
.support-ticket-content,.support-ticket-heading,.support-ticket-meta,.support-ticket-badges,.support-ticket-target { display:flex; }.support-ticket-content { min-width:0; flex-direction:column; gap:7px; }
.support-ticket-heading { align-items:center; gap:9px; min-width:0; }.support-ticket-heading strong { overflow:hidden; color:#262a3d; font-size:.86rem; text-overflow:ellipsis; white-space:nowrap; }.support-ticket-heading small { flex:0 0 auto; color:#a0a5b7; font-size:.66rem; }
.support-ticket-meta { gap:15px; color:#858ba0; font-size:.69rem; }.support-ticket-meta span { display:inline-flex; align-items:center; gap:5px; }
.support-ticket-badges { align-items:center; gap:6px; }.support-priority,.support-status { display:inline-flex; align-items:center; min-height:25px; padding:4px 9px; border-radius:999px; font-size:.66rem; font-weight:750; white-space:nowrap; }
.support-priority { background:#f1f3f8; color:#667087; }.priority-critical { background:#ffe9ed; color:#d92f48; }.priority-high { background:#fff0df; color:#d36a00; }.priority-medium { background:#fff8d8; color:#9c7410; }.priority-low { background:#eaf5ff; color:#2475b8; }
.support-status { background:#ebe7ff; color:#6644e4; }.status-resolved,.status-closed { background:#e4f8ef; color:#148b5d; }.status-waitingcustomer { background:#fff2dd; color:#bf6800; }.status-waitingstaff { background:#edf2ff; color:#4164c7; }.status-inprogress { background:#e8edff; color:#435ed1; }
.support-ticket-target { flex-direction:column; gap:2px; padding-left:15px; border-left:1px solid #eceef4; }.support-ticket-target small { color:#a0a5b7; font-size:.63rem; }.support-ticket-target strong { color:#5f667c; font-size:.7rem; font-weight:700; }.support-ticket-arrow { color:#aeb3c2; font-size:.7rem; }
.support-empty { padding:55px 20px; text-align:center; }.support-empty>div { width:58px; height:58px; display:grid; place-items:center; margin:0 auto 14px; border-radius:18px; background:#f1eeff; color:#7655f5; font-size:1.35rem; }.support-empty h3 { margin:0 0 7px; color:#25293c; font-size:1rem; }.support-empty p { margin:0 0 17px; color:#8b91a5; font-size:.78rem; }
.support-pagination { display:flex; justify-content:space-between; align-items:center; gap:15px; margin-top:14px; padding:12px 14px; border:1px solid #e4e6ef; border-radius:15px; background:#fff; }.support-pagination>span { color:#8a90a4; font-size:.7rem; }

.support-create-layout { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(280px,.65fr); gap:18px; align-items:start; }
.support-form-card,.support-help-card,.support-thread-card,.support-summary-card,.support-rating-card { border:1px solid #e2e4ee; border-radius:22px; background:#fff; box-shadow:0 16px 44px rgba(37,40,66,.055); }
.support-form-card { padding:25px; }.support-form-head { display:flex; align-items:center; gap:15px; padding-bottom:20px; margin-bottom:22px; border-bottom:1px solid #eef0f5; }.support-description-input { min-height:190px; resize:vertical; }.support-field-hint { display:flex; align-items:center; gap:7px; margin-top:8px; color:#8b91a5; font-size:.69rem; }.support-field-hint i { color:#7655f5; }.support-form-actions { display:flex; justify-content:flex-end; gap:9px; margin-top:22px; padding-top:18px; border-top:1px solid #eef0f5; }
.support-help-card { position:sticky; top:90px; padding:24px; overflow:hidden; }.support-help-visual { position:relative; width:72px; height:72px; display:grid; place-items:center; margin-bottom:20px; border-radius:22px; background:#f0edff; color:#714ef3; font-size:1.65rem; }.support-help-visual span { position:absolute; right:-4px; top:-4px; width:16px; height:16px; border:4px solid #fff; border-radius:50%; background:#22b779; }.support-help-card h3 { color:#262a3d; font-size:1rem; }.support-help-card ul { display:grid; gap:14px; padding:0; margin:18px 0; list-style:none; }.support-help-card li { display:flex; align-items:flex-start; gap:10px; color:#70778c; font-size:.75rem; line-height:1.55; }.support-help-card li i { width:19px; height:19px; display:grid; place-items:center; flex:0 0 auto; border-radius:7px; background:#e8f8f1; color:#15a36b; font-size:.58rem; }.support-security-note { display:flex; gap:10px; padding:13px; border-radius:13px; background:#f8f7ff; color:#70778c; font-size:.7rem; line-height:1.5; }.support-security-note i { color:#7655f5; margin-top:2px; }

.support-detail-hero { display:flex; align-items:center; gap:15px; padding:20px 22px; margin-bottom:16px; border:1px solid #e3e5ef; border-radius:20px; background:linear-gradient(120deg,#fff,#faf9ff); box-shadow:0 14px 40px rgba(37,40,66,.05); }.support-detail-hero>div:nth-child(2) { flex:1; min-width:0; }.support-detail-state { display:flex; gap:7px; align-items:center; }
.support-detail-layout { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(275px,.55fr); gap:17px; align-items:start; }.support-thread-card { overflow:hidden; }.support-thread-intro { display:flex; justify-content:space-between; gap:20px; padding:20px 22px; border-bottom:1px solid #eceef4; background:#fbfbfe; }.support-thread-intro span { color:#8b91a5; font-size:.68rem; font-weight:750; text-transform:uppercase; letter-spacing:.05em; }.support-thread-intro p { margin:6px 0 0; color:#555d72; font-size:.8rem; line-height:1.65; white-space:pre-wrap; }.support-thread-intro>small { flex:0 0 auto; color:#9ba0b2; font-size:.66rem; }.support-thread-head { display:flex; align-items:center; justify-content:space-between; padding:17px 22px; border-bottom:1px solid #eceef4; }.support-thread-head>div { display:flex; align-items:center; gap:11px; }.support-thread-head>div>i { width:36px; height:36px; display:grid; place-items:center; border-radius:11px; background:#f0edff; color:#7553f4; }.support-thread-head span span { display:flex; flex-direction:column; }.support-thread-head strong { color:#282c3f; font-size:.84rem; }.support-thread-head small,.support-thread-head>span { color:#969bad; font-size:.66rem; }
.support-thread-body { display:grid; gap:16px; padding:22px; background:#fcfcfe; }.support-message { display:flex; align-items:flex-start; gap:9px; max-width:88%; }.support-message.mine { margin-left:auto; flex-direction:row-reverse; }.support-message-avatar { width:32px; height:32px; display:grid; place-items:center; flex:0 0 auto; border-radius:11px; background:#e8f7f0; color:#16966a; font-size:.66rem; font-weight:800; }.support-message.mine .support-message-avatar { background:#ebe7ff; color:#6d49ed; }.support-message-bubble { min-width:170px; padding:12px 14px; border:1px solid #e3e6ef; border-radius:7px 16px 16px 16px; background:#fff; }.support-message.mine .support-message-bubble { border-color:#ddd6ff; border-radius:16px 7px 16px 16px; background:#f3f0ff; }.support-message-bubble>div { display:flex; justify-content:space-between; gap:18px; margin-bottom:5px; }.support-message-bubble strong { color:#303447; font-size:.7rem; }.support-message-bubble small,.support-edited { color:#9ba0b2; font-size:.61rem; }.support-message-bubble p { margin:0; color:#5b6277; font-size:.76rem; line-height:1.6; white-space:pre-wrap; }.support-thread-empty { display:flex; flex-direction:column; align-items:center; padding:28px; color:#9399ab; text-align:center; }.support-thread-empty i { margin-bottom:10px; font-size:1.35rem; color:#8768f9; }.support-thread-empty strong { color:#545b70; font-size:.8rem; }.support-thread-empty span { margin-top:4px; font-size:.68rem; }.support-reply-box { margin:0; padding:20px 22px; border:0; border-top:1px solid #eceef4; border-radius:0; box-shadow:none; }.support-reply-box label { margin-bottom:8px; color:#565d72; font-size:.74rem; font-weight:750; }.support-reply-box>div { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:10px; }.support-reply-box>div>span { color:#9399ab; font-size:.66rem; }.support-reply-box>div>span i { color:#23a874; margin-right:6px; }
.support-detail-sidebar { display:grid; gap:14px; }.support-summary-card,.support-rating-card { padding:19px; }.support-summary-title { display:flex; align-items:center; gap:10px; padding-bottom:14px; border-bottom:1px solid #eceef4; }.support-summary-title i { width:34px; height:34px; display:grid; place-items:center; border-radius:11px; background:#f0edff; color:#7553f4; }.support-summary-title h3,.support-rating-card h3 { margin:0; color:#292d40; font-size:.84rem; }.support-summary-card dl { display:grid; gap:0; margin:0; }.support-summary-card dl>div { display:flex; justify-content:space-between; gap:15px; padding:11px 0; border-bottom:1px solid #f0f1f5; }.support-summary-card dl>div:last-child { border-bottom:0; }.support-summary-card dt { color:#9398aa; font-size:.67rem; font-weight:600; }.support-summary-card dd { margin:0; color:#50576b; font-size:.68rem; font-weight:750; text-align:right; }.support-rating-card>i { color:#f4b536; font-size:1.25rem; }.support-rating-card h3 { margin:9px 0 4px; }.support-rating-card p { color:#8b91a4; font-size:.68rem; line-height:1.5; }.support-rating-card form { padding:0; border:0; box-shadow:none; }.support-rating-card form>div { display:flex; gap:4px; }.support-rating-card button { padding:3px; border:0; background:transparent; color:#d7dae3; font-size:.92rem; }.support-rating-card button:hover,.support-rating-card button.active { color:#f4b536; }.support-back-link { display:flex; align-items:center; justify-content:center; gap:8px; padding:12px; border:1px solid #e2e4ed; border-radius:13px; background:#fff; color:#696f83; font-size:.7rem; font-weight:750; text-decoration:none; }.support-back-link:hover { color:#6d49ed; border-color:#d7d0f8; }

@media (max-width: 1100px) { .support-create-layout,.support-detail-layout { grid-template-columns:1fr; }.support-help-card { position:static; }.support-detail-sidebar { grid-template-columns:repeat(2,minmax(0,1fr)); }.support-back-link { grid-column:1/-1; } }
@media (max-width: 820px) { .support-portal-hero { grid-template-columns:auto 1fr; }.support-portal-hero-actions { grid-column:1/-1; justify-content:flex-end; }.support-filter-panel { flex-wrap:wrap; }.support-filter-main,.support-filter-status { flex:1 1 100%; }.support-filter-panel .btn { flex:1; }.support-ticket-row { grid-template-columns:auto minmax(0,1fr) auto; }.support-ticket-badges { grid-column:2; }.support-ticket-target { display:none; }.support-ticket-arrow { grid-column:3; grid-row:1/3; }.support-detail-state { flex-direction:column; align-items:flex-end; } }
@media (max-width: 575px) { .support-portal-hero,.support-detail-hero { align-items:flex-start; padding:18px; }.support-portal-hero-icon,.support-detail-symbol { width:44px; height:44px; border-radius:14px; }.support-portal-hero-actions { flex-direction:column; align-items:stretch; }.support-total { padding:0; text-align:left; }.support-ticket-row { gap:10px; padding:14px; }.support-ticket-heading { flex-direction:column; align-items:flex-start; gap:3px; }.support-ticket-meta { flex-direction:column; gap:3px; }.support-ticket-badges { flex-wrap:wrap; }.support-pagination { align-items:flex-start; flex-direction:column; }.support-form-card { padding:18px; }.support-form-head { align-items:flex-start; }.support-detail-hero { flex-wrap:wrap; }.support-detail-state { width:100%; flex-direction:row; align-items:center; }.support-detail-sidebar { grid-template-columns:1fr; }.support-message { max-width:100%; }.support-thread-intro { flex-direction:column; }.support-reply-box>div { align-items:flex-start; flex-direction:column; }.support-reply-box .btn { width:100%; } }
/* Authentication bot protection */
.auth-captcha {
    margin: 2px 0 16px;
    padding: 12px;
    border: 1px solid #e5e9f3;
    border-radius: 16px;
    background: linear-gradient(145deg, #fbfcff, #f6f7fc);
    overflow: hidden;
}

.auth-captcha-head {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 10px;
    color: #263047;
}

.auth-captcha-head > span:last-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.auth-captcha-head strong {
    font-size: .78rem;
    font-weight: 750;
}

.auth-captcha-head small {
    color: #8992a6;
    font-size: .68rem;
    line-height: 1.35;
}

.auth-captcha-icon {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border-radius: 11px;
    color: #6948ee;
    background: rgba(105, 72, 238, .1);
}

.auth-captcha-icon svg {
    width: 17px;
    height: 17px;
}

.auth-captcha .cf-turnstile {
    width: 100%;
    min-height: 65px;
}

.auth-captcha-message {
    margin-top: 7px;
    color: #7b8498;
    font-size: .68rem;
    font-weight: 600;
}

.auth-captcha-message[data-state="success"] {
    color: #047857;
}

.auth-captcha-message[data-state="error"],
.auth-captcha-config-error {
    color: #b42318;
}

.auth-captcha-config-error {
    padding: 10px 11px;
    border: 1px solid rgba(239, 68, 68, .2);
    border-radius: 11px;
    background: rgba(254, 242, 242, .9);
    font-size: .72rem;
    font-weight: 650;
    line-height: 1.45;
}

.login-submit.is-captcha-pending {
    cursor: not-allowed;
    opacity: .62;
    box-shadow: none;
}
