html, body, body.vesta-app-body { background: var(--vesta-app-bg); }
body.ap-shell-body { font-family: var(--vesta-font); }
body.ap-shell-body .site,
body.ap-shell-body .wp-site-blocks,
body.ap-shell-body .entry-header,
body.ap-shell-body .wp-block-post-title,
body.ap-shell-body .entry-title,
body.ap-shell-body header.wp-block-template-part,
body.ap-shell-body footer.wp-block-template-part,
body.ap-shell-body .site-header,
body.ap-shell-body .site-footer,
body.ap-shell-body .wp-block-group.alignwide,
body.ap-shell-body .wp-block-group.alignfull { display:none !important; }

.vesta-icon { display:inline-flex; width:18px; height:18px; }
.vesta-icon svg { width:18px; height:18px; stroke-width:1.9; }
.vesta-sidebar__logo-mark {
  background: linear-gradient(135deg,#0d9f6e 0%,#0f172a 100%);
}
.vesta-button--primary { background:#0d9f6e; }
.vesta-topbar__create { text-decoration:none; }

.ap-shell-page { background:var(--vesta-app-bg); }
.ap-shell-page .ap-wrap-frontend {
  max-width:none;
  margin:0;
  padding:0;
  font-family:var(--vesta-font);
  color:var(--vesta-text);
  --ap-bg: var(--vesta-app-bg);
  --ap-card: var(--vesta-card-bg);
  --ap-text: var(--vesta-text);
  --ap-muted: var(--vesta-text-2);
  --ap-border: var(--vesta-border);
  --ap-border-strong: #d7d3c8;
  --ap-border-soft: var(--vesta-border);
  --ap-soft: var(--vesta-surface-soft);
  --ap-primary: #0d9f6e;
  --ap-primary-2: #0b7d57;
  --ap-radius: 18px;
  --ap-radius-sm: 12px;
  --ap-shadow: none;
  --ap-shadow-sm: none;
  --ap-gap: 18px;
}
.ap-shell-page .ap-hero {
  margin: 0 0 18px;
  padding: 28px 30px;
  border: 1px solid var(--vesta-border);
  border-radius: 22px;
  background: linear-gradient(135deg,#ffffff 0%,#fbfaf7 100%);
}
.ap-shell-page .ap-hero h2 { font-size: 36px; margin:0 0 10px; color:var(--vesta-text); }
.ap-shell-page .ap-muted { color: var(--vesta-text-2); }
.ap-shell-page .ap-hero-actions { display:flex; gap:10px; flex-wrap:wrap; }
.ap-shell-page--admin .ap-tabs { display:none; }
.ap-shell-page .ap-cards, .ap-shell-page .ap-stats { gap:18px; }
.ap-shell-page .ap-cards-4, .ap-shell-page .ap-stats { grid-template-columns: repeat(4, minmax(0,1fr)); }
.ap-shell-page .ap-card, .ap-shell-page .ap-stat, .ap-shell-page .ap-box {
  background:#fff;
  border:1px solid var(--vesta-border);
  border-radius:18px;
  box-shadow:none;
}
.ap-shell-page .ap-stat { min-height: 116px; justify-content:center; padding:18px 22px; }
.ap-shell-page .ap-stat-num, .ap-shell-page .ap-stat__num { font-size: 34px; font-weight:700; letter-spacing:-0.03em; color:var(--vesta-text); }
.ap-shell-page .ap-card .ap-card-title, .ap-shell-page .ap-stat .ap-muted { font-size:14px; text-transform:none; letter-spacing:0; color:var(--vesta-text-2); font-weight:500; }
.ap-shell-page .ap-card .ap-card-value { font-size:34px; font-weight:700; }
.ap-shell-page .ap-box { padding:22px 22px; margin-bottom:18px; }
.ap-shell-page .ap-section-head h3 { font-size:22px; }
.ap-shell-page .ap-range-btn,
.ap-shell-page .ap-pill,
.ap-shell-page .ap-btn,
.ap-shell-page .ap-btn-secondary,
.ap-shell-page .ap-tab {
  min-height:40px;
  border-radius:999px;
  font-weight:600;
  box-shadow:none;
}
.ap-shell-page .ap-btn { background:#111827; border-color:#111827; }
.ap-shell-page .ap-btn-secondary,
.ap-shell-page .ap-range-btn,
.ap-shell-page .ap-pill,
.ap-shell-page .ap-tab { background:#fff; color:var(--vesta-text); border-color:var(--vesta-border); }
.ap-shell-page .ap-range-btn.is-active,
.ap-shell-page .ap-pill.is-active,
.ap-shell-page .ap-tab.is-active { background:#0d9f6e; border-color:#0d9f6e; color:#fff; }
.ap-shell-page .ap-inline input[type="date"],
.ap-shell-page .ap-inline input[type="text"],
.ap-shell-page .ap-inline input[type="number"],
.ap-shell-page .ap-field input[type="date"],
.ap-shell-page .ap-field input[type="text"],
.ap-shell-page .ap-field input[type="number"],
.ap-shell-page .ap-field select,
.ap-shell-page .ap-box input[type="text"],
.ap-shell-page .ap-box input[type="email"],
.ap-shell-page .ap-box input[type="number"],
.ap-shell-page .ap-box input[type="date"],
.ap-shell-page .ap-box select,
.ap-shell-page .ap-box textarea,
.ap-shell-page .ap-box .wp-editor-container {
  border:1px solid var(--vesta-border);
  border-radius:12px;
  background:#fff;
}
.ap-shell-page .ap-inline input[type="date"],
.ap-shell-page .ap-inline input[type="text"],
.ap-shell-page .ap-inline input[type="number"],
.ap-shell-page .ap-box input[type="text"],
.ap-shell-page .ap-box input[type="email"],
.ap-shell-page .ap-box input[type="number"],
.ap-shell-page .ap-box input[type="date"],
.ap-shell-page .ap-box select { min-height:44px; padding:0 14px; }
.ap-shell-page .ap-table-wrap { border:1px solid var(--vesta-border); border-radius:18px; }
.ap-shell-page .ap-table { min-width:860px; }
.ap-shell-page .ap-table th,
.ap-shell-page .ap-table td { padding:14px 16px; border-bottom:1px solid var(--vesta-divider); }
.ap-shell-page .ap-table th { background:#fbfaf7; color:var(--vesta-text-2); font-size:12px; }
.ap-shell-page .ap-table tr:hover td { background:#fcfcfb; }
.ap-shell-page .ap-chart-card,
.ap-shell-page .ap-chart-fallback,
.ap-shell-page .ap-chart-canvas { background:transparent; }
.ap-shell-page .ap-device-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap:14px; }
.ap-shell-page .ap-device { border:1px solid var(--vesta-border); border-radius:16px; padding:16px; }
.ap-shell-page .ap-grid2 { display:grid; gap:16px; grid-template-columns:repeat(2,minmax(0,1fr)); }
.ap-shell-page--advertiser-dashboard .ap-box,
.ap-shell-page--admin-dashboard .ap-box { overflow:hidden; }
.ap-shell-page .ap-hero-row { align-items:center; }
.ap-shell-page .ap-hero-actions .ap-btn-secondary { background:#fff; }
.ap-shell-page .ap-box h3 { margin-top:0; }
.ap-shell-page .ap-box form { max-width:100%; }
.ap-shell-page .ap-box .button,
.ap-shell-page .ap-box button.button { border-radius:12px; }
.ap-shell-page .ap-muted.ap-diagnostics { background:#fbfaf7; border-style:solid; }
.ap-shell-page .ap-login-wrap, .ap-shell-page .ap-auth-card {
  max-width: 520px;
  margin: 40px auto;
  background:#fff;
  border:1px solid var(--vesta-border);
  border-radius:22px;
  padding:32px;
}

@media (max-width: 1200px) {
  .ap-shell-page .ap-cards-4, .ap-shell-page .ap-stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 767px) {
  .ap-shell-page .ap-hero { padding:20px 18px; border-radius:18px; }
  .ap-shell-page .ap-hero h2 { font-size:28px; }
  .ap-shell-page .ap-cards, .ap-shell-page .ap-cards-4, .ap-shell-page .ap-stats, .ap-shell-page .ap-grid2, .ap-shell-page .ap-device-grid { grid-template-columns: 1fr; }
  .ap-shell-page .ap-box { padding:18px 16px; border-radius:18px; }
  .ap-shell-page .ap-hero-actions { width:100%; }
  .ap-shell-page .ap-hero-actions .ap-btn, .ap-shell-page .ap-hero-actions .ap-btn-secondary { width:100%; }
}


html,
body,
body.ap-shell-body,
body.ap-shell-body * {
  font-family: 'Inter', var(--vesta-font) !important;
}

body.ap-shell-body a,
body.ap-shell-body a:hover,
body.ap-shell-body a:focus,
body.ap-shell-body a:active,
body.ap-shell-body a:visited {
  text-decoration: none !important;
}

.vesta-sidebar,
.vesta-sidebar * {
  font-family: 'Inter', var(--vesta-font) !important;
}

.vesta-sidebar__nav {
  display: grid;
  gap: 8px;
}

.vesta-sidebar__group {
  margin-bottom: 22px;
}

.vesta-sidebar__group-label {
  padding: 8px 12px 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  color: rgba(255,255,255,.45);
}

.vesta-sidebar__item,
.vesta-sidebar__item:link,
.vesta-sidebar__item:visited,
.vesta-sidebar__item:hover,
.vesta-sidebar__item:focus,
.vesta-sidebar__item:active {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 11px 14px;
  border-radius: 14px;
  color: rgba(255,255,255,.84) !important;
  text-decoration: none !important;
  background: transparent;
  border: 1px solid transparent;
  transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.vesta-sidebar__item .vesta-icon {
  opacity: .92;
}

.vesta-sidebar__item:hover,
.vesta-sidebar__item:focus-visible {
  color: #fff !important;
  background: rgba(255,255,255,.05);
  border-color: rgba(255,255,255,.06);
}

.vesta-sidebar__item.is-active,
.vesta-sidebar__item[aria-current="page"] {
  color: #fff !important;
  background: linear-gradient(180deg, rgba(255,255,255,.10) 0%, rgba(255,255,255,.06) 100%);
  border-color: rgba(255,255,255,.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.vesta-sidebar__item.is-active::before,
.vesta-sidebar__item[aria-current="page"]::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 999px;
  background: #0d9f6e;
}

.vesta-sidebar__label {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -.01em;
}

.vesta-sidebar__brand-copy strong,
.vesta-topbar__title,
.vesta-breadcrumb,
.vesta-user-chip,
.vesta-button,
.ap-shell-page {
  font-family: 'Inter', var(--vesta-font) !important;
}


/* ===== Full internal module rebuild pass ===== */
.ap-shell-page {
  padding: 28px;
}
.ap-shell-page .ap-wrap-frontend {
  display: grid;
  gap: 22px;
}
.ap-shell-page .ap-hero {
  display: grid;
  gap: 16px;
}
.ap-shell-page .ap-hero-row {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  flex-wrap:wrap;
}
.ap-shell-page .ap-hero h2,
.ap-shell-page .ap-box h3,
.ap-shell-page .ap-box h4 {
  letter-spacing:-0.03em;
}
.ap-shell-page .ap-hero-actions {
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
}
.ap-shell-page .ap-module-surface,
.ap-shell-page .ap-box {
  position: relative;
}
.ap-shell-page .ap-box + .ap-box {
  margin-top: 0;
}
.ap-shell-page .ap-section-head {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:18px;
  flex-wrap:wrap;
  padding-bottom:14px;
  margin-bottom:18px;
  border-bottom:1px solid var(--vesta-divider);
}
.ap-shell-page .ap-section-head h3,
.ap-shell-page .ap-section-head h4 {
  margin:0;
}
.ap-shell-page .ap-section-head .ap-muted {
  max-width:780px;
}
.ap-shell-page .ap-cards,
.ap-shell-page .ap-cards-3,
.ap-shell-page .ap-cards-4,
.ap-shell-page .ap-stats,
.ap-shell-page .ap-qp-grid,
.ap-shell-page .ap-grid2,
.ap-shell-page .ap-device-grid {
  display:grid;
  gap:18px;
}
.ap-shell-page .ap-cards-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.ap-shell-page .ap-cards-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.ap-shell-page .ap-qp-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
.ap-shell-page .ap-qp-span { grid-column: 1 / -1; }
.ap-shell-page .ap-form,
.ap-shell-page .ap-inline,
.ap-shell-page .ap-box form {
  display:grid;
  gap:16px;
}
.ap-shell-page .ap-inline {
  align-items:end;
}
.ap-shell-page .ap-inline > div {
  min-width:0;
}
.ap-shell-page label {
  display:grid;
  gap:8px;
  color:var(--vesta-text);
  font-size:14px;
  font-weight:600;
}
.ap-shell-page input[type="text"],
.ap-shell-page input[type="email"],
.ap-shell-page input[type="number"],
.ap-shell-page input[type="date"],
.ap-shell-page input[type="search"],
.ap-shell-page input[type="url"],
.ap-shell-page input[type="password"],
.ap-shell-page select,
.ap-shell-page textarea {
  width:100%;
  border:1px solid var(--vesta-border);
  background:#fff;
  border-radius:14px;
  min-height:48px;
  padding:12px 14px;
  color:var(--vesta-text);
  font-size:14px;
  transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.ap-shell-page textarea {
  min-height:120px;
  resize:vertical;
}
.ap-shell-page input:focus,
.ap-shell-page select:focus,
.ap-shell-page textarea:focus {
  outline:none;
  border-color: rgba(13,159,110,.55);
  box-shadow: 0 0 0 4px rgba(13,159,110,.10);
}
.ap-shell-page input[type="file"] {
  width:100%;
  border:1px dashed var(--vesta-border);
  border-radius:14px;
  background:#fbfaf7;
  padding:14px;
}
.ap-shell-page .ap-btn,
.ap-shell-page .ap-btn-secondary,
.ap-shell-page .ap-btn-danger,
.ap-shell-page .button,
.ap-shell-page button.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  min-height:44px;
  padding:0 16px;
  border-radius:14px;
  font-size:14px;
  font-weight:700;
  text-decoration:none !important;
}
.ap-shell-page .ap-btn-danger {
  background:#fff0f0;
  color:#9f1239;
  border:1px solid #fecdd3;
}
.ap-shell-page .ap-btn-danger:hover { background:#ffe4e6; }
.ap-shell-page .ap-badge,
.ap-shell-page .ap-pill,
.ap-shell-page .ap-range-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.ap-shell-page .ap-table-wrap {
  overflow:auto;
  background:#fff;
}
.ap-shell-page .ap-table {
  width:100%;
  border-collapse:separate;
  border-spacing:0;
}
.ap-shell-page .ap-table thead th {
  position:sticky;
  top:0;
  z-index:1;
}
.ap-shell-page .ap-table td {
  vertical-align:top;
}
.ap-shell-page .ap-table td .ap-btn,
.ap-shell-page .ap-table td .ap-btn-secondary,
.ap-shell-page .ap-table td .ap-btn-danger {
  min-height:36px;
  padding:0 12px;
  font-size:12px;
  border-radius:12px;
}
.ap-shell-page .ap-table td form {
  display:inline-flex;
}
.ap-shell-page .ap-box .ap-muted {
  line-height:1.65;
}
.ap-shell-page .ap-diagnostics {
  padding:14px 16px;
  border-width:1px;
  border-radius:16px;
}
.ap-shell-page .ap-device {
  background:#fcfcfb;
}
.ap-shell-page .ap-inbox-threads {
  display:grid;
  gap:14px;
}
.ap-shell-page .ap-thread-row {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  padding:18px 20px;
  border:1px solid var(--vesta-border);
  border-radius:18px;
  background:#fff;
}
.ap-shell-page .ap-thread-row:hover {
  border-color: rgba(13,159,110,.35);
  box-shadow: 0 8px 20px rgba(15,23,42,.04);
}
.ap-shell-page .ap-thread-main {
  min-width:0;
}
.ap-shell-page .ap-thread-title {
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  margin-bottom:6px;
}
.ap-shell-page .ap-thread-preview {
  overflow:hidden;
  text-overflow:ellipsis;
}
.ap-shell-page .ap-thread-header {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  flex-wrap:wrap;
  padding-bottom:14px;
  margin-bottom:18px;
  border-bottom:1px solid var(--vesta-divider);
}
.ap-shell-page .ap-thread-messages {
  display:grid;
  gap:14px;
}
.ap-shell-page .ap-msg {
  max-width:860px;
  padding:16px 18px;
  border-radius:18px;
  border:1px solid var(--vesta-border);
  background:#fff;
}
.ap-shell-page .ap-msg-me {
  margin-left:auto;
  background:linear-gradient(180deg,#f5fffb 0%, #ffffff 100%);
  border-color:rgba(13,159,110,.25);
}
.ap-shell-page .ap-msg-meta {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:8px;
}
.ap-shell-page .ap-msg-body p:last-child { margin-bottom:0; }
.ap-shell-page .ap-steps {
  display:grid;
  grid-template-columns:repeat(4, minmax(0,1fr));
  gap:12px;
}
.ap-shell-page .ap-step {
  min-height:52px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid var(--vesta-border);
  background:#fff;
  border-radius:16px;
  font-weight:700;
  color:var(--vesta-text-2);
}
.ap-shell-page .ap-step.is-active {
  border-color:rgba(13,159,110,.4);
  color:#0d9f6e;
  background:#f5fffb;
}
.ap-shell-page .ap-qp-creative {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:16px;
}
.ap-shell-page .ap-admin-workspace.ap-admin-tab--ads_actions .ap-module-surface,
.ap-shell-page .ap-admin-workspace.ap-admin-tab--quick_place .ap-module-surface,
.ap-shell-page .ap-account-settings-shell .ap-box,
.ap-shell-page .ap-order-flow-shell .ap-box,
.ap-shell-page .ap-advertiser-inbox-shell .ap-box {
  border-radius:22px;
}
.ap-shell-page .ap-admin-workspace.ap-admin-tab--ads_actions .ap-box,
.ap-shell-page .ap-admin-workspace.ap-admin-tab--quick_place .ap-box,
.ap-shell-page .ap-advertiser-workspace .ap-box,
.ap-shell-page .ap-account-settings-shell .ap-box,
.ap-shell-page .ap-order-flow-shell .ap-box {
  padding:24px;
}
.ap-shell-page .ap-admin-workspace.ap-admin-tab--quick_place .ap-module-surface--quick-place {
  background: linear-gradient(180deg,#ffffff 0%, #fcfcfb 100%);
}
.ap-shell-page .ap-admin-workspace.ap-admin-tab--quick_place .ap-module-surface--placed-ads,
.ap-shell-page .ap-admin-workspace.ap-admin-tab--ads_actions .ap-module-surface--action-menu {
  box-shadow: 0 10px 26px rgba(15,23,42,.04);
}
.ap-shell-page .ap-admin-workspace.ap-admin-tab--quick_place .ap-form > div:last-child {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.ap-shell-page .ap-admin-workspace.ap-admin-tab--quick_place .ap-table-wrap,
.ap-shell-page .ap-admin-workspace.ap-admin-tab--ads_actions .ap-table-wrap,
.ap-shell-page .ap-advertiser-workspace .ap-table-wrap {
  margin-top:4px;
}
.ap-shell-page .ap-admin-workspace.ap-admin-tab--overview .ap-box:first-of-type {
  padding-top:24px;
}
.ap-shell-page .ap-admin-workspace.ap-admin-tab--overview .ap-box .ap-box {
  background:#fff;
}
.ap-shell-page .ap-account-settings-shell .ap-form,
.ap-shell-page .ap-order-flow-shell form.ap-box,
.ap-shell-page .ap-advertiser-inbox-shell .ap-form {
  max-width:none;
}
.ap-shell-page .ap-order-flow-shell .ap-card {
  display:flex;
  gap:14px;
  align-items:flex-start;
  padding:18px;
  border-radius:18px;
  background:#fff;
  border:1px solid var(--vesta-border);
}
.ap-shell-page .ap-order-flow-shell .ap-card:hover {
  border-color: rgba(13,159,110,.35);
}
.ap-shell-page .ap-order-flow-shell .ap-card input[type="radio"] {
  margin-top:4px;
}
.ap-shell-page .ap-order-flow-shell .ap-box > h3:first-child,
.ap-shell-page .ap-admin-workspace .ap-box > h3:first-child,
.ap-shell-page .ap-advertiser-workspace .ap-box > h3:first-child {
  margin-top:0;
  margin-bottom:6px;
}
.ap-shell-page .ap-notice,
.ap-shell-page .ap-error,
.ap-shell-page .ap-dismissible {
  border-radius:16px;
  padding:16px 18px;
}
.ap-shell-page .ap-notice { border:1px solid rgba(13,159,110,.2); background:#f5fffb; }
.ap-shell-page .ap-error { border:1px solid #fecaca; background:#fff7f7; }
.ap-shell-page .ap-admin-workspace.ap-admin-tab--messages .ap-box,
.ap-shell-page .ap-admin-workspace.ap-admin-tab--emails .ap-box,
.ap-shell-page .ap-admin-workspace.ap-admin-tab--orders .ap-box,
.ap-shell-page .ap-admin-workspace.ap-admin-tab--renewals .ap-box,
.ap-shell-page .ap-admin-workspace.ap-admin-tab--invoices .ap-box,
.ap-shell-page .ap-admin-workspace.ap-admin-tab--creatives .ap-box,
.ap-shell-page .ap-admin-workspace.ap-admin-tab--slots .ap-box,
.ap-shell-page .ap-admin-workspace.ap-admin-tab--placements .ap-box {
  padding:24px;
}
.ap-shell-page .ap-admin-workspace.ap-admin-tab--orders .ap-grid2,
.ap-shell-page .ap-admin-workspace.ap-admin-tab--renewals .ap-grid2,
.ap-shell-page .ap-admin-workspace.ap-admin-tab--placements .ap-grid2,
.ap-shell-page .ap-admin-workspace.ap-admin-tab--invoices .ap-grid2,
.ap-shell-page .ap-advertiser-workspace .ap-grid2 {
  align-items:start;
}
@media (min-width: 1280px) {
  .ap-shell-page .ap-admin-workspace.ap-admin-tab--overview .ap-cards-4,
  .ap-shell-page .ap-advertiser-workspace .ap-cards-4 {
    grid-template-columns: repeat(4, minmax(0,1fr));
  }
}
@media (max-width: 1024px) {
  .ap-shell-page {
    padding: 20px;
  }
  .ap-shell-page .ap-cards-3,
  .ap-shell-page .ap-cards-4,
  .ap-shell-page .ap-qp-grid,
  .ap-shell-page .ap-grid2,
  .ap-shell-page .ap-device-grid,
  .ap-shell-page .ap-steps,
  .ap-shell-page .ap-qp-creative {
    grid-template-columns:1fr 1fr;
  }
}
@media (max-width: 767px) {
  .ap-shell-page {
    padding: 14px;
  }
  .ap-shell-page .ap-hero-row,
  .ap-shell-page .ap-section-head,
  .ap-shell-page .ap-thread-row,
  .ap-shell-page .ap-thread-header,
  .ap-shell-page .ap-msg-meta {
    grid-template-columns:none;
    flex-direction:column;
    align-items:stretch;
  }
  .ap-shell-page .ap-cards-3,
  .ap-shell-page .ap-cards-4,
  .ap-shell-page .ap-qp-grid,
  .ap-shell-page .ap-grid2,
  .ap-shell-page .ap-device-grid,
  .ap-shell-page .ap-steps,
  .ap-shell-page .ap-qp-creative {
    grid-template-columns:1fr;
  }
  .ap-shell-page .ap-table { min-width: 720px; }
  .ap-shell-page .ap-hero-actions,
  .ap-shell-page .ap-admin-workspace.ap-admin-tab--quick_place .ap-form > div:last-child {
    width:100%;
  }
  .ap-shell-page .ap-hero-actions > *,
  .ap-shell-page .ap-admin-workspace.ap-admin-tab--quick_place .ap-form > div:last-child > * {
    width:100%;
  }
}

/* ===== Density rebuild: compact shell + internal pages ===== */
:root {
  --ap-density-text: 14px;
  --ap-density-text-sm: 13px;
  --ap-density-title: 16px;
  --ap-density-h1: 22px;
  --ap-density-h2: 18px;
  --ap-density-h3: 16px;
}

body.ap-shell-body,
body.ap-shell-body .vesta-app-shell,
body.ap-shell-body .vesta-page-shell,
body.ap-shell-body .ap-wrap-frontend,
body.ap-shell-body .ap-shell-page {
  font-size: var(--ap-density-text) !important;
  line-height: 1.45;
}

body.ap-shell-body .vesta-sidebar {
  width: 280px;
  padding: 16px 14px 18px;
}
body.ap-shell-body .vesta-app-shell__main {
  margin-left: 280px;
}
body.ap-shell-body .vesta-sidebar__brand {
  gap: 10px;
  padding: 4px 8px 16px;
  margin-bottom: 10px;
}
body.ap-shell-body .vesta-sidebar__logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  font-size: 18px;
}
body.ap-shell-body .vesta-sidebar__brand-copy strong {
  font-size: 13px;
  line-height: 1.2;
}
body.ap-shell-body .vesta-sidebar__brand-copy span {
  font-size: 11px;
  margin-top: 3px;
}
body.ap-shell-body .vesta-sidebar__group {
  margin-bottom: 18px;
}
body.ap-shell-body .vesta-sidebar__group-label {
  padding: 8px 10px 8px;
  font-size: 10px;
  letter-spacing: .14em;
}
body.ap-shell-body .vesta-sidebar__nav {
  gap: 4px;
}
body.ap-shell-body .vesta-sidebar__item,
body.ap-shell-body .vesta-sidebar__item:link,
body.ap-shell-body .vesta-sidebar__item:visited,
body.ap-shell-body .vesta-sidebar__item:hover,
body.ap-shell-body .vesta-sidebar__item:focus,
body.ap-shell-body .vesta-sidebar__item:active {
  min-height: 40px;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
}
body.ap-shell-body .vesta-sidebar__label {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
}
body.ap-shell-body .vesta-sidebar .vesta-icon,
body.ap-shell-body .vesta-sidebar .vesta-icon--sidebar {
  width: 17px;
  height: 17px;
}
body.ap-shell-body .vesta-app-shell.is-sidebar-collapsed .vesta-sidebar {
  width: 76px;
}
body.ap-shell-body .vesta-app-shell.is-sidebar-collapsed .vesta-app-shell__main {
  margin-left: 76px;
}

body.ap-shell-body .vesta-topbar {
  min-height: 60px;
  padding: 0 20px;
}
body.ap-shell-body .vesta-topbar__row--main {
  min-height: 60px;
  gap: 14px;
}
body.ap-shell-body .vesta-topbar__left,
body.ap-shell-body .vesta-topbar__right {
  gap: 10px;
}
body.ap-shell-body .vesta-icon-button {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
body.ap-shell-body .vesta-breadcrumb {
  font-size: 11px;
  color: var(--vesta-text-2);
  line-height: 1.15;
}
body.ap-shell-body .vesta-topbar__title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}
body.ap-shell-body .vesta-search {
  height: 40px;
  padding: 0 12px;
  gap: 8px;
}
body.ap-shell-body .vesta-search input {
  font-size: 13px;
}
body.ap-shell-body .vesta-topbar__create,
body.ap-shell-body .vesta-button {
  min-height: 40px;
  border-radius: 14px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
}
body.ap-shell-body .vesta-user-chip {
  min-height: 40px;
  padding: 0 12px 0 8px;
  border-radius: 999px;
}
body.ap-shell-body .vesta-user-chip__avatar {
  width: 28px;
  height: 28px;
  font-size: 12px;
}
body.ap-shell-body .vesta-user-chip__label {
  font-size: 13px;
}

body.ap-shell-body .vesta-page-shell {
  padding: 20px;
}
body.ap-shell-body .ap-shell-page .ap-wrap-frontend {
  --ap-gap: 14px;
  --ap-radius: 16px;
  --ap-radius-sm: 12px;
}
body.ap-shell-body .ap-shell-page .ap-hero {
  margin: 0 0 14px;
  padding: 22px 24px;
  border-radius: 18px;
}
body.ap-shell-body .ap-shell-page .ap-hero h1,
body.ap-shell-body .ap-shell-page .ap-hero h2,
body.ap-shell-body .ap-shell-page h1,
body.ap-shell-body .ap-shell-page h2 {
  font-size: var(--ap-density-h1) !important;
  line-height: 1.2;
  letter-spacing: -.02em;
  margin-bottom: 6px !important;
}
body.ap-shell-body .ap-shell-page h3,
body.ap-shell-body .ap-shell-page .ap-section-head h3,
body.ap-shell-body .ap-shell-page .ap-box h3 {
  font-size: var(--ap-density-h3) !important;
  line-height: 1.25;
}
body.ap-shell-body .ap-shell-page p,
body.ap-shell-body .ap-shell-page .ap-muted,
body.ap-shell-body .ap-shell-page label,
body.ap-shell-body .ap-shell-page td,
body.ap-shell-body .ap-shell-page th,
body.ap-shell-body .ap-shell-page input,
body.ap-shell-body .ap-shell-page select,
body.ap-shell-body .ap-shell-page textarea,
body.ap-shell-body .ap-shell-page button {
  font-size: var(--ap-density-text-sm) !important;
}
body.ap-shell-body .ap-shell-page .ap-hero-actions {
  gap: 8px;
}
body.ap-shell-body .ap-shell-page .ap-range-btn,
body.ap-shell-body .ap-shell-page .ap-pill,
body.ap-shell-body .ap-shell-page .ap-btn,
body.ap-shell-body .ap-shell-page .ap-btn-secondary,
body.ap-shell-body .ap-shell-page .ap-tab,
body.ap-shell-body .ap-shell-page .button,
body.ap-shell-body .ap-shell-page button.button {
  min-height: 36px;
  padding: 0 14px;
  border-radius: 12px;
  font-size: 13px !important;
}
body.ap-shell-body .ap-shell-page .ap-cards,
body.ap-shell-body .ap-shell-page .ap-stats,
body.ap-shell-body .ap-shell-page .ap-grid2,
body.ap-shell-body .ap-shell-page .ap-device-grid {
  gap: 14px;
}
body.ap-shell-body .ap-shell-page .ap-box,
body.ap-shell-body .ap-shell-page .ap-card,
body.ap-shell-body .ap-shell-page .ap-stat {
  border-radius: 16px;
}
body.ap-shell-body .ap-shell-page .ap-box {
  padding: 18px;
  margin-bottom: 14px;
}
body.ap-shell-body .ap-shell-page .ap-stat {
  min-height: 96px;
  padding: 16px 18px;
}
body.ap-shell-body .ap-shell-page .ap-stat-num,
body.ap-shell-body .ap-shell-page .ap-stat__num,
body.ap-shell-body .ap-shell-page .ap-card .ap-card-value {
  font-size: 24px !important;
  line-height: 1.1;
}
body.ap-shell-body .ap-shell-page .ap-card .ap-card-title,
body.ap-shell-body .ap-shell-page .ap-stat .ap-muted {
  font-size: 12px !important;
}
body.ap-shell-body .ap-shell-page .ap-inline input[type="date"],
body.ap-shell-body .ap-shell-page .ap-inline input[type="text"],
body.ap-shell-body .ap-shell-page .ap-inline input[type="number"],
body.ap-shell-body .ap-shell-page .ap-box input[type="text"],
body.ap-shell-body .ap-shell-page .ap-box input[type="email"],
body.ap-shell-body .ap-shell-page .ap-box input[type="number"],
body.ap-shell-body .ap-shell-page .ap-box input[type="date"],
body.ap-shell-body .ap-shell-page .ap-box select,
body.ap-shell-body .ap-shell-page .ap-box textarea {
  min-height: 40px;
  padding: 0 12px;
  border-radius: 10px;
}
body.ap-shell-body .ap-shell-page .ap-box textarea {
  min-height: 96px;
  padding: 12px;
}
body.ap-shell-body .ap-shell-page .ap-table-wrap {
  border-radius: 14px;
}
body.ap-shell-body .ap-shell-page .ap-table {
  min-width: 760px;
}
body.ap-shell-body .ap-shell-page .ap-table th,
body.ap-shell-body .ap-shell-page .ap-table td {
  padding: 12px 14px;
  font-size: 12.5px !important;
}
body.ap-shell-body .ap-shell-page .ap-table th {
  font-size: 11px !important;
  letter-spacing: .03em;
}
body.ap-shell-body .ap-shell-page .ap-device {
  border-radius: 14px;
  padding: 14px;
}
body.ap-shell-body .ap-shell-page .ap-login-wrap,
body.ap-shell-body .ap-shell-page .ap-auth-card {
  max-width: 460px;
  padding: 24px;
}

@media (max-width: 1023px) {
  body.ap-shell-body .vesta-app-shell__main {
    margin-left: 0;
  }
  body.ap-shell-body .vesta-page-shell {
    padding: 16px;
  }
}

@media (max-width: 767px) {
  body.ap-shell-body .vesta-topbar {
    padding: var(--vesta-mobile-safe-top) 12px 0;
  }
  body.ap-shell-body .vesta-page-shell {
    padding: 12px;
  }
  body.ap-shell-body .ap-shell-page .ap-hero {
    padding: 18px 16px;
  }
  body.ap-shell-body .ap-shell-page .ap-box {
    padding: 16px;
  }
}


/* Auth pages live outside the app shell */
.ap-auth-body{background:#f5f7fb !important;font-family:"Inter",sans-serif !important;}
.ap-auth-shell{min-height:100vh;display:flex;align-items:flex-start;justify-content:center;padding:48px 24px;}
.ap-auth-shell__main{width:100%;max-width:1120px;}
.ap-auth-shell__card{background:#fff;border:1px solid #dde4ee;border-radius:24px;padding:28px 32px;box-shadow:0 12px 34px rgba(16,24,40,.05);}
.ap-auth-body .entry-title,.ap-auth-body .site-header,.ap-auth-body .site-footer,.ap-auth-body .vesta-sidebar,.ap-auth-body .vesta-topbar{display:none !important;}
.ap-auth-body .ap-wrap-frontend{max-width:none;margin:0;padding:0;}
.ap-auth-body .ap-box{background:transparent;border:0;padding:0;box-shadow:none;}
.ap-auth-body h2{font-size:20px;line-height:1.25;margin:0 0 20px;}
.ap-auth-body .ap-grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px;}
.ap-auth-body label{display:block;font-size:13px;font-weight:600;color:#0f172a;margin-bottom:8px;}
.ap-auth-body input[type="text"],.ap-auth-body input[type="password"],.ap-auth-body input[type="email"],.ap-auth-body input[type="tel"],.ap-auth-body textarea,.ap-auth-body select{width:100%;min-height:46px;border:1px solid #d7deea;border-radius:14px;padding:10px 14px;font-size:14px;}
.ap-auth-body .ap-btn{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:0 18px;border-radius:14px;background:#0f172a;color:#fff;text-decoration:none;border:0;font-weight:600;}
.ap-auth-body .ap-btn-secondary{background:#fff;color:#0f172a;border:1px solid #d7deea;}
@media (max-width: 800px){.ap-auth-shell{padding:20px 14px}.ap-auth-shell__card{padding:20px}.ap-auth-body .ap-grid2{grid-template-columns:1fr;}}
