.app-shell nav a,
.side-bottom > a {
  color: inherit;
  text-decoration: none;
}

/* Confirmed document delivery */
.mail-action{position:relative;min-width:88px}.mail-action summary{list-style:none;display:inline-flex;align-items:center;gap:6px;color:#5f46c9;font-weight:750;cursor:pointer;white-space:nowrap}.mail-action summary::-webkit-details-marker{display:none}.mail-action[open] form{position:absolute;z-index:20;right:0;top:30px;width:min(310px,80vw);padding:16px;border:1px solid #e4e1ed;border-radius:16px;background:#fff;box-shadow:0 22px 55px #17132726;display:grid;gap:12px}.mail-action label{font-size:12px;font-weight:700;color:#41485a}.mail-action input[type=email]{display:block;width:100%;margin-top:6px;padding:10px 11px;border:1px solid #d9dce5;border-radius:10px}.mail-action .mail-confirm{display:flex;align-items:flex-start;gap:8px;font-size:11px;font-weight:500;line-height:1.4}.mail-action .mail-confirm input{margin-top:2px}.mail-action button{border:0;border-radius:10px;background:#6e55dd;color:#fff;padding:10px 12px;font-weight:750}

/* Read-only advertising integrations */
.integration-status{margin-top:28px}.integration-status article{position:relative}.integration-status article form{margin-top:18px}.integration-status .secondary-button{display:inline-flex;align-items:center;gap:7px}.integration-status .status-off{display:inline-block}

.app-shell nav a:hover,
.side-bottom > a:hover {
  background: #22273a;
  color: #fff;
}

.side-bottom > a.active {
  background: #2d2858;
  color: #fff;
}

.back-pipeline,
.module-card a {
  color: #604ac3;
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
}

.module-content {
  max-width: 1050px;
}

.module-card {
  margin-top: 24px;
  padding: 34px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.module-card h2 {
  margin: 13px 0 8px;
  font-size: 18px;
}

.module-card p {
  max-width: 650px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.module-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: #eeeaff;
  color: #604ac3;
  font-weight: 900;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.settings-grid article {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.settings-grid small {
  color: #7258e8;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}

.settings-grid h2 {
  margin: 10px 0 5px;
  font-size: 17px;
}

.settings-grid p {
  color: var(--muted);
  font-size: 11px;
}

.status-ok {
  display: inline-block;
  margin-top: 7px;
  padding: 5px 9px;
  border-radius: 12px;
  background: #e9f9f2;
  color: #17845d;
  font-size: 9px;
  font-weight: 800;
}

@media (max-width: 620px) {
  .settings-grid { grid-template-columns: 1fr; }
  .module-card { padding: 24px; }
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.summary-grid article {
  padding: 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.summary-grid small,
.summary-grid strong,
.summary-grid span {
  display: block;
}

.summary-grid small {
  color: #7258e8;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
}

.summary-grid strong {
  margin: 10px 0 5px;
  font-size: 24px;
}

.summary-grid span {
  color: var(--muted);
  font-size: 10px;
}

.management-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-top: 24px;
}

.management-form,
.table-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.management-form {
  display: grid;
  gap: 13px;
  padding: 21px;
}

.management-form h2 {
  margin: 0 0 5px;
  font-size: 16px;
}

.management-form label {
  color: #4e586b;
  font-size: 10px;
  font-weight: 700;
}

.management-form input,
.management-form select,
.management-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px;
  border: 1px solid #dfe2e9;
  border-radius: 8px;
  outline: 0;
  font: inherit;
}

.management-form textarea {
  min-height: 90px;
  resize: vertical;
}

.management-form button,
.secondary-button {
  border: 0;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
}

.management-form button {
  padding: 11px;
  background: var(--purple);
  color: #fff;
}

.secondary-button {
  padding: 7px 9px;
  background: #eeebfb;
  color: #604ac3;
}

.pdf-button {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 7px;
  background: #172a61;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  text-decoration: none;
}

.table-card {
  overflow: auto;
}

.table-card table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
}

.table-card th,
.table-card td {
  padding: 13px 15px;
  border-bottom: 1px solid #eef0f4;
  text-align: left;
  vertical-align: middle;
}

.table-card th {
  color: #788397;
  background: #fafafd;
  font-size: 8px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

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

.table-card td small {
  margin-top: 3px;
  color: var(--muted);
}

.empty-table {
  padding: 34px !important;
  color: var(--muted);
  text-align: center !important;
}

.role-pill,
.kind-pill,
.status-off {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 11px;
  background: #f0eefb;
  color: #604ac3;
  font-size: 8px;
  font-weight: 800;
}

.status-off {
  background: #f1f2f5;
  color: #7d8491;
}

.notice {
  margin-top: 20px;
  padding: 11px 14px;
  border-radius: 8px;
  background: #e9f9f2;
  color: #17845d;
  font-size: 10px;
  font-weight: 700;
}

.notice-error {
  background: #fff0f1;
  color: #b53542;
}

.management-grid.single-column {
  grid-template-columns: 1fr;
}

.inline-form {
  display: flex;
  gap: 6px;
  align-items: center;
}

.inline-form select {
  min-width: 92px;
  padding: 6px;
  border: 1px solid #dfe2e9;
  border-radius: 7px;
  background: #fff;
  font-size: 9px;
}

.inline-form button {
  padding: 7px 8px;
  border: 0;
  border-radius: 7px;
  background: #eeeaff;
  color: #604ac3;
  font-size: 8px;
  font-weight: 800;
}

.spaced-card {
  margin-top: 18px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 18px;
}

.integration-note {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid #ded7fb;
  border-radius: 10px;
  background: #f7f4ff;
  color: #604ac3;
  font-size: 10px;
}

.integration-note span {
  color: #6f7584;
}

.security-controls {
  margin-bottom: 18px;
}

#aiDialog textarea {
  display: block;
  width: 100%;
  min-height: 95px;
  margin-top: 6px;
  padding: 11px;
  border: 1px solid #dfe2e9;
  border-radius: 8px;
  outline: 0;
  resize: vertical;
  font: inherit;
}

.ai-intro {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.ai-answer {
  padding: 14px;
  border: 1px solid #ded7fb;
  border-radius: 9px;
  background: #f7f4ff;
  color: #4d3aa3;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.6;
}

@media (max-width: 900px) {
  .summary-grid { grid-template-columns: repeat(2, 1fr); }
  .management-grid { grid-template-columns: 1fr; }
  .report-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .summary-grid { grid-template-columns: 1fr; }
}

/* Apple Pro interface refresh */
:root {
  --ink: #15171c;
  --muted: #747a88;
  --purple: #7450f7;
  --purple-soft: #eee9ff;
  --line: #e4e5e9;
  --nav: #1d1e22;
  --surface: #ffffff;
  --canvas: #f5f5f7;
}

html { background: var(--canvas); }
body {
  min-width: 320px;
  background: var(--canvas);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font-size: 15px; }
button { transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
button:hover { transform: translateY(-1px); }
button:active { transform: translateY(0); }

.app-shell { padding: 20px 24px 20px 18px; gap: 22px; }
.app-shell > aside {
  inset: 20px auto 20px 18px;
  width: 272px;
  padding: 27px 18px 20px;
  border: 1px solid #303136;
  border-radius: 24px;
  background: var(--nav);
  color: #c9cbd1;
  box-shadow: 0 18px 50px rgba(27, 28, 32, .16);
  overflow: hidden;
}

.brand { gap: 13px; padding: 0 8px 18px; }
.brand > span {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: var(--purple);
  font-size: 18px;
  letter-spacing: -.04em;
  box-shadow: 0 8px 22px rgba(116, 80, 247, .28);
}
.brand > b { font-size: 15px; letter-spacing: .06em; }
.brand small { margin-top: 3px; font-size: 10px; color: #a88dff; }
.app-shell > aside > p { margin: 18px 12px 10px; font-size: 10px; letter-spacing: .16em; color: #777a84; }
.app-shell nav { gap: 5px; }
.app-shell nav a,
.side-bottom > a {
  min-height: 49px;
  padding: 0 13px;
  border-radius: 13px;
  gap: 12px;
  font-size: 15px;
  font-weight: 550;
}
.app-shell nav a i,
.side-bottom > a i { width: 22px; font-size: 21px; text-align: center; }
.app-shell nav a.active,
.side-bottom > a.active {
  background: var(--purple);
  color: #fff;
  box-shadow: 0 10px 25px rgba(116, 80, 247, .25);
}
.app-shell nav a:hover,
.side-bottom > a:hover { background: #2a2b30; color: #fff; }
.app-shell nav a.active:hover,
.side-bottom > a.active:hover { background: #6843ed; }
.app-shell nav a b { min-width: 23px; padding: 3px 7px; border-radius: 9px; background: #fff; color: var(--purple); font-size: 11px; text-align: center; }
.side-bottom { padding-top: 12px; border-color: #37383d; }
.profile { margin-top: 10px; padding: 17px 8px 0; border-color: #37383d; gap: 11px; }
.profile > span { width: 41px; height: 41px; background: var(--purple); font-size: 13px; }
.profile b { font-size: 13px; }
.profile small { font-size: 11px; }
.profile form button { font-size: 21px; }

.app-shell > main {
  margin-left: 294px;
  width: calc(100% - 294px);
  min-width: 0;
}
.top {
  height: 72px;
  margin: 0;
  padding: 0 22px;
  border: 1px solid rgba(216, 217, 222, .88);
  border-radius: 20px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 10px 32px rgba(28, 30, 38, .05);
  backdrop-filter: blur(18px);
}
.search { display: flex; align-items: center; gap: 12px; width: min(760px, 75%); color: #6f7480; font-size: 20px; }
.search input { width: 100%; margin: 0; background: transparent; color: var(--ink); font-size: 16px; }
.search input::placeholder { color: #7d828e; opacity: 1; }
.ai {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 17px;
  border: 1px solid #e2def3;
  border-radius: 14px;
  background: #fff;
  color: #5834d8;
  font-size: 14px;
  font-weight: 750;
  box-shadow: 0 6px 20px rgba(31, 28, 45, .06);
}
.content { padding: 35px 4px 32px; }
.module-content { max-width: none; }
.page-title { align-items: center; gap: 24px; }
.page-title p, dialog header p { margin-bottom: 8px; font-size: 11px; letter-spacing: .16em; color: #6842e9; }
.page-title h1 { margin-bottom: 8px; font-size: clamp(32px, 3.1vw, 46px); line-height: 1.08; letter-spacing: -.035em; font-weight: 760; }
.page-title span { font-size: 15px; color: var(--muted); }
.page-title > button,
.management-form button,
.login-card form > button,
dialog form > button {
  min-height: 50px;
  padding: 0 20px;
  border-radius: 14px;
  background: var(--purple);
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(116, 80, 247, .24);
}
.page-title > button { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }

.metrics {
  grid-template-columns: 1.25fr repeat(3, 1fr);
  margin: 27px 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 34px rgba(28, 30, 38, .045);
}
.metrics article { min-height: 148px; padding: 25px 28px; display: flex; flex-direction: column; justify-content: center; }
.metrics small { font-size: 13px; color: #5f6470; }
.metrics strong { margin: 10px 0 5px; font-size: 35px; line-height: 1; letter-spacing: -.035em; }
.metrics article:first-child strong { font-size: 48px; }
.metrics span { font-size: 12px; }
.metrics article:last-child strong { position: relative; }
.metrics article:last-child strong::after { content: ""; display: inline-block; width: 8px; height: 8px; margin-left: 9px; border-radius: 50%; background: #2dbb67; vertical-align: middle; }

.pipeline {
  grid-template-columns: repeat(6, minmax(260px, 1fr));
  gap: 12px;
  padding: 0 0 18px;
  scroll-snap-type: x proximity;
  scrollbar-color: #8262ef #e4e1eb;
  scrollbar-width: thin;
}
.stage { scroll-snap-align: start; }
.stage > header { min-height: 44px; padding: 0 10px 10px; gap: 8px; font-size: 13px; }
.stage > header i { width: 8px; height: 8px; }
.stage > header b { font-size: 14px; }
.stage > header span { padding: 3px 8px; font-size: 11px; }
.stage > header em { font-size: 12px; }
.stage-body {
  min-height: 390px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, .74);
  box-shadow: 0 10px 28px rgba(28, 30, 38, .035);
}
.deal { padding: 15px; margin-bottom: 11px; border-radius: 15px; box-shadow: 0 8px 20px rgba(24, 27, 36, .055); }
.avatar { width: 35px; height: 35px; border-radius: 10px; font-size: 10px; }
.deal h3 { margin: 12px 0 4px; font-size: 14px; }
.deal p { margin-bottom: 10px; font-size: 12px; line-height: 1.45; }
.deal > strong { font-size: 14px; }
.deal footer span, .deal footer small { font-size: 10px; }
.add-deal { min-height: 48px; border-radius: 13px; background: rgba(255,255,255,.4); font-size: 12px; }
.add-deal i { margin-right: 5px; }
.pipeline-hint {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 2px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 8px 26px rgba(28, 30, 38, .04);
}
.pipeline-hint > i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--purple-soft); color: var(--purple); font-size: 19px; }
.pipeline-hint > div:nth-child(2) { flex: 1; }
.pipeline-hint b, .pipeline-hint span { display: block; }
.pipeline-hint b { font-size: 13px; }
.pipeline-hint span { margin-top: 2px; font-size: 12px; color: var(--muted); }
.pipeline-progress { display: flex; gap: 8px; align-items: center; }
.pipeline-progress i { width: 22px; height: 4px; border-radius: 4px; background: #d6d7dc; }
.pipeline-progress i:nth-child(-n+4) { background: var(--purple); }

.summary-grid { gap: 18px; margin-top: 27px; }
.summary-grid article,
.settings-grid article,
.module-card,
.management-form,
.table-card {
  border-color: var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(28, 30, 38, .04);
}
.summary-grid article { padding: 27px; }
.summary-grid small, .settings-grid small { font-size: 10px; }
.summary-grid strong { font-size: 34px; }
.summary-grid span, .settings-grid p { font-size: 13px; }
.settings-grid article { padding: 28px; }
.settings-grid h2 { font-size: 21px; }
.management-grid { grid-template-columns: 340px minmax(0, 1fr); gap: 20px; margin-top: 28px; }
.management-form { gap: 16px; padding: 25px; }
.management-form h2 { font-size: 21px; }
.management-form label { font-size: 13px; }
.management-form input,
.management-form select,
.management-form textarea,
#aiDialog textarea,
.login-card input,
dialog input,
dialog select {
  margin-top: 7px;
  padding: 13px 14px;
  border-radius: 12px;
  background: #fbfbfc;
  font-size: 14px;
}
.management-form textarea { min-height: 110px; }
.table-card table { font-size: 13px; }
.table-card th, .table-card td { padding: 16px 18px; }
.table-card th { font-size: 10px; }
.table-card td small { margin-top: 5px; font-size: 11px; }
.pdf-button, .secondary-button, .inline-form button { padding: 9px 12px; border-radius: 10px; font-size: 11px; }
.inline-form select { min-width: 112px; padding: 9px; border-radius: 10px; font-size: 11px; }
.role-pill, .kind-pill, .status-off, .status-ok { padding: 7px 10px; border-radius: 999px; font-size: 10px; }
.back-pipeline, .module-card a { font-size: 13px; }
.integration-note, .notice { border-radius: 14px; font-size: 12px; }

dialog { border-radius: 22px; }
dialog form { padding: 30px; gap: 18px; }
dialog h2 { font-size: 27px; }
.ai-intro, .ai-answer { font-size: 13px; }
.toast { border-radius: 14px; padding: 15px 20px; font-size: 13px; }

@media (max-width: 1100px) {
  .app-shell { padding-left: 12px; }
  .app-shell > aside { left: 12px; width: 78px; padding: 20px 11px; }
  .brand { padding: 0 4px 15px; justify-content: center; }
  .brand > span { width: 44px; height: 44px; }
  .brand > b, .app-shell > aside > p, .app-shell nav a span, .side-bottom > a span, .profile div, .profile form { display: none; }
  .app-shell nav a, .side-bottom > a { justify-content: center; padding: 0; }
  .app-shell nav a b { position: absolute; margin: -28px 0 0 33px; }
  .profile { justify-content: center; padding-left: 0; padding-right: 0; }
  .app-shell > main { margin-left: 90px; width: calc(100% - 90px); }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metrics article:nth-child(2) { border-right: 0; }
  .management-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .app-shell { padding: 10px; }
  .app-shell > aside { position: fixed; inset: auto 10px 10px; z-index: 20; width: auto; height: 66px; padding: 8px; border-radius: 18px; flex-direction: row; }
  .brand, .app-shell > aside > p, .side-bottom, .app-shell nav a:not(.active) { display: none; }
  .app-shell nav a.active { width: 54px; min-height: 48px; }
  .app-shell > main { margin-left: 0; width: 100%; padding-bottom: 74px; }
  .top { height: 62px; padding: 0 15px; border-radius: 16px; }
  .search { width: 100%; }
  .search input { font-size: 14px; }
  .ai { width: 43px; height: 43px; padding: 0; justify-content: center; font-size: 0; }
  .ai i { font-size: 18px; }
  .content { padding-top: 25px; }
  .page-title { align-items: flex-end; }
  .page-title h1 { font-size: 31px; }
  .page-title span { display: none; }
  .page-title > button { width: 48px; min-height: 48px; padding: 0; justify-content: center; font-size: 0; }
  .page-title > button i { font-size: 18px; }
  .metrics { grid-template-columns: 1fr; }
  .metrics article { min-height: 110px; border-right: 0; border-bottom: 1px solid var(--line); }
  .metrics article:first-child strong { font-size: 40px; }
  .pipeline { grid-template-columns: repeat(6, minmax(245px, 82vw)); }
  .pipeline-hint { display: none; }
  .summary-grid, .settings-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
}
