:root {
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --bg-main: #07111d;
  --bg-top: #142b45;
  --bg-card: rgba(255, 255, 255, 0.075);
  --bg-card-strong: rgba(255, 255, 255, 0.11);
  --bg-soft: rgba(255, 255, 255, 0.055);

  --border-soft: rgba(255, 255, 255, 0.12);
  --border-strong: rgba(255, 255, 255, 0.2);

  --text-main: #f8fafc;
  --text-soft: #cbd5e1;
  --text-muted: #94a3b8;

  --blue: #3b82f6;
  --blue-soft: rgba(59, 130, 246, 0.18);
  --green: #10b981;
  --yellow: #facc15;
  --orange: #f97316;
  --red: #ef4444;
  --purple: #8b5cf6;

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;

  --shadow-card:
    0 24px 80px rgba(0, 0, 0, 0.28);

  --shadow-soft:
    0 16px 44px rgba(0, 0, 0, 0.22);

  background: var(--bg-main);
  color: var(--text-main);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100vh;
}

body {
  background:
    radial-gradient(circle at 18% 10%, rgba(59, 130, 246, 0.18) 0, transparent 28%),
    radial-gradient(circle at 78% 0%, rgba(16, 185, 129, 0.08) 0, transparent 28%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-main) 100%);

  color: var(--text-main);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 72%);
  z-index: 0;
}

/* =========================
   APP LAYOUT
========================= */

.app-shell {
  position: relative;
  z-index: 1;

  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;

  width: 100%;
  max-width: 2200px;
  min-height: 100vh;

  margin: 0 auto;
  padding: 24px;

  align-items: start;
}

.workspace-sidebar {
  position: sticky;
  top: 24px;
  align-self: start;

  height: calc(100vh - 48px);

  overflow-y: auto;
  overflow-x: hidden;

  z-index: 20;

  padding-bottom: 40px;
  padding-right: 4px;

  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.workspace-sidebar::-webkit-scrollbar {
  width: 6px;
}

.workspace-sidebar::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.32);
  border-radius: 999px;
}

.workspace-main {
  min-width: 0;
  width: 100%;
  max-width: 100%;

  display: flex;
  justify-content: center;
  align-items: flex-start;

  padding: 0 20px 90px;
}

#workspaceMain {
  min-width: 0;
  width: 100%;
  max-width: 1720px;
}

.workspace-details {
  display: none;
}

.app-shell.lead-open {
  grid-template-columns: 240px minmax(0, 1fr);
}

.app-shell.lead-open .workspace-main,
.app-shell.lead-open #workspaceMain {
  width: 100%;
  max-width: 100%;
}

.app-shell.lead-open .workspace-details {
  display: none;
}

/* =========================
   GLASS CARDS
========================= */

.workspace-card,
.lead-detail-card,
.sidebar-brand {
  width: 100%;

  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.105) 0%,
      rgba(255, 255, 255, 0.055) 100%
    );

  border: 1px solid var(--border-soft);
  border-radius: var(--radius-xl);

  box-shadow: var(--shadow-card);
  backdrop-filter: blur(18px);
}

.workspace-card {
  position: relative;
  overflow: hidden;

  padding: 34px;
  min-width: 0;

  display: grid;
  gap: 24px;
}

.workspace-card::before,
.lead-detail-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;

  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.12) 0%,
      transparent 22%,
      transparent 74%,
      rgba(59, 130, 246, 0.08) 100%
    );

  opacity: 0.8;
}

.workspace-card > *,
.lead-detail-card > * {
  position: relative;
  z-index: 1;
}

.lead-detail-card {
  position: relative;
  overflow: hidden;

  padding: 32px;

  max-height: calc(100vh - 48px);

  display: flex;
  flex-direction: column;

  max-width: 1600px;
  margin: 0 auto;
}

/* =========================
   SIDEBAR
========================= */

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 18px;
  margin-bottom: 24px;

  border-radius: 26px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.11),
      rgba(255, 255, 255, 0.055)
    );

  border:
    1px solid rgba(147, 197, 253, 0.16);

  box-shadow:
    0 20px 54px rgba(0, 0, 0, 0.28);
}

.sidebar-brand-logo {
  display: block;

  width: 100%;
  max-width: 176px;
  height: auto;

  object-fit: contain;
}

.sidebar-nav {
  display: grid;
  gap: 24px;
  padding-bottom: 40px;
}

.sidebar-group {
  display: grid;
  gap: 8px;
}

.sidebar-group-label {
  font-size: 0.82rem;
  font-weight: 850;

  color: #d8e6fb;

  letter-spacing: 0.02em;

  padding-left: 2px;

  opacity: 0.95;
}

.sidebar-link {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 46px;

  padding: 12px 15px;

  border-radius: 15px;

  border:
    1px solid rgba(255, 255, 255, 0.075);

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.085),
      rgba(255, 255, 255, 0.042)
    );

  color: #eef6ff;

  font-size: 0.92rem;
  font-weight: 850;

  line-height: 1.22;

  text-align: center;
  text-decoration: none;

  cursor: pointer;

  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.12);

  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease;
}

.sidebar-link::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 12px;
  bottom: 12px;
  width: 3px;

  border-radius: 999px;

  background: transparent;

  transition: background 0.18s ease;
}

.sidebar-link:hover,
.sidebar-link.active {
  transform: translateY(-1px);

  background:
    linear-gradient(
      135deg,
      rgba(59, 130, 246, 0.22),
      rgba(255, 255, 255, 0.078)
    );

  border-color:
    rgba(96, 165, 250, 0.42);

  color: #ffffff;

  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sidebar-link.active::before {
  background: var(--blue);
}

.sidebar-link.active {
  font-weight: 900;

  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(59, 130, 246, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

/* =========================
   PAGE / HEADERS
========================= */

.dashboard-page {
  display: grid;
  gap: 28px;

  width: 100%;

  align-content: start;
}

.dashboard-header,
.page-header {
  position: relative;

  display: flex;
  justify-content: space-between;
  align-items: flex-start;

  gap: 18px;

  margin-bottom: 8px;
}

.dashboard-header h1,
.page-header h1,
.page-header h2 {
  margin: 0;

  font-size: clamp(2rem, 2.4vw, 3rem);
  line-height: 1.05;

  letter-spacing: -0.04em;
}

.dashboard-header p,
.page-header p {
  margin: 10px 0 0;

  color: var(--text-soft);

  font-size: 1rem;
  line-height: 1.7;
}

.dashboard-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* =========================
   FORMS
========================= */

.field-group,
.form-group {
  display: grid;
  gap: 9px;
  margin-bottom: 18px;
}

label,
.form-group label {
  font-weight: 800;
  color: #edf2ff;
  font-size: 0.9rem;
}

input,
textarea,
select {
  width: 100%;

  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 18px;

  padding: 14px 16px;

  font-size: 0.97rem;

  color: #e7eff9;

  background:
    rgba(255, 255, 255, 0.075);

  line-height: 1.5;

  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;

  border-color: rgba(96, 165, 250, 0.95);

  background:
    rgba(255, 255, 255, 0.1);

  box-shadow:
    0 0 0 4px rgba(59, 130, 246, 0.15);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.search-input {
  min-width: 280px;
  min-height: 54px;
  font-size: 0.95rem;
}

select option,
select:focus option {
  color: #111827 !important;
  background: #ffffff !important;
}

/* =========================
   BUTTONS
========================= */

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  border: 1px solid transparent;

  border-radius: 16px;

  padding: 12px 17px;

  font-size: 0.94rem;
  font-weight: 800;

  cursor: pointer;

  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;

  text-decoration: none;
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
}

button:active,
.btn:active {
  transform: translateY(0);
}

.btn-small {
  font-size: 0.78rem;
  padding: 8px 12px;
  border-radius: 12px;
}

.btn-primary {
  background:
    linear-gradient(
      135deg,
      #3b82f6 0%,
      #1d4ed8 100%
    );

  color: #ffffff;

  border-color: rgba(255, 255, 255, 0.12);

  box-shadow:
    0 12px 28px rgba(37, 99, 235, 0.28);
}

.btn-primary:hover {
  background:
    linear-gradient(
      135deg,
      #60a5fa 0%,
      #2563eb 100%
    );
}

.btn-success {
  background: #10b981;
  color: #ffffff;
}

.btn-success:hover {
  background: #059669;
}

.btn-secondary,
.btn,
.btn-ghost {
  background:
    rgba(255, 255, 255, 0.08);

  color: #eef7ff;

  border-color:
    rgba(255, 255, 255, 0.14);
}

.btn-secondary:hover,
.btn-ghost:hover {
  background:
    rgba(255, 255, 255, 0.12);

  border-color:
    rgba(255, 255, 255, 0.22);

  color: #ffffff;
}

/* =========================
   DASHBOARD POLISH
========================= */

.stats-grid {
  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  gap: 18px;

  width: 100%;
}

.stats-grid > .workspace-card,
.stats-grid > .stats-card {
  position: relative;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  gap: 18px;

  min-height: 138px;

  padding: 24px;

  border-radius: 26px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.105),
      rgba(255, 255, 255, 0.052)
    );

  border: 1px solid rgba(255, 255, 255, 0.13);

  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.22);
}

.stats-grid > .workspace-card::after,
.stats-grid > .stats-card::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -34px;

  width: 120px;
  height: 120px;

  border-radius: 999px;

  background:
    radial-gradient(
      circle,
      rgba(59, 130, 246, 0.22),
      transparent 68%
    );
}

.stats-grid > .workspace-card h3,
.stats-grid > .stats-card h3 {
  margin: 0;

  font-size: 0.86rem;
  line-height: 1.35;
  letter-spacing: 0.01em;

  color: #e5edff;
}

.stats-grid > .workspace-card p,
.stats-grid > .stats-card p {
  margin: 0;

  font-size: 2.4rem;
  font-weight: 900;

  line-height: 1;

  letter-spacing: -0.04em;

  color: #ffffff;
}

.dashboard-grid {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 18px;
}

.dashboard-card {
  position: relative;
  overflow: hidden;

  display: grid;
  gap: 10px;

  padding: 24px;

  border-radius: 26px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.09),
      rgba(255, 255, 255, 0.045)
    );

  border:
    1px solid rgba(255, 255, 255, 0.12);

  cursor: pointer;

  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.16);

  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.dashboard-card:hover {
  transform: translateY(-3px);

  border-color:
    rgba(96, 165, 250, 0.42);

  background:
    linear-gradient(
      145deg,
      rgba(59, 130, 246, 0.17),
      rgba(255, 255, 255, 0.07)
    );

  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.26);
}

.dashboard-card strong {
  font-size: 1.18rem;
  color: #ffffff;
}

.dashboard-card span {
  color: #aebfdb;
  font-size: 0.92rem;
}

/* =========================
   ADMIN COMMAND CENTER
========================= */

.admin-command-center {
  display: grid;
  gap: 28px;
}

.admin-command-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 24px;

  min-height: 190px;

  padding: 34px;

  border-color:
    rgba(96, 165, 250, 0.24);

  background:
    radial-gradient(
      circle at 88% 12%,
      rgba(59, 130, 246, 0.22),
      transparent 34%
    ),
    linear-gradient(
      145deg,
      rgba(59, 130, 246, 0.14),
      rgba(255, 255, 255, 0.05)
    );
}

.admin-command-hero > div {
  display: grid;
  gap: 10px;

  max-width: 760px;
}

.admin-command-hero h2 {
  margin: 0;

  color: #ffffff;

  font-size:
    clamp(
      1.8rem,
      2.5vw,
      2.8rem
    );

  line-height: 1.05;

  letter-spacing: -0.045em;
}

.admin-command-hero p {
  margin: 0;

  color: #b8c9df;

  font-size: 0.95rem;
  line-height: 1.65;
}

.admin-command-eyebrow,
.admin-command-card-label {
  display: inline-flex;
  align-items: center;

  width: fit-content;

  color: #93c5fd;

  font-size: 0.7rem;
  font-weight: 950;

  text-transform: uppercase;
  letter-spacing: 0.065em;
}

.admin-command-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 154px;
  min-height: 44px;

  flex-shrink: 0;

  padding: 11px 16px;

  border-radius: 999px;

  border:
    1px solid rgba(52, 211, 153, 0.28);

  background:
    rgba(16, 185, 129, 0.12);

  color: #bbf7d0;

  font-size: 0.8rem;
  font-weight: 900;
}

.admin-command-summary-grid {
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
}

.admin-command-summary-card {
  min-height: 146px;
}

.admin-command-summary-card h3 {
  font-size: 0.9rem !important;
}

.admin-command-summary-card p {
  font-size: 2.35rem !important;
}

.admin-command-section {
  display: grid;
  gap: 18px;
}

.admin-command-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;

  gap: 18px;
}

.admin-command-section-header h2 {
  margin: 0;

  color: #ffffff;

  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

.admin-command-section-header p {
  margin: 6px 0 0;

  color: #9fb2ce;

  font-size: 0.86rem;
  line-height: 1.5;
}

.admin-command-action-grid {
  grid-template-columns:
    repeat(3, minmax(0, 1fr));
}

.admin-command-action-card {
  align-items: flex-start;

  min-height: 196px !important;

  text-align: left;

  cursor: pointer;
}

.admin-command-action-card strong {
  color: #ffffff;

  font-size: 1.35rem;
  font-weight: 950;

  line-height: 1.1;
  letter-spacing: -0.035em;
}

.stats-grid >
.admin-command-action-card p {
  color: #b5c5da;

  font-size: 0.84rem;
  font-weight: 500;

  line-height: 1.55;
  letter-spacing: 0;
}

.admin-command-action-card small,
.admin-command-stage-card small {
  color: #93c5fd;

  font-size: 0.76rem;
  font-weight: 900;
}

.admin-command-action-card:hover,
.admin-command-stage-card:hover {
  transform: translateY(-3px);

  border-color:
    rgba(96, 165, 250, 0.42);

  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.3);
}

.admin-command-primary {
  border-color:
    rgba(96, 165, 250, 0.3) !important;

  background:
    linear-gradient(
      145deg,
      rgba(59, 130, 246, 0.2),
      rgba(255, 255, 255, 0.05)
    ) !important;
}

.admin-command-success {
  border-color:
    rgba(52, 211, 153, 0.26) !important;

  background:
    linear-gradient(
      145deg,
      rgba(16, 185, 129, 0.15),
      rgba(255, 255, 255, 0.045)
    ) !important;
}

.admin-command-warning {
  border-color:
    rgba(250, 204, 21, 0.3) !important;

  background:
    linear-gradient(
      145deg,
      rgba(250, 204, 21, 0.14),
      rgba(255, 255, 255, 0.045)
    ) !important;
}

.admin-command-neutral {
  border-color:
    rgba(255, 255, 255, 0.12) !important;
}

.admin-command-stage-grid {
  grid-template-columns:
    repeat(6, minmax(0, 1fr));
}

.admin-command-stage-card {
  align-items: flex-start;

  min-height: 154px !important;

  text-align: left;
}

.admin-command-stage-card h3 {
  color: #dbeafe !important;

  font-size: 0.82rem !important;
}

.admin-command-stage-card p {
  font-size: 2rem !important;
}

@media (max-width: 1500px) {

  .admin-command-stage-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

}

@media (max-width: 1200px) {

  .admin-command-summary-grid,
  .admin-command-action-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 760px) {

  .admin-command-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-command-mode {
    width: 100%;
  }

  .admin-command-summary-grid,
  .admin-command-action-grid,
  .admin-command-stage-grid {
    grid-template-columns: 1fr;
  }

  .admin-command-action-card,
  .admin-command-stage-card {
    min-height: 0 !important;
  }

}

/* =========================
   LEAD LIST
========================= */

.lead-list {
  display: grid;
  gap: 20px;

  width: 100%;
  align-content: start;
}

.lead-card {
  position: relative;
  overflow: hidden;

  display: flex;
  flex-direction: column;

  gap: 12px;

  width: 100%;
  min-height: 0;

  padding: 20px;

  border-radius: 22px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.08),
      rgba(255, 255, 255, 0.045)
    );

  border: 1px solid rgba(255, 255, 255, 0.13);

  cursor: pointer;

  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.lead-card::before {
  content: "";
  position: absolute;
  inset: 0;

  border-left: 3px solid transparent;

  pointer-events: none;

  transition: border-color 0.18s ease;
}

.lead-card:hover,
.lead-card.active {
  transform: translateY(-2px);

  background:
    linear-gradient(
      145deg,
      rgba(59, 130, 246, 0.16),
      rgba(255, 255, 255, 0.065)
    );

  border-color: rgba(96, 165, 250, 0.4);

  box-shadow:
    0 18px 44px rgba(0, 0, 0, 0.22);
}

.lead-card:hover::before,
.lead-card.active::before {
  border-left-color: var(--blue);
}

.lead-card-top {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.lead-card-top h3,
.lead-card-top strong {
  color: #ffffff;

  font-size: 1.08rem;
  line-height: 1.3;

  margin: 0;

  font-weight: 850;
}

.stage-pill {
  flex-shrink: 0;

  padding: 7px 11px;

  border-radius: 999px;

  background: rgba(59, 130, 246, 0.18);

  color: #dbeafe;

  font-size: 0.75rem;
  font-weight: 850;

  white-space: nowrap;
  letter-spacing: 0.02em;
}

.lead-card-meta {
  display: flex;
  flex-wrap: wrap;

  gap: 10px;

  color: #a5b8d8;

  font-size: 0.85rem;
}

.lead-card-meta p {
  margin: 0;

  color: #d7e6f4;

  line-height: 1.6;
}

.lead-card-meta small {
  color: #9fb2d3;
  font-size: 0.9rem;
}

.lead-card-actions {
  display: flex;
  justify-content: flex-end;

  margin-top: 8px;
}

.empty-state,
.empty-leads {
  padding: 28px;

  border-radius: 24px;

  background:
    rgba(255, 255, 255, 0.055);

  border:
    1px solid rgba(255, 255, 255, 0.11);

  color: #d7e6f4;
}

.empty-state strong {
  display: block;

  color: #ffffff;

  margin-bottom: 6px;
}

.empty-state p {
  margin: 0;

  color: #b9c8df;
}

/* =========================
   AUTH
========================= */

.auth-wrapper {
  position:
    relative;

  isolation:
    isolate;

  display:
    grid;

  place-items:
    center;

  min-height:
    100vh;

  overflow:
    hidden;

  padding:
    42px;

  background:
    radial-gradient(
      circle at 18% 18%,
      rgba(
        59,
        130,
        246,
        0.24
      ),
      transparent 32%
    ),
    radial-gradient(
      circle at 82% 76%,
      rgba(
        139,
        92,
        246,
        0.16
      ),
      transparent 30%
    ),
    linear-gradient(
      145deg,
      #102944 0%,
      #0a1b2e 48%,
      #06111e 100%
    );
}

.auth-wrapper::before {
  content:
    "";

  position:
    absolute;

  inset:
    0;

  z-index:
    -3;

  background:
    linear-gradient(
      rgba(
        255,
        255,
        255,
        0.018
      )
      1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(
        255,
        255,
        255,
        0.018
      )
      1px,
      transparent 1px
    );

  background-size:
    44px 44px;

  mask-image:
    radial-gradient(
      circle at center,
      black,
      transparent 78%
    );

  pointer-events:
    none;
}

.auth-background-orb {
  position:
    absolute;

  z-index:
    -2;

  width:
    420px;

  height:
    420px;

  border-radius:
    999px;

  filter:
    blur(
      12px
    );

  pointer-events:
    none;
}

.auth-background-orb-left {
  top:
    -190px;

  left:
    -130px;

  background:
    rgba(
      37,
      99,
      235,
      0.18
    );
}

.auth-background-orb-right {
  right:
    -170px;

  bottom:
    -210px;

  background:
    rgba(
      124,
      58,
      237,
      0.15
    );
}

.auth-card {
  position:
    relative;

  display:
    grid;

  grid-template-columns:
    minmax(
      0,
      1.02fr
    )
    minmax(
      390px,
      0.98fr
    );

  width:
    min(
      1040px,
      100%
    );

  max-width:
    1040px;

  min-height:
    610px;

  overflow:
    hidden;

  padding:
    0;

  border:
    1px solid
    rgba(
      148,
      184,
      226,
      0.2
    );

  border-radius:
    34px;

  background:
    linear-gradient(
      145deg,
      rgba(
        43,
        67,
        96,
        0.91
      ),
      rgba(
        12,
        28,
        47,
        0.95
      )
    );

  box-shadow:
    0 42px 120px
    rgba(
      0,
      0,
      0,
      0.45
    ),
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.07
    );

  backdrop-filter:
    blur(
      24px
    );
}

.auth-card::before {
  content:
    "";

  position:
    absolute;

  top:
    -110px;

  left:
    -90px;

  width:
    330px;

  height:
    330px;

  border-radius:
    999px;

  background:
    rgba(
      59,
      130,
      246,
      0.15
    );

  filter:
    blur(
      4px
    );

  pointer-events:
    none;
}

.auth-brand-panel,
.auth-form-panel {
  position:
    relative;

  z-index:
    1;

  min-width:
    0;
}

.auth-brand-panel {
  display:
    flex;

  flex-direction:
    column;

  justify-content:
    center;

  gap:
    28px;

  padding:
    52px;

  border-right:
    1px solid
    rgba(
      148,
      184,
      226,
      0.13
    );

  background:
    radial-gradient(
      circle at 18% 12%,
      rgba(
        96,
        165,
        250,
        0.19
      ),
      transparent 36%
    ),
    linear-gradient(
      145deg,
      rgba(
        45,
        76,
        111,
        0.46
      ),
      rgba(
        14,
        34,
        56,
        0.22
      )
    );
}

.auth-brand-mark {
  display:
    grid;

  place-items:
    center;

  width:
    190px;

  min-height:
    190px;

  padding:
    18px;

  border:
    1px solid
    rgba(
      255,
      255,
      255,
      0.2
    );

  border-radius:
    28px;

  background:
    #ffffff;

  box-shadow:
    0 24px 60px
    rgba(
      0,
      0,
      0,
      0.28
    ),
    0 0 0 8px
    rgba(
      255,
      255,
      255,
      0.025
    );
}

.auth-logo {
  display:
    block;

  width:
    100%;

  max-width:
    154px;

  height:
    auto;

  margin:
    0;

  object-fit:
    contain;
}

.auth-brand-copy {
  display:
    grid;

  gap:
    12px;
}

.auth-eyebrow,
.auth-form-kicker {
  display:
    inline-flex;

  align-items:
    center;

  width:
    fit-content;

  padding:
    7px 11px;

  border:
    1px solid
    rgba(
      96,
      165,
      250,
      0.28
    );

  border-radius:
    999px;

  background:
    rgba(
      59,
      130,
      246,
      0.12
    );

  color:
    #bfdbfe;

  font-size:
    0.68rem;

  font-weight:
    950;

  text-transform:
    uppercase;

  letter-spacing:
    0.07em;
}

.auth-brand-copy h1 {
  max-width:
    430px;

  margin:
    0;

  color:
    #ffffff;

  font-size:
    clamp(
      2.1rem,
      3.2vw,
      3.2rem
    );

  font-weight:
    950;

  line-height:
    1.02;

  letter-spacing:
    -0.055em;
}

.auth-brand-copy p {
  max-width:
    440px;

  margin:
    0;

  color:
    rgba(
      219,
      234,
      254,
      0.68
    );

  font-size:
    0.92rem;

  line-height:
    1.65;
}

.auth-brand-status {
  display:
    flex;

  align-items:
    center;

  gap:
    13px;

  width:
    fit-content;

  padding:
    13px 15px;

  border:
    1px solid
    rgba(
      52,
      211,
      153,
      0.2
    );

  border-radius:
    17px;

  background:
    linear-gradient(
      145deg,
      rgba(
        16,
        185,
        129,
        0.11
      ),
      rgba(
        15,
        23,
        42,
        0.14
      )
    );
}

.auth-brand-status-dot {
  width:
    10px;

  height:
    10px;

  flex-shrink:
    0;

  border-radius:
    999px;

  background:
    #34d399;

  box-shadow:
    0 0 0 5px
    rgba(
      52,
      211,
      153,
      0.1
    ),
    0 0 18px
    rgba(
      52,
      211,
      153,
      0.42
    );
}

.auth-brand-status > div {
  display:
    grid;

  gap:
    3px;
}

.auth-brand-status strong {
  color:
    #d1fae5;

  font-size:
    0.8rem;
}

.auth-brand-status small {
  color:
    rgba(
      167,
      243,
      208,
      0.6
    );

  font-size:
    0.68rem;
}

.auth-form-panel {
  display:
    flex;

  flex-direction:
    column;

  justify-content:
    center;

  gap:
    24px;

  padding:
    52px;
}

.auth-form-header {
  display:
    grid;

  gap:
    9px;
}

.auth-form-header h2 {
  margin:
    0;

  color:
    #ffffff;

  font-size:
    2rem;

  font-weight:
    950;

  line-height:
    1;

  letter-spacing:
    -0.045em;
}

.auth-form-header p {
  max-width:
    420px;

  margin:
    0;

  color:
    rgba(
      203,
      213,
      225,
      0.68
    );

  font-size:
    0.84rem;

  line-height:
    1.55;
}

.auth-form-fields {
  display:
    grid;

  gap:
    17px;
}

.auth-form-panel .field-group {
  display:
    grid;

  gap:
    8px;

  margin:
    0;
}

.auth-form-panel .field-group label {
  color:
    rgba(
      241,
      245,
      249,
      0.9
    );

  font-size:
    0.76rem;

  font-weight:
    900;
}

.auth-form-panel input {
  min-height:
    52px;

  padding:
    13px 15px;

  border:
    1px solid
    rgba(
      148,
      184,
      226,
      0.19
    );

  border-radius:
    16px;

  background:
    rgba(
      5,
      18,
      32,
      0.28
    );

  color:
    #ffffff;

  font-size:
    0.9rem;

  box-shadow:
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.035
    );
}

.auth-form-panel input::placeholder {
  color:
    rgba(
      148,
      163,
      184,
      0.5
    );
}

.auth-form-panel input:focus {
  border-color:
    rgba(
      96,
      165,
      250,
      0.76
    );

  background:
    rgba(
      10,
      26,
      45,
      0.52
    );

  box-shadow:
    0 0 0 4px
    rgba(
      37,
      99,
      235,
      0.15
    ),
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.05
    );
}

.auth-message {
  display:
    none;

  min-height:
    43px;

  padding:
    11px 13px;

  border:
    1px solid
    transparent;

  border-radius:
    14px;

  font-size:
    0.76rem;

  font-weight:
    750;

  line-height:
    1.45;
}

.auth-message:not(:empty) {
  display:
    flex;

  align-items:
    center;
}

.auth-message.is-loading,
.auth-message.is-info {
  border-color:
    rgba(
      96,
      165,
      250,
      0.22
    );

  background:
    rgba(
      59,
      130,
      246,
      0.09
    );

  color:
    #bfdbfe;
}

.auth-message.is-success {
  border-color:
    rgba(
      52,
      211,
      153,
      0.23
    );

  background:
    rgba(
      16,
      185,
      129,
      0.09
    );

  color:
    #a7f3d0;
}

.auth-message.is-error {
  border-color:
    rgba(
      248,
      113,
      113,
      0.26
    );

  background:
    rgba(
      239,
      68,
      68,
      0.09
    );

  color:
    #fecaca;
}

.auth-actions {
  display:
    grid;

  grid-template-columns:
    repeat(
      2,
      minmax(
        0,
        1fr
      )
    );

  gap:
    11px;
}

.auth-actions .btn {
  width:
    100%;

  min-height:
    48px;

  border-radius:
    14px;

  font-size:
    0.82rem;

  font-weight:
    900;
}

.auth-login-button {
  background:
    linear-gradient(
      135deg,
      #3b82f6,
      #2563eb
    );

  border-color:
    rgba(
      147,
      197,
      253,
      0.3
    );

  box-shadow:
    0 14px 34px
    rgba(
      37,
      99,
      235,
      0.25
    );
}

.auth-login-button:disabled {
  opacity:
    0.65;

  cursor:
    wait;

  transform:
    none;
}

.auth-contact-button {
  background:
    rgba(
      255,
      255,
      255,
      0.06
    );

  border-color:
    rgba(
      148,
      184,
      226,
      0.15
    );
}

.auth-form-footer {
  display:
    grid;

  grid-template-columns:
    28px
    minmax(
      0,
      1fr
    );

  align-items:
    center;

  gap:
    10px;

  padding-top:
    19px;

  border-top:
    1px solid
    rgba(
      148,
      184,
      226,
      0.1
    );
}

.auth-form-footer-icon {
  display:
    grid;

  place-items:
    center;

  width:
    28px;

  height:
    28px;

  border:
    1px solid
    rgba(
      96,
      165,
      250,
      0.2
    );

  border-radius:
    9px;

  background:
    rgba(
      59,
      130,
      246,
      0.09
    );

  color:
    #93c5fd;

  font-size:
    0.72rem;

  font-weight:
    950;
}

.auth-form-footer p {
  margin:
    0;

  color:
    rgba(
      148,
      163,
      184,
      0.68
    );

  font-size:
    0.7rem;

  line-height:
    1.5;
}

@media (
  max-width:
  900px
) {

  .auth-wrapper {
    padding:
      24px;
  }

  .auth-card {
    grid-template-columns:
      1fr;

    width:
      min(
        620px,
        100%
      );

    min-height:
      0;
  }

  .auth-brand-panel {
    gap:
      20px;

    padding:
      34px;

    border-right:
      0;

    border-bottom:
      1px solid
      rgba(
        148,
        184,
        226,
        0.13
      );
  }

  .auth-brand-mark {
    width:
      150px;

    min-height:
      150px;
  }

  .auth-brand-copy h1 {
    font-size:
      2.2rem;
  }

  .auth-form-panel {
    padding:
      34px;
  }

}

@media (
  max-width:
  560px
) {

  .auth-wrapper {
    place-items:
      start center;

    padding:
      14px;
  }

  .auth-card {
    border-radius:
      24px;
  }

  .auth-brand-panel,
  .auth-form-panel {
    padding:
      24px;
  }

  .auth-brand-mark {
    width:
      128px;

    min-height:
      128px;

    padding:
      13px;

    border-radius:
      22px;
  }

  .auth-brand-copy h1 {
    font-size:
      1.85rem;
  }

  .auth-actions {
    grid-template-columns:
      1fr;
  }

  .auth-form-header h2 {
    font-size:
      1.7rem;
  }

}
/* =========================
   NOTIFICATIONS
========================= */

.notification-bell {
  position: relative;

  width: 56px;
  height: 56px;

  border-radius: 18px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.11),
      rgba(255, 255, 255, 0.06)
    );

  border:
    1px solid rgba(255, 255, 255, 0.14);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 1.2rem;

  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.2);
}

.notification-badge,
.team-widget-badge {
  position: absolute;

  top: -6px;
  right: -6px;

  min-width: 22px;
  height: 22px;

  border-radius: 999px;

  background: var(--red);
  color: white;

  font-size: 0.75rem;
  font-weight: 800;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0 6px;

  border: 2px solid #10243a;
}

.notification-center {
  position: absolute;

  top: 90px;
  right: 24px;

  width: 420px;
  max-height: 650px;

  overflow-y: auto;

  display: none;

  z-index: 9999;

  background:
    rgba(15, 23, 42, 0.96);

  border:
    1px solid rgba(255, 255, 255, 0.12);

  border-radius: 24px;

  backdrop-filter: blur(18px);

  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.3);
}

.notification-center.open {
  display: block;
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 20px;

  border-bottom:
    1px solid rgba(255, 255, 255, 0.08);
}

.notification-list {
  display: grid;
  gap: 10px;

  padding: 12px;
}

.notification-item {
  padding: 16px;

  border-radius: 18px;

  cursor: pointer;

  transition: background 0.15s ease;

  background:
    rgba(255, 255, 255, 0.05);
}

.notification-item:hover {
  background:
    rgba(255, 255, 255, 0.10);
}

.notification-item.unread {
  border-left: 4px solid var(--blue);
}

.notification-item.read {
  opacity: 0.7;
}

.notification-title {
  font-weight: 800;
  margin-bottom: 6px;
}

.notification-message {
  color: var(--text-soft);
  margin-bottom: 6px;
}

.notification-company {
  color: #93c5fd;
  font-size: 0.9rem;
}

.notification-date {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 8px;
}

/* =========================
   TEAM WORKFLOW PANEL
========================= */

.team-widget-toggle {
  position: fixed;

  right: 24px;
  bottom: 24px;

  z-index: 9998;

  min-width: 92px;
  height: 52px;

  border-radius: 999px;

  background:
    linear-gradient(
      135deg,
      #3b82f6,
      #1d4ed8
    );

  color: #ffffff;

  border:
    1px solid rgba(255, 255, 255, 0.18);

  box-shadow:
    0 18px 44px rgba(37, 99, 235, 0.35);

  font-weight: 900;
}

.team-widget-panel {
  position: fixed;

  right: 24px;
  bottom: 24px;

  z-index: 9998;

  width: min(720px, calc(100vw - 48px));
  height: min(640px, calc(100vh - 48px));

  display: flex;
  flex-direction: column;

  overflow: hidden;

  border-radius: 30px;

  background:
    linear-gradient(
      180deg,
      rgba(15, 23, 42, 0.98),
      rgba(8, 19, 31, 0.98)
    );

  border:
    1px solid rgba(255, 255, 255, 0.14);

  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.48);

  backdrop-filter: blur(22px);
}

.team-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 18px 20px;

  border-bottom:
    1px solid rgba(255, 255, 255, 0.08);

  background:
    rgba(255, 255, 255, 0.045);
}

.team-widget-header strong {
  display: block;
  font-size: 1.1rem;
}

.team-widget-header span {
  display: block;
  margin-top: 3px;

  color: var(--text-muted);
  font-size: 0.82rem;
}

#team-widget-close {
  width: 38px;
  height: 38px;

  padding: 0;

  border-radius: 14px;

  background:
    rgba(255, 255, 255, 0.08);

  color: #ffffff;
}

.team-workspace-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;

  gap: 10px;

  padding: 12px;

  border-bottom:
    1px solid rgba(255, 255, 255, 0.08);
}

.team-workspace-button {
  border-radius: 16px;

  background:
    rgba(255, 255, 255, 0.07);

  color: var(--text-soft);

  border:
    1px solid rgba(255, 255, 255, 0.1);
}

.team-workspace-button.is-active {
  background:
    linear-gradient(
      135deg,
      rgba(59, 130, 246, 0.34),
      rgba(59, 130, 246, 0.14)
    );

  color: #ffffff;

  border-color:
    rgba(96, 165, 250, 0.45);
}

.team-widget-body {
  min-height: 0;
  flex: 1;

  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
}

.team-users-list {
  min-height: 0;

  overflow-y: auto;

  padding: 12px;

  border-right:
    1px solid rgba(255, 255, 255, 0.08);

  background:
    rgba(255, 255, 255, 0.025);
}

.team-user-item {
  width: 100%;

  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;

  gap: 10px;

  padding: 12px;

  margin-bottom: 8px;

  border-radius: 16px;

  background:
    rgba(255, 255, 255, 0.045);

  border:
    1px solid transparent;

  color: #ffffff;

  text-align: left;
}

.team-user-item:hover,
.team-user-item.is-active {
  background:
    rgba(59, 130, 246, 0.18);

  border-color:
    rgba(96, 165, 250, 0.32);
}

.team-user-item strong,
.team-user-item small {
  display: block;
  overflow: hidden;

  white-space: nowrap;
  text-overflow: ellipsis;
}

.team-user-item strong {
  font-size: 0.88rem;
}

.team-user-item small {
  margin-top: 3px;

  color: var(--text-muted);
  font-size: 0.74rem;
}

.team-user-item em {
  min-width: 22px;
  height: 22px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 999px;

  background: var(--red);

  color: #ffffff;

  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.team-user-status {
  width: 10px;
  height: 10px;

  border-radius: 999px;

  background:
    rgba(148, 163, 184, 0.45);

  box-shadow:
    0 0 0 4px rgba(148, 163, 184, 0.08);
}

.team-user-status.is-online {
  background: var(--green);
  box-shadow:
    0 0 0 4px rgba(16, 185, 129, 0.14);
}

.team-user-status.is-global {
  background: var(--blue);
  box-shadow:
    0 0 0 4px rgba(59, 130, 246, 0.16);
}

.team-chat-main {
  min-width: 0;
  min-height: 0;

  display: flex;
  flex-direction: column;
}

.team-chat-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;

  padding: 16px 18px;

  border-bottom:
    1px solid rgba(255, 255, 255, 0.08);
}

.team-chat-title strong {
  font-size: 1rem;
}

.team-chat-title small {
  color: var(--text-muted);
}

.team-chat-messages {
  flex: 1;
  min-height: 0;

  overflow-y: auto;

  display: flex;
  flex-direction: column;

  gap: 10px;

  padding: 16px;
}

.team-chat-message {
  max-width: 82%;

  align-self: flex-start;

  padding: 12px 14px;

  border-radius: 18px 18px 18px 6px;

  background:
    rgba(255, 255, 255, 0.075);

  border:
    1px solid rgba(255, 255, 255, 0.08);
}

.team-chat-message.is-mine {
  align-self: flex-end;

  border-radius: 18px 18px 6px 18px;

  background:
    linear-gradient(
      135deg,
      rgba(59, 130, 246, 0.32),
      rgba(37, 99, 235, 0.2)
    );

  border-color:
    rgba(96, 165, 250, 0.25);
}

.team-chat-message > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;

  margin-bottom: 6px;
}

.team-chat-message strong {
  font-size: 0.8rem;
}

.team-chat-message small {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.team-chat-message p {
  margin: 0;

  color: #edf5ff;

  font-size: 0.88rem;
  line-height: 1.55;
}

.team-chat-message span {
  display: inline-flex;

  margin-top: 8px;

  padding: 5px 8px;

  border-radius: 999px;

  background:
    rgba(255, 255, 255, 0.09);

  color: #bfdbfe;

  font-size: 0.72rem;
  font-weight: 800;
}

.team-chat-empty {
  margin: auto;

  color: var(--text-muted);

  text-align: center;
}

.team-chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;

  gap: 10px;

  padding: 14px;

  border-top:
    1px solid rgba(255, 255, 255, 0.08);

  background:
    rgba(255, 255, 255, 0.035);
}

.team-chat-form input {
  min-height: 46px;
  border-radius: 16px;
}

.team-chat-form button {
  min-width: 88px;

  background:
    linear-gradient(
      135deg,
      #3b82f6,
      #1d4ed8
    );

  color: #ffffff;
}

/* =========================
   SALES COPILOT PANEL
========================= */

.sales-copilot-widget-toggle {
  min-width: 104px;

  overflow: hidden;

  isolation: isolate;

  background:
    linear-gradient(
      135deg,
      #8b5cf6 0%,
      #6366f1 48%,
      #2563eb 100%
    );

  border-color:
    rgba(
      196,
      181,
      253,
      0.38
    );

  box-shadow:
    0 18px 46px
    rgba(
      99,
      102,
      241,
      0.38
    ),
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.16
    );

  letter-spacing:
    -0.01em;
}

.sales-copilot-widget-toggle::before {
  content:
    "AI";

  display:
    inline-flex;

  align-items:
    center;

  justify-content:
    center;

  width:
    27px;

  height:
    27px;

  flex-shrink:
    0;

  border:
    1px solid
    rgba(
      255,
      255,
      255,
      0.22
    );

  border-radius:
    10px;

  background:
    rgba(
      255,
      255,
      255,
      0.14
    );

  color:
    #ffffff;

  font-size:
    0.63rem;

  font-weight:
    950;

  letter-spacing:
    0.04em;

  box-shadow:
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.14
    );
}

.sales-copilot-widget-toggle:hover {
  background:
    linear-gradient(
      135deg,
      #a78bfa 0%,
      #7c3aed 48%,
      #3b82f6 100%
    );

  border-color:
    rgba(
      221,
      214,
      254,
      0.58
    );

  box-shadow:
    0 22px 56px
    rgba(
      99,
      102,
      241,
      0.48
    ),
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.2
    );
}

.sales-copilot-widget-panel {
  width:
    min(
      540px,
      calc(
        100vw -
        48px
      )
    );

  height:
    min(
      690px,
      calc(
        100vh -
        48px
      )
    );

  border-color:
    rgba(
      167,
      139,
      250,
      0.3
    );

  background:
    radial-gradient(
      circle at 92% 2%,
      rgba(
        139,
        92,
        246,
        0.18
      ),
      transparent 34%
    ),
    radial-gradient(
      circle at 8% 92%,
      rgba(
        59,
        130,
        246,
        0.1
      ),
      transparent 32%
    ),
    linear-gradient(
      180deg,
      rgba(
        18,
        24,
        48,
        0.99
      ),
      rgba(
        7,
        15,
        29,
        0.99
      )
    );

  box-shadow:
    0 34px 100px
    rgba(
      0,
      0,
      0,
      0.56
    ),
    0 0 0 1px
    rgba(
      139,
      92,
      246,
      0.08
    ),
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.07
    );
}

.sales-copilot-widget-panel
.team-widget-header {
  min-height:
    74px;

  padding:
    18px 20px;

  border-bottom-color:
    rgba(
      167,
      139,
      250,
      0.16
    );

  background:
    linear-gradient(
      135deg,
      rgba(
        139,
        92,
        246,
        0.18
      ),
      rgba(
        59,
        130,
        246,
        0.07
      )
    );
}

.sales-copilot-widget-panel
.team-widget-header > div {
  display:
    grid;

  gap:
    4px;
}

.sales-copilot-widget-panel
.team-widget-header strong {
  color:
    #ffffff;

  font-size:
    1.12rem;

  font-weight:
    950;

  letter-spacing:
    -0.025em;
}

.sales-copilot-widget-panel
.team-widget-header span {
  margin:
    0;

  color:
    #c4b5fd;

  font-size:
    0.74rem;

  font-weight:
    850;

  letter-spacing:
    0.035em;

  text-transform:
    uppercase;
}

#sales-copilot-widget-close {
  width:
    38px;

  height:
    38px;

  flex-shrink:
    0;

  padding:
    0;

  border-radius:
    14px;

  background:
    rgba(
      255,
      255,
      255,
      0.075
    );

  border-color:
    rgba(
      255,
      255,
      255,
      0.1
    );

  color:
    #ffffff;
}

#sales-copilot-widget-close:hover {
  background:
    rgba(
      239,
      68,
      68,
      0.18
    );

  border-color:
    rgba(
      248,
      113,
      113,
      0.28
    );
}

.sales-copilot-widget-panel
.team-chat-main {
  background:
    rgba(
      4,
      11,
      23,
      0.18
    );
}

.sales-copilot-widget-panel
.team-chat-title {
  align-items:
    center;

  min-height:
    70px;

  padding:
    15px 18px;

  border-bottom-color:
    rgba(
      167,
      139,
      250,
      0.12
    );

  background:
    rgba(
      255,
      255,
      255,
      0.018
    );
}

.sales-copilot-widget-panel
.team-chat-title > div {
  display:
    grid;

  gap:
    4px;

  min-width:
    0;
}

.sales-copilot-widget-panel
.team-chat-title strong {
  overflow:
    hidden;

  color:
    #ffffff;

  font-size:
    0.98rem;

  font-weight:
    900;

  white-space:
    nowrap;

  text-overflow:
    ellipsis;
}

.sales-copilot-widget-panel
.team-chat-title small {
  overflow:
    hidden;

  color:
    #aebfdb;

  font-size:
    0.73rem;

  white-space:
    nowrap;

  text-overflow:
    ellipsis;
}

.sales-copilot-connection-status {
  display:
    inline-flex;

  align-items:
    center;

  justify-content:
    center;

  min-height:
    31px;

  flex-shrink:
    0;

  padding:
    7px 11px;

  border:
    1px solid
    rgba(
      167,
      139,
      250,
      0.25
    );

  border-radius:
    999px;

  background:
    rgba(
      139,
      92,
      246,
      0.12
    );

  color:
    #ddd6fe;

  font-size:
    0.7rem;

  font-weight:
    900;

  white-space:
    nowrap;
}

.sales-copilot-connection-notice {
  display:
    grid;

  gap:
    7px;

  margin:
    14px 14px 0;

  padding:
    14px 15px;

  border:
    1px solid
    rgba(
      167,
      139,
      250,
      0.17
    );

  border-radius:
    18px;

  background:
    linear-gradient(
      145deg,
      rgba(
        139,
        92,
        246,
        0.1
      ),
      rgba(
        255,
        255,
        255,
        0.035
      )
    );

  box-shadow:
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.035
    );
}

.sales-copilot-connection-notice strong {
  color:
    #f5f3ff;

  font-size:
    0.82rem;

  font-weight:
    900;
}

.sales-copilot-connection-notice span {
  color:
    #aebfdb;

  font-size:
    0.75rem;

  line-height:
    1.5;

  overflow-wrap:
    anywhere;
}

.sales-copilot-widget-panel
.team-workspace-switch {
  gap:
    9px;

  padding:
    10px 14px 14px;

  border-bottom:
    0;
}

.sales-copilot-widget-panel
.team-workspace-button {
  min-height:
    42px;

  padding:
    9px 12px;

  border-radius:
    14px;

  font-size:
    0.75rem;

  font-weight:
    900;
}

.sales-copilot-widget-panel
.team-workspace-button.is-active {
  background:
    linear-gradient(
      135deg,
      rgba(
        139,
        92,
        246,
        0.52
      ),
      rgba(
        79,
        70,
        229,
        0.28
      )
    );

  border-color:
    rgba(
      196,
      181,
      253,
      0.43
    );

  box-shadow:
    0 12px 28px
    rgba(
      99,
      102,
      241,
      0.2
    );
}

.sales-copilot-widget-panel
.team-chat-messages {
  gap:
    12px;

  padding:
    16px 14px;
}

.sales-copilot-widget-panel
.team-chat-message {
  max-width:
    88%;

  border-color:
    rgba(
      167,
      139,
      250,
      0.12
    );

  background:
    linear-gradient(
      145deg,
      rgba(
        255,
        255,
        255,
        0.075
      ),
      rgba(
        139,
        92,
        246,
        0.055
      )
    );
}

.sales-copilot-widget-panel
.team-chat-message.is-mine {
  background:
    linear-gradient(
      135deg,
      rgba(
        139,
        92,
        246,
        0.38
      ),
      rgba(
        79,
        70,
        229,
        0.24
      )
    );

  border-color:
    rgba(
      196,
      181,
      253,
      0.26
    );
}

.sales-copilot-widget-panel
.team-chat-form {
  padding:
    13px 14px 14px;

  border-top-color:
    rgba(
      167,
      139,
      250,
      0.13
    );

  background:
    rgba(
      10,
      17,
      34,
      0.72
    );
}

.sales-copilot-widget-panel
.team-chat-form input {
  min-height:
    48px;

  border-color:
    rgba(
      167,
      139,
      250,
      0.18
    );

  background:
    rgba(
      255,
      255,
      255,
      0.055
    );
}

.sales-copilot-widget-panel
.team-chat-form input:focus {
  border-color:
    rgba(
      167,
      139,
      250,
      0.68
    );

  box-shadow:
    0 0 0 4px
    rgba(
      139,
      92,
      246,
      0.13
    );
}

.sales-copilot-widget-panel
.team-chat-form button {
  background:
    linear-gradient(
      135deg,
      #8b5cf6,
      #4f46e5
    );

  box-shadow:
    0 12px 28px
    rgba(
      99,
      102,
      241,
      0.24
    );
}

.sales-copilot-widget-panel
.team-chat-form input:disabled,
.sales-copilot-widget-panel
.team-chat-form button:disabled {
  opacity:
    0.48;

  cursor:
    not-allowed;

  transform:
    none;

  box-shadow:
    none;
}

/* =========================
   SALES COPILOT ACTION MODE
========================= */

.sales-copilot-widget-panel.is-action-mode {
  width:
    min(
      680px,
      calc(
        100vw -
        48px
      )
    );

  height:
    min(
      760px,
      calc(
        100vh -
        48px
      )
    );

  border-color:
    rgba(
      167,
      139,
      250,
      0.4
    );

  background:
    radial-gradient(
      circle at 90% 4%,
      rgba(
        139,
        92,
        246,
        0.22
      ),
      transparent 34%
    ),
    linear-gradient(
      180deg,
      rgba(
        20,
        25,
        52,
        0.995
      ),
      rgba(
        7,
        14,
        29,
        0.995
      )
    );

  box-shadow:
    0 38px 110px
    rgba(
      0,
      0,
      0,
      0.62
    ),
    0 0 0 1px
    rgba(
      167,
      139,
      250,
      0.12
    );
}

.sales-copilot-widget-panel.is-action-mode
.team-widget-header {
  min-height:
    68px;

  padding:
    16px 20px;
}

.sales-copilot-widget-panel.is-action-mode
.team-chat-title {
  min-height:
    62px;

  padding:
    13px 18px;
}

.sales-copilot-widget-panel.is-action-mode
.team-chat-main {
  min-height:
    0;

  overflow:
    hidden;

  background:
    linear-gradient(
      180deg,
      rgba(
        8,
        15,
        31,
        0.36
      ),
      rgba(
        4,
        10,
        22,
        0.2
      )
    );
}

.sales-copilot-widget-panel.is-action-mode
.sales-copilot-action-editor {
  flex:
    1;

  min-height:
    0;

  margin:
    16px;

  padding:
    18px;

  overflow:
    hidden;

  border-radius:
    22px;

  border-color:
    rgba(
      167,
      139,
      250,
      0.28
    );

  background:
    linear-gradient(
      145deg,
      rgba(
        139,
        92,
        246,
        0.115
      ),
      rgba(
        255,
        255,
        255,
        0.035
      )
    );

  box-shadow:
    0 18px 50px
    rgba(
      0,
      0,
      0,
      0.24
    ),
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.045
    );
}

.sales-copilot-widget-panel.is-action-mode
.sales-copilot-action-editor
.team-workspace-switch {
  grid-template-columns:
    repeat(
      2,
      minmax(
        0,
        1fr
      )
    );

  gap:
    10px;

  padding:
    0;
}

.sales-copilot-widget-panel.is-action-mode
.sales-copilot-action-editor
.team-workspace-button {
  min-height:
    44px;

  border-radius:
    14px;
}

.sales-copilot-widget-panel.is-action-mode
#sales-copilot-action-text {
  flex:
    1;

  min-height:
    360px !important;

  max-height:
    none !important;

  padding:
    18px !important;

  resize:
    none !important;

  border:
    1px solid
    rgba(
      167,
      139,
      250,
      0.3
    ) !important;

  border-radius:
    18px !important;

  background:
    rgba(
      3,
      9,
      21,
      0.88
    ) !important;

  color:
    #f8fafc !important;

  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif !important;

  font-size:
    0.9rem !important;

  font-weight:
    550;

  line-height:
    1.7 !important;

  caret-color:
    #c4b5fd;

  box-shadow:
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.045
    ),
    inset 0 0 0 1px
    rgba(
      0,
      0,
      0,
      0.12
    );
}

.sales-copilot-widget-panel.is-action-mode
#sales-copilot-action-text:focus {
  border-color:
    rgba(
      196,
      181,
      253,
      0.78
    ) !important;

  background:
    rgba(
      5,
      12,
      28,
      0.96
    ) !important;

  box-shadow:
    0 0 0 4px
    rgba(
      139,
      92,
      246,
      0.14
    ),
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.05
    ) !important;
}

.sales-copilot-widget-panel.is-action-mode
#sales-copilot-action-text::-webkit-scrollbar {
  width:
    8px;
}

.sales-copilot-widget-panel.is-action-mode
#sales-copilot-action-text::-webkit-scrollbar-thumb {
  border-radius:
    999px;

  background:
    rgba(
      167,
      139,
      250,
      0.38
    );
}

@media (
  max-width:
  900px
) {

  .sales-copilot-widget-panel {
    right:
      14px;

    bottom:
      14px;

    width:
      calc(
        100vw -
        28px
      );

    height:
      calc(
        100vh -
        28px
      );
  }

}

@media (
  max-width:
  560px
) {

  .sales-copilot-widget-toggle {
    min-width:
      52px;

    width:
      52px;

    padding:
      0;

    font-size:
      0;
  }

  .sales-copilot-widget-toggle::before {
    width:
      30px;

    height:
      30px;

    font-size:
      0.68rem;
  }

  .sales-copilot-widget-panel {
    border-radius:
      22px;
  }

  .sales-copilot-widget-panel
  .team-widget-header {
    min-height:
      66px;

    padding:
      14px 16px;
  }

  .sales-copilot-widget-panel
  .team-chat-title {
    align-items:
      flex-start;

    flex-direction:
      column;
  }

  .sales-copilot-connection-status {
    width:
      100%;
  }

  .sales-copilot-widget-panel
  .team-workspace-switch {
    grid-template-columns:
      1fr;
  }

  .sales-copilot-widget-panel
  .team-chat-form {
    grid-template-columns:
      1fr;
  }

  .sales-copilot-widget-panel
  .team-chat-form button {
    width:
      100%;
  }

}

/* =========================
   ADMIN COPILOT PANEL
========================= */

.admin-copilot-widget-toggle {
  min-width:
    112px;

  overflow:
    hidden;

  isolation:
    isolate;

  background:
    linear-gradient(
      135deg,
      #0ea5e9 0%,
      #2563eb 52%,
      #1d4ed8 100%
    );

  border-color:
    rgba(
      125,
      211,
      252,
      0.42
    );

  box-shadow:
    0 18px 46px
    rgba(
      37,
      99,
      235,
      0.38
    ),
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.18
    );

  color:
    #ffffff;

  letter-spacing:
    -0.01em;
}

.admin-copilot-widget-toggle::before {
  content:
    "ADM";

  display:
    inline-flex;

  align-items:
    center;

  justify-content:
    center;

  width:
    31px;

  height:
    27px;

  flex-shrink:
    0;

  border:
    1px solid
    rgba(
      255,
      255,
      255,
      0.24
    );

  border-radius:
    10px;

  background:
    rgba(
      255,
      255,
      255,
      0.14
    );

  color:
    #ffffff;

  font-size:
    0.57rem;

  font-weight:
    950;

  letter-spacing:
    0.04em;
}

.admin-copilot-widget-toggle:hover {
  background:
    linear-gradient(
      135deg,
      #38bdf8 0%,
      #3b82f6 52%,
      #2563eb 100%
    );

  border-color:
    rgba(
      186,
      230,
      253,
      0.62
    );

  box-shadow:
    0 22px 56px
    rgba(
      37,
      99,
      235,
      0.48
    ),
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.22
    );
}

.admin-copilot-widget-panel {
  width:
    min(
      540px,
      calc(
        100vw -
        48px
      )
    );

  height:
    min(
      660px,
      calc(
        100vh -
        48px
      )
    );

  border-color:
    rgba(
      125,
      211,
      252,
      0.28
    );

  background:
    radial-gradient(
      circle at 92% 2%,
      rgba(
        14,
        165,
        233,
        0.2
      ),
      transparent 34%
    ),
    radial-gradient(
      circle at 8% 92%,
      rgba(
        37,
        99,
        235,
        0.12
      ),
      transparent 32%
    ),
    linear-gradient(
      180deg,
      rgba(
        12,
        28,
        50,
        0.99
      ),
      rgba(
        5,
        14,
        27,
        0.99
      )
    );

  box-shadow:
    0 34px 100px
    rgba(
      0,
      0,
      0,
      0.56
    ),
    0 0 0 1px
    rgba(
      14,
      165,
      233,
      0.08
    ),
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.07
    );
}

.admin-copilot-widget-panel
.team-widget-header {
  min-height:
    74px;

  padding:
    18px 20px;

  border-bottom-color:
    rgba(
      125,
      211,
      252,
      0.15
    );

  background:
    linear-gradient(
      135deg,
      rgba(
        14,
        165,
        233,
        0.2
      ),
      rgba(
        37,
        99,
        235,
        0.08
      )
    );
}

.admin-copilot-widget-panel
.team-widget-header > div {
  display:
    grid;

  gap:
    4px;
}

.admin-copilot-widget-panel
.team-widget-header strong {
  color:
    #ffffff;

  font-size:
    1.12rem;

  font-weight:
    950;

  letter-spacing:
    -0.025em;
}

.admin-copilot-widget-panel
.team-widget-header span {
  margin:
    0;

  color:
    #bae6fd;

  font-size:
    0.72rem;

  font-weight:
    850;

  letter-spacing:
    0.04em;

  text-transform:
    uppercase;
}

#admin-copilot-widget-close {
  width:
    38px;

  height:
    38px;

  flex-shrink:
    0;

  padding:
    0;

  border-radius:
    14px;

  background:
    rgba(
      255,
      255,
      255,
      0.075
    );

  border-color:
    rgba(
      255,
      255,
      255,
      0.1
    );

  color:
    #ffffff;
}

#admin-copilot-widget-close:hover {
  background:
    rgba(
      239,
      68,
      68,
      0.18
    );

  border-color:
    rgba(
      248,
      113,
      113,
      0.28
    );
}

.admin-copilot-widget-panel
.team-chat-main {
  background:
    rgba(
      4,
      12,
      24,
      0.24
    );
}

.admin-copilot-widget-panel
.team-chat-title {
  align-items:
    center;

  min-height:
    70px;

  padding:
    15px 18px;

  border-bottom-color:
    rgba(
      125,
      211,
      252,
      0.12
    );

  background:
    rgba(
      255,
      255,
      255,
      0.018
    );
}

.admin-copilot-widget-panel
.team-chat-title > div {
  display:
    grid;

  gap:
    4px;

  min-width:
    0;
}

.admin-copilot-widget-panel
.team-chat-title strong {
  color:
    #ffffff;

  font-size:
    0.98rem;

  font-weight:
    900;
}

.admin-copilot-widget-panel
.team-chat-title small {
  color:
    #aebfdb;

  font-size:
    0.73rem;
}

.admin-copilot-widget-panel
.sales-copilot-connection-status {
  border-color:
    rgba(
      125,
      211,
      252,
      0.28
    );

  background:
    rgba(
      14,
      165,
      233,
      0.12
    );

  color:
    #bae6fd;
}

.admin-copilot-widget-panel
.team-chat-messages {
  gap:
    12px;

  padding:
    16px 14px;
}

.admin-copilot-widget-panel
.sales-copilot-connection-notice {
  border-color:
    rgba(
      125,
      211,
      252,
      0.17
    );

  background:
    linear-gradient(
      145deg,
      rgba(
        14,
        165,
        233,
        0.1
      ),
      rgba(
        255,
        255,
        255,
        0.035
      )
    );
}

.admin-copilot-widget-panel
.sales-copilot-connection-notice strong {
  color:
    #f0f9ff;
}

/* =========================
   ADMIN COPILOT CONTROL
========================= */

.admin-copilot-control-surface {
  display:
    grid;

  gap:
    15px;

  padding:
    17px;

  border:
    1px solid
    rgba(
      125,
      211,
      252,
      0.2
    );

  border-radius:
    22px;

  background:
    linear-gradient(
      145deg,
      rgba(
        14,
        165,
        233,
        0.12
      ),
      rgba(
        255,
        255,
        255,
        0.035
      )
    );

  box-shadow:
    0 18px 44px
    rgba(
      0,
      0,
      0,
      0.2
    ),
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.045
    );
}

.admin-copilot-control-header {
  display:
    flex;

  align-items:
    flex-start;

  justify-content:
    space-between;

  gap:
    14px;
}

.admin-copilot-control-header > div {
  display:
    grid;

  gap:
    5px;

  min-width:
    0;
}

.admin-copilot-control-header strong {
  color:
    #f0f9ff;

  font-size:
    0.9rem;

  font-weight:
    950;
}

.admin-copilot-control-header span {
  color:
    #aebfdb;

  font-size:
    0.75rem;

  line-height:
    1.5;
}

.admin-copilot-provider-badge {
  display:
    inline-flex;

  align-items:
    center;

  justify-content:
    center;

  min-height:
    31px;

  flex-shrink:
    0;

  padding:
    7px 11px;

  border:
    1px solid
    rgba(
      148,
      163,
      184,
      0.25
    );

  border-radius:
    999px;

  background:
    rgba(
      148,
      163,
      184,
      0.1
    );

  color:
    #dbeafe;

  font-size:
    0.68rem;

  font-weight:
    950;

  white-space:
    nowrap;
}

.admin-copilot-provider-badge.is-ready {
  border-color:
    rgba(
      52,
      211,
      153,
      0.3
    );

  background:
    rgba(
      16,
      185,
      129,
      0.13
    );

  color:
    #bbf7d0;
}

.admin-copilot-provider-badge.is-parked {
  border-color:
    rgba(
      250,
      204,
      21,
      0.3
    );

  background:
    rgba(
      250,
      204,
      21,
      0.11
    );

  color:
    #fef08a;
}

.admin-copilot-provider-badge.is-not_connected {
  border-color:
    rgba(
      248,
      113,
      113,
      0.28
    );

  background:
    rgba(
      239,
      68,
      68,
      0.1
    );

  color:
    #fecaca;
}

.admin-copilot-provider-field {
  display:
    grid;

  gap:
    8px;
}

.admin-copilot-provider-field > span {
  color:
    #dbeafe;

  font-size:
    0.74rem;

  font-weight:
    900;
}

.admin-copilot-provider-field select {
  min-height:
    48px;

  border:
    1px solid
    rgba(
      125,
      211,
      252,
      0.23
    );

  border-radius:
    16px;

  background:
    rgba(
      3,
      12,
      25,
      0.64
    );

  color:
    #ffffff;

  font-size:
    0.82rem;

  font-weight:
    800;
}

.admin-copilot-provider-field select:focus {
  border-color:
    rgba(
      56,
      189,
      248,
      0.72
    );

  box-shadow:
    0 0 0 4px
    rgba(
      14,
      165,
      233,
      0.13
    );
}

.admin-copilot-provider-summary {
  display:
    grid;

  gap:
    6px;

  padding:
    13px;

  border:
    1px solid
    rgba(
      255,
      255,
      255,
      0.09
    );

  border-radius:
    17px;

  background:
    rgba(
      255,
      255,
      255,
      0.04
    );
}

.admin-copilot-provider-summary strong {
  color:
    #ffffff;

  font-size:
    0.82rem;

  font-weight:
    900;
}

.admin-copilot-provider-summary span {
  color:
    #aebfdb;

  font-size:
    0.74rem;

  line-height:
    1.5;
}

.admin-copilot-safety-grid {
  display:
    grid;

  grid-template-columns:
    repeat(
      3,
      minmax(
        0,
        1fr
      )
    );

  gap:
    10px;
}

.admin-copilot-safety-item {
  display:
    grid;

  grid-template-columns:
    auto
    minmax(
      0,
      1fr
    );

  align-items:
    center;

  gap:
    10px;

  min-height:
    74px;

  padding:
    12px;

  border:
    1px solid
    rgba(
      255,
      255,
      255,
      0.09
    );

  border-radius:
    16px;

  background:
    rgba(
      255,
      255,
      255,
      0.038
    );
}

.admin-copilot-safety-item input[type="checkbox"] {
  appearance:
    none;

  position:
    relative;

  width:
    38px;

  height:
    23px;

  flex-shrink:
    0;

  padding:
    0;

  border:
    1px solid
    rgba(
      248,
      113,
      113,
      0.26
    );

  border-radius:
    999px;

  background:
    rgba(
      239,
      68,
      68,
      0.18
    );
}

.admin-copilot-safety-item input[type="checkbox"]::after {
  content:
    "";

  position:
    absolute;

  top:
    3px;

  left:
    3px;

  width:
    15px;

  height:
    15px;

  border-radius:
    999px;

  background:
    #ffffff;
}

.admin-copilot-safety-item input[type="checkbox"]:checked {
  border-color:
    rgba(
      52,
      211,
      153,
      0.36
    );

  background:
    rgba(
      16,
      185,
      129,
      0.26
    );
}

.admin-copilot-safety-item input[type="checkbox"]:checked::after {
  transform:
    translateX(
      15px
    );
}

.admin-copilot-safety-item input[type="checkbox"]:disabled {
  opacity:
    0.82;

  cursor:
    not-allowed;
}

.admin-copilot-safety-item > span {
  display:
    grid;

  gap:
    3px;

  min-width:
    0;
}

.admin-copilot-safety-item strong {
  color:
    #ffffff;

  font-size:
    0.72rem;

  font-weight:
    900;

  line-height:
    1.3;
}

.admin-copilot-safety-item small {
  color:
    #94a3b8;

  font-size:
    0.66rem;

  line-height:
    1.35;
}

.admin-copilot-control-actions {
  display:
    grid;

  grid-template-columns:
    repeat(
      2,
      minmax(
        0,
        1fr
      )
    );

  gap:
    10px;
}

.admin-copilot-control-actions
.team-workspace-button {
  min-height:
    43px;

  padding:
    9px 12px;

  border-radius:
    14px;

  font-size:
    0.75rem;

  font-weight:
    900;
}

.admin-copilot-control-actions
.team-workspace-button.is-active {
  border-color:
    rgba(
      125,
      211,
      252,
      0.4
    );

  background:
    linear-gradient(
      135deg,
      rgba(
        14,
        165,
        233,
        0.45
      ),
      rgba(
        37,
        99,
        235,
        0.26
      )
    );

  color:
    #ffffff;

  box-shadow:
    0 12px 28px
    rgba(
      37,
      99,
      235,
      0.2
    );
}

.admin-copilot-control-feedback {
  margin:
    0;

  padding:
    10px 12px;

  border:
    1px solid
    rgba(
      52,
      211,
      153,
      0.18
    );

  border-radius:
    14px;

  background:
    rgba(
      16,
      185,
      129,
      0.075
    );

  color:
    #bbf7d0;

  font-size:
    0.72rem;

  line-height:
    1.45;
}

@media (
  max-width:
  560px
) {

  .admin-copilot-control-header {
    flex-direction:
      column;

    align-items:
      stretch;
  }

  .admin-copilot-provider-badge {
    width:
      100%;
  }

  .admin-copilot-safety-grid,
  .admin-copilot-control-actions {
    grid-template-columns:
      1fr;
  }

}

/* =========================
   ADMIN COPILOT ACTION LAYER
========================= */

.admin-copilot-action-surface,
.admin-copilot-action-editor {
  display:
    grid;

  gap:
    15px;

  padding:
    17px;

  border:
    1px solid
    rgba(
      125,
      211,
      252,
      0.2
    );

  border-radius:
    22px;

  background:
    linear-gradient(
      145deg,
      rgba(
        14,
        165,
        233,
        0.105
      ),
      rgba(
        255,
        255,
        255,
        0.035
      )
    );

  box-shadow:
    0 18px 44px
    rgba(
      0,
      0,
      0,
      0.2
    ),
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.045
    );
}

.admin-copilot-action-header {
  display:
    flex;

  align-items:
    flex-start;

  justify-content:
    space-between;

  gap:
    14px;
}

.admin-copilot-action-header > div {
  display:
    grid;

  gap:
    5px;

  min-width:
    0;
}

.admin-copilot-action-header strong {
  color:
    #f0f9ff;

  font-size:
    0.9rem;

  font-weight:
    950;

  line-height:
    1.3;
}

.admin-copilot-action-header span {
  color:
    #aebfdb;

  font-size:
    0.74rem;

  line-height:
    1.5;
}

.admin-copilot-local-badge {
  display:
    inline-flex;

  align-items:
    center;

  justify-content:
    center;

  min-height:
    31px;

  flex-shrink:
    0;

  padding:
    7px 11px;

  border:
    1px solid
    rgba(
      52,
      211,
      153,
      0.28
    );

  border-radius:
    999px;

  background:
    rgba(
      16,
      185,
      129,
      0.11
    );

  color:
    #bbf7d0 !important;

  font-size:
    0.67rem !important;

  font-weight:
    950;

  line-height:
    1;

  white-space:
    nowrap;
}

.admin-copilot-action-grid {
  display:
    grid;

  grid-template-columns:
    repeat(
      3,
      minmax(
        0,
        1fr
      )
    );

  gap:
    10px;
}

.admin-copilot-action-card {
  display:
    grid;

  align-content:
    start;

  justify-items:
    start;

  gap:
    8px;

  min-width:
    0;

  min-height:
    112px;

  padding:
    14px;

  border:
    1px solid
    rgba(
      255,
      255,
      255,
      0.1
    );

  border-radius:
    17px;

  background:
    linear-gradient(
      145deg,
      rgba(
        255,
        255,
        255,
        0.07
      ),
      rgba(
        255,
        255,
        255,
        0.032
      )
    );

  color:
    #ffffff;

  text-align:
    left;

  box-shadow:
    0 12px 30px
    rgba(
      0,
      0,
      0,
      0.14
    );
}

.admin-copilot-action-card:hover {
  transform:
    translateY(
      -2px
    );

  border-color:
    rgba(
      125,
      211,
      252,
      0.36
    );

  background:
    linear-gradient(
      145deg,
      rgba(
        14,
        165,
        233,
        0.16
      ),
      rgba(
        255,
        255,
        255,
        0.05
      )
    );

  box-shadow:
    0 17px 38px
    rgba(
      0,
      0,
      0,
      0.22
    );
}

.admin-copilot-action-card.is-primary {
  border-color:
    rgba(
      125,
      211,
      252,
      0.3
    );

  background:
    linear-gradient(
      145deg,
      rgba(
        14,
        165,
        233,
        0.19
      ),
      rgba(
        37,
        99,
        235,
        0.08
      )
    );
}

.admin-copilot-action-card strong {
  color:
    #ffffff;

  font-size:
    0.78rem;

  font-weight:
    950;

  line-height:
    1.3;
}

.admin-copilot-action-card span {
  color:
    #aebfdb;

  font-size:
    0.69rem;

  font-weight:
    600;

  line-height:
    1.45;
}

#admin-copilot-action-dismiss,
#admin-copilot-action-show {
  width:
    100%;

  min-height:
    42px;

  border-radius:
    14px;

  font-size:
    0.74rem;

  font-weight:
    900;
}

.admin-copilot-action-buttons {
  display:
    grid;

  grid-template-columns:
    repeat(
      2,
      minmax(
        0,
        1fr
      )
    );

  gap:
    10px;
}

.admin-copilot-action-buttons
.team-workspace-button {
  min-height:
    43px;

  border-radius:
    14px;

  font-size:
    0.75rem;

  font-weight:
    900;
}

.admin-copilot-action-buttons
.team-workspace-button.is-active {
  border-color:
    rgba(
      125,
      211,
      252,
      0.42
    );

  background:
    linear-gradient(
      135deg,
      rgba(
        14,
        165,
        233,
        0.48
      ),
      rgba(
        37,
        99,
        235,
        0.28
      )
    );

  color:
    #ffffff;

  box-shadow:
    0 12px 28px
    rgba(
      37,
      99,
      235,
      0.22
    );
}

.admin-copilot-action-text-label {
  display:
    flex;

  flex:
    1;

  min-height:
    0;

  flex-direction:
    column;

  gap:
    8px;
}

.admin-copilot-action-text-label > span {
  color:
    #dbeafe;

  font-size:
    0.74rem;

  font-weight:
    900;
}

#admin-copilot-action-text {
  width:
    100%;

  min-height:
    330px;

  padding:
    17px;

  resize:
    vertical;

  border:
    1px solid
    rgba(
      125,
      211,
      252,
      0.25
    );

  border-radius:
    18px;

  background:
    rgba(
      3,
      12,
      25,
      0.78
    );

  color:
    #f8fafc;

  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  font-size:
    0.85rem;

  font-weight:
    540;

  line-height:
    1.68;

  caret-color:
    #7dd3fc;

  box-shadow:
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.04
    );
}

#admin-copilot-action-text:focus {
  border-color:
    rgba(
      56,
      189,
      248,
      0.76
    );

  background:
    rgba(
      4,
      16,
      32,
      0.94
    );

  box-shadow:
    0 0 0 4px
    rgba(
      14,
      165,
      233,
      0.13
    ),
    inset 0 1px 0
    rgba(
      255,
      255,
      255,
      0.05
    );
}

#admin-copilot-action-text::-webkit-scrollbar {
  width:
    8px;
}

#admin-copilot-action-text::-webkit-scrollbar-thumb {
  border-radius:
    999px;

  background:
    rgba(
      56,
      189,
      248,
      0.32
    );
}

/* =========================
   ADMIN COPILOT ACTION MODE
========================= */

.admin-copilot-widget-panel.is-action-mode {
  width:
    min(
      680px,
      calc(
        100vw -
        48px
      )
    );

  height:
    min(
      760px,
      calc(
        100vh -
        48px
      )
    );

  border-color:
    rgba(
      125,
      211,
      252,
      0.38
    );

  background:
    radial-gradient(
      circle at 90% 4%,
      rgba(
        14,
        165,
        233,
        0.22
      ),
      transparent 34%
    ),
    linear-gradient(
      180deg,
      rgba(
        11,
        30,
        55,
        0.995
      ),
      rgba(
        4,
        13,
        27,
        0.995
      )
    );

  box-shadow:
    0 38px 110px
    rgba(
      0,
      0,
      0,
      0.62
    ),
    0 0 0 1px
    rgba(
      125,
      211,
      252,
      0.1
    );
}

.admin-copilot-widget-panel.is-action-mode
.team-widget-header {
  min-height:
    68px;

  padding:
    16px 20px;
}

.admin-copilot-widget-panel.is-action-mode
.team-chat-title {
  min-height:
    62px;

  padding:
    13px 18px;
}

.admin-copilot-widget-panel.is-action-mode
.team-chat-main {
  flex:
    1;

  min-height:
    0;

  height:
    100%;

  overflow:
    hidden;
}

.admin-copilot-widget-panel.is-action-mode
.admin-copilot-action-editor {
  flex:
    1;

  align-self:
    stretch;

  min-height:
    0;

  height:
    calc(
      100% -
      32px
    );

  margin:
    16px;

  overflow:
    hidden;
}

.admin-copilot-widget-panel.is-action-mode
.admin-copilot-action-editor.is-focused {
  grid-template-rows:
    auto
    auto
    minmax(
      0,
      1fr
    );
}

.admin-copilot-widget-panel.is-action-mode
.admin-copilot-action-text-label {
  min-height:
    0;
}

.admin-copilot-widget-panel.is-action-mode
#admin-copilot-action-text {
  flex:
    1;

  min-height:
    0;

  height:
    100%;

  resize:
    none;
}

@media (
  max-width:
  700px
) {

  .admin-copilot-action-grid {
    grid-template-columns:
      1fr;
  }

  .admin-copilot-action-card {
    min-height:
      0;
  }

}

@media (
  max-width:
  560px
) {

  .admin-copilot-action-header {
    align-items:
      stretch;

    flex-direction:
      column;
  }

  .admin-copilot-local-badge {
    width:
      100%;
  }

  .admin-copilot-action-buttons {
    grid-template-columns:
      1fr;
  }

  .admin-copilot-widget-panel.is-action-mode {
    width:
      calc(
        100vw -
        28px
      );

    height:
      calc(
        100vh -
        28px
      );
  }

  .admin-copilot-widget-panel.is-action-mode
  .admin-copilot-action-editor {
    margin:
      10px;

    padding:
      14px;
  }

}

@media (
  max-width:
  900px
) {

  .admin-copilot-widget-panel {
    right:
      14px;

    bottom:
      14px;

    width:
      calc(
        100vw -
        28px
      );

    height:
      calc(
        100vh -
        28px
      );
  }

}

@media (
  max-width:
  560px
) {

  .admin-copilot-widget-toggle {
    min-width:
      52px;

    width:
      52px;

    padding:
      0;

    font-size:
      0;
  }

  .admin-copilot-widget-toggle::before {
    width:
      32px;

    height:
      30px;
  }

  .admin-copilot-widget-panel {
    border-radius:
      22px;
  }

  .admin-copilot-widget-panel
  .team-widget-header {
    min-height:
      66px;

    padding:
      14px 16px;
  }

  .admin-copilot-widget-panel
  .team-chat-title {
    align-items:
      flex-start;

    flex-direction:
      column;
  }

  .admin-copilot-widget-panel
  .sales-copilot-connection-status {
    width:
      100%;
  }

}

/* =========================
   UNKNOWN QUEUE
========================= */

.unknown-queue-view,
.contact-registry-view {
  display: grid;
  gap: 24px;
}

.unknown-queue-list,
.registry-list {
  display: grid;
  gap: 18px;
}

.unknown-lead-card,
.registry-card {
  display: grid;
  gap: 14px;

  padding: 24px;

  border-radius: 24px;

  background:
    rgba(255, 255, 255, 0.06);

  border:
    1px solid rgba(255, 255, 255, 0.12);
}

.unknown-lead-card strong,
.registry-card strong {
  color: #ffffff;
  font-size: 1.1rem;
}

.registry-search {
  width: 100%;
}

.registry-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* =========================
   SALES LEAD TRANSFER
========================= */

.sales-transfer-section {
  border:
    1px solid rgba(96, 165, 250, 0.18);

  background:
    linear-gradient(
      145deg,
      rgba(59, 130, 246, 0.11),
      rgba(255, 255, 255, 0.045)
    );
}

.sales-transfer-section h3 {
  margin-bottom: 6px;
}

.sales-section-help {
  margin:
    -2px
    0
    16px;

  color: #b7c7df;

  font-size: 0.9rem;

  line-height: 1.5;
}

#salesTransferMessage {
  min-height: 96px;
}

#transferSalesLeadBtn {
  width: 100%;

  margin-top: 4px;

  background:
    linear-gradient(
      135deg,
      rgba(59, 130, 246, 0.9),
      rgba(29, 78, 216, 0.95)
    );

  color: #ffffff;

  border:
    1px solid rgba(147, 197, 253, 0.3);

  box-shadow:
    0 14px 34px rgba(37, 99, 235, 0.24);
}

#transferSalesLeadBtn:hover {
  background:
    linear-gradient(
      135deg,
      rgba(96, 165, 250, 0.95),
      rgba(37, 99, 235, 0.95)
    );
}

#transferSalesLeadBtn:disabled {
  opacity: 0.55;

  cursor: not-allowed;

  transform: none;
}

/* =========================
   MOVE STAGE
========================= */

#moveStageSelect {
  width: 100%;

  margin-bottom: 12px;

  background: #1f2d3d;
  color: #ffffff;

  border: 1px solid #3b4d63;
  border-radius: 12px;

  padding: 10px;

  cursor: pointer;
}

#moveStageSelect option {
  background: #1f2d3d;
  color: #ffffff;
}

/* =========================
   ADMIN AUDIT VIEW
========================= */

.audit-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;

  gap: 12px;

  padding: 6px 0 12px;
}

.audit-filter-row input,
.audit-filter-row select {
  min-height: 48px;

  border-radius: 16px;

  background:
    rgba(255, 255, 255, 0.07);

  border-color:
    rgba(255, 255, 255, 0.13);
}

.audit-filter-row .search-input {
  flex: 1 1 320px;
  min-width: 260px;
}

.audit-filter-row select {
  flex: 0 0 150px;
}

.audit-filter-row input[type="date"] {
  flex: 0 0 158px;
}

.audit-filter-row #adminAuditApplyFilters {
  min-height: 48px;
  flex: 0 0 auto;
}

.audit-filter-button {
  min-height: 42px;

  padding: 10px 16px;

  border-radius: 999px;

  font-size: 0.8rem;
  font-weight: 900;

  background:
    rgba(255, 255, 255, 0.065);

  border:
    1px solid rgba(255, 255, 255, 0.12);

  color: #dbeafe;

  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.12);
}

.audit-filter-button:hover {
  background:
    rgba(255, 255, 255, 0.105);

  border-color:
    rgba(147, 197, 253, 0.28);
}

.audit-filter-button.is-active {
  background:
    linear-gradient(
      135deg,
      rgba(59, 130, 246, 0.42),
      rgba(37, 99, 235, 0.24)
    );

  border-color:
    rgba(96, 165, 250, 0.58);

  color: #ffffff;

  box-shadow:
    0 14px 34px rgba(37, 99, 235, 0.26),
    inset 0 1px 0 rgba(255, 255, 255, 0.11);
}

.audit-table {
  width: 100%;

  overflow-x: auto;

  display: grid;
  gap: 8px;

  padding-top: 10px;
}

.audit-table-row {
  display: grid;

  grid-template-columns:
    150px
    118px
    minmax(280px, 1fr)
    minmax(170px, 240px)
    120px;

  gap: 14px;

  align-items: start;

  min-width: 940px;

  padding: 14px 16px;

  border-radius: 18px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.07),
      rgba(255, 255, 255, 0.035)
    );

  border:
    1px solid rgba(255, 255, 255, 0.09);

  color: #e2edf9;

  font-size: 0.84rem;
  line-height: 1.45;

  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

.audit-table-details:not([open]) .audit-table-row:hover {
  transform: translateY(-1px);

  background:
    linear-gradient(
      145deg,
      rgba(59, 130, 246, 0.13),
      rgba(255, 255, 255, 0.05)
    );

  border-color:
    rgba(96, 165, 250, 0.26);

  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.18);
}

.audit-table-head {
  background:
    rgba(255, 255, 255, 0.095);

  color: #ffffff;

  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.055em;

  border-color:
    rgba(255, 255, 255, 0.13);
}

.audit-table-row span {
  min-width: 0;

  overflow-wrap: anywhere;
}

.audit-table-row small {
  display: block;

  margin-top: 5px;

  color: var(--text-muted);

  font-size: 0.75rem;
  line-height: 1.45;
}

.audit-table-details {
  display: grid;
  gap: 0;

  min-width: 940px;

  border-radius: 18px;
}

.audit-table-details summary {
  list-style: none;
  cursor: pointer;
}

.audit-table-details summary::-webkit-details-marker {
  display: none;
}

.audit-table-details[open] .audit-table-row {
  border-color:
    rgba(96, 165, 250, 0.34);

  background:
    linear-gradient(
      145deg,
      rgba(59, 130, 246, 0.17),
      rgba(255, 255, 255, 0.055)
    );

  border-radius: 18px 18px 0 0;

  box-shadow:
    0 16px 44px rgba(0, 0, 0, 0.18);
}

.audit-detail-panel {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 12px;

  padding: 16px;

  border:
    1px solid rgba(96, 165, 250, 0.22);

  border-top: 0;

  border-radius: 0 0 18px 18px;

  background:
    linear-gradient(
      180deg,
      rgba(15, 23, 42, 0.48),
      rgba(15, 23, 42, 0.28)
    );
}

.audit-detail-item {
  display: grid;
  gap: 7px;

  padding: 13px;

  border-radius: 15px;

  background:
    rgba(255, 255, 255, 0.052);

  border:
    1px solid rgba(255, 255, 255, 0.08);

  min-width: 0;
}

.audit-detail-item span {
  color: #a9bbd5;

  font-size: 0.7rem;
  font-weight: 900;

  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.audit-detail-item code {
  display: block;

  max-height: 190px;

  overflow: auto;

  white-space: pre-wrap;
  overflow-wrap: anywhere;

  color: #dbeafe;

  font-size: 0.78rem;
  line-height: 1.55;

  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
}

.audit-stats-grid {
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
}

.audit-stats-grid > .audit-control-surface {
  grid-column: 1 / -1;

  min-height: 0;

  padding: 28px;

  align-content: stretch;

  border-color:
    rgba(96, 165, 250, 0.18);

  background:
    linear-gradient(
      145deg,
      rgba(59, 130, 246, 0.10),
      rgba(255, 255, 255, 0.052)
    );
}

.audit-control-surface {
  cursor: default;
}

.audit-control-surface summary {
  list-style: none;
}

.audit-control-surface summary::-webkit-details-marker {
  display: none;
}

.audit-control-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 18px;

  cursor: pointer;
}

.audit-control-summary h3,
.audit-control-summary h2 {
  margin: 0;

  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.audit-control-summary small,
.audit-control-summary .lead-page-copy {
  display: block;

  margin: 6px 0 0;

  color: #aebfdb;

  line-height: 1.5;
}

.audit-control-summary-pill {
  flex-shrink: 0;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 132px;
  min-height: 44px;

  padding: 11px 16px;

  border-radius: 999px;

  background:
    linear-gradient(
      135deg,
      rgba(59, 130, 246, 0.32),
      rgba(37, 99, 235, 0.18)
    );

  border:
    1px solid rgba(96, 165, 250, 0.38);

  color: #ffffff;

  font-size: 0.84rem;
  font-weight: 950;

  box-shadow:
    0 14px 32px rgba(37, 99, 235, 0.2);
}

.audit-control-surface[open] .audit-control-summary-pill {
  font-size: 0;
}

.audit-control-surface[open] .audit-control-summary-pill::after {
  content: "Lukk kontroll";

  font-size: 0.84rem;
}

.audit-control-grid {
  display: grid;

  grid-template-columns:
    repeat(6, minmax(0, 1fr));

  gap: 14px;

  width: 100%;

  margin-top: 20px;
}

.audit-control-item {
  position: relative;
  overflow: hidden;

  display: grid;
  align-content: space-between;

  gap: 10px;

  min-height: 138px;

  padding: 18px;

  border-radius: 22px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.075),
      rgba(255, 255, 255, 0.038)
    );

  border:
    1px solid rgba(255, 255, 255, 0.1);

  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.15);
}

.audit-control-item::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -28px;

  width: 92px;
  height: 92px;

  border-radius: 999px;

  background:
    radial-gradient(
      circle,
      rgba(255, 255, 255, 0.08),
      transparent 68%
    );

  pointer-events: none;
}

.audit-control-item span,
.audit-control-item small,
.audit-control-item strong {
  position: relative;
  z-index: 1;
}

.audit-control-item span {
  color: #cbdaf0;

  font-size: 0.78rem;
  font-weight: 900;

  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.audit-control-item strong {
  color: #ffffff;

  font-size: 1.9rem;
  font-weight: 950;

  letter-spacing: -0.055em;
}

.audit-control-item small {
  color: var(--text-muted);

  font-size: 0.76rem;
  line-height: 1.45;
}

.audit-control-locked {
  border-color:
    rgba(239, 68, 68, 0.22);

  background:
    linear-gradient(
      145deg,
      rgba(239, 68, 68, 0.135),
      rgba(255, 255, 255, 0.042)
    );
}

.audit-control-locked strong {
  color: #fecaca;
}

.audit-control-safe {
  border-color:
    rgba(16, 185, 129, 0.26);

  background:
    linear-gradient(
      145deg,
      rgba(16, 185, 129, 0.135),
      rgba(255, 255, 255, 0.042)
    );
}

.audit-control-safe strong {
  color: #bbf7d0;
}

.audit-control-editor {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 14px;

  margin-top: 18px;

  padding: 18px;

  border-radius: 24px;

  background:
    rgba(7, 17, 29, 0.34);

  border:
    1px solid rgba(255, 255, 255, 0.09);
}

.audit-control-toggle-row {
  position: relative;

  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;

  gap: 14px;

  min-height: 104px;

  padding: 16px;

  border-radius: 20px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.075),
      rgba(255, 255, 255, 0.038)
    );

  border:
    1px solid rgba(255, 255, 255, 0.1);

  cursor: pointer;

  transition:
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.audit-control-toggle-row:hover {
  transform: translateY(-1px);

  border-color:
    rgba(96, 165, 250, 0.28);

  background:
    linear-gradient(
      145deg,
      rgba(59, 130, 246, 0.12),
      rgba(255, 255, 255, 0.05)
    );

  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.18);
}

.audit-control-toggle-row input[type="checkbox"] {
  appearance: none;

  position: relative;

  width: 58px;
  height: 34px;

  flex-shrink: 0;

  padding: 0;

  border-radius: 999px;

  border:
    1px solid rgba(255, 255, 255, 0.16);

  background:
    rgba(239, 68, 68, 0.22);

  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.28);

  cursor: pointer;

  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.audit-control-toggle-row input[type="checkbox"]::after {
  content: "";

  position: absolute;

  top: 4px;
  left: 4px;

  width: 24px;
  height: 24px;

  border-radius: 999px;

  background:
    #ffffff;

  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.28);

  transition:
    transform 0.18s ease;
}

.audit-control-toggle-row input[type="checkbox"]:checked {
  background:
    rgba(16, 185, 129, 0.34);

  border-color:
    rgba(52, 211, 153, 0.48);

  box-shadow:
    0 0 0 4px rgba(16, 185, 129, 0.08),
    inset 0 2px 8px rgba(0, 0, 0, 0.22);
}

.audit-control-toggle-row input[type="checkbox"]:checked::after {
  transform:
    translateX(24px);
}

.audit-control-toggle-row span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.audit-control-toggle-row strong {
  color: #ffffff;

  font-size: 0.94rem;
  line-height: 1.25;
}

.audit-control-toggle-row small {
  color: #aebfdb;

  font-size: 0.78rem;
  line-height: 1.45;
}

.audit-control-toggle-row em {
  display: inline-flex;
  width: fit-content;

  margin-top: 4px;

  padding: 5px 9px;

  border-radius: 999px;

  background:
    rgba(255, 255, 255, 0.075);

  color: #bfdbfe;

  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.audit-control-editor .field-group {
  grid-column: 1 / -1;

  margin: 2px 0 0;
}

.audit-control-editor textarea {
  min-height: 94px;

  border-radius: 20px;

  background:
    rgba(255, 255, 255, 0.065);
}

.audit-control-editor .dashboard-actions {
  grid-column: 1 / -1;

  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 14px;

  padding-top: 2px;
}

.audit-control-editor .dashboard-actions .btn,
.audit-control-editor .dashboard-actions button {
  min-width: 180px;
  min-height: 48px;
}

#aiAutomationControlStatus {
  color: #aebfdb;
  font-size: 0.86rem;
}

@media (max-width: 1500px) {

  .audit-control-grid {
    grid-template-columns:
      repeat(3, minmax(0, 1fr));
  }

}

@media (max-width: 1200px) {

  .audit-control-editor {
    grid-template-columns: 1fr;
  }

  .audit-stats-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 1000px) {

  .audit-control-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .audit-detail-panel {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 760px) {

  .audit-filter-row {
    align-items: stretch;
    flex-direction: column;
  }

  .audit-filter-row .search-input,
  .audit-filter-row select,
  .audit-filter-row input[type="date"],
  .audit-filter-row #adminAuditApplyFilters {
    width: 100%;
    flex: 1 1 auto;
  }

  .audit-control-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .audit-control-summary-pill {
    width: 100%;
  }

  .audit-control-grid,
  .audit-detail-panel,
  .audit-stats-grid {
    grid-template-columns: 1fr;
  }

  .audit-control-toggle-row {
    grid-template-columns: 1fr;
  }

  .audit-control-toggle-row input[type="checkbox"] {
    justify-self: start;
  }

  .audit-control-editor .dashboard-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .audit-control-editor .dashboard-actions .btn,
  .audit-control-editor .dashboard-actions button {
    width: 100%;
  }

}

/* =========================
   C-LEAD CONTEXT ANALYSIS
========================= */

.lead-context-analysis-panel {
  position: relative;
  overflow: hidden;

  display: grid;
  gap: 20px;

  width: 100%;

  padding: 26px;

  border-radius: 26px;

  background:
    linear-gradient(
      145deg,
      rgba(59, 130, 246, 0.13),
      rgba(255, 255, 255, 0.045)
    );

  border:
    1px solid rgba(96, 165, 250, 0.24);

  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.2);
}

.lead-context-analysis-panel::before {
  content: "";

  position: absolute;

  top: -90px;
  right: -90px;

  width: 240px;
  height: 240px;

  border-radius: 999px;

  background:
    radial-gradient(
      circle,
      rgba(59, 130, 246, 0.2),
      transparent 68%
    );

  pointer-events: none;
}

.lead-context-analysis-panel > * {
  position: relative;
  z-index: 1;
}

.lead-context-analysis-panel .lead-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;

  gap: 20px;
}

.lead-context-analysis-panel .lead-panel-header h3 {
  margin: 0;

  color: #ffffff;

  font-size: 1.22rem;
  font-weight: 900;

  letter-spacing: -0.025em;
}

.lead-analysis-subtitle {
  margin-top: 7px;

  color: #afc2dd;

  font-size: 0.88rem;
  line-height: 1.55;
}

.lead-analysis-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;

  gap: 10px;

  flex-wrap: wrap;
}

.lead-context-analysis-panel .lead-ai-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 34px;

  padding: 8px 12px;

  border-radius: 999px;

  background:
    rgba(59, 130, 246, 0.18);

  border:
    1px solid rgba(96, 165, 250, 0.3);

  color: #dbeafe;

  font-size: 0.76rem;
  font-weight: 900;

  white-space: nowrap;
}

.lead-context-analysis-panel button:disabled {
  opacity: 0.62;

  cursor: wait;

  transform: none;
}

.lead-analysis-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 9px;
}

.lead-analysis-meta span {
  display: inline-flex;
  align-items: center;

  min-height: 30px;

  padding: 6px 10px;

  border-radius: 999px;

  background:
    rgba(255, 255, 255, 0.055);

  border:
    1px solid rgba(255, 255, 255, 0.09);

  color: #aebfdb;

  font-size: 0.74rem;
  font-weight: 750;
}

.lead-analysis-grid {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 14px;

  width: 100%;
}

.lead-analysis-card {
  min-width: 0;
  min-height: 132px;

  display: grid;
  align-content: start;

  gap: 10px;

  padding: 17px;

  border-radius: 20px;

  background:
    linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.075),
      rgba(255, 255, 255, 0.035)
    );

  border:
    1px solid rgba(255, 255, 255, 0.1);

  box-shadow:
    0 12px 30px rgba(0, 0, 0, 0.13);
}

.lead-analysis-label {
  color: #93c5fd;

  font-size: 0.7rem;
  font-weight: 950;

  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.lead-analysis-value {
  min-width: 0;

  color: #e8f1fb;

  font-size: 0.88rem;
  line-height: 1.62;

  white-space: normal;
  overflow-wrap: anywhere;
}

.lead-analysis-list {
  display: grid;
  gap: 7px;

  margin: 0;
  padding-left: 18px;
}

.lead-analysis-list li {
  padding-left: 2px;

  color: #d8e6f6;
}

.lead-analysis-list li::marker {
  color: #60a5fa;
}

.lead-analysis-json {
  width: 100%;
  max-height: 240px;

  margin: 0;
  padding: 12px;

  overflow: auto;

  border-radius: 14px;

  background:
    rgba(7, 17, 29, 0.58);

  border:
    1px solid rgba(255, 255, 255, 0.08);

  color: #bfdbfe;

  white-space: pre-wrap;
  overflow-wrap: anywhere;

  font-size: 0.77rem;
  line-height: 1.55;

  font-family:
    "SFMono-Regular",
    Consolas,
    "Liberation Mono",
    monospace;
}

.lead-context-analysis-panel .lead-empty-state {
  display: grid;
  justify-items: center;

  gap: 8px;

  padding: 30px 22px;

  text-align: center;

  border-radius: 22px;

  background:
    rgba(7, 17, 29, 0.24);

  border:
    1px dashed rgba(96, 165, 250, 0.26);
}

.lead-context-analysis-panel .lead-empty-icon {
  font-size: 1.8rem;
}

.lead-context-analysis-panel .lead-empty-text {
  color: #ffffff;

  font-size: 1rem;
  font-weight: 900;
}

.lead-context-analysis-panel .lead-empty-hint {
  max-width: 560px;

  color: #aebfdb;

  font-size: 0.86rem;
  line-height: 1.55;
}

@media (max-width: 1200px) {

  .lead-analysis-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 760px) {

  .lead-context-analysis-panel {
    padding: 20px;

    border-radius: 22px;
  }

  .lead-context-analysis-panel .lead-panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .lead-analysis-header-actions {
    align-items: stretch;
    justify-content: stretch;
    flex-direction: column;
  }

  .lead-analysis-header-actions .lead-ai-badge,
  .lead-analysis-header-actions button {
    width: 100%;
  }

  .lead-analysis-grid {
    grid-template-columns: 1fr;
  }

  .lead-analysis-card {
    min-height: 0;
  }

  .lead-analysis-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .lead-analysis-meta span {
    width: 100%;
  }

}

/* =========================
   UTILITIES
========================= */

.hidden {
  display: none !important;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1400px) {

  .app-shell,
  .app-shell.lead-open {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .workspace-main {
    justify-content: stretch;
  }

  #workspaceMain {
    max-width: 100%;
  }

  .workspace-details {
    grid-column: 1 / -1;

    position: static;

    height: auto;
  }

  .stats-grid {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

}

@media (max-width: 900px) {

  .team-widget-panel {
    right: 14px;
    bottom: 14px;

    width: calc(100vw - 28px);
    height: calc(100vh - 28px);
  }

  .team-widget-body {
    grid-template-columns: 1fr;
  }

  .team-users-list {
    max-height: 180px;

    border-right: none;

    border-bottom:
      1px solid rgba(255, 255, 255, 0.08);
  }

}

@media (max-width: 760px) {

  .app-shell,
  .app-shell.lead-open {
    grid-template-columns: 1fr;

    padding: 18px;
  }

  .workspace-sidebar {
    position: static;

    height: auto;
  }

  .workspace-main {
    padding: 0 0 90px;
  }

  .page-header,
  .dashboard-header,
  .dashboard-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .search-input {
    min-width: 0;
  }

  .workspace-card,
  .lead-detail-card {
    border-radius: 24px;
    padding: 22px;
  }

  .team-widget-toggle {
    right: 16px;
    bottom: 16px;
  }

}