:root {
  --bg: #e9eef5;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --text: #363b44;
  --muted: #7b8491;
  --line: #cdd8e6;
  --primary: #4f7df3;
  --primary-strong: #2f66df;
  --accent: #fff36d;
  --cyan: #1fbfd0;
  --orange: #ffb74a;
  --lime: #8fd14f;
  --warning: #d99525;
  --success: #21a67a;
  --info: #4f7df3;
  --brand-deep: #2f66df;
  --brand-light: #4f7df3;
  --shadow: 0 12px 30px rgba(39, 49, 67, .08);
  --shadow-soft: 0 6px 18px rgba(39, 49, 67, .06);
}

html,
body,
button,
input,
select,
textarea {
  font-family: "PT Sans", Arial, sans-serif !important;
}

body {
  background: #e9eef5 !important;
  color: #363b44 !important;
}

.app-main {
  background: #e9eef5 !important;
}

.sidebar {
  background: #f7f9fc !important;
  color: #363b44 !important;
  border-right: 1px solid #cdd8e6 !important;
  box-shadow: 10px 0 28px rgba(39,49,67,.055) !important;
}

.sidebar::before,
.sidebar-circuit,
.login-orbit,
.login-screen::before {
  display: none !important;
}

.brand {
  min-height: 74px !important;
  border-bottom: 1px solid #cdd8e6 !important;
  border-radius: 0 !important;
  background: linear-gradient(180deg, #ffffff 0%, #f4f7fb 100%) !important;
  box-shadow: none !important;
}

.brand-mark {
  width: 44px !important;
  height: 44px !important;
  border: 1px solid #e1e6ec !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.brand strong,
.brand small,
.menu-label {
  color: #7b8491 !important;
}

.nav-list {
  gap: 4px !important;
  padding: 12px !important;
}

.nav-list a {
  min-height: 42px !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #4b5563 !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  box-shadow: none !important;
}

.nav-list a:hover {
  background: #e9eff8 !important;
  color: #363b44 !important;
}

.nav-list a.active {
  border-color: #d7e4ff !important;
  background: #eaf1ff !important;
  color: #356fe8 !important;
  box-shadow: none !important;
}

.nav-list a.active::before {
  display: none !important;
}

.nav-icon,
body.sidebar-collapsed .nav-icon,
body.sidebar-collapsed .sidebar:hover .nav-icon {
  width: 34px !important;
  height: 34px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: currentColor !important;
  box-shadow: none !important;
}

.nav-icon svg,
.sidebar-toggle svg,
.icon-button svg,
.chat-record-button svg,
.crm-attach-button svg {
  width: 21px !important;
  height: 21px !important;
}

.nav-icon svg *,
.sidebar-toggle svg *,
.crm-attach-button svg * {
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.8 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.sidebar-toggle {
  border-color: #e1e6ec !important;
  background: #fff !important;
  color: #4f7df3 !important;
  box-shadow: 0 8px 20px rgba(39,49,67,.08) !important;
}

.profile-box {
  border-color: #cdd8e6 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #363b44 !important;
  box-shadow: 0 10px 26px rgba(39,49,67,.07) !important;
}

.topbar,
.panel,
.metric,
.toolbar,
.section-block,
.column,
.modal,
.user-create-card,
.company-card,
.traffic-card,
.person-item,
.goal-item,
.daily-item,
.agenda-item,
.task-card,
.chat-panel,
.chat-side,
.crm-shell,
.crm-lead-detail,
.crm-connect-panel,
.admin-hero,
.access-template-card,
.users-list-panel,
.admin-form-section {
  border: 1px solid #e1e6ec !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 10px 26px rgba(39,49,67,.075) !important;
  backdrop-filter: none !important;
}

.panel:hover,
.metric:hover,
.company-card:hover,
.traffic-card:hover,
.person-item:hover,
.goal-item:hover,
.daily-item:hover,
.task-card:hover,
.agenda-item:hover {
  border-color: #cbd7ea !important;
  box-shadow: 0 8px 22px rgba(39,49,67,.07) !important;
  transform: none !important;
}

.topbar {
  min-height: 74px !important;
  color: #363b44 !important;
}

.topbar h1,
h1,
h2,
h3,
strong {
  color: #363b44;
}

.eyebrow,
.global-results span,
.crm-inbox-item em,
.area-badge,
.company-contact a,
.advisory-head strong {
  color: #4f7df3 !important;
}

.metric span,
.metric small,
label,
.card-meta,
.person-role,
th,
.form-hint,
small {
  color: #7b8491;
}

.primary-button {
  border-color: #4f7df3 !important;
  background: #4f7df3 !important;
  color: #fff !important;
  box-shadow: none !important;
}

.primary-button:hover {
  background: #2f66df !important;
  transform: none !important;
}

.secondary-button,
.ghost-button,
.icon-button,
.table-action,
.quiet-action,
.card-actions button,
.campaign-actions button {
  border-color: #d8dee8 !important;
  background: #fff !important;
  color: #363b44 !important;
  box-shadow: none !important;
}

.secondary-button:hover,
.ghost-button:hover,
.icon-button:hover,
.table-action:hover,
.quiet-action:hover {
  border-color: #a9bfef !important;
  background: #f3f6fb !important;
  color: #2f66df !important;
}

input,
select,
textarea {
  border-color: #d8dee8 !important;
  border-radius: 6px !important;
  background: #fff !important;
  color: #363b44 !important;
  box-shadow: none !important;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #4f7df3 !important;
  box-shadow: 0 0 0 3px rgba(79,125,243,.16) !important;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: #4f7df3;
}

.global-search,
.search-field,
.crm-filter-bar,
.crm-topbar,
.crm-thread-head {
  border-color: #e1e6ec !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: none !important;
}

.column {
  background: #f7f8fa !important;
}

.column::before,
.crm-pipeline-column::before {
  background: #fff36d !important;
}

.column-header,
.crm-column-head {
  border-bottom-color: #e1e6ec !important;
}

.task-card,
.crm-card,
.crm-inbox-item,
.crm-followup-card,
.crm-seller-card {
  border-color: #dfe5ee !important;
  border-left-color: #fff36d !important;
  background: #fff !important;
  box-shadow: 0 2px 6px rgba(39,49,67,.05) !important;
}

.task-card:hover,
.crm-card:hover,
.crm-inbox-item:hover {
  border-color: #cbd7ea !important;
  border-left-color: #4f7df3 !important;
}

.count-pill,
.live-pill,
.role-badge,
.permission-tags em,
.ops-service-tags em,
.area-badge {
  border: 1px solid #dbe5f6 !important;
  border-radius: 999px !important;
  background: #eef4ff !important;
  color: #356fe8 !important;
}

.live-pill[data-mode="online"] {
  background: #eaf8f2 !important;
  color: #16845f !important;
  border-color: #cdeee1 !important;
}

.avatar,
.owner-name .avatar {
  background: #4f7df3 !important;
  color: #fff !important;
  box-shadow: none !important;
}

table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}

th {
  background: #f7f8fa !important;
  color: #7b8491 !important;
  font-size: 12px !important;
}

td {
  background: #fff !important;
  border-bottom-color: #edf0f4 !important;
}

.login-screen {
  background: #f5f5f5 !important;
  color: #363b44 !important;
}

.login-brand {
  color: #363b44 !important;
}

.login-brand small {
  color: #7b8491 !important;
}

.login-card {
  border: 1px solid #e1e6ec !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #363b44 !important;
  box-shadow: 0 18px 46px rgba(39,49,67,.08) !important;
}

.login-card h1 {
  color: #363b44 !important;
}

.login-insight {
  border-color: #e1e6ec !important;
  border-radius: 8px !important;
  background: #f7f8fa !important;
}

.login-stage {
  opacity: .92 !important;
  filter: drop-shadow(0 24px 40px rgba(39,49,67,.12)) !important;
}

.crm-stage-line,
.progress-fill,
.pilot-focus-item.today > span {
  background: #4f7df3 !important;
}

.danger-action,
.role-admin {
  color: #d84b4b !important;
}

body.sidebar-collapsed .brand {
  justify-content: center !important;
}

/* Kommo-like white dashboard: readable, structured, and not washed out. */
body {
  background: #e4ebf3 !important;
}

.app-main {
  background:
    radial-gradient(circle at 18% 0, rgba(79,125,243,.08), transparent 0 240px, transparent 420px),
    linear-gradient(180deg, #f4f8fc 0, #e4ebf3 260px, #e4ebf3 100%) !important;
}

.login-screen {
  background:
    radial-gradient(circle at 78% 52%, rgba(45, 179, 200, .18), transparent 0 20%, transparent 42%),
    linear-gradient(135deg, #f8fbfd 0%, #edf4f9 55%, #e5eef5 100%) !important;
}

.login-card {
  border-color: #cfd8e3 !important;
  box-shadow: 0 26px 70px rgba(39,49,67,.14) !important;
}

.login-insight {
  background: #eef4ff !important;
  color: #363b44 !important;
}

.login-insight span,
.login-insight strong,
.login-insight p,
.login-card label {
  color: #363b44 !important;
  opacity: 1 !important;
}

.login-card input {
  background: #f8fbff !important;
  color: #1f2937 !important;
}

.brand-logo {
  filter: drop-shadow(0 12px 26px rgba(47,102,223,.15)) !important;
}

.topbar,
.panel,
.metric,
.toolbar,
.section-block,
.column,
.modal,
.user-create-card,
.company-card,
.traffic-card,
.person-item,
.goal-item,
.daily-item,
.agenda-item,
.task-card,
.chat-panel,
.chat-side,
.crm-shell,
.crm-lead-detail,
.crm-connect-panel,
.admin-hero,
.access-template-card,
.users-list-panel,
.admin-form-section {
  border-color: #c8d4e4 !important;
  box-shadow: 0 12px 30px rgba(39,49,67,.095) !important;
}

.topbar {
  background: rgba(255,255,255,.94) !important;
  border-color: #c8d4e4 !important;
  box-shadow: 0 12px 30px rgba(39,49,67,.09) !important;
}

.kommo-admin-dashboard {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
}

.kommo-dashboard-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background:
    radial-gradient(circle at 100% 0, rgba(79,125,243,.16), transparent 0 32%, transparent 58%),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(231,239,248,.96));
  box-shadow: 0 16px 36px rgba(39,49,67,.11);
}

.kommo-dashboard-title h2 {
  margin: 4px 0 0;
  color: #263241;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
}

.kommo-dashboard-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.kommo-dashboard-filters button,
.channel-card button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #d8e0ea;
  border-radius: 999px;
  background: #fff;
  color: #4b5563;
  font-weight: 700;
}

.kommo-dashboard-filters button.active,
.kommo-dashboard-filters button:hover,
.channel-card button:hover {
  border-color: #b8c9ef;
  background: #eaf1ff;
  color: #2f66df;
}

.kommo-channel-strip {
  display: grid;
  grid-template-columns: minmax(280px, 560px);
  gap: 12px;
}

.channel-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 86px;
  padding: 14px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(39,49,67,.085);
}

.channel-card > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  font-weight: 700;
}

.channel-card.official {
  min-height: 104px;
  padding: 18px;
  border-color: rgba(37, 211, 102, .34);
  background:
    radial-gradient(circle at 0 0, rgba(37, 211, 102, .14), transparent 0 32%, transparent 58%),
    linear-gradient(135deg, #ffffff 0%, #f1fff6 100%);
}

.channel-card.official .channel-logo {
  width: 54px;
  height: 54px;
  border-radius: 15px;
  background: #25d366;
  box-shadow: 0 14px 28px rgba(18, 140, 126, .22);
}

.channel-logo svg {
  width: 31px !important;
  height: 31px !important;
}

.channel-logo svg path:first-child {
  fill: #25d366 !important;
  stroke: #fff !important;
  stroke-width: 1.5 !important;
}

.channel-logo svg path:last-child {
  fill: #fff !important;
  stroke: none !important;
}

.channel-card strong,
.channel-card small {
  display: block;
}

.channel-card strong {
  color: #263241;
  font-size: 15px;
}

.channel-card small {
  color: #667085;
  font-size: 12px;
  line-height: 1.25;
}

.channel-card.official button {
  border-color: rgba(37, 211, 102, .4);
  background: #25d366;
  color: #fff;
  box-shadow: 0 10px 22px rgba(37, 211, 102, .22);
}

.channel-card.official button:hover {
  border-color: #128c7e;
  background: #128c7e;
  color: #fff;
}

.channel-card.whatsapp > span { background: #25d366; }
.channel-card.instagram > span { background: linear-gradient(135deg, #ff4d8d, #8b5cf6); }
.channel-card.facebook > span { background: #2f66df; }
.channel-card.tiktok > span { background: #111827; }

.kommo-dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, minmax(160px, 1fr));
  grid-auto-rows: minmax(142px, auto);
  gap: 12px;
}

.kommo-stat-card {
  display: grid;
  align-content: space-between;
  gap: 10px;
  min-height: 142px;
  padding: 16px;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  box-shadow: 0 10px 24px rgba(39,49,67,.085);
}

.kommo-stat-card.large {
  grid-row: span 2;
  min-height: 296px;
}

.kommo-stat-card.wide {
  grid-column: span 2;
}

.kommo-stat-card.sources {
  grid-column: span 2;
}

.kommo-stat-card > span {
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.kommo-stat-card > strong {
  color: #4f7df3;
  font-size: clamp(42px, 4vw, 64px);
  line-height: .9;
}

.kommo-stat-card > small {
  color: #667085;
  font-size: 13px;
}

#adminDashSources {
  display: grid;
  gap: 8px;
}

#adminDashSources p {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid #eef2f6;
  color: #4b5563;
  font-weight: 700;
}

#adminDashSources strong {
  color: #4f7df3;
}

.metrics-grid[data-view="dashboard"] {
  margin-top: 2px !important;
}

.metrics-grid[data-view="dashboard"] .metric {
  min-height: 118px !important;
  background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%) !important;
}

.metrics-grid[data-view="dashboard"] .metric strong {
  color: #263241 !important;
}

.metrics-grid[data-view="dashboard"] .metric span,
.metrics-grid[data-view="dashboard"] .metric small {
  color: #667085 !important;
}

.dashboard-focus-strip article,
.executive-card,
.intel-card,
.pilot-panel,
.daily-columns > div,
.notification-center {
  border-color: #d8e0ea !important;
  background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%) !important;
  color: #263241 !important;
  box-shadow: 0 10px 24px rgba(39,49,67,.085) !important;
}

.dashboard-focus-strip article strong,
.executive-card strong,
.intel-card strong,
.pilot-panel strong,
.daily-columns h3 {
  color: #263241 !important;
}

.dashboard-focus-strip article span,
.dashboard-focus-strip article small,
.executive-card span,
.executive-card small,
.intel-card span,
.intel-card small,
.pilot-panel small,
.daily-columns small {
  color: #667085 !important;
}

@media (max-width: 1320px) {
  .kommo-channel-strip,
  .kommo-dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .kommo-stat-card.large,
  .kommo-stat-card.wide,
  .kommo-stat-card.sources {
    grid-column: auto;
    grid-row: auto;
    min-height: 142px;
  }
}

@media (max-width: 760px) {
  .kommo-dashboard-head,
  .channel-card,
  .kommo-channel-strip,
  .kommo-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .kommo-dashboard-filters {
    justify-content: flex-start;
  }
}

/* Keep only the opening/login screen with the original EVOADS energy. */
.login-screen {
  background:
    radial-gradient(circle at 78% 46%, rgba(139,61,255,.56), transparent 0 18%, transparent 34%),
    radial-gradient(circle at 20% 15%, rgba(139,61,255,.3), transparent 0 22%, transparent 45%),
    linear-gradient(135deg, #000 0%, #180729 38%, #411b78 72%, #8b3dff 120%) !important;
  color: #fff !important;
}

.login-screen::before {
  display: block !important;
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  pointer-events: none !important;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px) !important;
  background-size: 54px 54px !important;
  mask-image: radial-gradient(circle at 50% 50%, #000, transparent 72%) !important;
}

.login-orbit {
  display: block !important;
  position: absolute !important;
  width: 560px !important;
  height: 560px !important;
  right: 8vw !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  border: 1px solid rgba(255,255,255,.18) !important;
  border-radius: 50% !important;
  box-shadow: inset 0 0 80px rgba(139,61,255,.24), 0 0 90px rgba(139,61,255,.18) !important;
  animation: orbitPulse 5s ease-in-out infinite !important;
}

.login-brand {
  color: #fff !important;
}

.login-brand small {
  color: #cfc5dc !important;
}

.login-card {
  border-color: rgba(255,255,255,.22) !important;
  background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.06)) !important;
  color: #fff !important;
  box-shadow: 0 30px 90px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.22) !important;
  backdrop-filter: blur(22px) !important;
}

.login-card h1,
.login-card label,
.login-insight span,
.login-insight strong,
.login-insight p {
  color: #fff !important;
}

.login-insight {
  border-color: rgba(255,255,255,.18) !important;
  background: rgba(255,255,255,.1) !important;
  color: #fff !important;
}

.login-card input {
  border-color: rgba(255,255,255,.18) !important;
  background: rgba(255,255,255,.12) !important;
  color: #fff !important;
}

.login-card input::placeholder {
  color: rgba(255,255,255,.62) !important;
}

.login-stage {
  opacity: 1 !important;
  filter: drop-shadow(0 30px 70px rgba(0,0,0,.44)) !important;
  animation: mascotFloat 4.8s ease-in-out infinite !important;
}
