/* Admin console shell — sidebar + main */
:root {
  --adm-sidebar-w: 272px;
  --adm-sidebar-w-collapsed: 88px;
  --adm-topbar-h: 64px;
  --adm-surface: #ffffff;
  --adm-surface-2: #f7faff;
  --adm-sidebar-bg: #001038;
  --adm-sidebar-border: #ffffff14;
  --adm-nav-hover: #ffffff0f;
  --adm-nav-active: #0060f824;
  --adm-nav-active-border: #4da3ff;
}

body.admin-app {
  font-family: var(--adm-font-body);
  color: var(--adm-ink);
  background: var(--adm-surface-2);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.adm-app {
  min-height: 100dvh;
}

.adm-app.is-sidebar-collapsed .adm-sidebar {
  width: var(--adm-sidebar-w-collapsed);
}

/* —— Sidebar —— */
.adm-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  width: var(--adm-sidebar-w);
  height: 100dvh;
  max-height: 100dvh;
  background: var(--adm-sidebar-bg);
  border-right: 1px solid var(--adm-sidebar-border);
  overflow: hidden;
  transition: width 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.adm-sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(#ffffff0a 1px, transparent 1px),
    linear-gradient(90deg, #ffffff0a 1px, transparent 1px);
  background-size: 48px 48px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
}

.adm-sidebar::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  top: -80px;
  right: -120px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, #0060f838, transparent 68%);
  filter: blur(40px);
}

.adm-sidebar-head,
.adm-sidebar-nav,
.adm-sidebar-foot {
  position: relative;
  z-index: 1;
}

.adm-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 76px;
  padding: 22px 40px 18px 16px;
  border-bottom: 1px solid var(--adm-sidebar-border);
}

.adm-sidebar-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  line-height: 0;
  text-decoration: none;
}

.adm-brand-full {
  display: block;
  width: min(100%, 158px);
  height: auto;
  filter: drop-shadow(0 8px 24px #00000040);
}

.adm-brand-mark {
  display: none;
  width: 30px;
  height: 30px;
  object-fit: contain;
  mix-blend-mode: screen;
}

.adm-sidebar-collapse {
  position: absolute;
  top: 26px;
  right: 16px;
  z-index: 45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #8fb4ff;
  cursor: pointer;
  transition: color 0.18s ease, transform 0.28s ease;
}

.adm-sidebar-collapse:hover {
  background: transparent;
  color: #fff;
}

.adm-sidebar-collapse iconify-icon {
  width: 18px;
  height: 18px;
}

.adm-sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 20px 14px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #ffffff30 transparent;
}

.adm-sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.adm-sidebar-nav::-webkit-scrollbar-thumb {
  background: #ffffff30;
  border-radius: 999px;
}

.adm-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  color: #ffffffc7;
  text-decoration: none;
  transition: color 0.18s ease;
}

.adm-nav-item iconify-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: #8fb4ff;
}

.adm-nav-item:hover {
  background: none;
}

.adm-nav-item:hover .adm-nav-label {
  color: #fff;
}

.adm-nav-item.is-active {
  background: none;
  color: #4da3ff;
  box-shadow: inset 3px 0 0 var(--adm-nav-active-border);
}

.adm-nav-item.is-active .adm-nav-label {
  color: #4da3ff;
}

.adm-nav-item.is-active:hover .adm-nav-label {
  color: #7ec0ff;
}

.adm-nav-item.is-active iconify-icon {
  color: #4da3ff;
}

.adm-nav-label {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: color 0.18s ease;
}

.adm-sidebar-foot {
  flex: 0 0 auto;
  padding: 18px 16px 22px;
  border-top: 1px solid var(--adm-sidebar-border);
}

.adm-user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.adm-user-chip:hover,
.adm-user-chip:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  outline: none;
}
.adm-user-chip-avatar {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #1e3a6e;
  color: #cfe0ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.adm-user-chip-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.adm-user-chip-text {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.adm-user-chip strong {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-user-chip span {
  font-family: var(--adm-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #8fb4ff;
}

.adm-sidebar-signout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: #ffffffbf;
  cursor: pointer;
  transition: color 0.18s ease;
}

.adm-sidebar-signout:hover {
  background: transparent;
  color: #fff;
}

.adm-sidebar-signout iconify-icon {
  width: 18px;
  height: 18px;
}

@media (min-width: 961px) {
  .adm-app.is-sidebar-collapsed .adm-sidebar-head {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 20px 8px 16px;
    min-height: 76px;
  }

  .adm-app.is-sidebar-collapsed .adm-brand-full {
    display: none;
  }

  .adm-app.is-sidebar-collapsed .adm-brand-mark {
    display: block;
    width: 30px;
    height: 30px;
  }

  .adm-app.is-sidebar-collapsed .adm-sidebar-collapse {
    position: static;
    top: auto;
    right: auto;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transform: rotate(180deg);
  }

  .adm-app.is-sidebar-collapsed .adm-sidebar-nav {
    align-items: center;
    padding: 16px 10px;
  }

  .adm-app.is-sidebar-collapsed .adm-nav-item {
    justify-content: center;
    width: 46px;
    height: 46px;
    padding: 0;
    gap: 0;
  }

  .adm-app.is-sidebar-collapsed .adm-nav-item:hover {
    transform: none;
  }

  .adm-app.is-sidebar-collapsed .adm-nav-label {
    display: none;
  }

  .adm-app.is-sidebar-collapsed .adm-sidebar-foot {
    padding: 12px 10px 16px;
  }

  .adm-app.is-sidebar-collapsed .adm-user-chip {
    display: none;
  }

  .adm-app.is-sidebar-collapsed .adm-sidebar-signout {
    width: 46px;
    height: 46px;
    padding: 0;
    margin-inline: auto;
    border-radius: 14px;
  }
}

/* —— Main —— */
.adm-app-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100dvh;
  margin-left: var(--adm-sidebar-w);
  width: calc(100vw - var(--adm-sidebar-w));
  max-width: calc(100vw - var(--adm-sidebar-w));
  box-sizing: border-box;
  overflow-x: hidden;
  transition: margin-left 0.28s cubic-bezier(0.16, 1, 0.3, 1), width 0.28s cubic-bezier(0.16, 1, 0.3, 1), max-width 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

.adm-app.is-sidebar-collapsed .adm-app-main {
  margin-left: var(--adm-sidebar-w-collapsed);
  width: calc(100vw - var(--adm-sidebar-w-collapsed));
  max-width: calc(100vw - var(--adm-sidebar-w-collapsed));
}

.adm-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: var(--adm-topbar-h);
  padding: 12px clamp(16px, 3vw, 28px);
  background: #ffffffeb;
  border-bottom: 1px solid var(--adm-border);
  backdrop-filter: blur(12px);
}

.adm-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  background: #fff;
  color: var(--adm-ink);
  cursor: pointer;
}

.adm-menu-toggle iconify-icon {
  width: 22px;
  height: 22px;
}

.adm-topbar-title {
  margin: 0;
  font-family: var(--adm-font-display);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.adm-topbar-meta {
  margin-left: auto;
  font-family: var(--adm-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--adm-muted);
}

.adm-content {
  flex: 1;
  min-width: 0;
  padding: clamp(20px, 3vw, 32px);
  overflow-x: hidden;
}

.adm-view-panel[hidden] {
  display: none !important;
}

.adm-view-panel[data-panel="pipeline"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.adm-page-head {
  margin-bottom: 20px;
}

.adm-page-head p {
  margin: 0;
  max-width: 42rem;
  font-size: 15px;
  line-height: 1.55;
  color: var(--adm-muted);
}

.adm-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.adm-stat-card {
  padding: 20px 18px;
  border: 1px solid var(--adm-border);
  border-radius: 18px;
  background: var(--adm-surface);
  box-shadow: 0 10px 30px #00103808;
}

.adm-stat-card kbd {
  display: block;
  margin-bottom: 10px;
  font-family: var(--adm-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--adm-muted);
  background: none;
}

.adm-stat-card strong {
  display: block;
  font-family: var(--adm-font-display);
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1;
  color: var(--adm-ink);
}

.adm-stat-card span {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--adm-muted);
}

.adm-placeholder {
  padding: clamp(28px, 4vw, 40px);
  border: 1px dashed #0060f838;
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #f0f6ff 100%);
  text-align: center;
}

.adm-placeholder iconify-icon {
  width: 40px;
  height: 40px;
  color: var(--adm-accent);
  margin-bottom: 14px;
}

.adm-placeholder h3 {
  margin: 0 0 8px;
  font-family: var(--adm-font-display);
  font-size: 1.35rem;
  font-weight: 500;
}

.adm-placeholder p {
  margin: 0 auto;
  max-width: 28rem;
  font-size: 14px;
  line-height: 1.55;
  color: var(--adm-muted);
}

/* —— Pipeline kanban —— */
.adm-pipeline {
  --adm-pipeline-slot: 140px;
  --adm-pipeline-gap: 10px;
  --adm-pipeline-visible-cards: 10;
  --adm-pipeline-col-w: 280px;
  min-height: 320px;
  margin-top: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.adm-pipeline-subnav {
  margin-top: 4px;
  width: max-content;
  max-width: min(420px, 100%);
}

.adm-pipeline-subnav .adm-lead-subtab {
  flex: 0 1 auto;
}

.adm-pipeline-scroll {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.adm-pipeline-rail {
  position: relative;
  flex: 0 0 auto;
  height: 14px;
  border-radius: 999px;
  background: #dbe3f0;
  cursor: pointer;
  user-select: none;
  touch-action: none;
}

.adm-pipeline-rail[hidden] {
  display: none !important;
}

.adm-pipeline-rail-thumb {
  position: absolute;
  top: 0;
  left: 0;
  height: 14px;
  min-width: 48px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #475569;
  cursor: grab;
  box-shadow: inset 0 0 0 1px #33415555;
}

.adm-pipeline-rail-thumb:hover,
.adm-pipeline-rail.is-dragging .adm-pipeline-rail-thumb {
  background: #334155;
}

.adm-pipeline-rail.is-dragging .adm-pipeline-rail-thumb {
  cursor: grabbing;
}

.adm-pipeline-board-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden !important;
  box-sizing: border-box;
}

.adm-pipeline-board {
  display: flex;
  flex-wrap: nowrap;
  gap: 14px;
  align-items: flex-start;
  width: max-content;
  box-sizing: border-box;
  scroll-snap-type: none;
  transition: none;
}

.adm-pipeline-col {
  flex: 0 0 var(--adm-pipeline-col-w);
  width: var(--adm-pipeline-col-w);
  min-width: var(--adm-pipeline-col-w);
  max-width: var(--adm-pipeline-col-w);
  box-sizing: border-box;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 0;
  padding: 14px;
  border: 1px solid var(--adm-border);
  border-radius: 16px;
  background: var(--adm-surface-2);
  transition: border-color 0.14s ease, box-shadow 0.14s ease, background 0.14s ease;
}

.adm-pipeline-col.is-drop-target {
  border-color: #0060f866;
  background: #eef4ff;
  box-shadow: inset 0 0 0 2px #0060f822;
}

.adm-pipeline-col-head {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #00103812;
}

.adm-pipeline-col-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.adm-pipeline-col-avg {
  font-style: normal;
  font-size: 11px;
  color: var(--adm-muted);
  font-weight: 500;
}

.adm-pipeline-col-head h3 {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--adm-ink);
  line-height: 1.35;
}

.adm-pipeline-col-head span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--adm-border);
  font-family: var(--adm-font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--adm-muted);
}

.adm-pipeline-cards {
  flex: 1 1 auto;
  display: grid;
  gap: var(--adm-pipeline-gap);
  align-content: start;
  min-height: calc(var(--adm-pipeline-slot) * 2 + var(--adm-pipeline-gap));
  max-height: calc(
    var(--adm-pipeline-visible-cards) * var(--adm-pipeline-slot) +
    (var(--adm-pipeline-visible-cards) - 1) * var(--adm-pipeline-gap)
  );
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  -webkit-overflow-scrolling: touch;
}

.adm-pipeline-cards::-webkit-scrollbar {
  width: 8px;
}

.adm-pipeline-cards::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: #00103822;
}

.adm-pipeline-cards::-webkit-scrollbar-thumb:hover {
  background: #00103838;
}

.adm-pipeline-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px #0010380a;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  transition: box-shadow 0.14s ease, border-color 0.14s ease;
  will-change: transform;
}

.adm-pipeline-card:hover {
  border-color: #0060f833;
  box-shadow: 0 12px 28px #00103812;
}

.adm-pipeline-card.is-dragging {
  opacity: 0;
  pointer-events: none;
}

.adm-pipeline-card-ghost {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 12000;
  margin: 0;
  pointer-events: none;
  cursor: grabbing;
  box-shadow: 0 18px 44px #0010382e, 0 0 0 1px #0060f822;
  transform: rotate(1.25deg);
  transition: none !important;
  will-change: left, top;
}

.adm-pipeline-card-placeholder {
  border-radius: 12px;
  border: 2px dashed #0060f855;
  background: #0060f812;
  box-sizing: border-box;
  transition: height 0.12s ease;
}

.adm-pipeline-is-dragging {
  cursor: grabbing;
  user-select: none;
  -webkit-user-select: none;
}

.adm-pipeline-is-dragging .adm-pipeline-board {
  scroll-snap-type: none;
}

.adm-pipeline-is-dragging .adm-pipeline-card:not(.is-dragging) {
  transition: transform 0.12s ease;
}

.adm-pipeline-card-title {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  color: var(--adm-ink);
}

.adm-pipeline-card-title a {
  color: inherit;
  text-decoration: none;
}

.adm-pipeline-card-title a:hover {
  color: var(--adm-accent, #0060f8);
}

.adm-pipeline-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.adm-pipeline-card-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef4ff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0047c2;
}

.adm-pipeline-card-tag-kind.is-lead {
  background: #eef4ff;
  color: #0047c2;
}

.adm-pipeline-card-tag-kind.is-client {
  background: #ecfdf5;
  color: #047857;
}

.adm-pipeline-card-tag.is-support {
  background: #eef4ff;
  color: #245bdb;
}

.adm-pipeline-card-tag.is-portal {
  background: #f3e8ff;
  color: #7c3aed;
}

.adm-support-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.adm-support-card {
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  padding: 16px;
  background: #fff;
}

.adm-support-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.adm-support-head time {
  margin-left: 8px;
  font-size: 12px;
  color: var(--adm-muted);
}

.adm-support-question h4,
.adm-support-reply label {
  margin: 0 0 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--adm-muted);
}

.adm-support-question p {
  margin: 0 0 12px;
  line-height: 1.5;
}

.adm-support-html {
  width: 100%;
  min-height: 180px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  line-height: 1.45;
  border: 1px solid var(--adm-border);
  border-radius: 8px;
  padding: 10px;
  resize: vertical;
}

.adm-support-lead {
  margin: 0 0 16px;
}

.adm-pipeline-card-time {
  margin: 0;
  font-family: var(--adm-font-mono);
  font-size: 11px;
  color: var(--adm-muted);
}

.adm-pipeline-card-history {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: #64748b;
}

.adm-pipeline-start {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--adm-muted);
}

.adm-pipeline-start input[type="date"] {
  width: 100%;
  box-sizing: border-box;
  padding: 6px 8px;
  border: 1px solid var(--adm-border, #dbe3f0);
  border-radius: 8px;
  background: #f8fafc;
  font: inherit;
  font-size: 12px;
  color: var(--adm-ink, #0f172a);
  cursor: pointer;
}

.adm-pipeline-start input[type="date"]:focus {
  outline: 2px solid #245bdb;
  outline-offset: 1px;
  border-color: #245bdb;
  background: #fff;
}

.adm-pipeline-card-snippet {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--adm-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.adm-pipeline-empty {
  padding: 18px 12px;
  border: 1px dashed #0010381f;
  border-radius: 10px;
  text-align: center;
  font-size: 12px;
  color: var(--adm-muted);
}

.adm-slack-setup {
  margin: 0 0 18px;
  font-size: 13px;
  line-height: 1.55;
}

.adm-slack-setup a {
  color: var(--adm-accent, #0060f8);
}

.adm-slack-event-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.adm-slack-event-list li {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  background: #fff;
}

.adm-slack-event-list strong {
  font-size: 14px;
  color: var(--adm-ink);
}

.adm-slack-event-list span {
  font-size: 13px;
  line-height: 1.45;
  color: var(--adm-muted);
}

.adm-slack-event-list code {
  width: fit-content;
  font-family: var(--adm-font-mono);
  font-size: 11px;
  color: #0047c2;
  background: #eef4ff;
  padding: 2px 8px;
  border-radius: 999px;
}

.adm-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.adm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 20px;
  padding: 4px;
  width: fit-content;
  max-width: 100%;
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  background: #fff;
}

.adm-tab {
  padding: 7px 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--adm-muted);
  cursor: pointer;
}

.adm-tab.is-active {
  background: #eef4ff;
  color: var(--adm-ink);
}

.adm-tab-panel[hidden] {
  display: none !important;
}

.adm-stat-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.adm-stat-text {
  font-size: 0.95rem !important;
  line-height: 1.3;
  word-break: break-word;
}

.adm-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}

.adm-contacts-toolbar {
  justify-content: flex-end;
}

.adm-toolbar-hint {
  margin: 0 auto 0 0;
  font-size: 13px;
  color: var(--adm-muted);
}

.adm-toolbar .adm-input-sm {
  flex: 1 1 220px;
  min-width: 0;
  width: auto;
  padding: 10px 12px 10px 12px;
  font-size: 14px;
}

.adm-content .adm-btn-sm {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 10px 16px;
  font-size: 13px;
  flex: 0 0 auto;
}

.adm-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--adm-border);
  border-radius: 16px;
  background: #fff;
}

.adm-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 13px;
}

.adm-table th,
.adm-table td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid var(--adm-border);
  vertical-align: top;
}

.adm-table th {
  font-family: var(--adm-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--adm-muted);
  background: var(--adm-surface-2);
}

.adm-table tr:last-child td {
  border-bottom: 0;
}

.adm-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.adm-pill.is-live {
  background: #ecfdf5;
  color: #047857;
}

.adm-pill.is-planned {
  background: #f1f5f9;
  color: #64748b;
}

.adm-types {
  color: var(--adm-muted);
  font-size: 12px;
}

/* —— Email triggers —— */
.adm-email-layout {
  display: grid;
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
  gap: 16px;
  min-height: 360px;
}

.adm-trigger-nav {
  border: 1px solid var(--adm-border);
  border-radius: 16px;
  background: #fff;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.adm-trigger-loading {
  padding: 10px 12px;
  margin: 0;
  font-size: 13px;
}

.adm-trigger-item {
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 13px;
  color: var(--adm-ink);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.adm-trigger-item kbd {
  display: block;
  font-family: var(--adm-font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--adm-muted);
  margin-bottom: 4px;
}

.adm-trigger-item:hover {
  background: var(--adm-surface-2);
}

.adm-trigger-item.is-active {
  background: #eef4ff;
  color: var(--adm-ink);
  font-weight: 700;
}

.adm-trigger-detail {
  border: 1px solid var(--adm-border);
  border-radius: 16px;
  background: #fff;
  padding: 24px;
}

.adm-trigger-detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-bottom: 12px;
}

.adm-trigger-detail-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.adm-trigger-detail-desc {
  margin: 0 0 20px;
  color: var(--adm-muted);
  font-size: 14px;
  line-height: 1.55;
}

.adm-trigger-meta {
  margin: 0;
  display: grid;
  gap: 14px;
}

.adm-trigger-meta > div {
  display: grid;
  gap: 4px;
}

.adm-trigger-meta dt {
  font-family: var(--adm-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--adm-muted);
}

.adm-trigger-meta dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.adm-trigger-meta code {
  font-family: var(--adm-font-mono);
  font-size: 12px;
  background: var(--adm-surface-2);
  padding: 2px 6px;
  border-radius: 6px;
}

.adm-email-offline {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fff8e6;
  border: 1px solid #f5d78e;
  color: #7a5d00;
  font-size: 13px;
  line-height: 1.45;
}

.adm-email-offline[hidden] {
  display: none;
}

.adm-email-offline code {
  font-family: var(--adm-font-mono);
  font-size: 12px;
}

/* —— Trigger editor (HTML + Preview) —— */
.adm-trigger-editor {
  display: grid;
  gap: 16px;
}

.adm-trigger-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--adm-border);
}

.adm-trigger-subtab {
  padding: 8px 14px;
  border: 0;
  border-radius: 8px 8px 0 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--adm-muted);
  cursor: pointer;
}

.adm-trigger-subtab.is-active {
  color: var(--adm-ink);
  box-shadow: inset 0 -2px 0 var(--adm-nav-active-border);
}

.adm-trigger-editor-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 36px;
}

.adm-inline-feedback {
  margin: 0;
  flex: 1 1 auto;
  text-align: right;
  font-size: 13px;
  line-height: 1.4;
}

.adm-inline-feedback.is-busy {
  color: #1a4fad;
}

.adm-inline-feedback.is-ok {
  color: #047857;
  font-weight: 600;
}

.adm-inline-feedback.is-err {
  color: #9f1239;
  font-weight: 600;
}

.adm-content .adm-btn.is-busy {
  position: relative;
  pointer-events: none;
  opacity: 0.9;
  padding-left: 34px;
}

.adm-content .adm-btn.is-busy::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: adm-spin 0.65s linear infinite;
}

@keyframes adm-spin {
  to { transform: rotate(360deg); }
}

.adm-toast-root {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(100% - 32px, 360px);
  pointer-events: none;
}

.adm-toast {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.45;
  box-shadow: 0 12px 40px #00103824;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.adm-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.adm-toast.is-ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.adm-toast.is-err {
  background: #fff1f2;
  color: #9f1239;
  border: 1px solid #fecdd3;
}

.adm-alert.is-busy {
  background: #eef4ff;
  color: #1a4fad;
  border: 1px solid #c5d4ef;
}

.adm-trigger-editor-panel[hidden] {
  display: none;
}

.adm-template-html {
  width: 100%;
  min-height: 420px;
  padding: 14px;
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  background: #fbfcff;
  font-family: var(--adm-font-mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--adm-ink);
  resize: vertical;
}

.adm-template-html:focus {
  outline: 2px solid #0060f833;
  border-color: #0060f866;
}

.adm-preview-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.adm-preview-devices {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--adm-border);
  border-radius: 999px;
  background: var(--adm-surface-2);
}

.adm-preview-device {
  padding: 6px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--adm-muted);
  cursor: pointer;
}

.adm-preview-device.is-active {
  background: #fff;
  color: var(--adm-ink);
  box-shadow: 0 1px 4px #00103814;
}

.adm-preview-hint {
  margin: 0;
  font-size: 12px;
  color: var(--adm-muted);
}

.adm-preview-hint-sample {
  margin-bottom: 4px;
  color: var(--adm-ink-soft, #4a5d7a);
}

.adm-preview-hint code {
  font-family: var(--adm-font-mono);
  font-size: 11px;
}

.adm-template-vars {
  margin: 0 0 12px;
}

.adm-template-vars-preview {
  margin-top: 12px;
}

.adm-var-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.adm-var-chip {
  padding: 5px 10px;
  border: 1px solid #c5d4ef;
  border-radius: 999px;
  background: #eef4ff;
  font-family: var(--adm-font-mono);
  font-size: 11px;
  font-weight: 700;
  color: #1a4fad;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.adm-var-chip:hover {
  background: #dce9ff;
  border-color: #4da3ff;
}

.adm-var-chip:active {
  transform: scale(0.97);
}

.adm-preview-shell {
  margin-top: 12px;
  padding: 20px;
  border: 1px solid var(--adm-border);
  border-radius: 14px;
  background: #e8edf5;
  overflow: auto;
}

.adm-preview-viewport {
  margin: 0 auto;
  background: #fff;
  border: 1px solid #dbe3f0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 40px #0010381a;
  transition: max-width 0.24s ease;
}

.adm-preview-shell.is-desktop .adm-preview-viewport {
  width: 100%;
  max-width: 720px;
  min-height: 480px;
}

.adm-preview-shell.is-mobile .adm-preview-viewport {
  width: 100%;
  max-width: 375px;
  min-height: 640px;
}

.adm-preview-frame {
  display: block;
  width: 100%;
  min-height: 480px;
  border: 0;
  background: #fff;
}

.adm-preview-shell.is-mobile .adm-preview-frame {
  min-height: 640px;
}

/* —— Mobile —— */
.adm-sidebar-backdrop {
  display: none;
}

@media (max-width: 960px) {
  .adm-app-main {
    margin-left: 0;
    width: 100vw;
    max-width: 100vw;
  }

  .adm-app.is-sidebar-collapsed .adm-app-main {
    margin-left: 0;
    width: 100vw;
    max-width: 100vw;
  }

  .adm-menu-toggle {
    display: inline-flex;
  }

  .adm-sidebar-collapse {
    display: none;
  }

  .adm-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(100%, var(--adm-sidebar-w));
    transform: translateX(-105%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 24px 0 64px #00103840;
  }

  .adm-app.is-nav-open .adm-sidebar {
    transform: translateX(0);
  }

  .adm-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 30;
    border: 0;
    padding: 0;
    background: #00103866;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s ease, visibility 0.24s ease;
    cursor: pointer;
  }

  .adm-app.is-nav-open .adm-sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .adm-topbar-meta {
    display: none;
  }

  .adm-stat-grid {
    grid-template-columns: 1fr;
  }

  .adm-stat-grid-2 {
    grid-template-columns: 1fr;
  }

  .adm-tabs {
    width: 100%;
  }

  .adm-tab {
    flex: 1 1 0;
    text-align: center;
  }

  .adm-toolbar-hint {
    flex: 1 1 100%;
    margin: 0;
  }

  .adm-email-layout {
    grid-template-columns: 1fr;
  }

  .adm-trigger-nav {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 6px;
    padding: 8px;
  }

  .adm-trigger-item {
    flex: 0 0 auto;
    width: auto;
    min-width: 148px;
  }

  .adm-trigger-item kbd {
    white-space: nowrap;
  }
}

/* —— Image server —— */
body.admin-app.adm-modal-open {
  overflow: hidden;
}

.adm-modal.is-front {
  z-index: 320;
}

.adm-image-upload {
  margin: 0 0 20px;
  padding: 28px 20px;
  border: 2px dashed var(--adm-border);
  border-radius: 14px;
  background: #f8fafd;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.adm-image-upload:hover,
.adm-image-upload.is-dragover {
  border-color: #3b6fd4;
  background: #eef4ff;
}

.adm-image-upload-inner {
  text-align: center;
}

.adm-image-upload-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--adm-ink);
}

.adm-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.adm-image-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--adm-border);
  border-radius: 14px;
  background: #fff;
}

.adm-card-tools {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  gap: 6px;
}

.adm-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--adm-border);
  border-radius: 8px;
  background: #fff;
  color: var(--adm-muted);
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.adm-card-icon iconify-icon {
  width: 18px;
  height: 18px;
}

.adm-card-icon:hover {
  color: var(--adm-ink);
  border-color: #3b6fd4;
  background: #eef4ff;
}

.adm-card-icon-danger:hover {
  color: #be123c;
  border-color: #fecdd3;
  background: #fff1f2;
}

.adm-confirm-modal-card {
  width: min(100%, 420px);
  text-align: left;
}

.adm-confirm-modal-card .adm-modal-title,
.adm-confirm-modal-card .adm-modal-text {
  text-align: left;
}

.adm-confirm-modal-card .adm-btn-danger {
  color: #fff;
  background: #be123c;
  border-color: #be123c;
}

.adm-confirm-modal-card .adm-btn-danger:hover {
  background: #9f1239;
  border-color: #9f1239;
}

.adm-image-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  max-height: 160px;
  padding: 8px;
  border-radius: 10px;
  background: #f4f6fb;
  overflow: hidden;
}

.adm-image-thumb img {
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
}

.adm-image-name {
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--adm-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-image-size {
  margin: 0 0 6px;
  font-size: 12px;
}

.adm-image-url {
  margin: 0;
  font-family: var(--adm-font-mono);
  font-size: 11px;
  line-height: 1.4;
  color: var(--adm-muted);
  word-break: break-all;
}

.adm-image-dev-hint {
  margin: -8px 0 16px;
  font-size: 13px;
  line-height: 1.5;
}

.adm-image-dev-hint code {
  font-family: var(--adm-font-mono);
  font-size: 12px;
}

.adm-th-actions,
.adm-td-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.adm-user-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
}

.adm-table-wrap-users,
.adm-table-wrap-leads,
.adm-table-wrap-clients {
  overflow: visible;
}

.adm-icon-tip {
  position: relative;
  display: inline-flex;
}

.adm-icon-tip::after {
  content: attr(data-tip);
  position: absolute;
  right: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(50%) translateY(4px);
  padding: 6px 10px;
  border-radius: 8px;
  background: #001038;
  color: #f7faff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.3;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 40;
  box-shadow: 0 8px 24px #00103833;
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}

.adm-icon-tip::before {
  content: "";
  position: absolute;
  right: 50%;
  bottom: calc(100% + 2px);
  transform: translateX(50%) translateY(4px);
  border: 5px solid transparent;
  border-top-color: #001038;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 41;
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s ease;
}

.adm-icon-tip:hover::after,
.adm-icon-tip:focus-within::after,
.adm-icon-tip:hover::before,
.adm-icon-tip:focus-within::before {
  opacity: 1;
  visibility: visible;
  transform: translateX(50%) translateY(0);
}

.adm-icon-action {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--adm-muted);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.adm-icon-action iconify-icon {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

.adm-icon-action:hover:not(:disabled):not(.is-disabled) {
  color: var(--adm-ink);
  background: #00103808;
  border-color: #00103814;
}

.adm-icon-action:disabled,
.adm-icon-action.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.adm-icon-action[data-user-delete]:hover:not(:disabled) {
  color: #be123c;
  background: #fff1f2;
  border-color: #fecdd3;
}

.adm-icon-action[data-user-block]:hover:not(:disabled) {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

.adm-table tr.is-banned td {
  opacity: 0.72;
}

.adm-user-modal-card {
  width: min(100%, 480px);
  text-align: left;
}

.adm-user-perms-card {
  width: min(100%, 560px);
}

.adm-user-edit-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.adm-perms-grid {
  display: grid;
  gap: 18px;
  margin: 16px 0;
  max-height: min(55vh, 420px);
  overflow: auto;
  padding-right: 4px;
}

.adm-perms-section h3 {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--adm-muted);
}

.adm-perms-list {
  display: grid;
  gap: 8px;
}

.adm-perm-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--adm-border);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: var(--adm-ink);
}

.adm-perm-check:hover {
  border-color: #0060f844;
  background: #f7faff;
}

.adm-perm-check input {
  margin-top: 2px;
}

.adm-perm-check:has(input:disabled) {
  opacity: 0.65;
  cursor: default;
  background: #f8fafc;
}

.adm-btn-danger {
  color: #be123c;
  border-color: #fecdd3;
  background: #fff1f2;
}

.adm-btn-danger:hover {
  background: #ffe4e6;
}

.adm-image-modal-card {
  width: min(100%, 480px);
  text-align: left;
}

.adm-image-edit-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.adm-image-edit-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  padding: 12px;
  border-radius: 12px;
  background: #f4f6fb;
}

.adm-image-edit-preview img {
  max-width: 100%;
  max-height: 120px;
  object-fit: contain;
}

.adm-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

/* —— Lead / client profile —— */
.adm-lead-link {
  font-weight: 700;
  color: var(--adm-accent, #0060f8);
  text-decoration: none;
  transition: color 0.2s ease;
}

.adm-lead-link:hover {
  color: #0047c2;
  text-decoration: underline;
}

.adm-lead-profile {
  display: grid;
  gap: 20px;
}

.adm-lead-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--adm-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.adm-lead-back:hover {
  color: var(--adm-accent, #0060f8);
}

.adm-lead-back iconify-icon {
  width: 18px;
  height: 18px;
}

.adm-lead-hero {
  position: relative;
  overflow: hidden;
  padding: 28px 28px 24px;
  border: 1px solid #00103814;
  border-radius: 20px;
  background:
    radial-gradient(120% 140% at 100% 0%, #0060f828 0%, transparent 55%),
    linear-gradient(165deg, #001038 0%, #000c28 52%, #001a4a 100%);
  color: #f7faff;
  box-shadow: 0 20px 50px #0010381f;
}

.adm-lead-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--adm-border);
  border-radius: 14px;
  background: #fff;
}

.adm-lead-subtab {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 16px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--adm-muted);
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.adm-lead-subtab:hover {
  color: var(--adm-ink);
  background: #00103806;
}

.adm-lead-subtab.is-active {
  color: var(--adm-ink);
  background: #eef4ff;
  box-shadow: inset 0 0 0 1px #0060f814;
}

.adm-lead-subnav-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: #0010380f;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  color: var(--adm-muted);
}

.adm-lead-subtab.is-active .adm-lead-subnav-count {
  background: #0060f818;
  color: #0047c2;
}

.adm-lead-tab-panels {
  display: grid;
  gap: 0;
}

.adm-lead-tab-panel[hidden] {
  display: none !important;
}

.adm-lead-timeline-wrap--tab,
.adm-lead-logs-wrap--tab {
  margin: 0;
}

.adm-lead-logs-wrap--tab .adm-lead-logs-scroll {
  max-height: min(640px, 70vh);
}

.adm-lead-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(#ffffff0a 1px, transparent 1px),
    linear-gradient(90deg, #ffffff0a 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 90%);
}

.adm-lead-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px 24px;
  align-items: center;
}

.adm-lead-avatar {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(145deg, #4da3ff 0%, #0060f8 100%);
  font-family: var(--adm-font-display, Georgia, serif);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  box-shadow: 0 12px 32px #0060f847;
}

.adm-lead-hero-copy h2 {
  margin: 0 0 6px;
  font-family: var(--adm-font-display, Georgia, serif);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.adm-lead-hero-copy p {
  margin: 0;
  font-size: 15px;
  color: #b8c9e8;
}

.adm-lead-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.adm-lead-ref {
  font-family: var(--adm-font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #7eb6ff;
}

.adm-lead-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.adm-lead-pill.is-lead {
  background: #0060f833;
  color: #9ec5ff;
}

.adm-lead-pill.is-client {
  background: #10b98133;
  color: #6ee7b7;
}

.adm-lead-manager {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  background: #ffffff14;
  border: 1px solid #ffffff28;
}

.adm-lead-manager.is-editable {
  cursor: pointer;
  padding-right: 6px;
}

.adm-lead-manager-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #9ec5ff;
}

.adm-lead-manager strong {
  font-size: 12px;
  font-weight: 700;
  color: #f7faff;
}

.adm-lead-manager-select {
  appearance: none;
  -webkit-appearance: none;
  max-width: 180px;
  margin: 0;
  padding: 2px 22px 2px 6px;
  border: 0;
  border-radius: 999px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ec5ff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E")
    no-repeat right 6px center / 12px,
    transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: #f7faff;
  cursor: pointer;
}

.adm-lead-manager-select:focus {
  outline: none;
  box-shadow: 0 0 0 2px #9ec5ff55;
}

.adm-lead-manager-select:disabled {
  opacity: 0.55;
  cursor: wait;
}

.adm-lead-manager-select option {
  color: #0f172a;
  background: #fff;
}

.adm-lead-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #ffffff1a;
}

.adm-lead-actions .adm-btn {
  width: auto;
  margin: 0;
}

.adm-lead-actions .adm-btn-ghost {
  margin: 0;
  padding: 10px 16px;
  width: auto;
  border: 1px solid #ffffff33;
  border-radius: 999px;
  background: #ffffff14;
  color: #f7faff;
  text-decoration: none;
}

.adm-lead-actions .adm-btn-ghost:hover {
  background: #ffffff24;
  color: #fff;
}

.adm-lead-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 16px;
}

.adm-lead-card {
  padding: 22px 22px 20px;
  border: 1px solid var(--adm-border);
  border-radius: 16px;
  background: #fff;
}

.adm-lead-card h3 {
  margin: 0 0 16px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--adm-muted);
}

.adm-lead-dl {
  display: grid;
  gap: 14px;
  margin: 0;
}

.adm-lead-dl div {
  display: grid;
  gap: 4px;
}

.adm-lead-dl dt {
  margin: 0;
  font-family: var(--adm-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--adm-muted);
}

.adm-lead-dl dd {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--adm-ink);
  word-break: break-word;
}

.adm-lead-dl a {
  color: var(--adm-accent, #0060f8);
  text-decoration: none;
  font-weight: 650;
}

.adm-lead-dl a:hover {
  text-decoration: underline;
}

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

.adm-lead-stat {
  padding: 16px;
  border-radius: 12px;
  background: var(--adm-surface-2);
}

.adm-lead-stat kbd {
  display: block;
  margin-bottom: 6px;
  font-family: var(--adm-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--adm-muted);
}

.adm-lead-stat strong {
  display: block;
  font-family: var(--adm-font-display, Georgia, serif);
  font-size: 28px;
  font-weight: 500;
  line-height: 1;
  color: var(--adm-ink);
}

.adm-lead-timeline-wrap {
  padding: 22px;
  border: 1px solid var(--adm-border);
  border-radius: 16px;
  background: #fff;
}

.adm-lead-timeline-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 18px;
}

.adm-lead-timeline-head h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--adm-muted);
}

.adm-lead-timeline-head span {
  font-size: 13px;
  color: var(--adm-muted);
}

.adm-lead-timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.adm-lead-timeline li {
  position: relative;
  padding: 0 0 22px 28px;
}

.adm-lead-timeline li::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #0060f833, #0060f808);
}

.adm-lead-timeline li:last-child {
  padding-bottom: 0;
}

.adm-lead-timeline li:last-child::before {
  display: none;
}

.adm-lead-timeline-dot {
  position: absolute;
  left: 0;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #0060f8;
  box-shadow: 0 0 0 2px #0060f824;
}

.adm-lead-timeline li.is-has-proposal .adm-lead-timeline-dot {
  background: #10b981;
  box-shadow: 0 0 0 2px #10b98133;
}

.adm-lead-brief-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.adm-lead-brief-top time {
  font-family: var(--adm-font-mono);
  font-size: 11px;
  color: var(--adm-muted);
}

.adm-lead-brief-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.adm-lead-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--adm-border);
  background: var(--adm-surface-2);
  font-size: 11px;
  font-weight: 700;
  color: var(--adm-muted);
}

.adm-lead-tag.is-proposal-done {
  border-color: #10b98155;
  background: #10b98118;
  color: #059669;
}

.adm-lead-brief-body {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: var(--adm-ink);
  white-space: pre-wrap;
}

.adm-lead-brief-proposal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #10b98144;
  background: #10b98112;
}

.adm-lead-brief-proposal-ok {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #059669;
}

.adm-lead-brief-proposal-ok iconify-icon {
  font-size: 16px;
  color: #10b981;
}

.adm-lead-brief-proposal-title {
  flex: 1 1 140px;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--adm-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-lead-brief-proposal .adm-btn {
  width: auto;
  gap: 6px;
}

.adm-lead-empty {
  padding: 32px 20px;
  border: 1px dashed var(--adm-border);
  border-radius: 14px;
  text-align: center;
  color: var(--adm-muted);
  font-size: 14px;
}

.adm-lead-logs-wrap {
  display: grid;
  gap: 14px;
}

.adm-lead-logs-scroll {
  overflow: auto;
  border: 1px solid var(--adm-border);
  border-radius: 14px;
  background: #fff;
  max-height: min(520px, 60vh);
}

.adm-lead-logs {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.adm-lead-logs thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 12px 14px;
  border-bottom: 1px solid var(--adm-border);
  background: #f7f9fc;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--adm-muted);
  white-space: nowrap;
}

.adm-lead-logs tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #0010380d;
  vertical-align: top;
  color: var(--adm-text);
}

.adm-lead-logs tbody tr:last-child td {
  border-bottom: 0;
}

.adm-lead-logs tbody tr:hover td {
  background: #0060f808;
}

.adm-log-type {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  background: #0010380a;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #334155;
  white-space: nowrap;
}

.adm-log-status {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
  white-space: nowrap;
}

.adm-log-status.is-ok {
  background: #ecfdf3;
  color: #027a48;
}

.adm-log-status.is-warn {
  background: #fffaeb;
  color: #b54708;
}

.adm-log-status.is-err {
  background: #fef3f2;
  color: #b42318;
}

.adm-log-status.is-muted {
  background: #f2f4f7;
  color: #475467;
}

.adm-proposals-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.adm-proposal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.adm-proposal-card {
  width: min(920px, calc(100vw - 24px));
  max-height: min(94vh, 960px);
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  text-align: left;
  overflow: hidden;
}

.adm-proposal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.adm-proposal-status-line {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--adm-muted);
}

.adm-proposal-form {
  overflow: auto;
  padding-right: 4px;
  display: grid;
  gap: 18px;
  margin-top: 12px;
}

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

.adm-proposal-section {
  display: grid;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--adm-border);
}

.adm-proposal-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.adm-proposal-section-head h3 {
  margin: 0;
  font-size: 14px;
}

.adm-proposal-rows {
  display: grid;
  gap: 8px;
}

.adm-proposal-row {
  display: grid;
  gap: 8px;
  align-items: center;
}

.adm-proposal-row[data-kind="conditions"],
.adm-proposal-row[data-kind="outOfScope"] {
  grid-template-columns: minmax(0, 1fr) auto;
}

#admProposalConditionRows .adm-proposal-row,
#admProposalOutOfScopeRows .adm-proposal-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.adm-proposal-scope-card,
.adm-proposal-timeline-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  background: #f8f9fc;
}

.adm-proposal-scope-card .adm-proposal-row,
.adm-proposal-timeline-card .adm-proposal-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.adm-proposal-timeline-card .adm-proposal-row--split {
  grid-template-columns: minmax(0, 1.4fr) minmax(110px, 0.7fr) auto;
}

.adm-proposal-invest-row {
  grid-template-columns: minmax(0, 1.6fr) 88px 110px auto;
}

.adm-proposal-detail-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  background: #f8f9fc;
}

.adm-proposal-detail-card .adm-proposal-row {
  grid-template-columns: 64px minmax(0, 1fr) auto;
}

.adm-proposal-textarea {
  min-height: 64px;
  resize: vertical;
}

.adm-proposal-footer {
  margin-top: 12px;
}

@media (max-width: 720px) {
  .adm-proposal-grid,
  .adm-proposal-row,
  .adm-proposal-invest-row,
  .adm-proposal-detail-card .adm-proposal-row,
  .adm-proposal-scope-card .adm-proposal-row,
  .adm-proposal-timeline-card .adm-proposal-row,
  .adm-proposal-timeline-card .adm-proposal-row--split {
    grid-template-columns: 1fr;
  }
}

.adm-log-note {
  min-width: 180px;
  max-width: 320px;
  color: var(--adm-muted);
  line-height: 1.45;
  word-break: break-word;
}

@media (max-width: 900px) {
  .adm-lead-grid {
    grid-template-columns: 1fr;
  }

  .adm-lead-hero-inner {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .adm-lead-logs thead {
    display: none;
  }

  .adm-lead-logs tbody tr {
    display: grid;
    gap: 6px;
    padding: 14px;
    border-bottom: 1px solid var(--adm-border);
  }

  .adm-lead-logs tbody td {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 8px;
    padding: 0;
    border: 0;
  }

  .adm-lead-logs tbody td::before {
    content: attr(data-label);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--adm-muted);
  }

  .adm-log-note {
    max-width: none;
  }

  .adm-lead-subnav {
    flex-direction: column;
  }

  .adm-lead-subtab {
    width: 100%;
    text-align: left;
    white-space: normal;
  }
}

@media (max-width: 480px) {
  .adm-sidebar-head {
    padding: 22px 18px 20px;
  }

  .adm-content {
    padding: 16px;
  }
}

.adm-email-composer-card {
  width: min(880px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 22px 24px 20px;
  text-align: left;
}

.adm-email-composer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--adm-border);
}

.adm-email-composer-head .adm-modal-title {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.adm-email-composer-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.adm-composer-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border: 1px solid var(--adm-border);
  border-radius: 8px;
  background: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  color: var(--adm-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.adm-composer-tool:hover {
  color: var(--adm-ink);
  border-color: #0060f828;
  background: #f7faff;
}

.adm-composer-tool iconify-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #0060f8;
}

.adm-email-composer-envelope {
  display: grid;
  gap: 0;
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.adm-email-composer-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 40px;
  padding: 0 14px;
  border-bottom: 1px solid #0010380a;
  font-size: 13px;
}

.adm-email-composer-line:last-child {
  border-bottom: 0;
}

.adm-email-composer-k {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--adm-muted);
}

.adm-email-composer-v {
  color: var(--adm-ink);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-email-composer-line-subject {
  min-height: 44px;
}

.adm-email-composer-subject-input {
  width: 100%;
  padding: 8px 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--adm-ink);
}

.adm-email-composer-subject-input:focus {
  outline: none;
}

.adm-email-composer-subject-input::placeholder {
  color: #5f6e8866;
  font-weight: 400;
}

.adm-template-vars-compact {
  margin: 0;
}

.adm-template-vars-compact .adm-template-vars-label {
  margin: 0 0 8px;
  font-size: 11px;
}

.adm-email-composer-tabs {
  margin: 0;
  padding-bottom: 0;
  border-bottom: 1px solid var(--adm-border);
}

.adm-email-composer-editor {
  display: grid;
  gap: 0;
  min-height: 280px;
}

.adm-email-composer-editor .adm-template-html {
  min-height: 280px;
  max-height: 38vh;
  border-radius: 0 0 12px 12px;
}

.adm-email-composer-editor .adm-preview-shell {
  min-height: 280px;
  max-height: 38vh;
  border-radius: 0 0 12px 12px;
}

.adm-email-composer-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}

.adm-email-composer-footer .adm-composer-footer-btn {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 8px 16px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  text-decoration: none;
}

.adm-email-composer-footer .adm-btn-ghost.adm-composer-footer-btn {
  margin: 0;
  padding: 8px 14px;
  border-radius: 9px;
  background: transparent;
  color: var(--adm-muted);
  font-weight: 600;
  width: auto;
}

.adm-email-composer-footer .adm-btn-ghost.adm-composer-footer-btn:hover {
  color: var(--adm-ink);
  background: #00103808;
  transform: none;
  box-shadow: none;
}

.adm-email-composer-footer .adm-composer-footer-btn:not(.adm-btn-ghost) {
  box-shadow: none;
}

.adm-email-composer-footer .adm-composer-footer-btn:not(.adm-btn-ghost):hover {
  transform: none;
  box-shadow: 0 4px 14px #0060f833;
}

.adm-email-composer-card .adm-alert {
  margin: 0;
  font-size: 13px;
}

.adm-composer-attach {
  display: grid;
  gap: 10px;
}

.adm-composer-attach-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.adm-composer-attach-hint {
  font-size: 12px;
  color: var(--adm-muted);
}

.adm-composer-attach-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.adm-composer-attach-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--adm-border);
  border-radius: 10px;
  background: #f8f9fc;
}

.adm-composer-attach-icon {
  color: var(--adm-muted);
  font-size: 18px;
}

.adm-composer-attach-name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.adm-composer-attach-size {
  font-size: 12px;
  color: var(--adm-muted);
  white-space: nowrap;
}

.adm-composer-attach-remove {
  border: 0;
  background: transparent;
  color: var(--adm-muted);
  cursor: pointer;
  padding: 2px;
  display: inline-flex;
  border-radius: 6px;
}

.adm-composer-attach-remove:hover {
  color: #b42318;
  background: #fee4e2;
}

.adm-contact-email-view-attach {
  margin-top: 14px;
}

.adm-contact-email-view-attach-label {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--adm-muted);
}

.adm-contact-email-view-attach-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.adm-contact-email-view-attach-list li {
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid var(--adm-border);
  border-radius: 999px;
  background: #f8f9fc;
}

.adm-crm-template-picker-card,
.adm-crm-template-name-card {
  width: min(520px, calc(100vw - 32px));
  text-align: left;
}

.adm-contact-email-view-card {
  width: min(920px, calc(100vw - 32px));
  max-height: min(92vh, 900px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  text-align: left;
}

.adm-contact-email-view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.adm-contact-email-view-meta {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--adm-muted);
}

.adm-contact-email-view-body {
  min-height: 0;
  margin-top: 16px;
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.adm-contact-email-view-frame {
  width: 100%;
  height: min(62vh, 640px);
  border: 0;
  display: block;
  background: #fff;
}

.adm-proposal-pdf-card {
  width: min(980px, calc(100vw - 24px));
  height: min(92dvh, calc(100dvh - 48px), 960px);
  max-height: min(92dvh, calc(100dvh - 48px), 960px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  text-align: left;
  padding-bottom: 16px;
  overflow: hidden;
}

.adm-proposal-pdf-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.adm-proposal-pdf-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.adm-proposal-pdf-head-actions .adm-btn {
  width: auto;
  gap: 6px;
}

.adm-proposal-pdf-body {
  position: relative;
  min-height: 0;
  margin-top: 14px;
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  overflow: hidden;
  background: #525659;
  isolation: isolate;
}

.adm-proposal-pdf-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #525659;
}

.adm-lead-emails tbody td:nth-child(5) {
  width: 88px;
  white-space: nowrap;
}

.adm-crm-template-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: min(360px, 50vh);
  overflow: auto;
  border: 1px solid var(--adm-border);
  border-radius: 12px;
}

.adm-crm-template-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid #0010380d;
  background: #fff;
  text-align: left;
  font: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.adm-crm-template-item:last-child {
  border-bottom: 0;
}

.adm-crm-template-item:hover,
.adm-crm-template-item:focus-visible {
  background: #eef4ff;
  outline: none;
}

.adm-crm-template-item strong {
  font-size: 14px;
  color: var(--adm-ink);
}

.adm-crm-template-item span {
  font-size: 12px;
  color: var(--adm-muted);
}

.adm-crm-template-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--adm-muted);
  font-size: 14px;
}

/* --- Billing / Finance --- */
.adm-stat-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 960px) {
  .adm-stat-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.adm-finance-head {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.adm-finance-filters {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.adm-commission-pix {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}
.adm-commission-pix[hidden],
#admCommissionWithdraw[hidden] {
  display: none !important;
}
.adm-commission-pix-type {
  flex: 0 0 140px;
  width: 140px;
  min-width: 120px;
}
.adm-commission-pix-key {
  flex: 1 1 220px;
  min-width: 160px;
  width: auto;
}
.adm-commission-pix .adm-btn-sm {
  flex: 0 0 auto;
  width: auto;
  margin: 0;
}

.adm-profile {
  display: grid;
  gap: 18px;
  max-width: 820px;
}
.adm-profile-card {
  padding: 18px 20px 20px;
  border: 1px solid var(--adm-border);
  border-radius: 16px;
  background: #fff;
}
.adm-profile-identity {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 20px;
  align-items: start;
}
.adm-profile-avatar-btn {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.adm-profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1px solid var(--adm-border);
  background: #eef3fb;
  color: #35507a;
  font-size: 28px;
  font-weight: 700;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.adm-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.adm-profile-avatar.has-photo {
  border-color: transparent;
  background: #101828;
}
.adm-profile-avatar-hint {
  font-family: var(--adm-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--adm-muted, #6b7c93);
}
.adm-profile-fields {
  display: grid;
  gap: 12px;
}
.adm-profile-meta-row,
.adm-profile-finance {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.adm-profile-pix-key {
  grid-column: 1 / -1;
}
.adm-profile-finance-lead {
  margin: 0 0 12px;
}
.adm-profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.adm-field {
  display: grid;
  gap: 6px;
}
.adm-field > span {
  font-family: var(--adm-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--adm-muted, #6b7c93);
}
.adm-field input[readonly] {
  background: #f4f7fb;
  color: #4a5b73;
}
@media (max-width: 720px) {
  .adm-profile-identity,
  .adm-profile-meta-row,
  .adm-profile-finance {
    grid-template-columns: 1fr;
  }
}

.adm-finance-plans {
  margin-top: 28px;
}
.adm-section-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--adm-ink);
}
.adm-pipeline-card-tag.is-billing-none {
  background: #f3f4f6;
  color: #4b5563;
}
.adm-pipeline-card-tag.is-billing-ok {
  background: #dcfce7;
  color: #166534;
}
.adm-pipeline-card-tag.is-billing-warn {
  background: #fef3c7;
  color: #92400e;
}
.adm-pipeline-card-tag.is-billing-late {
  background: #fee2e2;
  color: #991b1b;
}
.adm-log-status.is-billing-scheduled { color: #64748b; }
.adm-log-status.is-billing-sent,
.adm-log-status.is-billing-issued { color: #1d4ed8; }
.adm-log-status.is-billing-paid { color: #166534; }
.adm-log-status.is-billing-overdue { color: #b91c1c; }
.adm-log-status.is-billing-canceled { color: #6b7280; }

.adm-invoice-lines {
  margin: 6px 0 0;
  padding-left: 1.1em;
  font-size: 0.86em;
  color: #4a5568;
  line-height: 1.45;
}
.adm-invoice-lines li { margin: 0 0 2px; }
.adm-billing-plan-card {
  width: min(100%, 960px);
  max-width: 960px;
  max-height: min(92vh, 920px);
  overflow: auto;
  text-align: left;
  padding: 28px 32px 24px;
}
.adm-billing-plan-card .adm-modal-title {
  text-align: left;
}
.adm-billing-plan-card .adm-muted {
  text-align: left;
}
.adm-billing-plan-form {
  display: grid;
  gap: 16px;
}
.adm-billing-plan-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.85fr);
  gap: 20px 24px;
  align-items: start;
}
.adm-billing-plan-main {
  display: grid;
  gap: 12px;
  min-width: 0;
}
.adm-billing-plan-side {
  position: sticky;
  top: 0;
  display: grid;
  gap: 8px;
  min-width: 0;
}
.adm-billing-preview-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--adm-ink);
}
.adm-billing-step-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--adm-muted, #6b7c93);
  line-height: 1.45;
}
.adm-billing-model-panel {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--adm-border, #e2e8f0);
  border-radius: 12px;
  background: #fff;
}
.adm-billing-model-panel[hidden] {
  display: none !important;
}
.adm-billing-top-grid {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr;
  gap: 10px 12px;
}
.adm-billing-models {
  border: 0;
  margin: 0;
  padding: 12px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  border: 1px solid var(--adm-border, #e2e8f0);
  border-radius: 12px;
  background: #f8fafc;
}
.adm-billing-models legend {
  font-family: var(--adm-font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 4px;
  width: 100%;
  color: var(--adm-muted, #6b7c93);
}
.adm-billing-models label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.adm-billing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
.adm-billing-plan-actions {
  justify-content: flex-end;
  padding-top: 4px;
  border-top: 1px solid var(--adm-border, #e2e8f0);
}
@media (max-width: 820px) {
  .adm-billing-plan-layout {
    grid-template-columns: 1fr;
  }
  .adm-billing-plan-side {
    position: static;
  }
}
@media (max-width: 560px) {
  .adm-billing-grid,
  .adm-billing-top-grid {
    grid-template-columns: 1fr;
  }
}
.adm-field-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 4px 0 0;
  font-size: 13px;
}
.adm-billing-preview {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--adm-border, #d8dee9);
  border-radius: 12px;
  background: var(--adm-surface-2, #f8fafc);
  font-size: 13px;
  min-height: 140px;
}

.adm-field-hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--adm-muted);
}

.adm-billing-due-dates {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--adm-border, #e2e8f0);
  border-radius: 8px;
  background: #fff;
}

.adm-billing-due-dates-title {
  margin: 0 0 10px;
  font-size: 13px;
}

.adm-billing-due-dates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.adm-billing-due-dates-grid .adm-field span {
  font-size: 12px;
}

.adm-billing-preview ol {
  margin: 6px 0 0;
  padding-left: 18px;
}
.adm-billing-preview li {
  margin: 2px 0;
}
.adm-lead-finance-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
