/* Get Married workspace & client pages — unified with the public frontend */
:root {
  --ink: #26364a;
  --forest: #323b60;
  --deep: #171c37;
  --sage: #f93700;
  --ivory: #f5f1e9;
  --paper: #ffffff;
  --sand: #ebe5db;
  --muted: #6f7688;
  --line: rgba(38, 54, 74, 0.16);
  --green-soft: #e4f0e8;
  --red-soft: #f8e8e4;
  --shadow: 0 24px 70px rgba(23, 28, 55, 0.14);
  --gm-orange: #f93700;
  --gm-orange-readable: #df3500;
  --gm-navy: #323b60;
  --gm-navy-deep: #171c37;
  --gm-blue: #1b3578;
  --gm-cream: #f5f1e9;
  --gm-white: #ffffff;
  --gm-yellow: #fcbf00;
}

body {
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

::selection {
  background: rgba(249, 55, 0, 0.22);
  color: var(--gm-navy-deep);
}

a,
button,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(249, 55, 0, 0.28);
  outline-offset: 3px;
}

.kicker {
  color: var(--gm-orange);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0.2em;
}

.kicker-light {
  color: rgba(255, 255, 255, 0.86);
}

.btn {
  min-height: 48px;
  border-radius: 999px;
  padding-inline: 23px;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(23, 28, 55, 0.15);
}

.btn-dark {
  background: var(--gm-navy-deep);
  color: white;
}

.btn-dark:hover {
  background: var(--gm-blue);
}

.btn-light {
  background: white;
  color: var(--gm-navy-deep);
}

.btn-outline {
  border-color: rgba(50, 59, 96, 0.32);
  background: transparent;
  color: var(--gm-navy);
}

.btn-outline:hover {
  border-color: var(--gm-orange);
  color: var(--gm-orange);
}

.under-link {
  color: var(--gm-navy);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.public-brand,
.admin-brand,
.setup-brand {
  gap: 11px;
}

.public-brand > img,
.admin-brand > img,
.setup-brand > img {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border: 0;
  border-radius: 0;
  object-fit: contain;
}

.public-brand strong,
.admin-brand strong,
.setup-brand strong {
  color: inherit;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  font-weight: 950;
  letter-spacing: -0.025em;
  line-height: 0.95;
  text-transform: lowercase;
}

.public-brand small,
.admin-brand small,
.setup-brand small {
  color: var(--gm-orange);
  font-size: 7px;
  font-weight: 950;
  letter-spacing: 0.2em;
}

/* Shared forms */
.main-form,
.admin-form,
.setup-form {
  gap: 18px;
}

.main-form label,
.admin-form label,
.setup-form label,
.project-detail-fields label,
.rab-client-form label {
  gap: 8px;
  color: var(--gm-navy-deep);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.025em;
}

.main-form input,
.main-form select,
.main-form textarea,
.admin-form input,
.admin-form select,
.admin-form textarea,
.setup-form input,
.setup-form select,
.setup-form textarea,
.panel-search input,
.public-invoice-link input,
.project-detail-fields input,
.project-detail-fields textarea,
.stage-move-form select,
.admin-stage-row textarea,
.rab-client-form textarea {
  min-height: 46px;
  border: 1px solid rgba(50, 59, 96, 0.2);
  border-radius: 9px;
  background: white;
  color: var(--ink);
  padding: 12px 14px;
  font-size: 12px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.main-form textarea,
.admin-form textarea,
.setup-form textarea,
.project-detail-fields textarea,
.admin-stage-row textarea,
.rab-client-form textarea {
  min-height: 92px;
}

.main-form input:focus,
.main-form select:focus,
.main-form textarea:focus,
.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus,
.setup-form input:focus,
.setup-form select:focus,
.setup-form textarea:focus,
.panel-search input:focus,
.project-detail-fields input:focus,
.project-detail-fields textarea:focus,
.stage-move-form select:focus,
.admin-stage-row textarea:focus,
.rab-client-form textarea:focus {
  border-color: var(--gm-orange);
  outline: 0;
  box-shadow: 0 0 0 4px rgba(249, 55, 0, 0.1);
}

.main-form label small,
.admin-form label small,
.setup-form label small {
  color: var(--muted);
  line-height: 1.55;
}

.check-label input {
  min-height: 0;
  accent-color: var(--gm-orange);
}

.alert {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 11px;
}

.alert-error {
  border-color: rgba(223, 53, 0, 0.14);
  background: #fff0eb;
  color: #963413;
}

.alert-success {
  border-color: rgba(39, 117, 70, 0.14);
  background: #eaf5ed;
  color: #29643d;
}

/* Login & setup */
.setup-body,
.login-body {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(23, 28, 55, 0.96), rgba(27, 53, 120, 0.86)),
    url("hero-original.jpg") center / cover fixed;
}

.setup-body::before,
.login-body::before {
  position: fixed;
  z-index: -1;
  top: -130px;
  right: -100px;
  width: 360px;
  height: 360px;
  border: 54px solid var(--gm-orange);
  border-radius: 50%;
  content: "";
  opacity: 0.86;
}

.setup-body::after,
.login-body::after {
  position: fixed;
  z-index: -1;
  bottom: -180px;
  left: -150px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  content: "";
}

.setup-card,
.login-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 34px 100px rgba(4, 8, 28, 0.36);
  padding: clamp(34px, 5vw, 56px);
}

.setup-card {
  width: min(700px, 100%);
}

.login-card {
  width: min(480px, 100%);
}

.setup-card::before,
.login-card::before {
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, var(--gm-orange), var(--gm-yellow));
  content: "";
}

.setup-brand,
.login-brand {
  margin-bottom: 42px;
  color: var(--gm-navy-deep);
}

.setup-card h1,
.login-card h1 {
  max-width: 520px;
  color: var(--gm-navy-deep);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(38px, 6vw, 56px);
  font-weight: 950;
  letter-spacing: -0.06em;
  line-height: 0.96;
}

.setup-lead,
.login-lead,
.setup-success p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.setup-form hr {
  border-color: rgba(50, 59, 96, 0.14);
}

.login-back {
  color: var(--gm-navy);
}

/* Public booking */
.booking-public-body {
  background: var(--gm-cream);
}

.booking-public-shell {
  grid-template-columns: minmax(380px, 0.9fr) minmax(520px, 1.1fr);
}

.booking-public-intro {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    linear-gradient(140deg, rgba(23, 28, 55, 0.94), rgba(27, 53, 120, 0.72)),
    url("hero-original.jpg") 52% center / cover;
  padding: clamp(34px, 5vw, 64px) clamp(30px, 6vw, 82px);
}

.booking-public-intro::after {
  position: absolute;
  z-index: -1;
  right: -110px;
  bottom: -110px;
  width: 300px;
  height: 300px;
  border: 42px solid var(--gm-orange);
  border-radius: 50%;
  content: "";
}

.booking-public-intro .public-brand {
  width: fit-content;
  color: white;
}

.booking-public-intro h1 {
  max-width: 680px;
  color: white;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(48px, 6.4vw, 88px);
  font-weight: 950;
  letter-spacing: -0.065em;
  line-height: 0.9;
}

.booking-public-intro > div > p:last-child {
  color: rgba(255, 255, 255, 0.82);
}

.booking-public-intro > a:last-child {
  width: fit-content;
  border-bottom: 2px solid var(--gm-orange);
  padding-bottom: 6px;
  color: white;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.booking-public-form {
  width: min(720px, 100%);
  padding: clamp(48px, 7vw, 86px) clamp(30px, 6vw, 70px);
}

.form-heading {
  border-color: rgba(50, 59, 96, 0.16);
}

.form-heading h2,
.booking-success h2 {
  color: var(--gm-navy-deep);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 950;
  letter-spacing: -0.055em;
  line-height: 1;
}

.form-heading h2 {
  font-size: clamp(31px, 4vw, 44px);
}

.form-heading > span {
  border-radius: 999px;
  background: rgba(249, 55, 0, 0.09);
  color: var(--gm-orange);
  padding: 7px 10px;
  font-weight: 900;
}

.booking-success > span {
  background: var(--gm-orange);
  color: white;
}

.booking-success p,
.form-disclaimer {
  color: var(--muted);
}

/* Admin workspace */
.admin-body {
  background:
    radial-gradient(circle at 92% 4%, rgba(249, 55, 0, 0.08), transparent 240px),
    var(--gm-cream);
}

.admin-shell {
  grid-template-columns: 260px minmax(0, 1fr);
  transition: grid-template-columns 180ms ease;
}

.admin-sidebar {
  z-index: 30;
  width: auto;
  background:
    radial-gradient(circle at 18% 92%, rgba(249, 55, 0, 0.23), transparent 180px),
    var(--gm-navy-deep);
  padding: 25px 18px 20px;
}

.admin-sidebar::before {
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--gm-orange);
  content: "";
}

.admin-brand {
  margin: 4px 10px 34px;
  color: white;
}

.admin-brand > img {
  width: 62px;
  height: 62px;
  flex-basis: 62px;
}

.admin-brand small {
  color: rgba(255, 255, 255, 0.68);
}

.admin-sidebar nav {
  flex: 1;
  gap: 5px;
  align-content: start;
  min-height: 0;
  overflow-y: auto;
  padding-right: 3px;
}

.admin-sidebar nav a {
  position: relative;
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.68);
  padding: 0 14px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  transition: background 170ms ease, color 170ms ease, transform 170ms ease;
}

.admin-sidebar nav a::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border: 1px solid currentColor;
  border-radius: 50%;
  content: "";
}

.admin-sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  transform: translateX(3px);
}

.admin-sidebar nav a.active {
  background: var(--gm-orange-readable);
  color: white;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.admin-sidebar nav a.active::before {
  border-color: white;
  background: white;
}

.admin-sidebar-bottom {
  border-color: rgba(255, 255, 255, 0.14);
}

.admin-sidebar-bottom a,
.admin-sidebar-bottom button {
  color: rgba(255, 255, 255, 0.65);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-sidebar-bottom a:hover,
.admin-sidebar-bottom button:hover {
  color: white;
}

.admin-main {
  min-width: 0;
}

.admin-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 68px;
  border-color: rgba(50, 59, 96, 0.11);
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  padding: 0 clamp(20px, 3vw, 42px);
  backdrop-filter: blur(16px);
}

.admin-topbar strong {
  color: var(--gm-navy-deep);
}

.admin-user {
  min-height: 36px;
  background: var(--gm-navy-deep);
  color: white;
  padding-inline: 14px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mobile-menu {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gm-navy-deep);
  color: white;
  place-items: center;
  font-size: 16px;
}

.admin-content {
  width: min(1360px, 100%);
  padding: clamp(24px, 3vw, 38px) clamp(18px, 3vw, 42px) 72px;
}

.admin-page-heading {
  margin-bottom: 24px;
}

.admin-page-heading h1 {
  max-width: 850px;
  color: var(--gm-navy-deep);
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 950;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.admin-page-heading > div > p:last-child {
  max-width: 680px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.admin-stats {
  gap: 16px;
  margin-bottom: 18px;
}

.admin-stats article {
  position: relative;
  overflow: hidden;
  min-height: 128px;
  border-color: rgba(50, 59, 96, 0.14);
  border-radius: 14px;
  padding: 23px;
  box-shadow: 0 13px 35px rgba(23, 28, 55, 0.05);
}

.admin-stats article::after {
  position: absolute;
  right: -28px;
  bottom: -42px;
  width: 112px;
  height: 112px;
  border: 18px solid rgba(249, 55, 0, 0.14);
  border-radius: 50%;
  content: "";
}

.admin-stats article:nth-child(1) {
  border-color: transparent;
  background: var(--gm-navy-deep);
  color: white;
}

.admin-stats article:nth-child(3) {
  border-color: transparent;
  background: var(--gm-orange-readable);
  color: white;
}

.admin-stats article:nth-child(1) span,
.admin-stats article:nth-child(1) small,
.admin-stats article:nth-child(3) span,
.admin-stats article:nth-child(3) small {
  color: rgba(255, 255, 255, 0.72);
}

.admin-stats article span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.admin-stats article strong {
  color: inherit;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(26px, 2.5vw, 34px);
  font-weight: 950;
  letter-spacing: -0.05em;
}

.admin-panel,
.project-progress-card,
.project-data-card,
.project-share-panel {
  border-color: rgba(50, 59, 96, 0.14);
  border-radius: 14px;
  background: white;
  box-shadow: 0 13px 38px rgba(23, 28, 55, 0.045);
}

.panel-head {
  min-height: 68px;
  border-color: rgba(50, 59, 96, 0.11);
  padding: 18px 22px;
}

.panel-head h2 {
  color: var(--gm-navy-deep);
  font-size: 12px;
  font-weight: 950;
  letter-spacing: -0.015em;
}

.panel-head p {
  color: var(--muted);
}

.panel-head > a {
  color: var(--gm-orange);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-event-list > a,
.admin-invoice-list > a,
.service-admin-list article,
.content-list article,
.project-doc-card > div:nth-child(2) > a {
  border-color: rgba(50, 59, 96, 0.1);
  transition: background 160ms ease;
}

.admin-event-list > a:hover,
.admin-invoice-list > a:hover,
.service-admin-list article:hover,
.content-list article:hover,
.project-doc-card > div:nth-child(2) > a:hover {
  background: rgba(245, 241, 233, 0.75);
}

.admin-date {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  background: var(--gm-cream);
  color: var(--gm-navy-deep);
}

.admin-date strong {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 17px;
  font-weight: 950;
}

.admin-date small,
.admin-event-list small,
.admin-invoice-list small,
.service-admin-list small,
.content-list small,
.portfolio-admin-grid small {
  color: var(--muted);
}

.quick-actions {
  border-color: rgba(50, 59, 96, 0.11);
}

.quick-actions a {
  border-color: rgba(50, 59, 96, 0.16);
  border-radius: 9px;
  color: var(--gm-navy);
  font-weight: 900;
}

.quick-actions a:hover {
  border-color: var(--gm-orange);
  color: var(--gm-orange);
}

.status {
  padding: 6px 10px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.status-baru,
.status-draft {
  background: #eef0f7;
  color: var(--gm-navy);
}

.status-konsep,
.status-terkirim,
.status-finalisasi,
.status-sebagian {
  background: #e8edff;
  color: var(--gm-blue);
}

.status-persiapan,
.status-dp {
  background: #fff0d1;
  color: #805e00;
}

.status-selesai,
.status-lunas {
  background: #e4f0e8;
  color: #28633c;
}

.status-batal,
.status-belum {
  background: #fff0eb;
  color: #963413;
}

.admin-table th {
  background: var(--gm-navy-deep);
  color: rgba(255, 255, 255, 0.82);
  padding: 14px 18px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.admin-table td {
  border-color: rgba(50, 59, 96, 0.1);
  padding: 17px 18px;
}

.admin-table tbody tr {
  transition: background 150ms ease;
}

.admin-table tbody tr:hover {
  background: rgba(245, 241, 233, 0.65);
}

.admin-table td small {
  color: var(--muted);
}

.admin-table td > a,
.actions a,
.add-row-button,
.project-doc-card a i {
  color: var(--gm-navy);
  font-weight: 900;
}

.actions a:hover,
.add-row-button:hover {
  color: var(--gm-orange);
}

.actions button {
  color: #b43d1b;
}

.filter-tabs a {
  color: var(--muted);
  font-weight: 900;
}

.filter-tabs a.active {
  background: var(--gm-orange-readable);
  color: white;
}

.side-form {
  top: 92px;
}

.form-section {
  border-color: rgba(50, 59, 96, 0.1);
}

.form-section > div:first-child h2,
.upgrade-intro h2,
.upgrade-success h2,
.invoice-view-head strong,
.project-progress-card strong,
.project-data-card strong,
.content-list p {
  color: var(--gm-navy-deep);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  letter-spacing: -0.035em;
}

.service-admin-list article > span {
  color: var(--gm-orange);
  font-weight: 950;
}

.portfolio-admin-grid article {
  border-color: rgba(50, 59, 96, 0.14);
  border-radius: 10px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.portfolio-admin-grid article:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px rgba(23, 28, 55, 0.11);
}

.portfolio-admin-grid img {
  height: 175px;
}

.invoice-item-row button {
  border-radius: 8px;
  background: #fff0eb;
  color: #a83b1b;
}

.invoice-view-head,
.invoice-view-bottom,
.public-invoice-link,
.project-detail-fields,
.admin-stage-row,
.stage-move-form,
.upgrade-action {
  border-color: rgba(50, 59, 96, 0.1);
}

.public-invoice-link {
  background: var(--gm-cream);
}

.admin-progress-track {
  background: #e8e9ef;
}

.admin-progress-track i {
  background: linear-gradient(90deg, var(--gm-orange), var(--gm-orange-readable));
}

.stage-number {
  background: #eef0f7;
  color: var(--gm-navy);
}

.stage-row-completed .stage-number {
  background: #e4f0e8;
  color: #28633c;
}

.stage-row-active .stage-number {
  background: var(--gm-orange-readable);
  color: white;
}

.client-note-box {
  background: var(--gm-cream);
}

/* Client portal */
.portal-body {
  --portal-accent-text: #c4320a;
  background:
    radial-gradient(circle at 88% 6%, rgba(249, 55, 0, 0.1), transparent 280px),
    var(--gm-cream);
}

.portal-topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  height: 84px;
  border-color: rgba(50, 59, 96, 0.11);
  background: rgba(255, 255, 255, 0.94);
  padding: 0 max(20px, calc((100% - 880px) / 2));
  backdrop-filter: blur(16px);
}

.portal-topbar > a:last-child {
  border: 1px solid var(--gm-navy);
  border-radius: 999px;
  color: var(--gm-navy);
  padding: 10px 14px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.portal-topbar > a:last-child:hover {
  border-color: var(--portal-accent-text);
  color: var(--portal-accent-text);
}

.portal-topbar > a:last-child:hover {
  border-color: var(--gm-orange);
  color: var(--gm-orange);
}

.portal-shell {
  width: min(880px, calc(100% - 36px));
  margin: 32px auto 84px;
}

.portal-hero-card {
  position: relative;
  isolation: isolate;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--gm-navy-deep), var(--gm-blue));
  padding: clamp(28px, 5vw, 48px);
  box-shadow: 0 28px 72px rgba(23, 28, 55, 0.24);
}

.portal-hero-card::after {
  position: absolute;
  z-index: -1;
  top: -82px;
  right: -72px;
  width: 230px;
  height: 230px;
  border: 34px solid var(--gm-orange);
  border-radius: 50%;
  content: "";
  opacity: 0.9;
}

.portal-hero-top {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 900;
}

.portal-hero-card h1 {
  margin-top: 42px;
  color: white;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(40px, 7vw, 64px);
  font-weight: 950;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.portal-hero-card > p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
}

.portal-event-grid {
  border-color: rgba(255, 255, 255, 0.2);
}

.portal-event-grid span,
.portal-current-stage span {
  color: rgba(255, 255, 255, 0.64);
}

.portal-event-grid strong {
  color: white;
}

.portal-current-stage {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.09);
}

.portal-current-stage strong {
  color: var(--gm-yellow);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 950;
}

.portal-progress-card,
.portal-section {
  border-color: rgba(50, 59, 96, 0.14);
  border-radius: 15px;
  box-shadow: 0 12px 34px rgba(23, 28, 55, 0.045);
}

.portal-progress-card {
  margin-top: 18px;
  padding: 24px;
}

.portal-progress-card strong {
  color: var(--gm-navy-deep);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 950;
}

.portal-progress-track {
  height: 10px;
  background: #e7e8ee;
}

.portal-progress-track i {
  background: linear-gradient(90deg, var(--gm-orange), var(--gm-orange-readable));
}

.portal-section {
  margin-top: 18px;
  padding: clamp(22px, 4vw, 32px);
}

.portal-section-heading span {
  color: var(--portal-accent-text);
  color: var(--gm-orange);
  font-weight: 950;
}

.portal-section-heading h2 {
  color: var(--gm-navy-deep);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 27px;
  font-weight: 950;
  letter-spacing: -0.045em;
}

.portal-timeline,
.portal-stage,
.rab-client-form,
.payment-summary .remaining-row {
  border-color: rgba(50, 59, 96, 0.11);
}

.portal-stage-icon {
  background: #eef0f7;
  color: var(--gm-navy);
  font-weight: 950;
}

.portal-stage-completed .portal-stage-icon {
  background: #e4f0e8;
  color: #28633c;
}

.portal-stage-active .portal-stage-icon {
  background: var(--gm-orange-readable);
  color: white;
}

.portal-stage summary strong {
  color: var(--gm-navy-deep);
  font-weight: 900;
}

.portal-stage-content {
  border-radius: 10px;
  background: var(--gm-cream);
}

.portal-note {
  border-color: var(--gm-orange);
}

.rab-value {
  border-radius: 11px;
  background: var(--gm-navy-deep);
  color: white;
  padding: 20px;
}

.rab-value span {
  color: rgba(255, 255, 255, 0.67);
}

.rab-value strong {
  color: white;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.portal-documents article {
  border-color: rgba(50, 59, 96, 0.14);
  border-radius: 10px;
}

.document-icon {
  border-radius: 9px;
  background: rgba(249, 55, 0, 0.1);
  color: var(--gm-orange);
}

.portal-documents a {
  color: var(--gm-navy);
  font-weight: 900;
}

.portal-documents a:hover {
  color: var(--gm-orange);
}

.payment-summary .paid-value {
  color: #28633c;
}

.portal-contact-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--gm-orange-readable);
  padding: 36px;
}

.portal-contact-card::after {
  position: absolute;
  right: -52px;
  bottom: -66px;
  width: 160px;
  height: 160px;
  border: 25px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  content: "";
}

.portal-contact-card > span {
  color: rgba(255, 255, 255, 0.8);
}

.portal-contact-card h2 {
  position: relative;
  z-index: 1;
  color: white;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.portal-contact-card .btn {
  position: relative;
  z-index: 1;
}

/* Invoice & receipt */
.invoice-public-body {
  background:
    radial-gradient(circle at 90% 4%, rgba(249, 55, 0, 0.1), transparent 250px),
    var(--gm-cream);
}

.invoice-actions {
  color: var(--gm-navy);
  font-weight: 900;
}

.invoice-actions button {
  border-color: var(--gm-navy);
  background: var(--gm-navy-deep);
  color: white;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.invoice-actions button:hover {
  background: var(--gm-orange-readable);
}

.invoice-document,
.receipt-document {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(50, 59, 96, 0.12);
  border-radius: 16px;
  box-shadow: 0 28px 80px rgba(23, 28, 55, 0.15);
}

.invoice-document::before,
.receipt-document::before {
  position: absolute;
  inset: 0 0 auto;
  height: 8px;
  background: linear-gradient(90deg, var(--gm-navy-deep) 0 72%, var(--gm-orange) 72%);
  content: "";
}

.invoice-document > header,
.receipt-document header,
.invoice-document footer,
.receipt-document footer {
  border-color: rgba(50, 59, 96, 0.14);
}

.invoice-document > header small,
.invoice-parties-public span,
.invoice-summary-public span,
.invoice-document footer span,
.receipt-document header small,
.receipt-document section > span,
.receipt-amount span,
.receipt-document footer span {
  color: var(--gm-orange);
  font-weight: 950;
}

.invoice-parties-public h1,
.receipt-document h1 {
  color: var(--gm-navy-deep);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 950;
  letter-spacing: -0.045em;
}

.invoice-table-public thead {
  background: var(--gm-navy-deep);
}

.invoice-table-public td {
  border-color: rgba(50, 59, 96, 0.1);
  color: var(--ink);
}

.invoice-summary-public .grand-total {
  border-color: rgba(50, 59, 96, 0.16);
  color: var(--gm-orange-readable);
}

.invoice-summary-public .grand-total dd {
  font-size: 15px;
  font-weight: 950;
}

.receipt-paid-mark {
  border-color: var(--gm-orange-readable);
  border-radius: 6px;
  color: var(--gm-orange-readable);
}

.receipt-amount {
  border-left: 6px solid var(--gm-orange);
  border-radius: 10px;
  background: var(--gm-cream);
}

.receipt-amount strong {
  color: var(--gm-navy-deep);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 950;
  letter-spacing: -0.04em;
}

.receipt-document > dl div {
  border-color: rgba(50, 59, 96, 0.1);
}

.financial-status-preview {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 78px;
  border: 1px solid rgba(50, 59, 96, 0.14);
  border-radius: 9px;
  background: var(--gm-cream);
  padding: 13px 14px;
}

.financial-status-preview span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.financial-status-preview strong {
  color: var(--gm-navy-deep);
  font-size: 12px;
}

.financial-status-preview small {
  color: var(--muted);
  font-size: 9px;
}

.payment-summary .payment-overpaid {
  border-radius: 8px;
  background: #fff0eb;
  color: #963413;
  padding: 11px 13px;
}

@media (max-width: 1100px) {
  .booking-public-shell {
    grid-template-columns: minmax(340px, 0.8fr) minmax(480px, 1.2fr);
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .booking-public-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .booking-public-intro {
    min-height: 620px;
  }

  .booking-public-form {
    margin-inline: auto;
  }

  .admin-dashboard-grid,
  .admin-split-layout,
  .content-admin-grid,
  .project-admin-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-form,
  .project-side-column {
    position: static;
  }

  .project-side-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .setup-body,
  .login-body {
    padding: 22px 14px;
  }

  .setup-body::before,
  .login-body::before {
    top: -86px;
    right: -90px;
    width: 230px;
    height: 230px;
    border-width: 34px;
  }

  .setup-card,
  .login-card {
    border-radius: 14px;
    padding: 34px 24px;
  }

  .booking-public-intro {
    min-height: 590px;
    padding: 30px 24px 40px;
  }

  .booking-public-intro h1 {
    font-size: clamp(44px, 12vw, 66px);
  }

  .booking-public-form {
    padding: 52px 22px;
  }

  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .admin-shell {
    display: block;
  }

  .admin-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -285px;
    width: 270px;
    height: 100vh;
    transition: left 190ms ease;
  }

  .admin-sidebar.open {
    left: 0;
    box-shadow: 24px 0 70px rgba(7, 11, 31, 0.32);
  }

  .mobile-menu {
    display: grid;
  }

  .admin-topbar {
    height: 68px;
    padding-inline: 14px;
  }

  .admin-content {
    padding: 30px 14px 64px;
  }

  .admin-page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-page-heading h1 {
    font-size: clamp(38px, 12vw, 52px);
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-stats article {
    min-height: 140px;
    padding: 18px;
  }

  .panel-search {
    align-items: stretch;
  }

  .panel-search form {
    width: 100%;
  }

  .form-section {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
    padding: 24px 18px;
  }

  .heading-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .project-summary-grid,
  .project-share-panel,
  .project-side-column {
    grid-template-columns: minmax(0, 1fr);
  }

  .portal-topbar {
    height: 72px;
    padding-inline: 14px;
  }

  .portal-topbar .public-brand > img {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
  }

  .portal-topbar .public-brand strong {
    font-size: 14px;
  }

  .portal-shell {
    width: min(100% - 22px, 880px);
    margin-top: 14px;
  }

  .portal-hero-card {
    border-radius: 15px;
    padding: 25px 20px;
  }

  .portal-event-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .portal-section {
    padding: 20px 17px;
  }

  .portal-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .portal-stage-content {
    margin-left: 0;
  }

  .portal-stage-content dl div {
    grid-template-columns: minmax(0, 1fr);
  }

  .rab-client-form > div {
    flex-direction: column;
  }

  .portal-documents article {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .portal-documents article a:last-child {
    grid-column: 2 / -1;
  }

  .invoice-public-body {
    padding: 0;
  }

  .invoice-actions {
    padding: 14px;
  }

  .invoice-document,
  .receipt-document {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 40px 22px;
  }

  .invoice-parties-public,
  .invoice-summary-public {
    grid-template-columns: minmax(0, 1fr);
    gap: 30px;
  }

  .receipt-document footer {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .receipt-document footer > div:last-child {
    text-align: left;
  }
}

@media (max-width: 520px) {
  .public-brand > img,
  .setup-brand > img,
  .login-brand > img {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .booking-public-intro {
    min-height: 560px;
  }

  .form-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .admin-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .portfolio-admin-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .quick-actions {
    grid-template-columns: minmax(0, 1fr);
  }

  .portal-hero-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .portal-hero-card h1 {
    margin-top: 28px;
  }

  .rab-value {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .invoice-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .invoice-actions button {
    min-height: 44px;
  }

  .invoice-document > header,
  .receipt-document header {
    align-items: flex-start;
    flex-direction: column;
    gap: 22px;
  }

  .invoice-document > header > div,
  .receipt-document header > div {
    text-align: left;
  }
}

@page {
  margin: 8mm;
}

@media print {
  html,
  body {
    min-width: 0;
    background: white !important;
  }

  *,
  *::before,
  *::after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .no-print {
    display: none !important;
  }

  .invoice-public-body {
    min-height: 0;
    margin: 0;
    background: white !important;
    padding: 0;
  }

  .invoice-document,
  .receipt-document {
    width: 100%;
    max-width: 930px;
    min-height: 0;
    overflow: hidden;
    margin: 0 auto;
    border: 1px solid rgba(50, 59, 96, 0.16);
    border-radius: 16px;
    background: white !important;
    box-shadow: none;
    padding: 28px 42px;
    break-inside: avoid;
  }

  .invoice-document > header {
    padding-bottom: 22px;
  }

  .invoice-parties-public {
    margin: 0;
    padding: 24px 0;
  }

  .invoice-summary-public {
    margin: 0;
    padding: 22px 0 24px;
  }

  .invoice-document footer {
    margin-top: 0;
    padding-top: 20px;
  }

  .invoice-document::before,
  .receipt-document::before {
    display: block;
    background: linear-gradient(90deg, var(--gm-navy-deep) 0 72%, var(--gm-orange) 72%) !important;
  }

  .invoice-table-public {
    overflow: visible;
  }

  .invoice-table-public thead,
  .admin-table thead {
    background: var(--gm-navy-deep) !important;
    color: white !important;
  }

  .invoice-table-public tr,
  .invoice-summary-public,
  .invoice-document footer,
  .receipt-document section,
  .receipt-amount,
  .receipt-document > dl div {
    break-inside: avoid;
  }
}

@media print and (orientation: portrait) {
  .invoice-document,
  .receipt-document {
    max-width: 760px;
    padding: 22px 30px;
  }

  .invoice-document > header { padding-bottom: 17px; }
  .invoice-parties-public { gap: 45px; padding: 18px 0; }
  .invoice-summary-public { gap: 45px; padding: 17px 0 18px; }
  .invoice-document footer { padding-top: 15px; }
}

.finance-stat-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:20px; }
.finance-stat-grid article { padding:22px;display:grid;gap:8px; }
.finance-stat-grid span,.finance-mini-summary span { color:#687083;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.08em; }
.finance-stat-grid strong { color:var(--gm-navy-deep);font-size:24px; }
.finance-stat-grid small { color:#7a8190; }
.negative-value { color:#c83321!important; }
.finance-layout { display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,.75fr);gap:18px;align-items:start; }
.finance-form-layout { display:grid;grid-template-columns:minmax(0,1.9fr) minmax(320px,.8fr);gap:18px;align-items:start; }
.finance-due-list { display:grid; }
.finance-due-list a { display:flex;justify-content:space-between;gap:15px;padding:15px 0;border-bottom:1px solid #e6e7ec;text-decoration:none;color:inherit; }
.finance-due-list span { display:grid;gap:4px; }
.finance-due-list small { color:#7a8190; }
.finance-mini-summary { display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:22px; }
.finance-mini-summary div,.financial-status-preview { padding:14px;border:1px solid #e1e3e9;border-radius:10px;display:grid;gap:5px; }
.inline-check { display:flex!important;align-items:center;gap:10px; }
.inline-check input { width:auto!important; }
.delete-text-button { width:100%;margin-top:8px;border:0;background:transparent;color:#b42c20;font-weight:800;cursor:pointer;padding:10px; }
.finance-form-layout > aside { display:grid;gap:18px; }
.vendor-payment-panel { padding:22px; }
.payment-history { display:grid;margin-top:18px;border-top:1px solid #e1e3e9; }
.payment-history > div { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 0;border-bottom:1px solid #e8e9ed; }
.payment-history span { display:grid;gap:4px; }
.payment-history small { color:#737b8c; }
.payment-history button { border:0;background:transparent;color:#b42c20;font-size:11px;font-weight:850;cursor:pointer; }
@media(max-width:1100px){.finance-stat-grid{grid-template-columns:repeat(2,1fr)}.finance-layout,.finance-form-layout{grid-template-columns:1fr}}
@media(max-width:600px){.finance-stat-grid{grid-template-columns:1fr}}

/* Dashboard interaction and responsive usability */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.skip-link {
  position: fixed;
  z-index: 200;
  top: 8px;
  left: 8px;
  transform: translateY(-150%);
  border-radius: 8px;
  background: white;
  color: var(--gm-navy-deep);
  padding: 11px 14px;
  font-size: 12px;
  font-weight: 850;
}

.skip-link:focus { transform: translateY(0); }

.admin-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.admin-sidebar-close {
  display: none;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  color: white;
  cursor: pointer;
  font-size: 25px;
}

.admin-nav-search { display: block; margin: -18px 5px 15px; }
.admin-nav-search input {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 9px;
  background: rgba(255,255,255,.07);
  color: white;
  padding: 9px 12px;
  font-size: 11px;
}
.admin-nav-search input::placeholder { color: rgba(255,255,255,.48); }
.admin-nav-search input:focus { border-color: rgba(255,255,255,.48); outline: 0; }

.admin-sidebar nav a::before { display: none; }
.admin-sidebar nav a i {
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  color: currentColor;
  font-size: 14px;
  font-style: normal;
  line-height: 1;
}
.admin-sidebar nav a[hidden] { display: none; }
.admin-sidebar-bottom button[data-sidebar-collapse] {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.admin-sidebar-bottom button[data-sidebar-collapse] i { font-style: normal; }

.admin-sidebar-backdrop {
  position: fixed;
  z-index: 29;
  inset: 0;
  display: none;
  border: 0;
  background: rgba(7,11,31,.52);
  backdrop-filter: blur(3px);
}

.admin-breadcrumb { display: inline-flex; align-items: center; gap: 8px; }
.admin-breadcrumb i { color: rgba(50,59,96,.28); font-style: normal; }

.admin-alert {
  position: fixed;
  z-index: 90;
  top: 84px;
  right: 22px;
  display: flex;
  width: min(430px, calc(100% - 28px));
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 18px 52px rgba(23,28,55,.17);
}
.admin-alert button {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.55);
  color: inherit;
  cursor: pointer;
  font-size: 18px;
}
.admin-dialog-body > .admin-alert {
  position: static;
  width: 100%;
  margin-bottom: 18px;
  box-shadow: none;
}

.admin-mobile-nav { display: none; }

[data-money-input] {
  appearance: textfield;
  font-variant-numeric: tabular-nums;
}
[data-money-input]::-webkit-inner-spin-button,
[data-money-input]::-webkit-outer-spin-button { margin: 0; appearance: none; }
.money-input-preview {
  display: block;
  margin-top: -3px;
  color: var(--gm-blue);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0;
}

body.admin-dialog-open { overflow: hidden; }
.admin-dialog {
  width: min(760px, calc(100% - 28px));
  max-width: none;
  max-height: min(90vh, 900px);
  margin: auto;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: white;
  padding: 0;
  color: var(--ink);
  box-shadow: 0 34px 100px rgba(7,11,31,.34);
}
.admin-dialog::backdrop {
  background: rgba(7,11,31,.62);
  backdrop-filter: blur(5px);
}
.admin-dialog-shell {
  display: flex;
  max-height: min(90vh, 900px);
  flex-direction: column;
}
.admin-dialog-header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid rgba(50,59,96,.11);
  background: linear-gradient(135deg, #fff, #f8f5ef);
  padding: 22px 24px;
}
.admin-dialog-header > div { display: grid; gap: 5px; }
.admin-dialog-header span {
  color: var(--gm-orange);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.admin-dialog-header h2 {
  margin: 0;
  color: var(--gm-navy-deep);
  font-size: 22px;
  letter-spacing: -.035em;
}
.admin-dialog-header p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.admin-dialog-header > button,
.admin-dialog-header-actions > button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 1px solid rgba(50,59,96,.16);
  border-radius: 50%;
  background: white;
  color: var(--gm-navy-deep);
  cursor: pointer;
  place-items: center;
  font-size: 24px;
}
.admin-dialog-header-actions {
  display: flex !important;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px !important;
}
.dialog-new-link {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border: 1px solid rgba(50,59,96,.16);
  border-radius: 999px;
  color: var(--gm-navy);
  padding: 8px 13px;
  font-size: 9px;
  font-weight: 850;
}
.admin-dialog-body { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 24px; }
.admin-dialog .dialog-form { padding: 0; }
.admin-split-layout.side-form-modalized,
.finance-form-layout.side-form-modalized { grid-template-columns: minmax(0,1fr); }
.modalized-admin-form {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.admin-dialog-sideform .admin-dialog-body { padding: 0; }
.admin-dialog-sideform .modalized-admin-form > .admin-form { padding: 24px; }
.admin-dialog-actions {
  position: sticky;
  bottom: -24px;
  z-index: 2;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 6px -24px -24px;
  border-top: 1px solid rgba(50,59,96,.11);
  background: rgba(255,255,255,.96);
  padding: 16px 24px;
  backdrop-filter: blur(12px);
}
.admin-dialog-actions .btn { min-width: 150px; }
.dialog-notice {
  border: 1px solid #efd7ae;
  border-radius: 10px;
  background: #fff8e9;
  color: #765918;
  padding: 14px 16px;
  font-size: 11px;
  line-height: 1.55;
}
.dialog-notice-success { border-color: #cfe5d5; background: #edf7ef; color: #29643d; }

.vendor-bill-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.vendor-bill-overview article { display: grid; min-height: 112px; align-content: center; gap: 8px; padding: 18px 20px; }
.vendor-bill-overview span { color: var(--muted); font-size: 9px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.vendor-bill-overview strong { color: var(--gm-navy-deep); font-size: 23px; letter-spacing: -.04em; }
.vendor-bill-overview small { color: var(--muted); font-size: 9px; }
.vendor-bill-overview article.is-warning { border-color: rgba(223,53,0,.28); background: #fff8f5; }
.vendor-bill-overview article.is-warning strong { color: #a53416; }
.vendor-bill-list { overflow: visible; }
.overdue-text { color: #b13b1c !important; font-weight: 800; }
.vendor-row-actions { gap: 6px; }
.table-action {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(50,59,96,.16);
  border-radius: 8px;
  padding: 7px 10px !important;
  font-size: 9px !important;
  text-decoration: none;
}
.table-action:hover { border-color: var(--gm-orange); }
.table-action-primary { border-color: var(--gm-navy-deep); background: var(--gm-navy-deep); color: white !important; }
.table-action-primary:hover { border-color: var(--gm-blue); background: var(--gm-blue); color: white !important; }
.actions .table-action {
  border: 1px solid rgba(50,59,96,.16);
  background: white;
  color: var(--gm-navy);
}
.actions .table-action-primary {
  border-color: var(--gm-navy-deep);
  background: var(--gm-navy-deep);
  color: white !important;
}
.actions .table-action-primary:hover { border-color: var(--gm-blue); background: var(--gm-blue); }

.payment-dialog-summary {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 10px;
  margin-bottom: 22px;
}
.payment-dialog-summary div {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(50,59,96,.13);
  border-radius: 10px;
  background: var(--gm-cream);
  padding: 14px;
}
.payment-dialog-summary span { color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.payment-dialog-summary strong { color: var(--gm-navy-deep); font-size: 15px; }
.payment-entry-form { border-bottom: 1px solid rgba(50,59,96,.12); padding-bottom: 24px !important; }
.fill-remaining-button {
  width: 100%;
  min-height: 44px;
  border: 1px dashed rgba(27,53,120,.35);
  border-radius: 9px;
  background: #f4f6ff;
  color: var(--gm-blue);
  cursor: pointer;
  padding: 10px 14px;
  font-size: 10px;
  font-weight: 850;
}
.fill-remaining-button:hover { border-style: solid; background: #e9edff; }
.payment-history-section { margin-top: 24px; }
.payment-history-heading span { color: var(--gm-orange); font-size: 8px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.payment-history-heading h3 { margin: 4px 0 0; color: var(--gm-navy-deep); font-size: 15px; }

@media (min-width: 761px) {
  .admin-body.sidebar-collapsed .admin-shell { grid-template-columns: 88px minmax(0,1fr); }
  .admin-body.sidebar-collapsed .admin-sidebar { padding-inline: 12px; }
  .admin-body.sidebar-collapsed .admin-brand { justify-content: center; margin-inline: 0; }
  .admin-body.sidebar-collapsed .admin-brand > img { width: 52px; height: 52px; flex-basis: 52px; }
  .admin-body.sidebar-collapsed .admin-brand strong,
  .admin-body.sidebar-collapsed .admin-nav-search,
  .admin-body.sidebar-collapsed .admin-sidebar nav a span,
  .admin-body.sidebar-collapsed .admin-sidebar-bottom a,
  .admin-body.sidebar-collapsed .logout-form,
  .admin-body.sidebar-collapsed [data-sidebar-collapse] span { display: none; }
  .admin-body.sidebar-collapsed .admin-sidebar nav a { justify-content: center; padding-inline: 10px; }
  .admin-body.sidebar-collapsed .admin-sidebar nav a i { width: 24px; height: 24px; flex-basis: 24px; font-size: 16px; }
  .admin-body.sidebar-collapsed .admin-sidebar-bottom { justify-items: center; }
  .admin-body.sidebar-collapsed [data-sidebar-collapse] { width: 44px; justify-content: center; }
  .admin-body.sidebar-collapsed [data-sidebar-collapse] i { transform: rotate(180deg); }
}

@media (max-width: 920px) {
  .vendor-bill-overview { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .vendor-bill-overview strong { font-size: 19px; }
}

@media (max-width: 760px) {
  .admin-body.admin-menu-open { overflow: hidden; }
  .admin-sidebar {
    z-index: 40;
    left: 0;
    width: min(320px, calc(100vw - 42px));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    transform: translateX(calc(-100% - 12px));
    transition: transform 190ms ease;
  }
  .admin-sidebar.open { left: 0; transform: translateX(0); }
  .admin-sidebar.open + .admin-sidebar-backdrop,
  .admin-menu-open .admin-sidebar-backdrop { display: block; }
  .admin-sidebar-close { display: grid; place-items: center; }
  .admin-brand { margin-bottom: 28px; }
  .admin-nav-search { margin-top: -12px; }
  .admin-sidebar-bottom button[data-sidebar-collapse] { display: none; }
  .admin-topbar { padding-inline: 12px; }
  .admin-breadcrumb { overflow: hidden; flex: 1; margin-inline: 10px; white-space: nowrap; }
  .admin-breadcrumb { font-size: 0; }
  .admin-breadcrumb strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; }
  .admin-breadcrumb i { display: none; }
  .admin-user { max-width: 116px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .admin-content { padding: 22px 12px calc(100px + env(safe-area-inset-bottom)); }
  .admin-page-heading { margin-bottom: 20px; }
  .admin-page-heading h1 { font-size: clamp(32px,10vw,42px); line-height: 1; }
  .admin-page-heading .btn,
  .heading-actions .btn,
  .heading-actions > button { flex: 1 1 145px; min-width: 0; }
  .admin-mobile-nav {
    position: fixed;
    z-index: 28;
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    min-height: 64px;
    overflow: hidden;
    border: 1px solid rgba(50,59,96,.14);
    border-radius: 18px;
    background: rgba(255,255,255,.96);
    padding: 5px;
    box-shadow: 0 16px 48px rgba(23,28,55,.22);
    backdrop-filter: blur(16px);
  }
  .admin-mobile-nav a,
  .admin-mobile-nav button {
    display: grid;
    min-width: 0;
    min-height: 54px;
    align-content: center;
    justify-items: center;
    gap: 4px;
    border: 0;
    border-radius: 13px;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-size: 8px;
    font-weight: 850;
  }
  .admin-mobile-nav i { font-size: 17px; font-style: normal; line-height: 1; }
  .admin-mobile-nav .active { background: var(--gm-navy-deep); color: white; }
  .admin-alert { top: 76px; right: 14px; }
  .vendor-bill-overview { grid-template-columns: minmax(0,1fr); gap: 9px; }
  .vendor-bill-overview article { min-height: 88px; grid-template-columns: 1fr auto; align-items: center; }
  .vendor-bill-overview article small { grid-column: 1 / -1; }
  .admin-dialog { width: 100%; max-height: min(94dvh, 940px); margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .admin-dialog-shell { max-height: min(94dvh, 940px); }
  .admin-dialog-header { padding: 18px 16px; }
  .admin-dialog-header h2 { font-size: 19px; }
  .admin-dialog-body { padding: 18px 14px max(18px, env(safe-area-inset-bottom)); }
  .admin-dialog-actions { bottom: -18px; margin: 4px -14px -18px; padding: 13px 14px max(13px, env(safe-area-inset-bottom)); }
  .admin-dialog-actions .btn { min-width: 0; flex: 1; padding-inline: 12px; }
  .payment-dialog-summary { grid-template-columns: minmax(0,1fr); }
  .payment-dialog-summary div { grid-template-columns: 1fr auto; align-items: center; }
}

@media (max-width: 700px) {
  .mobile-card-table,
  .mobile-card-table tbody { display: block; width: 100%; }
  .mobile-card-table thead { display: none; }
  .mobile-card-table { padding: 10px; }
  .mobile-card-table tbody tr {
    display: block;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid rgba(50,59,96,.13);
    border-radius: 12px;
    background: white;
    padding: 8px 12px;
    box-shadow: 0 7px 20px rgba(23,28,55,.04);
  }
  .mobile-card-table tbody tr:last-child { margin-bottom: 0; }
  .mobile-card-table td {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(92px,.38fr) minmax(0,1fr);
    gap: 12px;
    align-items: start;
    border-top: 0;
    border-bottom: 1px solid rgba(50,59,96,.08);
    padding: 10px 2px;
    white-space: normal;
  }
  .mobile-card-table td:last-child { border-bottom: 0; }
  .mobile-card-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
  }
  .mobile-card-table td[colspan] { display: block; padding: 0; }
  .mobile-card-table td[colspan]::before { display: none; }
  .mobile-card-table td.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
  }
  .mobile-card-table td.actions::before { flex: 0 0 92px; padding-top: 9px; }
  .mobile-card-table td.actions > a,
  .mobile-card-table td.actions > button,
  .mobile-card-table td.actions > form { flex: 1 1 72px; }
  .mobile-card-table td.actions > form button { width: 100%; min-height: 34px; }
  .mobile-card-table .table-action { min-height: 40px; }
}

@media (max-width: 420px) {
  .admin-user { width: 38px; max-width: 38px; padding: 0; font-size: 0; }
  .admin-user::after { content: "ADM"; font-size: 8px; }
  .admin-dialog-header p { display: none; }
  .admin-dialog-actions { flex-direction: column-reverse; }
  .admin-dialog-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* WO end-to-end v4.0 */
.progress-width-8 { width: 8%; }
.progress-width-15 { width: 15%; }
.progress-width-23 { width: 23%; }
.progress-width-31 { width: 31%; }
.progress-width-38 { width: 38%; }
.progress-width-46 { width: 46%; }
.progress-width-54 { width: 54%; }
.progress-width-62 { width: 62%; }
.progress-width-69 { width: 69%; }
.progress-width-77 { width: 77%; }
.progress-width-85 { width: 85%; }
.progress-width-92 { width: 92%; }

.admin-user { display: flex; height: auto; min-width: 110px; flex-direction: column; align-items: flex-start; justify-content: center; text-decoration: none; }
.admin-user small { color: rgba(255,255,255,.68); font-size: 7px; line-height: 1.25; }
.wo-section-gap { margin-top: 22px; }
.wo-two-column { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; align-items: start; }
.wo-metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.wo-metric-grid > article { min-height: 126px; display: flex; flex-direction: column; justify-content: center; }
.wo-metric-grid span,.wo-card-list span,.wo-task-list article > div > span,.wo-list-row small,.wo-version-list small { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.wo-metric-grid strong { margin: 6px 0; color: var(--gm-navy-deep); font-size: clamp(26px,3vw,40px); line-height: 1; }
.wo-metric-grid small { color: var(--muted); }
.wo-tabs { display: flex; overflow-x: auto; gap: 7px; margin: -8px 0 22px; border-bottom: 1px solid rgba(50,59,96,.12); padding: 0 0 10px; scrollbar-width: thin; }
.wo-tabs a { min-height: 42px; display: inline-flex; flex: 0 0 auto; align-items: center; border-radius: 9px; color: var(--muted); padding: 0 14px; font-size: 9px; font-weight: 900; letter-spacing: .04em; text-decoration: none; text-transform: uppercase; }
.wo-tabs a:hover,.wo-tabs a.active { background: var(--gm-navy-deep); color: white; }
.wo-card-list,.wo-task-list { display: grid; gap: 10px; }
.wo-card-list article,.wo-task-list article,.wo-list-row { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; border: 1px solid rgba(50,59,96,.11); border-radius: 12px; background: #fff; padding: 15px 16px; }
.wo-card-list h3,.wo-task-list h3 { margin: 4px 0; color: var(--gm-navy-deep); font-size: 16px; }
.wo-card-list p,.wo-task-list p,.wo-list-row p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.wo-list-row > div { min-width: 0; }
.wo-list-row strong,.wo-list-row small { display: block; }
.wo-list-row > em { color: var(--muted); font-size: 10px; font-style: normal; font-weight: 800; }
.wo-task-list article { border-left: 4px solid #aeb5c2; }
.wo-task-list article.priority-high { border-left-color: #f39a36; }
.wo-task-list article.priority-urgent { border-left-color: #c93d42; }
.wo-status-form { min-width: 150px; display: flex; gap: 7px; align-items: center; }
.wo-status-form select { min-height: 38px; }
.wo-task-actions { display: grid; gap: 6px; }
.wo-task-actions > form:last-child { margin-left: auto; }
.wo-checklist { display: grid; gap: 4px; margin-top: 11px; }
.wo-checklist form { margin: 0; }
.wo-checklist button { border: 0; background: transparent; color: var(--gm-navy-deep); padding: 3px 0; text-align: left; cursor: pointer; }
.wo-checklist button.done { color: var(--muted); text-decoration: line-through; }
.wo-rab-summary { display: grid; gap: 8px; }
.wo-rab-summary strong { color: var(--gm-navy-deep); font-size: 28px; }
.wo-rab-summary p { color: var(--muted); line-height: 1.65; }
.wo-rab-layout { display: grid; grid-template-columns: minmax(220px,280px) minmax(0,1fr); gap: 22px; align-items: start; }
.wo-version-list { position: sticky; top: 90px; }
.wo-version-list > a { display: grid; gap: 3px; border: 1px solid rgba(50,59,96,.1); border-radius: 10px; color: var(--gm-navy-deep); margin-bottom: 8px; padding: 12px; text-decoration: none; }
.wo-version-list > a.active { border-color: var(--gm-orange); background: rgba(249,55,0,.05); box-shadow: inset 3px 0 var(--gm-orange); }
.wo-version-list > a span { font-size: 11px; font-weight: 850; }
.wo-rab-table input,.wo-rab-table select { min-width: 110px; width: 100%; margin: 2px 0; }
.wo-rab-table td:first-child { min-width: 240px; }
.wo-rab-table td:last-child strong,.wo-rab-table td:last-child small { display: block; }
.wo-total-box { display: flex; align-items: center; justify-content: space-between; border-radius: 12px; background: var(--gm-navy-deep); color: white; margin: 18px 0; padding: 18px; }
.wo-total-box strong { font-size: 24px; }
.wo-submit-rab { margin-top: 12px; }
.wo-secret-box { display: grid; gap: 7px; border-radius: 12px; background: #f4f5f8; margin: 14px 0; padding: 16px; }
.wo-secret-box code { overflow-wrap: anywhere; color: var(--gm-navy-deep); font-size: 18px; font-weight: 900; letter-spacing: .08em; }
.wo-secret-box small { overflow-wrap: anywhere; color: var(--muted); }
.wo-inline-form { display: flex; gap: 12px; align-items: end; }
.wo-inline-form label { flex: 1; }
.wo-danger-form { margin-top: 16px; }
.wo-return-form { display: grid; min-width: 220px; grid-template-columns: repeat(3,70px); gap: 5px; }
.wo-return-form input { min-width: 0; }
.wo-return-form input[name=return_notes],.wo-return-form button { grid-column: 1/-1; }
.wo-rundown-live { display: grid; min-width: 360px; grid-template-columns: 110px 74px minmax(120px,1fr) auto; gap: 5px; align-items: center; }
.wo-rundown-live select,.wo-rundown-live input { min-width: 0; }
.wo-calendar-layout { display: grid; grid-template-columns: minmax(0,1fr) 330px; gap: 20px; align-items: start; }
.wo-calendar-layout main { display: grid; gap: 14px; }
.wo-calendar-day { display: grid; grid-template-columns: 105px minmax(0,1fr); gap: 18px; }
.wo-calendar-day > header { display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid rgba(50,59,96,.1); }
.wo-calendar-day > header strong { color: var(--gm-orange-readable); font-size: 38px; line-height: 1; }
.wo-calendar-day > header span { color: var(--muted); margin-top: 6px; font-size: 9px; text-align: center; text-transform: uppercase; }
.wo-calendar-day > div { display: grid; gap: 8px; }
.wo-calendar-day article { display: grid; grid-template-columns: 74px minmax(0,1fr) auto; gap: 10px; align-items: center; border-left: 3px solid #8d94a3; padding: 8px 0 8px 12px; }
.wo-calendar-day article > span { color: var(--muted); font-size: 8px; font-weight: 900; text-transform: uppercase; }
.wo-calendar-day article strong,.wo-calendar-day article small { display: block; }
.wo-calendar-day article small { color: var(--muted); margin-top: 3px; }
.wo-calendar-day article a { font-size: 9px; font-weight: 850; }
.wo-calendar-day .calendar-type-event { border-color: var(--gm-orange); }
.wo-calendar-day .calendar-type-task { border-color: #c93d42; }
.wo-calendar-day .calendar-type-team { border-color: #4377c4; }
.wo-calendar-day .calendar-type-vendor { border-color: #8057a8; }
.wo-calendar-day .calendar-type-inventory { border-color: #3a8d71; }
.wo-conflict-panel { position: sticky; top: 90px; }
.wo-conflict-panel article { display: grid; gap: 3px; border-bottom: 1px solid rgba(50,59,96,.09); padding: 11px 0; }
.wo-conflict-panel article > span { color: #b23137; font-size: 8px; font-weight: 900; text-transform: uppercase; }
.wo-conflict-panel article small { color: var(--muted); }
.wo-all-clear { min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); text-align: center; }
.wo-all-clear > span { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; background: #dff2e9; color: #1e7b58; font-size: 22px; }
.wo-all-clear strong { color: var(--gm-navy-deep); margin: 10px 0 4px; }
.wo-filter-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; }
.wo-filter-bar label { min-width: 150px; flex: 1; }
.wo-filter-bar .btn { flex: 0 0 auto; }
.table-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.table-actions form { margin: 0; }
.severity-high,.severity-critical { border-left: 4px solid #c93d42; }
.severity-medium { border-left: 4px solid #f39a36; }
.portal-event-list,.portal-task-list { display: grid; gap: 9px; }
.portal-event-list article { display: grid; grid-template-columns: minmax(0,1fr) minmax(150px,.45fr); gap: 15px; border-bottom: 1px solid rgba(50,59,96,.09); padding: 13px 0; }
.portal-event-list article span,.portal-event-list article strong,.portal-event-list article small { display: block; }
.portal-event-list article span { color: var(--gm-orange-readable); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.portal-event-list article p { color: var(--muted); margin: 0; text-align: right; }
.portal-task-list article { display: flex; gap: 12px; align-items: center; border-bottom: 1px solid rgba(50,59,96,.09); padding: 10px 0; }
.portal-task-list article > span { width: 30px; height: 30px; display: grid; flex: 0 0 30px; place-items: center; border-radius: 50%; background: #f0f2f6; }
.portal-task-list strong,.portal-task-list small { display: block; }
.portal-task-list small { color: var(--muted); margin-top: 3px; }
.portal-rab-table { margin: 18px 0; }
.portal-legal-document {
  overflow: hidden;
  border: 1px solid rgba(50,59,96,.12);
  border-radius: 12px;
  background: #f8f8fa;
  margin: 18px 0;
}
.portal-legal-document summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--gm-navy-deep);
  padding: 15px 17px;
  font-size: 11px;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}
.portal-legal-document summary::-webkit-details-marker { display: none; }
.portal-legal-document summary i { font-style: normal; transition: transform .2s ease; }
.portal-legal-document[open] summary i { transform: rotate(180deg); }
.portal-legal-document pre {
  overflow: auto;
  max-height: 52vh;
  border-top: 1px solid rgba(50,59,96,.1);
  background: #fff;
  margin: 0;
  padding: 18px;
  color: var(--gm-navy-deep);
  font: 500 11px/1.75 Arial, Helvetica, sans-serif;
  white-space: pre-wrap;
}
.portal-acceptance-form {
  border-radius: 13px;
  background: rgba(20,30,67,.035);
  padding: 16px;
}
.portal-change-orders { display: grid; gap: 10px; margin-top: 22px; }
.portal-change-orders > h3 { margin: 0; color: var(--gm-navy-deep); font-size: 15px; }
.portal-change-orders > article {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(280px,.62fr);
  gap: 18px;
  align-items: start;
  border: 1px solid rgba(50,59,96,.11);
  border-radius: 12px;
  background: #fff;
  padding: 15px;
}
.portal-change-orders article strong,
.portal-change-orders article small { display: block; }
.portal-change-orders article small { margin-top: 4px; color: var(--muted); font-size: 9px; }
.portal-change-orders article p { margin: 8px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.portal-note {
  border-left: 4px solid var(--gm-orange);
  border-radius: 0 12px 12px 0;
  background: #f8f8fa;
  padding: 16px 18px;
}
.portal-note > span { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.portal-note > p { margin: 8px 0 0; color: var(--gm-navy-deep); font-size: 12px; line-height: 1.7; }
.wo-readonly-surface { border: 0; padding: 0; margin: 0; min-width: 0; opacity: 1; }
.wo-readonly-surface:disabled { color: inherit; }
.wo-readonly-surface:disabled input,.wo-readonly-surface:disabled select,.wo-readonly-surface:disabled textarea,.wo-readonly-surface:disabled button { cursor: not-allowed; opacity: .68; }
.wo-vendor-row { align-items: flex-start; }
.wo-vendor-actions { display: grid; gap: 8px; min-width: 230px; }
.wo-evaluation { border: 1px solid rgba(50,59,96,.12); border-radius: 10px; padding: 8px 10px; }
.wo-evaluation summary { cursor: pointer; color: var(--gm-navy-deep); font-size: 11px; font-weight: 800; }
.wo-evaluation .admin-form { margin-top: 10px; }

@media (max-width: 1050px) {
  .wo-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .wo-calendar-layout { grid-template-columns: minmax(0,1fr); }
  .wo-conflict-panel,.wo-version-list { position: static; }
  .wo-rab-layout { grid-template-columns: minmax(0,1fr); }
}
@media (max-width: 760px) {
  .wo-two-column,.wo-metric-grid { grid-template-columns: minmax(0,1fr); }
  .wo-calendar-day { grid-template-columns: minmax(0,1fr); }
  .wo-calendar-day > header { align-items: flex-start; border-right: 0; border-bottom: 1px solid rgba(50,59,96,.1); padding-bottom: 10px; }
  .wo-calendar-day > header span { text-align: left; }
  .wo-calendar-day article { grid-template-columns: 58px minmax(0,1fr); }
  .wo-calendar-day article a { grid-column: 2; }
  .wo-inline-form,.wo-status-form { width: 100%; flex-direction: column; align-items: stretch; }
  .wo-rundown-live { min-width: 280px; grid-template-columns: 1fr 72px; }
  .wo-rundown-live input[name=incident_notes],.wo-rundown-live button { grid-column: 1/-1; }
  .wo-task-list article { flex-direction: column; }
  .portal-event-list article { grid-template-columns: minmax(0,1fr); }
  .portal-event-list article p { text-align: left; }
  .portal-change-orders > article { grid-template-columns: minmax(0,1fr); }
  .portal-acceptance-form { padding: 12px; }
  .portal-legal-document pre { max-height: 44vh; padding: 14px; }
}

/* Client-facing UI coherence v4.2.1 */
.portal-body {
  min-width: 320px;
  background:
    radial-gradient(circle at 95% 2%, rgba(249, 55, 0, 0.08), transparent 340px),
    #f7f4ee;
  color: #263047;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

.portal-body *,
.portal-body *::before,
.portal-body *::after {
  box-sizing: border-box;
}

.portal-body :focus-visible {
  outline: 3px solid rgba(36, 87, 197, 0.22);
  outline-offset: 3px;
}

.portal-topbar {
  height: 78px;
  border-bottom: 1px solid rgba(50, 59, 96, 0.1);
  padding: 0 max(20px, calc((100% - 960px) / 2));
}

.portal-topbar .public-brand > img {
  width: 50px;
  height: 50px;
  flex-basis: 50px;
}

.portal-topbar .public-brand strong {
  font-size: 16px;
}

.portal-topbar .public-brand small {
  font-size: 8px;
  letter-spacing: 0.14em;
}

.portal-topbar > a:last-child {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  border-radius: 11px;
  padding: 9px 15px;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}

.portal-shell {
  width: min(960px, calc(100% - 36px));
  margin: 30px auto 88px;
}

.portal-hero-card {
  border-radius: 22px;
  padding: clamp(32px, 5vw, 50px);
  box-shadow: 0 26px 68px rgba(23, 28, 55, 0.22);
}

.portal-hero-card::after {
  top: -96px;
  right: -84px;
  width: 250px;
  height: 250px;
  border-width: 36px;
  opacity: 0.82;
}

.portal-hero-top {
  font-size: 11px;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.portal-hero-card h1 {
  max-width: 760px;
  margin-top: 38px;
  font-family: inherit;
  font-size: clamp(40px, 6.5vw, 60px);
  font-weight: 850;
  letter-spacing: -0.055em;
  line-height: 1;
  overflow-wrap: anywhere;
}

.portal-hero-card > p {
  max-width: 720px;
  font-size: 14px;
}

.portal-event-grid {
  gap: 22px;
  margin-top: 30px;
  padding-top: 22px;
}

.portal-event-grid span,
.portal-current-stage span,
.portal-progress-card span {
  font-size: 10px;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.portal-event-grid strong {
  margin-top: 5px;
  font-size: 14px;
  line-height: 1.45;
}

.portal-current-stage {
  margin-top: 22px;
  border-radius: 12px;
  padding: 16px 18px;
}

.portal-current-stage strong {
  margin-top: 4px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 800;
}

.portal-progress-card,
.portal-section {
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(23, 28, 55, 0.045);
}

.portal-progress-card {
  margin-top: 20px;
  padding: 25px 27px;
}

.portal-progress-card > div:first-child {
  align-items: center;
}

.portal-progress-card strong {
  font-family: inherit;
  font-size: 25px;
  font-weight: 820;
}

.portal-progress-card p {
  margin-bottom: 0;
  color: #667085;
  font-size: 13px;
}

.portal-progress-track {
  height: 9px;
  margin-top: 15px;
  border-radius: 999px;
}

.portal-section {
  margin-top: 20px;
  padding: clamp(24px, 4vw, 34px);
}

.portal-section-heading {
  gap: 16px;
  margin-bottom: 20px;
}

.portal-section-heading span {
  font-size: 10px;
  letter-spacing: 0.075em;
}

.portal-section-heading h2 {
  margin-top: 5px;
  font-family: inherit;
  font-size: clamp(23px, 3vw, 28px);
  font-weight: 820;
  letter-spacing: -0.035em;
  line-height: 1.18;
}

.portal-section-heading > small,
.portal-section-heading > em {
  font-size: 10px;
}

.portal-event-list article,
.portal-task-list article {
  padding: 14px 0;
}

.portal-event-list article span {
  color: var(--portal-accent-text);
  font-size: 10px;
}

.portal-event-list article strong,
.portal-task-list strong {
  font-size: 13px;
}

.portal-event-list article small,
.portal-task-list small,
.portal-event-list article p {
  font-size: 11.5px;
  line-height: 1.5;
}

.portal-stage summary {
  min-height: 68px;
  padding: 13px 15px;
}

.portal-stage summary strong {
  font-size: 13px;
}

.portal-stage summary small {
  margin-top: 3px;
  font-size: 11px;
}

.portal-stage-icon {
  width: 38px;
  height: 38px;
  flex-basis: 38px;
  font-size: 11px;
}

.portal-stage-content {
  margin: 0 15px 15px 68px;
  border-radius: 11px;
  padding: 16px;
  font-size: 12px;
}

.portal-note {
  border-left-width: 4px;
  border-radius: 0 12px 12px 0;
  padding: 17px 19px;
}

.portal-note > span {
  font-size: 10px;
}

.portal-note > p {
  font-size: 13px;
  line-height: 1.7;
}

.rab-value {
  border-radius: 13px;
  padding: 20px 21px;
}

.rab-value span {
  font-size: 11px;
}

.rab-value strong {
  font-family: inherit;
  font-size: clamp(23px, 4vw, 31px);
  font-weight: 850;
}

.portal-rab-table {
  width: 100%;
  margin: 20px 0;
  border-collapse: collapse;
  font-size: 12px;
}

.portal-rab-table th {
  border-bottom: 1px solid rgba(50, 59, 96, 0.12);
  background: #f7f8fb;
  color: #667085;
  padding: 12px 14px;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
}

.portal-rab-table td {
  border-bottom: 1px solid rgba(50, 59, 96, 0.1);
  padding: 14px;
}

.portal-rab-table td small {
  display: block;
  margin-top: 3px;
  color: #667085;
  font-size: 10.5px;
}

.rab-client-form,
.portal-acceptance-form {
  display: grid;
  gap: 16px;
  border-radius: 14px;
  padding: 18px;
}

.rab-client-form label {
  display: grid;
  gap: 7px;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.rab-client-form input,
.rab-client-form select,
.rab-client-form textarea {
  width: 100%;
  min-height: 47px;
  border: 1px solid #cbd2dc;
  border-radius: 10px;
  background: #fff;
  color: #172033;
  padding: 10px 13px;
  font: inherit;
  font-size: 13px;
}

.rab-client-form textarea {
  min-height: 94px;
  line-height: 1.6;
  resize: vertical;
}

.rab-client-form input:focus,
.rab-client-form select:focus,
.rab-client-form textarea:focus {
  border-color: #2859c5;
  box-shadow: 0 0 0 3px rgba(40, 89, 197, 0.1);
  outline: 0;
}

.rab-client-form .check-label {
  display: flex;
  min-height: 42px;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.55;
}

.rab-client-form .check-label input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  flex: 0 0 18px;
  margin-top: 2px;
  accent-color: #121a3a;
}

.rab-client-form > div {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.portal-body .btn {
  min-height: 44px;
  border-radius: 10px;
  padding: 10px 17px;
  font-size: 12px;
  font-weight: 750;
}

.portal-legal-document {
  margin: 20px 0;
  border-radius: 13px;
}

.portal-legal-document summary {
  min-height: 52px;
  padding: 15px 18px;
  font-size: 12px;
}

.portal-legal-document pre {
  max-height: 54vh;
  padding: 20px;
  font: 500 12px/1.8 Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.portal-change-orders {
  gap: 12px;
  margin-top: 24px;
}

.portal-change-orders > h3 {
  font-size: 17px;
}

.portal-change-orders > article {
  gap: 20px;
  border-radius: 13px;
  padding: 17px;
}

.portal-change-orders article strong {
  font-size: 13px;
}

.portal-change-orders article small {
  font-size: 10.5px;
}

.portal-change-orders article p {
  font-size: 12px;
}

.rab-approved,
.rab-revision {
  border-radius: 12px;
  padding: 15px 17px;
}

.rab-approved strong,
.rab-revision strong {
  font-size: 13px;
}

.rab-approved small,
.rab-revision p,
.portal-muted {
  font-size: 11.5px;
  line-height: 1.6;
}

@media (max-width: 760px) {
  .portal-topbar {
    height: 68px;
    padding-inline: 12px;
  }

  .portal-topbar .public-brand > img {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .portal-topbar .public-brand strong {
    font-size: 14px;
  }

  .portal-topbar > a:last-child {
    min-height: 40px;
    padding-inline: 12px;
  }

  .portal-shell {
    width: min(100% - 20px, 960px);
    margin-top: 12px;
  }

  .portal-hero-card {
    border-radius: 18px;
    padding: 27px 21px;
  }

  .portal-hero-card h1 {
    margin-top: 30px;
    font-size: clamp(35px, 11vw, 46px);
  }

  .portal-hero-card > p {
    font-size: 13px;
  }

  .portal-progress-card {
    padding: 21px 18px;
  }

  .portal-section {
    padding: 21px 17px;
  }

  .portal-section-heading {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 16px;
  }

  .portal-stage-content {
    margin-left: 0;
  }

  .portal-change-orders > article {
    grid-template-columns: minmax(0, 1fr);
  }

  .rab-client-form > div {
    flex-direction: column;
  }

  .rab-client-form > div .btn {
    width: 100%;
  }

  .portal-body .mobile-card-table,
  .portal-body .mobile-card-table tbody {
    display: block;
    width: 100%;
  }

  .portal-body .mobile-card-table thead {
    display: none;
  }

  .portal-body .mobile-card-table tbody tr {
    display: block;
    margin-bottom: 10px;
    border: 1px solid rgba(50, 59, 96, 0.12);
    border-radius: 12px;
    padding: 6px 11px;
  }

  .portal-body .mobile-card-table td {
    display: grid;
    grid-template-columns: minmax(88px, 0.34fr) minmax(0, 1fr);
    gap: 12px;
    border: 0;
    border-bottom: 1px solid rgba(50, 59, 96, 0.1);
    padding: 10px 1px;
  }

  .portal-body .mobile-card-table td:last-child {
    border-bottom: 0;
  }

  .portal-body .mobile-card-table td::before {
    content: attr(data-label);
    color: #667085;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.055em;
    text-transform: uppercase;
  }
}

@media (max-width: 480px) {
  .portal-topbar .public-brand small {
    display: none;
  }

  .portal-topbar > a:last-child {
    font-size: 10px;
  }

  .portal-event-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .rab-value {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .portal-body .mobile-card-table td {
    display: block;
  }

  .portal-body .mobile-card-table td::before {
    display: block;
    margin-bottom: 4px;
  }
}
