:root {
  --navy-900: #1a2f4a;
  --navy-800: #1e3856;
  --navy-700: #234463;
  --blue-600: #235a86;
  --blue-500: #3572a0;
  --blue-100: #e7eef4;
  --brand-gradient: linear-gradient(135deg, #1a2f4a, #235a86);
  --ink: #1a2433;
  --gray-500: #667085;
  --gray-200: #e2e6ec;
  --gray-100: #f4f6f9;
  --white: #ffffff;
  --red-600: #c02b2b;
  --red-50: #fdecec;
  --radius: 10px;
  --shadow: 0 20px 50px rgba(10, 30, 60, 0.25);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
}

a {
  color: inherit;
}

/* ---------- Login page ---------- */

.login-page {
  height: 100vh;
  margin: 0;
  overflow: hidden;
  background: var(--white);
}

.login-split {
  display: flex;
  height: 100%;
}

.login-panel {
  flex: 1 1 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 12px 4px;
}

.login-image-panel {
  position: relative;
  flex: 1 1 50%;
  overflow: hidden;
}

.login-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.login-image-panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(26, 47, 74, 0.65), rgba(35, 90, 134, 0.35));
}

.brand {
  text-align: center;
  margin-bottom: 28px;
}

.brand-logo {
  display: block;
  max-width: 220px;
  width: 100%;
  height: auto;
  margin: 0 auto 14px;
  border-radius: 6px;
}

.brand-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy-800);
  letter-spacing: 0.2px;
}

.brand-subtitle {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-600);
  text-transform: uppercase;
  letter-spacing: 1.2px;
}

.login-card .brand-subtitle {
  font-size: 15px;
}

@media (max-width: 900px) {
  .login-page {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .login-split {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  .login-panel {
    padding: 40px 24px 24px;
    overflow-y: visible;
  }

  .login-image-panel {
    flex: none;
    height: 220px;
    order: 2;
  }
}

@media (max-width: 560px) {
  .login-image-panel {
    display: none;
  }
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-500);
  margin-bottom: 7px;
}

.field input {
  width: 100%;
  padding: 15px 16px;
  font-size: 17px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--gray-100);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
  outline: none;
  border-color: var(--blue-500);
  background: var(--white);
}

.btn-primary {
  width: 100%;
  padding: 16px;
  font-size: 17px;
  font-weight: 600;
  color: var(--white);
  background: var(--blue-600);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: var(--brand-gradient);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: default;
}

.error-message {
  display: none;
  background: var(--red-50);
  color: var(--red-600);
  border: 1px solid #f4c7c7;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13.5px;
  margin-bottom: 16px;
}

.error-message.visible {
  display: block;
}

.login-footer {
  text-align: center;
  margin-top: 22px;
  font-size: 12px;
  color: var(--gray-500);
}

/* ---------- Dashboard page ---------- */

.dashboard-page {
  min-height: 100vh;
  background: var(--gray-100);
}

.topbar {
  background: var(--navy-900);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  line-height: 1.25;
}

.topbar-logo {
  height: 40px;
  width: auto;
  border-radius: 4px;
  display: block;
}

.topbar-brand .brand-name {
  color: var(--white);
  text-align: left;
  font-size: 18px;
}

.topbar-brand .brand-subtitle {
  color: #9fc1e6;
  text-align: left;
  margin: 0;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-user .agent-name {
  font-size: 14px;
  font-weight: 600;
}

.topbar-user .agent-name .label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #9fc1e6;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.btn-logout {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-logout:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.6);
}

.dashboard-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 56px 32px;
}

.dashboard-main--wide {
  max-width: 1180px;
  padding-top: 32px;
}

@media (max-width: 600px) {
  .dashboard-main--wide {
    padding: 20px 16px 40px;
  }
}

.dashboard-heading {
  margin-bottom: 32px;
}

.dashboard-heading h1 {
  font-size: 24px;
  margin: 0 0 6px;
  color: var(--navy-900);
}

.dashboard-heading p {
  margin: 0;
  color: var(--gray-500);
  font-size: 14.5px;
}

/* One grid for the Quote and Payment buttons and the cards posted from the
   admin area: up to 4 across on a wide screen, 3 on a laptop, 1 on a phone.
   With fewer cards than that, they share the row. */
.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.grid-slot {
  display: flex;
  min-width: 0;
}

.grid-slot[hidden] {
  display: none;
}

.action-card {
  position: relative;
  overflow: hidden;
  flex: 1;
  width: 100%;
  min-height: 140px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  text-align: left;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.action-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(10, 30, 60, 0.1);
  border-color: var(--blue-500);
}

/* Every card in the grid has a trim along its top edge: blue as standard,
   yellow when highlighted from the admin area. The Quote and Payment
   buttons get "highlighted" through the slot around them. */
.action-card::before,
.news-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--blue-600);
  z-index: 1;
}

.grid-slot.is-highlighted > .action-card::before,
.news-card.is-highlighted::before {
  background: var(--gold-400, #f5b83d);
}

.action-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-card .icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--blue-100);
  color: var(--blue-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.action-card h2 {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  color: var(--navy-900);
}

.action-card .cta {
  margin-top: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue-600);
}

.loading-state {
  text-align: center;
  color: var(--gray-500);
  padding: 80px 0;
  font-size: 14px;
}

.dashboard-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  background: var(--red-50);
  color: var(--red-600);
  border: 1px solid #f4c7c7;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13.5px;
}

.dashboard-error-dismiss {
  background: none;
  border: none;
  color: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

/* ---------- Admin page ---------- */

.admin-tabs {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 28px;
}

.admin-tab {
  padding: 12px 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.admin-tab:hover {
  color: var(--navy-800);
}

.admin-tab.active {
  color: var(--blue-600);
  border-bottom-color: var(--blue-600);
}

.admin-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.admin-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 26px;
}

.admin-card h2 {
  margin: 0 0 18px;
  font-size: 16px;
  color: var(--navy-900);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px 20px;
}

.field input:disabled {
  color: var(--gray-500);
  cursor: default;
}

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

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-200);
}

.admin-table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-message {
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 18px;
  font-size: 13.5px;
}

.admin-message.error {
  background: var(--red-50);
  color: var(--red-600);
  border: 1px solid #f4c7c7;
}

.admin-message.success {
  background: #e7f6ec;
  color: #1f7a3f;
  border: 1px solid #bfe6cb;
}

/* ---------- Profile forms ---------- */

.field select {
  width: 100%;
  padding: 15px 16px;
  font-size: 17px;
  color: var(--ink);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--gray-100);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field select:focus {
  outline: none;
  border-color: var(--blue-500);
  background: var(--white);
}

.field select:disabled,
.field input[readonly] {
  color: var(--gray-500);
  cursor: default;
}

.field label .req {
  margin-left: 2px;
  color: var(--red-600);
}

.field-hint {
  margin: -10px 0 18px;
  font-size: 12.5px;
  color: var(--gray-500);
}

/* An input with a button sitting inside it — the password show/hide eye.
   The wrapper replaces the input as the .field's child, so the input keeps
   its full width and only gives up room on the right for the button. */

.field-with-action {
  position: relative;
}

.field-with-action input {
  padding-right: 46px;
}

.field-action {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: none;
  color: var(--gray-500);
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
}

.field-action:hover {
  color: var(--blue-600);
  background: var(--blue-100);
}

.field-action:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 1px;
}

.field-action svg {
  display: block;
  width: 18px;
  height: 18px;
}

.form-section {
  margin-bottom: 8px;
}

.form-section h3 {
  margin: 0 0 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.form-actions .btn-primary {
  width: auto;
  padding: 14px 26px;
}

.btn-secondary {
  padding: 14px 26px;
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-600);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-small {
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--blue-600);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-secondary:hover,
.btn-small:hover {
  background: var(--blue-100);
  border-color: var(--blue-500);
}

.agency-code {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 18px;
}

.agency-code .label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.agency-code .value,
.admin-table .code-cell {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.5px;
}

.agency-code .value {
  font-size: 22px;
  font-weight: 700;
  color: var(--navy-900);
}

.topbar-link {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 7px;
  transition: background 0.15s, border-color 0.15s;
}

.topbar-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.35);
}

/* ---------- Admin dashboard shell ---------- */

/* Everything here is scoped to .adm-page or an .adm- class. The admin area
   shares .field, .form-section, .admin-message and friends with the
   agent-facing my-profile page, so the few adjustments it needs are made
   under .adm-page rather than on the shared rule. */

.adm-page {
  --adm-navy: #14263f;
  --adm-content: #f4f6f9;
  --adm-hover: #1e3654;
  --adm-idle: #b7c6d9;
  --adm-danger: #f0999b;
  --adm-link: #185fa5;
  --adm-border: #e8edf3;
  --adm-topbar-h: 52px;
  --adm-side-w: 220px;
  margin: 0;
  min-height: 100vh;
  background: var(--adm-content);
}

/* Top bar */

.adm-topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 20;
  height: var(--adm-topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: var(--adm-navy);
  color: var(--white);
}

.adm-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.adm-logo {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: var(--white);
  color: var(--adm-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.adm-brand-text {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 1.4px;
}

.adm-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #27405f;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

/* Sidebar */

.adm-sidebar {
  position: fixed;
  top: var(--adm-topbar-h);
  bottom: 0;
  left: 0;
  z-index: 10;
  width: var(--adm-side-w);
  background: var(--adm-navy);
  display: flex;
  flex-direction: column;
  padding: 18px 0 16px;
}

.adm-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.adm-nav-foot {
  margin-top: auto;
  padding-top: 14px;
}

.adm-nav-foot::before {
  content: '';
  display: block;
  height: 1px;
  margin: 0 20px 12px;
  background: rgba(255, 255, 255, 0.12);
}

/* One class for every item. Every state shares the same inset, fully rounded
   pill — active, hover and idle differ only in colour. */
.adm-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  height: 42px;
  padding: 0 16px;
  /* Inset on BOTH sides so no item, in any state, touches a sidebar edge. */
  margin-left: 14px;
  margin-right: 14px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 400;
  color: var(--adm-idle);
  text-align: left;
  text-decoration: none;
  background: transparent;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.adm-nav-item svg {
  width: 17px;
  height: 17px;
  flex: none;
}

/* Hover on an inactive item: a subtle lighter-navy fill in the same pill. */
.adm-nav-item:hover {
  background: var(--adm-hover);
  color: var(--white);
}

/* The active item keeps the shared pill and only changes colour/weight. */
.adm-nav-item.is-active,
.adm-nav-item.is-active:hover {
  background: var(--adm-content);
  color: var(--adm-navy);
  font-weight: 500;
}

.adm-nav-item.is-logout {
  color: var(--adm-danger);
}

.adm-nav-item.is-logout:hover {
  background: var(--adm-hover);
  color: var(--adm-danger);
}

/* Content area */

.adm-main {
  margin-left: var(--adm-side-w);
  padding: calc(var(--adm-topbar-h) + 24px) 24px 40px;
}

.adm-view {
  max-width: 1080px;
}

.adm-loading {
  margin-left: var(--adm-side-w);
  padding: calc(var(--adm-topbar-h) + 80px) 24px;
  text-align: center;
  color: var(--gray-500);
  font-size: 14px;
}

.adm-card {
  background: var(--white);
  border: 1px solid var(--adm-border);
  border-radius: 12px;
  padding: 22px;
}

.adm-card + .adm-card {
  margin-top: 20px;
}

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

.adm-card-head h2,
.adm-card > h2 {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--adm-navy);
}

.adm-card-head h2 {
  margin: 0;
}

/* Page heading */

.adm-heading {
  margin-bottom: 22px;
}

.adm-heading h1 {
  margin: 0 0 6px;
  font-size: 23px;
  font-weight: 600;
  color: var(--adm-navy);
}

.adm-heading p {
  margin: 0;
  font-size: 14px;
  color: var(--gray-500);
}

/* Overview stat cards */

.adm-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.adm-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 132px;
  padding: 20px 22px;
  background: var(--white);
  border: 1px solid var(--adm-border);
  border-radius: 12px;
}

.adm-stat .adm-stat-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-500);
}

.adm-stat .adm-stat-value {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.1;
  color: var(--adm-navy);
  font-variant-numeric: tabular-nums;
}

.adm-stat .adm-stat-sub {
  margin-top: auto;
  font-size: 12.5px;
  color: var(--gray-500);
}

.adm-stat-action {
  background: var(--adm-navy);
  border-color: var(--adm-navy);
  color: var(--white);
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}

.adm-stat-action:hover {
  background: #1b3252;
}

.adm-stat-action .adm-stat-plus {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.adm-stat-action .adm-stat-label {
  color: var(--white);
  font-size: 15px;
  font-weight: 600;
}

.adm-stat-action .adm-stat-sub {
  color: #b7c6d9;
}

/* Tables */

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

.adm-table th,
.adm-table td {
  text-align: left;
  padding: 11px 14px;
}

.adm-table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  border-bottom: 1px solid var(--adm-border);
}

.adm-table tbody tr:nth-child(even) {
  background: #fafbfd;
}

.adm-table .adm-code {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 12.5px;
  letter-spacing: 0.4px;
}

.adm-table .adm-muted {
  color: var(--gray-500);
}

.adm-link {
  color: var(--adm-link);
  font-weight: 500;
  text-decoration: none;
}

.adm-link:hover {
  text-decoration: underline;
}

.adm-back {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--gray-500);
  text-decoration: none;
}

.adm-back:hover {
  color: var(--adm-navy);
}

.adm-empty {
  padding: 26px 14px;
  text-align: center;
  font-size: 13.5px;
  color: var(--gray-500);
}

/* Buttons in the admin shell */

.adm-btn {
  padding: 9px 16px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  background: var(--adm-navy);
  border: 1px solid var(--adm-navy);
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}

.adm-btn:hover {
  background: #1b3252;
}

.adm-btn-ghost {
  color: var(--adm-navy);
  background: var(--white);
  border-color: var(--adm-border);
}

.adm-btn-ghost:hover {
  background: var(--adm-content);
  border-color: #d6dde6;
}

/* Agency code callout on the detail page */

.adm-code-block {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--adm-border);
}

.adm-code-block .adm-code-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.adm-code-block .adm-code-value {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 26px;
  font-weight: 600;
  color: var(--adm-navy);
  letter-spacing: 1px;
}

.adm-code-block .adm-code-hint {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--gray-500);
}

/* Read-only definition list */

.adm-group {
  margin-bottom: 22px;
}

.adm-group:last-child {
  margin-bottom: 0;
}

.adm-group h3 {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.adm-dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px 22px;
  margin: 0;
}

.adm-dl dt {
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 3px;
}

.adm-dl dd {
  margin: 0;
  font-size: 14px;
  color: var(--ink);
  word-break: break-word;
}

.adm-dl dd.is-empty {
  color: #a6b0be;
}

/* Shared form styling, dialled down for the denser admin cards */

.adm-page .field input,
.adm-page .field select {
  padding: 11px 13px;
  font-size: 14px;
}

.adm-page .field label {
  font-size: 13px;
}

.adm-page .field {
  margin-bottom: 16px;
}

.adm-page .form-actions .btn-primary {
  padding: 11px 22px;
  font-size: 14px;
}

.adm-page .btn-secondary {
  padding: 11px 22px;
  font-size: 14px;
}

@media (max-width: 900px) {
  .adm-page {
    --adm-side-w: 62px;
  }

  .adm-nav-item {
    justify-content: center;
    gap: 0;
    padding: 0 10px;
    margin-left: 8px;
    margin-right: 8px;
  }

  .adm-nav-item span {
    display: none;
  }

  .adm-brand-text {
    display: none;
  }
}

/* ---------- Phase 2: dashboard banner and posted cards ---------- */

/* Shared by the agent dashboard and the admin preview. */

:root {
  --gold-400: #f5b83d;
  --gold-300: #ffc85c;
  --gold-50: #fff5df;
}

.dashboard-banners {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.dashboard-banners[hidden] {
  display: none;
}

.dash-banner {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 30px 36px 30px 42px;
  border-radius: 14px;
  color: var(--white);
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.16), transparent 42%),
    linear-gradient(120deg, #1a2f4a 0%, #1f4a70 55%, #2a6a9c 100%);
  box-shadow: 0 14px 34px rgba(10, 30, 60, 0.18);
}

.dash-banner::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: var(--gold-400);
}

.dash-banner-text {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-banner-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dash-banner-icon {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.dash-banner-title {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--white);
}

.dash-banner-body {
  margin: 0;
  max-width: 70ch;
  font-size: 15.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.9);
  white-space: pre-line;
}

.dash-banner-button {
  align-self: flex-start;
  margin-top: 4px;
  padding: 11px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-900);
  background: var(--gold-400);
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}

.dash-banner-button:hover {
  background: var(--gold-300);
}

.dash-banner-image {
  flex: 0 0 38%;
  max-width: 38%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

@media (max-width: 720px) {
  .dash-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 24px 22px 24px 28px;
  }

  .dash-banner-image {
    order: -1;
    flex: none;
    width: 100%;
    max-width: 100%;
  }

  .dash-banner-title {
    font-size: 22px;
  }
}

.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
}

.news-card-image {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  background: var(--gray-100);
}

.news-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px 22px 20px;
}

.news-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.news-card-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gold-50);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.news-card-title {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
  color: var(--navy-900);
}

.news-card-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-line;
}

.news-card-button {
  align-self: flex-start;
  margin-top: auto;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  background: var(--blue-600);
  border-radius: 7px;
  text-decoration: none;
  transition: background 0.15s;
}

.news-card-button:hover {
  background: var(--navy-800);
}

/* ---------- Phase 2: admin additions ---------- */

.adm-page .adm-muted {
  color: var(--gray-500);
}

.adm-inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.adm-stack {
  margin-top: 20px;
}

.adm-text {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}

.adm-subtle {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--gray-500);
}

.adm-badge {
  display: inline-block;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 999px;
  white-space: nowrap;
}

.adm-badge.is-green { background: #e5f4ea; color: #1e6b3a; }
.adm-badge.is-red { background: var(--red-50); color: var(--red-600); }
.adm-badge.is-blue { background: var(--blue-100); color: var(--blue-600); }
.adm-badge.is-gray { background: #eef1f5; color: var(--gray-500); }

.adm-btn-danger {
  background: var(--red-600);
  border-color: var(--red-600);
}

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

.adm-push-right {
  margin-left: auto;
}

.adm-link-button {
  padding: 0;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--adm-link);
  background: none;
  border: none;
  cursor: pointer;
}

.adm-link-button:hover {
  text-decoration: underline;
}

.adm-panel {
  margin: 14px 0 18px;
  padding: 16px 18px;
  background: var(--adm-content);
  border: 1px solid var(--adm-border);
  border-radius: 10px;
}

.adm-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}

.adm-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 0;
}

/* Form controls for the Phase 2 screens */

.adm-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.adm-field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--gray-500);
}

.adm-field-label .req {
  color: var(--red-600);
}

.adm-input,
.adm-textarea {
  width: 100%;
  padding: 9px 11px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid #d6dde6;
  border-radius: 8px;
}

.adm-inline .adm-input {
  width: auto;
}

.adm-textarea {
  resize: vertical;
  line-height: 1.45;
}

.adm-input:focus,
.adm-textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(53, 114, 160, 0.15);
}

.adm-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 18px;
}

.adm-file {
  font-size: 13px;
}

.adm-radio,
.adm-check,
.adm-toggle {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
}

.adm-toggle {
  align-self: end;
  margin-bottom: 24px;
}

.adm-radio-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.adm-audience-box {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--adm-border);
  border-radius: 10px;
  background: #fafbfd;
}

.adm-checklist {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px 14px;
  max-height: 220px;
  margin-top: 10px;
  overflow-y: auto;
}

.adm-check {
  font-size: 13px;
}

/* Filters bar (Activity, Reports) */

.adm-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 24px;
  margin-bottom: 20px;
}

.adm-filters + .adm-card {
  margin-top: 0;
}

.adm-filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.adm-filter-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.adm-filters .adm-input {
  width: auto;
  min-width: 150px;
}

/* Report tabs */

.adm-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.adm-tab {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--adm-navy);
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--adm-border);
  border-radius: 999px;
}

.adm-tab:hover {
  border-color: #c9d3de;
}

.adm-tab.is-active {
  color: var(--white);
  background: var(--adm-navy);
  border-color: var(--adm-navy);
}

/* Dashboard card editor: form beside a live preview */

.adm-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.adm-preview {
  position: sticky;
  top: calc(var(--adm-topbar-h) + 24px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: var(--gray-100);
  border-radius: 12px;
}

.adm-preview .news-card-button {
  pointer-events: none;
}

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

  .adm-preview {
    position: static;
  }
}

/* Hints inside the Phase 2 forms sit below their control, not tucked up
   under it as in the original forms. */
.adm-field .field-hint {
  margin: 0;
}

.adm-card > .field-hint,
.adm-panel > .field-hint {
  margin: 10px 0 12px;
}

.adm-panel .admin-message {
  margin-bottom: 12px;
}

.adm-table td.adm-nowrap {
  white-space: nowrap;
}

.adm-search {
  min-width: 240px;
}

.adm-panel .adm-textarea {
  margin: 6px 0 14px;
}

.admin-message .adm-confirm {
  display: flex;
  margin-top: 8px;
  color: var(--ink);
  font-weight: 600;
}

.adm-card > h2 + .adm-subtle,
.adm-card > .admin-message + .adm-subtle {
  margin: -8px 0 18px;
}

/* ---------- Dashboard layout: admin additions ---------- */

.adm-card-icon {
  display: inline-block;
  margin-right: 8px;
}

.adm-main-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.adm-main-button-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.2fr) auto minmax(200px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 12px 14px;
  background: var(--gray-100);
  border-radius: 8px;
}

.adm-main-button-name {
  font-weight: 600;
  color: var(--navy-900);
}

.adm-inline-field {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--gray-500);
}

.adm-page .adm-input-narrow {
  width: 90px;
}

.adm-main-buttons .form-actions {
  margin-top: 0;
}

.adm-order-line {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 6px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--gray-200);
}

.adm-order-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.adm-order-chip {
  padding: 5px 12px;
  font-size: 13px;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  background: var(--white);
}

.adm-order-chip.is-main {
  background: var(--blue-100);
  border-color: var(--blue-100);
  color: var(--blue-600);
  font-weight: 600;
}

.adm-order-chip.is-highlighted {
  box-shadow: inset 0 -3px 0 var(--gold-400);
}

.adm-order-chip.is-banner {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: var(--white);
}

@media (max-width: 900px) {
  .adm-main-button-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* The preview column is narrow, so a banner there stacks like on a phone. */
.adm-preview .dash-banner {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 22px 18px 22px 24px;
}

.adm-preview .dash-banner-image {
  order: -1;
  flex: none;
  width: 100%;
  max-width: 100%;
}

.adm-preview .dash-banner-title {
  font-size: 20px;
}

.adm-preview .dash-banner-button {
  pointer-events: none;
}

.adm-main-button-row .adm-toggle {
  align-self: center;
  margin-bottom: 0;
}

.adm-main-button-row .adm-muted {
  font-size: 13px;
}

.adm-order-line .field-hint {
  margin-top: 2px;
}

/* The agent pages' top bar on a phone: smaller logo, and the name and
   buttons wrap under it instead of running off the screen. */
@media (max-width: 600px) {
  .topbar {
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 12px 16px;
  }

  .topbar-logo {
    height: 32px;
  }

  .topbar-brand .brand-subtitle,
  .topbar-user .agent-name .label {
    display: none;
  }

  .topbar-user {
    gap: 12px;
    margin-left: auto;
  }

  .btn-logout {
    padding: 7px 12px;
  }

  .action-card {
    min-height: 0;
  }
}

.adm-toggle-stack {
  display: flex;
  flex-direction: column;
  justify-content: end;
  gap: 10px;
  padding-bottom: 22px;
}

.adm-toggle-stack .adm-toggle {
  margin-bottom: 0;
  align-self: start;
}

.adm-main-button-row {
  grid-template-columns: minmax(220px, 1.2fr) auto auto minmax(180px, 1fr);
}

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

/* ---------- Phase 2.2: agency logo and release label ---------- */

.logo-panel {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.logo-preview,
.adm-logo-box {
  flex: none;
  width: 260px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  border: 1px dashed var(--gray-200);
  border-radius: 10px;
  background: var(--white);
}

.logo-preview img,
.adm-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-empty {
  font-size: 13px;
  color: var(--gray-500);
}

.logo-actions {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.logo-actions .field-hint,
.logo-actions .form-actions {
  margin: 0;
}

.adm-logo-row {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.adm-logo-box .adm-muted {
  font-size: 13px;
  text-align: center;
}

.portal-footer {
  text-align: center;
  padding: 0 16px 28px;
  font-size: 12px;
  color: var(--gray-500);
}

.adm-version {
  padding: 10px 24px 4px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.45);
  white-space: nowrap;
}

@media (max-width: 900px) {
  .adm-version {
    display: none;
  }
}

/* ---------- Phase 2.2: Compare Quotes (entry form) ---------- */

.cmp-main {
  padding-bottom: 40px;
}

.cmp-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.cmp-heading h1 {
  margin: 0 0 6px;
  font-size: 24px;
  color: var(--navy-900);
}

.cmp-heading p {
  margin: 0;
  max-width: 70ch;
  color: var(--gray-500);
  font-size: 14px;
  line-height: 1.5;
}

a.btn-primary {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}

.cmp-new {
  width: auto;
  flex: none;
  padding-left: 22px;
  padding-right: 22px;
}

.cmp-back {
  display: inline-block;
  margin-bottom: 12px;
  font-size: 13px;
  color: var(--blue-600);
  text-decoration: none;
}

.cmp-empty {
  margin: 0;
  color: var(--gray-500);
  font-size: 14px;
}

.cmp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
  align-items: start;
}

.cmp-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}

.cmp-form .admin-card,
.cmp-results {
  margin: 0;
}

.cmp-section h2,
.cmp-results h2 {
  margin: 0 0 14px;
  font-size: 17px;
  color: var(--navy-900);
}

.cmp-quote {
  border-top: 4px solid var(--blue-600);
}

.cmp-quote.is-current {
  border-top-color: var(--gold-400, #f5b83d);
}

.cmp-quote-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.cmp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px 18px;
  align-items: start;
}

.cmp-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.cmp-field.is-wide {
  grid-column: span 2;
}

.cmp-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-500);
}

.cmp-input {
  width: 100%;
  padding: 10px 12px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
}

.cmp-input:focus {
  outline: 2px solid var(--blue-100);
  border-color: var(--blue-500);
}

.cmp-input:disabled {
  background: var(--gray-100);
}

.cmp-hint {
  font-size: 12px;
  color: var(--gray-500);
}

.cmp-msg:empty {
  display: none;
}

.cmp-msg {
  font-size: 12.5px;
  line-height: 1.4;
}

.cmp-msg.is-error {
  color: var(--red-600);
}

.cmp-msg.is-warning {
  color: #9a6700;
}

.cmp-derived {
  font-size: 12.5px;
  color: var(--blue-600);
}

.cmp-derived.is-strong {
  font-weight: 700;
}

.cmp-ded {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.cmp-method {
  display: flex;
  gap: 16px;
  padding: 9px 0;
}

.cmp-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
}

.cmp-sub {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--gray-200);
}

.cmp-sub h3 {
  margin: 0 0 2px;
  font-size: 14px;
  color: var(--navy-900);
}

.cmp-buydowns {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.cmp-bd {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(170px, 1.2fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  background: var(--gray-100);
  border-radius: 8px;
}

.cmp-bd-facts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 22px;
  font-size: 12.5px;
  color: var(--blue-600);
}

.cmp-remove-bd {
  padding-top: 30px;
}

.cmp-link-button {
  padding: 0;
  font: inherit;
  font-size: 13px;
  color: var(--blue-600);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
}

.cmp-add-bd {
  margin-top: 10px;
}

.cmp-add-quote {
  align-self: flex-start;
}

.cmp-prepared summary {
  cursor: pointer;
  list-style-position: inside;
}

.cmp-summary-title {
  font-weight: 700;
  color: var(--navy-900);
}

.cmp-prepared[open] summary {
  margin-bottom: 12px;
}

.cmp-prepared-logo {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 6px;
  font-size: 13px;
}

.cmp-prepared-logo img {
  max-height: 56px;
  max-width: 220px;
  object-fit: contain;
}

.cmp-results {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
}

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

.cmp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.cmp-table th,
.cmp-table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--gray-200);
  text-align: left;
  vertical-align: top;
}

.cmp-table th {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--gray-500);
}

.cmp-table .cmp-num {
  text-align: right;
  white-space: nowrap;
}

.cmp-options tr.is-best td {
  background: #eefaf1;
}

.cmp-sub-line {
  display: block;
  font-size: 12px;
  color: var(--gray-500);
}

.cmp-num.is-good {
  color: #1e7e34;
  font-weight: 600;
}

.cmp-num.is-bad {
  color: var(--red-600);
  font-weight: 600;
}

.cmp-status {
  margin: 0;
  font-size: 13px;
}

.cmp-status.is-error {
  color: var(--red-600);
}

.cmp-status.is-warning {
  color: #9a6700;
}

.cmp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cmp-actions .btn-primary,
.cmp-actions .btn-secondary {
  width: auto;
  flex: 1 1 auto;
}

.cmp-link {
  color: var(--blue-600);
  font-weight: 600;
  text-decoration: none;
}

.cmp-row-actions {
  display: flex;
  gap: 14px;
  white-space: nowrap;
}

.cmp-row-actions a {
  color: var(--blue-600);
  font-size: 13px;
}

@media (max-width: 1000px) {
  .cmp-layout {
    grid-template-columns: 1fr;
  }

  .cmp-results {
    position: static;
  }
}

@media (max-width: 640px) {
  .cmp-heading {
    flex-direction: column;
    align-items: stretch;
  }

  .cmp-field.is-wide {
    grid-column: auto;
  }

  .cmp-bd {
    grid-template-columns: 1fr 1fr;
  }

  .cmp-bd-facts,
  .cmp-remove-bd {
    padding-top: 0;
  }
}

/* Compare Quotes on the dashboard is a link styled as a card. */
a.action-card {
  text-decoration: none;
  color: inherit;
}

.cmp-main .btn-primary,
.cmp-main .btn-secondary {
  padding: 11px 18px;
  font-size: 14.5px;
}

/* ---------- Compare Quotes: compact entry (Phase 2.2 update) ---------- */

.cmp-form .cmp-section {
  padding: 16px 18px;
}

.cmp-form {
  gap: 14px;
}

.cmp-section h2,
.cmp-results h2 {
  margin: 0 0 10px;
  font-size: 15.5px;
}

.cmp-input {
  padding: 7px 10px;
  font-size: 14px;
  border-radius: 7px;
}

.cmp-label {
  font-size: 12px;
}

.cmp-field {
  gap: 4px;
}

.cmp-row {
  display: grid;
  gap: 10px 14px;
  align-items: start;
}

.cmp-row-client {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) minmax(0, 1fr);
}

.cmp-row-quote {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr) minmax(0, 1fr);
}

.cmp-quote-head {
  align-items: center;
  margin-bottom: 8px;
}

.cmp-quote-head h2 {
  margin: 0;
}

.cmp-quote-head .cmp-msg {
  flex: 1;
}

.cmp-tiv {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cmp-tiv .cmp-mini {
  align-self: flex-end;
}

.cmp-static {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  padding: 8px 0 7px;
  font-size: 14px;
  color: var(--ink);
}

.cmp-mini {
  font-size: 12px;
}

.cmp-ded-controls {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 6px;
}

.cmp-ded .cmp-derived {
  font-size: 12px;
}

.cmp-sub {
  margin-top: 12px;
  padding-top: 10px;
}

.cmp-buydowns {
  gap: 6px;
  margin-top: 0;
}

.cmp-bd {
  grid-template-columns: 140px 140px minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
}

.cmp-bd-head {
  padding: 0 8px;
  background: none;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--gray-500);
}

.cmp-bd .cmp-field .cmp-msg {
  grid-column: 1 / -1;
}

.cmp-bd-facts {
  display: block;
  padding-top: 0;
  font-size: 13px;
}

.cmp-bd-facts .cmp-hint {
  font-size: 12.5px;
}

.cmp-remove-bd {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  color: var(--gray-500);
  background: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.cmp-remove-bd:hover {
  color: var(--red-600);
  background: var(--white);
}

.cmp-add-bd {
  margin-top: 8px;
}

.cmp-count-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy-900);
}

.cmp-count-row .cmp-count {
  width: auto;
}

.cmp-options tr.is-off td {
  opacity: 0.45;
}

.cmp-options tr.is-last-printed td {
  border-bottom: 2px solid var(--navy-900);
}

@media (max-width: 760px) {
  .cmp-row-client,
  .cmp-row-quote {
    grid-template-columns: 1fr;
  }

  .cmp-bd {
    grid-template-columns: 1fr 1fr 28px;
  }

  .cmp-bd-head {
    display: none;
  }

  .cmp-bd-facts {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

/* ---------- Dashboard: pictures and Featured style on the built-in cards ---------- */

/* The picture runs edge to edge across the top of the card, like on
   posted cards; the trim sits on top of it. */
.action-card-image {
  display: block;
  /* Clicks go straight to the card's button, and the picture can't be
     dragged off by a slightly moving click. */
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
  width: calc(100% + 44px);
  max-width: none;
  margin: -22px -22px 0;
  aspect-ratio: 3 / 1;
  object-fit: cover;
  background: var(--gray-100);
}

.action-card-image[hidden] {
  display: none;
}

/* Featured: a dark card with a gold button, so it stands out. */
.grid-slot.is-featured > .action-card {
  color: var(--white);
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.14), transparent 45%),
    linear-gradient(135deg, #0b2a55 0%, #1f4a70 100%);
  border-color: #0b2a55;
  box-shadow: 0 10px 26px rgba(10, 30, 60, 0.22);
}

.grid-slot.is-featured > .action-card:hover {
  border-color: var(--gold-400, #f5b83d);
  box-shadow: 0 16px 34px rgba(10, 30, 60, 0.3);
}

.grid-slot.is-featured > .action-card h2 {
  color: var(--white);
  font-size: 18px;
}

.grid-slot.is-featured > .action-card .icon {
  background: rgba(255, 255, 255, 0.14);
  color: var(--white);
}

.grid-slot.is-featured > .action-card .cta {
  align-self: flex-start;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-900);
  background: var(--gold-400, #f5b83d);
  border-radius: 7px;
}

.grid-slot.is-featured > .action-card:hover .cta {
  background: var(--gold-300, #ffc85c);
}

.grid-slot.is-featured > .action-card::before {
  background: var(--gold-400, #f5b83d);
}

.adm-main-button-row {
  grid-template-columns: minmax(210px, 1.2fr) auto auto auto minmax(170px, 1fr);
}

.adm-main-button-pic {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 14px;
  padding-top: 8px;
  border-top: 1px dashed var(--gray-200);
}

.adm-main-button-pic .adm-field-label {
  margin: 0;
}

.adm-button-thumb {
  height: 36px;
  width: 108px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--gray-200);
}

.adm-main-button-pic .adm-muted {
  font-size: 13px;
}

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

.adm-page .adm-btn.adm-btn-small {
  padding: 6px 12px;
  font-size: 13px;
}
