:root {
  --aap-black: #080808;
  --aap-cyan: #08a9e9;
  --aap-pink: #ed168c;
  --aap-yellow: #f4cf00;
  --aap-green: #20a763;
  --aap-bg: #f1f2f4;
  --aap-border: #e1e3e7;
  --aap-muted: #6c727c;
  --aap-radius: 20px;
}

.aap-portal-page .site-header,
.aap-portal-page .site-footer,
.aap-portal-page .entry-header,
.aap-portal-page .page-header,
.aap-portal-page #comments {
  display: none !important;
}

.aap-portal-page,
.aap-portal-page #page,
.aap-portal-page .site-main,
.aap-portal-page .site-content,
.aap-portal-page .content-area,
.aap-portal-page article,
.aap-portal-page .entry-content {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.aap-app,
.aap-login-screen,
.aap-public-quote-shell,
.aap-access-card {
  box-sizing: border-box;
  color: #151515;
  font-family: Arial, Helvetica, sans-serif;
}

.aap-app *,
.aap-login-screen *,
.aap-public-quote-shell *,
.aap-access-card * {
  box-sizing: border-box;
}

.aap-app a,
.aap-login-screen a,
.aap-public-quote-shell a {
  text-decoration: none;
}

.aap-app {
  min-height: 100vh;
  background: var(--aap-bg);
}

.aap-app-header {
  min-height: 94px;
  padding: 14px clamp(18px, 4vw, 54px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #fff;
  border-bottom: 1px solid var(--aap-border);
  position: sticky;
  top: 0;
  z-index: 30;
}

.aap-app-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--aap-black);
}

.aap-app-brand img {
  width: 154px;
  height: 62px;
  object-fit: contain;
}

.aap-app-brand > span,
.aap-app-user > span:not(.aap-user-avatar) {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.aap-app-brand strong {
  font-size: 17px;
}

.aap-app-brand small,
.aap-app-user small {
  margin-top: 3px;
  color: var(--aap-muted);
  font-size: 12px;
}

.aap-app-user {
  display: flex;
  align-items: center;
  gap: 10px;
}

.aap-app-user > a {
  margin-left: 12px;
  padding: 10px 14px;
  color: #444;
  border: 1px solid var(--aap-border);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.aap-user-avatar,
.aap-customer-avatar {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  border-radius: 14px;
  background: var(--aap-black);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.aap-app-main {
  width: min(1440px, calc(100% - 36px));
  margin: 0 auto;
  padding: 42px 0 70px;
}

.aap-page-heading,
.aap-enquiry-heading {
  margin-bottom: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.aap-page-heading h1,
.aap-enquiry-heading h1 {
  margin: 5px 0 8px;
  color: var(--aap-black);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.aap-page-heading p,
.aap-enquiry-heading p,
.aap-panel-head p,
.aap-form-intro p {
  margin: 0;
  color: var(--aap-muted);
  font-size: 14px;
  line-height: 1.55;
}

.aap-eyebrow {
  display: inline-block;
  color: var(--aap-cyan);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.aap-btn {
  min-height: 46px;
  padding: 12px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.aap-btn:hover {
  transform: translateY(-1px);
}

.aap-btn-dark {
  background: var(--aap-black);
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
}

.aap-btn-dark:hover {
  background: var(--aap-pink);
}

.aap-btn-light {
  background: #fff;
  color: var(--aap-black) !important;
  border-color: var(--aap-border);
}

.aap-btn-accept {
  background: var(--aap-green);
  color: #fff !important;
}

.aap-stat-grid {
  margin-bottom: 28px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.aap-stat-card {
  min-height: 148px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  color: #fff !important;
  border-radius: var(--aap-radius);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .08);
  transition: transform .2s ease, box-shadow .2s ease;
}

.aap-stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, .14);
}

.aap-stat-card span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.aap-stat-card strong {
  margin: 12px 0 auto;
  font-size: 38px;
  line-height: 1;
}

.aap-stat-card small {
  opacity: .84;
  font-size: 11px;
  font-weight: 700;
}

.aap-stat-cyan { background: var(--aap-cyan); }
.aap-stat-pink { background: var(--aap-pink); }
.aap-stat-yellow { background: var(--aap-yellow); color: var(--aap-black) !important; }
.aap-stat-black { background: var(--aap-black); }
.aap-stat-green { background: var(--aap-green); }

.aap-panel {
  margin: 0 0 20px;
  background: #fff;
  border: 1px solid var(--aap-border);
  border-radius: var(--aap-radius);
  box-shadow: 0 8px 24px rgba(18, 23, 30, .045);
  overflow: hidden;
}

.aap-panel-head {
  min-height: 78px;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--aap-border);
}

.aap-panel-head h2,
.aap-form-intro h3 {
  margin: 0 0 4px;
  font-size: 19px;
  line-height: 1.2;
}

.aap-search {
  display: flex;
  align-items: center;
  gap: 7px;
}

.aap-search input {
  width: min(320px, 36vw);
  min-height: 42px;
  padding: 0 14px;
  background: #f7f7f8;
  border: 1px solid var(--aap-border);
  border-radius: 12px;
  font: inherit;
  font-size: 13px;
}

.aap-search button,
.aap-status-form button {
  min-height: 42px;
  padding: 0 16px;
  background: var(--aap-black);
  color: #fff;
  border: 0;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.aap-search a {
  padding: 10px;
  color: var(--aap-muted);
  font-size: 12px;
  font-weight: 700;
}

.aap-table-wrap {
  overflow-x: auto;
}

.aap-enquiries-table {
  width: 100%;
  border-collapse: collapse;
}

.aap-enquiries-table th {
  padding: 13px 20px;
  background: #fafafa;
  color: #777;
  border-bottom: 1px solid var(--aap-border);
  font-size: 10px;
  letter-spacing: .09em;
  text-align: left;
  text-transform: uppercase;
}

.aap-enquiries-table td {
  padding: 16px 20px;
  color: #34383e;
  border-bottom: 1px solid #ededee;
  font-size: 13px;
  vertical-align: middle;
}

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

.aap-enquiries-table tbody tr:hover {
  background: #fbfbfb;
}

.aap-customer {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--aap-black) !important;
}

.aap-customer > span:last-child,
.aap-enquiries-table td:nth-child(3) {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.aap-customer strong {
  font-size: 13px;
}

.aap-customer small,
.aap-enquiries-table td small {
  color: #858a92;
  font-size: 11px;
}

.aap-row-open {
  color: var(--aap-pink) !important;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.aap-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f1f2f4;
  color: #4b5058;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}

.aap-status i {
  width: 7px;
  height: 7px;
  background: #9297a0;
  border-radius: 50%;
}

.aap-status-new { background: #e5f7fd; color: #087ba9; }
.aap-status-new i { background: var(--aap-cyan); }
.aap-status-in_progress { background: #fff0f8; color: #a41263; }
.aap-status-in_progress i { background: var(--aap-pink); }
.aap-status-awaiting_customer { background: #fff9dd; color: #756100; }
.aap-status-awaiting_customer i { background: var(--aap-yellow); }
.aap-status-quote_sent { background: #eee; color: #111; }
.aap-status-quote_sent i { background: #111; }
.aap-status-won { background: #e8f8ef; color: #177b49; }
.aap-status-won i { background: var(--aap-green); }

.aap-pagination {
  padding: 20px;
  display: flex;
  justify-content: center;
  gap: 6px;
  border-top: 1px solid var(--aap-border);
}

.aap-pagination a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #555;
  border: 1px solid var(--aap-border);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.aap-pagination a.is-current {
  background: var(--aap-black);
  color: #fff;
  border-color: var(--aap-black);
}

.aap-empty,
.aap-panel-empty {
  padding: 50px 24px;
  text-align: center;
  color: var(--aap-muted);
}

.aap-empty > span {
  display: block;
  color: var(--aap-yellow);
  font-size: 48px;
}

.aap-empty h3 {
  margin: 10px 0 5px;
  color: var(--aap-black);
}

.aap-back {
  margin-bottom: 22px;
  display: inline-block;
  color: #555 !important;
  font-size: 12px;
  font-weight: 800;
}

.aap-enquiry-heading {
  padding: 24px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--aap-border);
  border-radius: var(--aap-radius);
}

.aap-enquiry-title {
  display: flex;
  align-items: center;
  gap: 17px;
}

.aap-avatar-large {
  width: 62px;
  height: 62px;
  flex-basis: 62px;
  background: var(--aap-cyan);
  border-radius: 20px;
  font-size: 25px;
}

.aap-enquiry-heading h1 {
  margin: 3px 0;
  font-size: 30px;
}

.aap-status-form label {
  display: block;
  margin-bottom: 6px;
  color: #6d7279;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.aap-status-form > div {
  display: flex;
  gap: 7px;
}

.aap-status-form select {
  min-width: 180px;
  min-height: 42px;
  padding: 0 36px 0 12px;
  background: #f7f7f8;
  border: 1px solid var(--aap-border);
  border-radius: 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.aap-detail-grid {
  display: grid;
  grid-template-columns: minmax(280px, 350px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.aap-detail-sidebar {
  position: sticky;
  top: 114px;
}

.aap-contact-panel dl {
  margin: 0;
  padding: 8px 24px 22px;
}

.aap-contact-panel dt {
  margin-top: 16px;
  color: #858a92;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.aap-contact-panel dd {
  margin: 5px 0 0;
  color: var(--aap-black);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.aap-contact-panel dd a {
  color: var(--aap-cyan) !important;
  font-weight: 700;
}

.aap-brief-meta {
  padding: 18px 24px 8px;
  display: grid;
  gap: 13px;
}

.aap-brief-meta span {
  color: #444;
  font-size: 12px;
}

.aap-brief-meta strong {
  display: block;
  margin-bottom: 3px;
  color: #858a92;
  font-size: 10px;
  text-transform: uppercase;
}

.aap-project-message {
  margin: 12px 24px 24px;
  padding: 16px;
  background: #f7f7f8;
  border-left: 4px solid var(--aap-pink);
  border-radius: 10px;
  color: #34383e;
  font-size: 13px;
  line-height: 1.65;
}

.aap-action-panel {
  overflow: visible;
}

.aap-tabs {
  padding: 8px;
  display: flex;
  gap: 5px;
  background: #f6f6f7;
  border-bottom: 1px solid var(--aap-border);
  border-radius: var(--aap-radius) var(--aap-radius) 0 0;
}

.aap-tabs button {
  padding: 12px 16px;
  background: transparent;
  color: #666;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.aap-tabs button.is-active {
  background: #fff;
  color: var(--aap-black);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .07);
}

.aap-tab-panel {
  display: none;
}

.aap-tab-panel.is-active {
  display: block;
}

.aap-form {
  padding: 26px;
}

.aap-form-intro {
  margin-bottom: 22px;
}

.aap-form label {
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  color: #4b5058;
  font-size: 11px;
  font-weight: 800;
}

.aap-form input,
.aap-form textarea,
.aap-form select {
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  color: #171717;
  border: 1px solid #dcdfe3;
  border-radius: 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 400;
  outline: none;
}

.aap-form input:focus,
.aap-form textarea:focus,
.aap-form select:focus {
  border-color: var(--aap-cyan);
  box-shadow: 0 0 0 3px rgba(8, 169, 233, .11);
}

.aap-form textarea {
  resize: vertical;
  line-height: 1.55;
}

.aap-form-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.aap-line-items {
  margin: 18px 0;
  overflow-x: auto;
}

.aap-line-head,
.aap-line-row {
  min-width: 690px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 74px 120px 100px 34px;
  gap: 8px;
  align-items: center;
}

.aap-line-head {
  padding: 0 8px 8px;
  color: #858a92;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.aap-line-row {
  margin-bottom: 7px;
  padding: 8px;
  background: #f7f7f8;
  border-radius: 12px;
}

.aap-line-row input {
  padding: 10px;
  background: #fff;
}

.aap-line-row strong {
  font-size: 12px;
  text-align: right;
}

.aap-line-row button {
  width: 30px;
  height: 30px;
  background: #fff0f5;
  color: var(--aap-pink);
  border: 0;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
}

.aap-add-line {
  padding: 9px 13px;
  background: #fff;
  color: var(--aap-cyan);
  border: 1px dashed var(--aap-cyan);
  border-radius: 10px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.aap-quote-totals {
  margin: 4px 0 20px auto;
  width: min(100%, 390px);
  padding: 14px 18px;
  display: grid;
  gap: 9px;
  background: #f7f7f8;
  border-radius: 14px;
}

.aap-quote-totals span {
  display: flex;
  justify-content: space-between;
  color: #666;
  font-size: 12px;
}

.aap-quote-totals .aap-grand-total {
  margin-top: 4px;
  padding-top: 12px;
  color: var(--aap-black);
  border-top: 1px solid #ddd;
  font-size: 15px;
  font-weight: 900;
}

.aap-quote-totals .aap-grand-total strong {
  color: var(--aap-pink);
  font-size: 19px;
}

.aap-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 9px;
}

.aap-quote-list {
  padding: 14px;
  display: grid;
  gap: 8px;
}

.aap-quote-card {
  padding: 13px 14px;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) auto auto auto;
  align-items: center;
  gap: 14px;
  background: #f7f7f8;
  border-radius: 13px;
}

.aap-quote-card > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.aap-quote-card small {
  color: #858a92;
  font-size: 10px;
}

.aap-quote-status {
  padding: 6px 9px;
  display: inline-flex;
  border-radius: 999px;
  background: #eceef1;
  color: #555;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.aap-quote-sent { background: #e5f7fd; color: #087ba9; }
.aap-quote-accepted { background: #e8f8ef; color: #177b49; }
.aap-quote-declined { background: #fff0f5; color: #a41263; }

.aap-quote-total {
  font-size: 15px;
}

.aap-quote-actions {
  display: flex;
  gap: 6px;
}

.aap-quote-actions a {
  padding: 7px 9px;
  background: #fff;
  color: #333 !important;
  border: 1px solid var(--aap-border);
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
}

.aap-timeline {
  padding: 22px 24px;
}

.aap-timeline-item {
  position: relative;
  padding: 0 0 25px 30px;
  border-left: 2px solid #e5e6e8;
}

.aap-timeline-item:last-child {
  padding-bottom: 0;
  border-left-color: transparent;
}

.aap-timeline-dot {
  width: 13px;
  height: 13px;
  position: absolute;
  left: -7px;
  top: 2px;
  background: var(--aap-cyan);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--aap-cyan);
}

.aap-event-quote_sent .aap-timeline-dot,
.aap-event-quote_saved .aap-timeline-dot { background: var(--aap-pink); box-shadow: 0 0 0 1px var(--aap-pink); }
.aap-event-internal_note .aap-timeline-dot { background: var(--aap-yellow); box-shadow: 0 0 0 1px var(--aap-yellow); }
.aap-event-quote_accepted .aap-timeline-dot { background: var(--aap-green); box-shadow: 0 0 0 1px var(--aap-green); }

.aap-timeline-item header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.aap-timeline-item header strong {
  font-size: 13px;
}

.aap-timeline-item time,
.aap-timeline-item small {
  color: #858a92;
  font-size: 10px;
}

.aap-event-body {
  margin: 8px 0;
  padding: 12px;
  background: #f7f7f8;
  border-radius: 10px;
  color: #4a4f57;
  font-size: 12px;
  line-height: 1.6;
}

.aap-notice {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 800;
}

.aap-notice-success {
  background: #e8f8ef;
  color: #177b49;
  border: 1px solid #b9e7cd;
}

.aap-notice-error {
  background: #fff0f5;
  color: #a41263;
  border: 1px solid #f2bfd3;
}

.aap-login-screen {
  min-height: 100vh;
  padding: 35px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 15% 20%, rgba(8,169,233,.15), transparent 25%), radial-gradient(circle at 85% 75%, rgba(237,22,140,.13), transparent 25%), #eceef1;
}

.aap-login-card {
  width: min(100%, 480px);
  padding: 0 44px 42px;
  background: #fff;
  border-radius: 25px;
  box-shadow: 0 25px 70px rgba(0,0,0,.13);
  overflow: hidden;
}

.aap-colour-stripe {
  margin: 0 -44px 28px;
  height: 9px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.aap-colour-stripe span:nth-child(1) { background: var(--aap-cyan); }
.aap-colour-stripe span:nth-child(2) { background: var(--aap-pink); }
.aap-colour-stripe span:nth-child(3) { background: var(--aap-yellow); }

.aap-login-logo {
  width: 250px;
  height: 116px;
  display: block;
  margin: 0 auto 12px;
  object-fit: contain;
}

.aap-login-card h1 {
  margin: 8px 0;
  color: var(--aap-black);
  font-size: 31px;
  line-height: 1.1;
  text-align: center;
}

.aap-login-card > p,
.aap-login-card > .aap-eyebrow {
  display: block;
  text-align: center;
}

.aap-login-card > p {
  margin: 0 0 24px;
  color: var(--aap-muted);
  font-size: 13px;
  line-height: 1.6;
}

.aap-login-card form p {
  margin: 0 0 15px;
}

.aap-login-card form label {
  display: block;
  margin-bottom: 6px;
  color: #444;
  font-size: 11px;
  font-weight: 800;
}

.aap-login-card .input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--aap-border);
  border-radius: 12px;
  font: inherit;
}

.aap-login-card .login-remember label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.aap-login-card #wp-submit {
  width: 100%;
  min-height: 50px;
  background: var(--aap-black);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
}

.aap-forgot {
  display: block;
  margin-top: 16px;
  color: var(--aap-pink) !important;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
}

.aap-access-card {
  margin: 80px auto;
  max-width: 560px;
  padding: 40px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(0,0,0,.1);
  text-align: center;
}

.aap-public-quote-shell {
  min-height: 100vh;
  padding: 40px 18px;
  background: #eceef1;
}

.aap-public-quote {
  width: min(100%, 920px);
  margin: 0 auto;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,.12);
  overflow: hidden;
}

.aap-public-quote > .aap-colour-stripe {
  margin: 0;
}

.aap-public-quote > header {
  padding: 24px 35px;
  border-bottom: 1px solid var(--aap-border);
}

.aap-public-quote > header img {
  width: 230px;
  height: 100px;
  object-fit: contain;
}

.aap-public-quote > .aap-notice {
  margin: 20px 35px 0;
}

.aap-public-heading,
.aap-public-intro,
.aap-public-table,
.aap-public-terms,
.aap-decision-form,
.aap-quote-missing {
  margin-left: 35px;
  margin-right: 35px;
}

.aap-public-heading {
  padding: 32px 0 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.aap-public-heading h1 {
  margin: 5px 0;
  font-size: clamp(26px, 5vw, 42px);
  line-height: 1.08;
}

.aap-public-heading p,
.aap-public-intro,
.aap-public-terms {
  color: var(--aap-muted);
  font-size: 14px;
  line-height: 1.7;
}

.aap-public-table {
  overflow-x: auto;
}

.aap-public-table table {
  width: 100%;
  border-collapse: collapse;
}

.aap-public-table th {
  padding: 13px;
  background: var(--aap-black);
  color: #fff;
  font-size: 10px;
  text-align: left;
  text-transform: uppercase;
}

.aap-public-table td {
  padding: 14px 13px;
  border-bottom: 1px solid var(--aap-border);
  font-size: 13px;
}

.aap-public-table td:not(:first-child),
.aap-public-table th:not(:first-child) {
  text-align: right;
}

.aap-public-summary {
  width: min(420px, calc(100% - 70px));
  margin: 20px 35px 30px auto;
  display: grid;
  gap: 9px;
}

.aap-public-summary span {
  display: flex;
  justify-content: space-between;
  color: #666;
  font-size: 13px;
}

.aap-public-summary .aap-public-total {
  margin-top: 5px;
  padding: 14px;
  background: var(--aap-pink);
  color: #fff;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 900;
}

.aap-public-terms {
  padding: 20px 0;
  border-top: 1px solid var(--aap-border);
}

.aap-public-terms h2 {
  color: var(--aap-black);
  font-size: 18px;
}

.aap-decision-form {
  margin-top: 10px;
  margin-bottom: 35px;
  padding: 24px;
  background: #f7f7f8;
  border-radius: 16px;
  text-align: center;
}

.aap-decision-form p {
  margin: 0 0 14px;
  font-weight: 900;
}

.aap-decision-form > div {
  display: flex;
  justify-content: center;
  gap: 9px;
}

.aap-trap {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  clip: rect(0,0,0,0) !important;
  overflow: hidden !important;
}

.aap-public-quote > footer {
  padding: 22px 35px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  background: var(--aap-black);
  color: #fff;
  font-size: 12px;
}

.aap-quote-missing {
  padding: 50px 0;
  text-align: center;
}

@media (max-width: 1080px) {
  .aap-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .aap-detail-grid { grid-template-columns: 280px minmax(0, 1fr); }
  .aap-detail-sidebar { position: static; }
}

@media (max-width: 820px) {
  .aap-app-header { position: static; }
  .aap-app-brand > span,
  .aap-app-user > span:not(.aap-user-avatar) { display: none; }
  .aap-page-heading,
  .aap-enquiry-heading { align-items: stretch; flex-direction: column; }
  .aap-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aap-detail-grid { grid-template-columns: 1fr; }
  .aap-panel-head { align-items: stretch; flex-direction: column; }
  .aap-search input { width: 100%; }
  .aap-form-row { grid-template-columns: 1fr; }
  .aap-enquiries-table thead { display: none; }
  .aap-enquiries-table,
  .aap-enquiries-table tbody,
  .aap-enquiries-table tr,
  .aap-enquiries-table td { display: block; width: 100%; }
  .aap-enquiries-table tr { padding: 12px 16px; border-bottom: 1px solid var(--aap-border); }
  .aap-enquiries-table td { padding: 7px 0; border: 0; }
  .aap-enquiries-table td[data-label]::before { content: attr(data-label); display: block; margin-bottom: 4px; color: #93979e; font-size: 9px; font-weight: 900; text-transform: uppercase; }
  .aap-quote-card { grid-template-columns: 1fr auto; }
  .aap-quote-actions { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .aap-app-header { min-height: 78px; padding: 9px 13px; }
  .aap-app-brand img { width: 110px; height: 50px; }
  .aap-app-user > a { margin-left: 0; padding: 8px 10px; }
  .aap-app-main { width: min(100% - 22px, 1440px); padding-top: 24px; }
  .aap-stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .aap-stat-card { min-height: 125px; padding: 15px; }
  .aap-stat-card strong { font-size: 31px; }
  .aap-page-heading .aap-btn { width: 100%; }
  .aap-search { flex-wrap: wrap; }
  .aap-search input { flex: 1 1 100%; }
  .aap-enquiry-heading { padding: 18px; }
  .aap-enquiry-title { align-items: flex-start; }
  .aap-avatar-large { width: 50px; height: 50px; flex-basis: 50px; }
  .aap-status-form > div { width: 100%; }
  .aap-status-form select { min-width: 0; flex: 1; }
  .aap-tabs { overflow-x: auto; }
  .aap-tabs button { white-space: nowrap; }
  .aap-form { padding: 20px 16px; }
  .aap-form-actions { flex-direction: column; }
  .aap-form-actions .aap-btn { width: 100%; }
  .aap-login-card { padding: 0 24px 30px; }
  .aap-colour-stripe { margin-left: -24px; margin-right: -24px; }
  .aap-public-quote-shell { padding: 12px; }
  .aap-public-quote { border-radius: 17px; }
  .aap-public-heading,
  .aap-public-intro,
  .aap-public-table,
  .aap-public-terms,
  .aap-decision-form,
  .aap-quote-missing { margin-left: 18px; margin-right: 18px; }
  .aap-public-quote > header { padding: 18px; }
  .aap-public-heading { flex-direction: column; }
  .aap-public-summary { width: calc(100% - 36px); margin-right: 18px; }
  .aap-decision-form > div { flex-direction: column; }
  .aap-public-quote > footer { padding: 18px; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .aap-btn,
  .aap-stat-card { transition: none; }
}
