html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.quote-portal {
  --portal-blue: #1976d2;
  --portal-blue-soft: #e3f2fd;
  --portal-ink: #14213d;
  --portal-muted: #667085;
  --portal-border: #d9e3f0;
  --portal-card: #ffffff;
  color: var(--portal-ink);
}

.quote-portal,
.quote-portal *,
.quote-portal-banner,
.quote-portal-banner * {
  box-sizing: border-box;
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
}

.quote-portal {
  position: relative;
  z-index: 5;
  margin-top: -64px;
  padding-inline: 22px;
}

.quote-portal > .container-fluid,
.quote-portal-banner .container-fluid {
  max-width: 1180px;
}

.quote-portal-banner {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  background: #eaf4ff;
}

.quote-portal-banner .banner-img {
  position: absolute;
  inset: 0;
}

.quote-portal-banner .banner-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .46;
  filter: saturate(1.05);
}

.quote-portal-banner .banner-head {
  position: relative;
  display: flex;
  min-height: 340px;
  align-items: center;
  background:
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, .52), transparent 28%),
    linear-gradient(110deg, rgba(8, 30, 58, .92), rgba(25, 118, 210, .72) 52%, rgba(255, 255, 255, .35));
}

.quote-portal-banner .banner-head-padding {
  width: 100%;
}

.quote-portal-banner .heading-meta {
  display: inline-flex;
  margin-bottom: 10px;
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, .16);
  color: #fff !important;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.quote-portal-banner .pwe-heading {
  max-width: 640px;
  margin: 0;
  color: #fff !important;
  font-size: clamp(2rem, 5vw, 4.4rem);
  font-weight: 800;
  letter-spacing: 0;
  line-height: .98;
  text-shadow: 0 12px 36px rgba(8, 30, 58, .3);
}

.quote-portal-hero,
.quote-portal-panel,
.quote-card,
.quote-access-card,
.quote-portal-empty {
  border: 1px solid var(--portal-border);
  border-radius: 16px;
  background: var(--portal-card);
  box-shadow: 0 18px 45px rgba(20, 33, 61, .08);
}

.quote-portal-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
  padding: 22px 24px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(227, 242, 253, .9), rgba(255, 255, 255, .96)),
    #fff;
}

.quote-portal-hero::before {
  content: "";
  align-self: stretch;
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(#1976d2, #64b5f6);
  order: -1;
}

.quote-portal-hero span,
.quote-portal-panel-head span,
.quote-card-kicker,
.quote-card-grid span,
.quote-totals span,
.quote-portal-stats span {
  display: block;
  color: var(--portal-muted);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.quote-portal-hero h3,
.quote-portal-panel h3,
.quote-card h3,
.quote-access-brand h3 {
  margin: 4px 0 6px;
  color: var(--portal-ink);
  font-weight: 800;
  line-height: 1.15;
}

.quote-portal-hero p,
.quote-access-brand p {
  margin: 0;
  color: var(--portal-muted);
}

.quote-portal-ghost,
.quote-filter-form button,
.quote-access-form button,
.quote-card footer button,
.quote-card footer a,
.quote-portal-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid #bbdefb;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--portal-blue);
  color: #fff;
  box-shadow: 0 8px 18px rgba(25, 118, 210, .18);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.quote-portal-ghost,
.quote-card footer button,
.quote-card footer a {
  background: #fff;
  color: var(--portal-blue);
}

.quote-portal-ghost:hover,
.quote-filter-form button:hover,
.quote-access-form button:hover,
.quote-card footer button:hover,
.quote-card footer a:hover,
.quote-portal-link:hover {
  color: #fff;
  background: #0d47a1;
  box-shadow: 0 12px 24px rgba(25, 118, 210, .2);
  text-decoration: none;
  transform: translateY(-1px);
}

.quote-portal-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.quote-portal-stats article {
  min-height: 104px;
  border: 1px solid var(--portal-border);
  border-radius: 16px;
  padding: 18px;
  background:
    linear-gradient(135deg, #fff, #f5f9ff);
  box-shadow: 0 12px 26px rgba(20, 33, 61, .05);
}

.quote-portal-stats strong {
  display: block;
  margin-top: 8px;
  color: var(--portal-ink);
  font-size: 1.45rem;
}

.quote-portal-stats .ok,
.quote-totals .ok {
  color: #2e7d32;
}

.quote-portal-message {
  margin-bottom: 18px;
  border-radius: 14px;
  padding: 13px 16px;
  font-weight: 800;
}

.quote-portal-message.success {
  border: 1px solid #bbdefb;
  background: #e3f2fd;
  color: #0d47a1;
}

.quote-portal-message.error {
  border: 1px solid #ffcdd2;
  background: #ffebee;
  color: #b71c1c;
}

.quote-portal-panel {
  margin-bottom: 18px;
  padding: 20px;
  background: linear-gradient(180deg, #fff, #fbfdff);
}

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

.quote-filter-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr)) auto auto;
  gap: 12px;
  align-items: end;
}

.quote-filter-form label,
.quote-access-form label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: .84rem;
  font-weight: 700;
}

.quote-filter-form input,
.quote-filter-form select,
.quote-access-form input {
  min-height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0 13px;
  background: #fff;
  color: #1f2937;
  outline: none;
  font-size: .95rem;
  font-weight: 500;
}

.quote-filter-form input:focus,
.quote-filter-form select:focus,
.quote-access-form input:focus {
  border-color: var(--portal-blue);
  box-shadow: 0 0 0 4px rgba(25, 118, 210, .12);
}

.quote-filter-form > a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  color: var(--portal-blue);
  font-weight: 700;
}

.quote-list {
  display: grid;
  gap: 18px;
}

.quote-card {
  padding: 22px;
  position: relative;
}

.quote-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  border-radius: 16px 16px 0 0;
  background: linear-gradient(90deg, #1976d2, #64b5f6, #90caf9);
}

.quote-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.quote-card header p {
  margin: 0;
  color: var(--portal-muted);
}

.quote-status {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  font-size: .82rem;
  font-weight: 800;
}

.quote-status.info {
  background: var(--portal-blue-soft);
  color: #0d47a1;
}

.quote-status.success {
  background: #e8f5e9;
  color: #2e7d32;
}

.quote-status.warning {
  background: #fff8e1;
  color: #ef6c00;
}

.quote-status.danger {
  background: #ffebee;
  color: #b71c1c;
}

.quote-alert {
  margin-bottom: 16px;
  border: 1px solid #ffe0b2;
  border-radius: 12px;
  padding: 12px 14px;
  background: #fff8e1;
  color: #8a4b00;
  font-weight: 600;
}

.quote-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.quote-card-grid div {
  border: 1px solid #e6edf7;
  border-radius: 14px;
  padding: 13px;
  background: #f8fbff;
}

.quote-card-grid strong {
  display: block;
  margin-top: 4px;
}

.quote-items {
  overflow-x: auto;
  border: 1px solid #e6edf7;
  border-radius: 14px;
  margin-bottom: 14px;
}

.quote-items table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  min-width: 620px;
}

.quote-items th,
.quote-items td {
  padding: 12px 14px;
  border-bottom: 1px solid #e6edf7;
  text-align: left;
}

.quote-items th {
  background: var(--portal-blue);
  color: #fff;
  font-weight: 800;
}

.quote-items tbody tr:nth-child(even) {
  background: #f8fbff;
}

.quote-items tr:last-child td {
  border-bottom: 0;
}

.quote-choice-form {
  border: 1px solid #d9e8fb;
  border-radius: 18px;
  margin-bottom: 16px;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(25, 118, 210, .08), transparent 36%),
    #fbfdff;
}

.quote-choice-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e6edf7;
  margin-bottom: 16px;
  padding-bottom: 14px;
}

.quote-choice-head span {
  display: block;
  color: var(--portal-blue);
  font-size: .78rem;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.quote-choice-head h4 {
  margin: 3px 0 5px;
  color: var(--portal-ink);
  font-size: 1.25rem;
  font-weight: 900;
}

.quote-choice-head p {
  max-width: 680px;
  margin: 0;
  color: var(--portal-muted);
}

.quote-choice-head button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid #1976d2;
  border-radius: 999px;
  padding: 0 18px;
  background: #1976d2;
  color: #fff;
  box-shadow: 0 10px 24px rgba(25, 118, 210, .18);
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}

.quote-choice-locked {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border-radius: 999px;
  padding: 0 14px;
  background: #eef2f7;
  color: #64748b;
  font-size: .82rem;
}

.quote-choice-groups {
  display: grid;
  gap: 14px;
}

.quote-choice-group {
  border: 1px solid #e6edf7;
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.quote-choice-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.quote-choice-group-head h5 {
  margin: 0 0 4px;
  color: var(--portal-ink);
  font-size: 1rem;
  font-weight: 900;
}

.quote-choice-group-head p {
  margin: 0;
  color: var(--portal-muted);
  font-size: .9rem;
}

.quote-choice-group-head > span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  border-radius: 999px;
  padding: 0 11px;
  background: var(--portal-blue-soft);
  color: #0d47a1;
  font-size: .78rem;
  font-weight: 900;
  white-space: nowrap;
}

.quote-choice-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
}

.quote-choice-option {
  position: relative;
  display: flex;
  min-height: 76px;
  gap: 10px;
  border: 1px solid #dbe7f5;
  border-radius: 14px;
  padding: 12px;
  background: #f8fbff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}

.quote-choice-option:hover {
  border-color: #90caf9;
  box-shadow: 0 10px 22px rgba(25, 118, 210, .1);
  transform: translateY(-1px);
}

.quote-choice-option.selected {
  border-color: #1976d2;
  background: #e3f2fd;
  box-shadow: 0 12px 24px rgba(25, 118, 210, .14);
}

.quote-choice-option.locked,
.quote-choice-option.server-locked {
  opacity: .48;
  cursor: not-allowed;
  background: #f1f5f9;
}

.quote-choice-option.locked:hover,
.quote-choice-option.server-locked:hover {
  border-color: #dbe7f5;
  box-shadow: none;
  transform: none;
}

.quote-choice-option input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  accent-color: #1976d2;
}

.quote-choice-option span {
  display: grid;
  gap: 4px;
}

.quote-choice-option strong {
  color: var(--portal-ink);
  font-size: .96rem;
  font-weight: 800;
  line-height: 1.25;
}

.quote-choice-option small {
  color: var(--portal-muted);
  font-size: .78rem;
  line-height: 1.25;
}

.quote-change-card {
  max-width: 980px;
  margin-inline: auto;
}

.quote-change-form {
  border: 1px solid #d9e8fb;
  border-radius: 18px;
  margin-top: 16px;
  padding: 18px;
  background:
    radial-gradient(circle at top right, rgba(25, 118, 210, .08), transparent 36%),
    #fbfdff;
}

.quote-change-message {
  display: grid;
  gap: 8px;
  color: #344054;
  font-size: .86rem;
  font-weight: 800;
}

.quote-change-message textarea {
  width: 100%;
  min-height: 160px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 14px;
  background: #fff;
  color: #1f2937;
  outline: none;
  resize: vertical;
  font-size: .96rem;
  font-weight: 500;
  line-height: 1.5;
}

.quote-change-message textarea:focus {
  border-color: var(--portal-blue);
  box-shadow: 0 0 0 4px rgba(25, 118, 210, .12);
}

.quote-change-message [data-valmsg-for],
.quote-change-message .field-validation-error {
  color: #b71c1c;
  font-size: .82rem;
  font-weight: 800;
}

.quote-change-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.quote-change-actions button,
.quote-change-actions a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid #bbdefb;
  border-radius: 999px;
  padding: 0 18px;
  background: #fff;
  color: var(--portal-blue);
  box-shadow: 0 8px 18px rgba(25, 118, 210, .12);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.quote-change-actions button.quote-action-ok {
  border-color: #2e7d32;
  background: #2e7d32;
  color: #fff;
}

.quote-change-actions button:hover,
.quote-change-actions a:hover {
  background: #0d47a1;
  border-color: #0d47a1;
  color: #fff;
  text-decoration: none;
}

.quote-totals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.quote-totals span {
  border-radius: 12px;
  padding: 10px 12px;
  background: #f5f9ff;
  border: 1px solid #e6edf7;
}

.quote-totals strong {
  display: block;
  margin-top: 4px;
  color: var(--portal-ink);
  font-size: 1rem;
}

.quote-notes {
  border-radius: 14px;
  margin-bottom: 14px;
  padding: 14px;
  background: #fffdf1;
  color: #46515f;
}

.quote-notes p:last-child {
  margin-bottom: 0;
}

.quote-card footer {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.quote-card footer form {
  margin: 0;
}

.quote-card footer .quote-action-ok {
  background: #2e7d32;
  border-color: #2e7d32;
  color: #fff;
}

.quote-card footer .quote-action-disabled {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px dashed #cbd5e1;
  border-radius: 999px;
  padding: 0 16px;
  background: #f8fafc;
  color: #64748b;
  box-shadow: none;
  font-weight: 800;
  cursor: not-allowed;
}

.quote-card footer button.quote-action-disabled {
  opacity: 1;
}

.quote-portal-empty {
  margin-bottom: 18px;
  padding: 28px;
  text-align: center;
}

.quote-access-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 430px);
  gap: 24px;
  max-width: 980px;
  margin: 0 auto;
  padding: 28px;
  background: linear-gradient(135deg, #ffffff, #f5f9ff);
}

.quote-access-brand {
  display: flex;
  min-height: 320px;
  flex-direction: column;
  justify-content: center;
  border-radius: 18px;
  padding: 26px;
  background:
    radial-gradient(circle at 85% 12%, rgba(25, 118, 210, .14), transparent 32%),
    #fff;
}

.quote-access-brand img {
  width: min(280px, 80%);
  height: auto;
  margin-bottom: 20px;
}

.quote-access-brand span {
  color: var(--portal-blue);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.quote-access-form {
  align-self: center;
  display: grid;
  gap: 14px;
  border: 1px solid #d9e3f0;
  border-radius: 16px;
  padding: 20px;
  background: #fff;
}

.quote-access-form button {
  width: 100%;
}

.quote-access-form small {
  color: var(--portal-muted);
}

.quote-access-error {
  border: 1px solid #ffcdd2;
  border-radius: 12px;
  padding: 10px 12px;
  background: #ffebee;
  color: #b71c1c;
  font-weight: 700;
}

@media (max-width: 992px) {
  .quote-portal-stats,
  .quote-card-grid,
  .quote-totals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .quote-filter-form,
  .quote-access-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .quote-portal-hero,
  .quote-portal-panel-head,
  .quote-card header,
  .quote-choice-head,
  .quote-choice-group-head {
    align-items: stretch;
    flex-direction: column;
  }

  .quote-portal-stats,
  .quote-card-grid,
  .quote-totals {
    grid-template-columns: 1fr;
  }

  .quote-card,
  .quote-portal-panel,
  .quote-access-card {
    padding: 18px;
  }
}
