:root { color-scheme: light; }

.admin-shell { margin: 0; background: #edf5ff; color: #102d4e; font-family: "Poppins", Arial, sans-serif; }
.admin-shell .admin-page { min-height: 100vh; display: grid; overflow: visible; place-items: stretch; padding: 0; background: #edf5ff; }
.admin-shell .admin-page::before { display: none; }
.admin-shell [hidden] { display: none !important; }
.admin-shell button, .admin-shell input { font: inherit; }
.admin-visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.auth-portal { position: relative; isolation: isolate; width: 100%; max-width: 100vw; min-height: 100vh; display: grid; grid-template: auto minmax(0, 1fr) auto / minmax(350px, .72fr) minmax(520px, 1.28fr); overflow: hidden; background: radial-gradient(circle at 12% 8%, rgba(101,159,244,.22) 0 7%, transparent 7.2%), radial-gradient(circle at 97% 8%, rgba(111,159,238,.28) 0 20%, transparent 20.2%), radial-gradient(circle at 0 100%, rgba(67,132,224,.28) 0 22%, transparent 22.2%), linear-gradient(145deg, #f8fbff 0%, #eef5ff 52%, #f8fbff 100%); }
.auth-portal::before { position: absolute; z-index: 5; inset: clamp(24px, 3.5vw, 54px); border: 3px solid #0a5b9e; border-radius: clamp(22px, 2.5vw, 38px); content: ""; pointer-events: none; }
.auth-portal-header { z-index: 6; grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; padding: clamp(46px, 5vw, 74px) clamp(66px, 7vw, 118px) 20px; }
.auth-portal-brand, .portal-brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; font-size: .76rem; font-weight: 600; letter-spacing: .04em; text-decoration: none; text-transform: uppercase; }
.auth-portal-brand { color: #083e70; }
.auth-portal-brand span, .portal-brand span { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid currentColor; font-size: .72rem; letter-spacing: -.02em; text-transform: none; }
.auth-portal-header > p { display: flex; align-items: center; gap: 9px; margin: 0; color: #58738f; font-size: .61rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
.auth-portal-header > p span, .auth-security span { width: 7px; height: 7px; border-radius: 50%; background: #3c8ee8; box-shadow: 0 0 0 5px rgba(60,142,232,.12); }
.auth-form-panel { z-index: 2; grid-column: 1; grid-row: 2; display: flex; justify-content: center; flex-direction: column; padding: clamp(42px, 6vw, 92px) clamp(66px, 7vw, 118px); background: transparent; }
.auth-form-heading, .auth-form-panel form, .auth-form-panel .back-link { width: min(100%, 390px); }
.auth-form-heading { margin-bottom: 34px; }
.auth-eyebrow { margin: 0 0 15px; color: #3c82c9; font-size: .61rem; font-weight: 600; letter-spacing: .15em; text-transform: uppercase; }
.auth-form-heading h1 { margin: 0 0 12px; color: #102d4e; font: 600 clamp(2.15rem, 3.2vw, 3.15rem)/1.08 "Poppins", Arial, sans-serif; letter-spacing: -.055em; }
.auth-form-heading > p:last-child { max-width: 350px; margin: 0; color: #6b8197; font-size: .76rem; line-height: 1.7; }
.auth-form-panel .field { margin-bottom: 20px; }
.auth-form-panel .field label { margin-bottom: 8px; color: #254968; font-size: .66rem; font-weight: 600; }
.auth-form-panel .field input { min-height: 52px; padding: 11px 14px; border: 0; border-bottom: 1px solid #a7bfda; border-radius: 0; background: rgba(255,255,255,.34); color: #102d4e; }
.auth-form-panel .field input:hover { border-color: #5c90c7; }
.auth-form-panel .field input:focus { border-color: #237fd8; outline: 2px solid rgba(35,127,216,.18); outline-offset: 2px; background: rgba(255,255,255,.7); }
.auth-form-panel .admin-primary-button { width: min(190px, 100%); justify-content: space-between; margin-top: 8px; padding-inline: 18px; border-color: #287fd7; border-radius: 3px; background: #3b8ee8; box-shadow: 0 8px 24px rgba(31,115,204,.22); }
.auth-form-panel .admin-primary-button:hover { border-color: #0a5b9e; background: #0a5b9e; color: #fff; }
.auth-form-panel .form-status { min-height: 22px; margin-top: 12px; color: #526f8c; font-size: .7rem; }
.auth-portal-visual { position: relative; z-index: 1; grid-column: 2; grid-row: 2 / 4; min-height: 590px; margin: 10px clamp(70px, 7vw, 120px) clamp(54px, 6vw, 96px) 0; }
.portal-shape { position: absolute; z-index: -1; background: linear-gradient(145deg, rgba(77,139,231,.16), rgba(154,193,249,.5)); filter: blur(.2px); }
.portal-shape-one { width: 76%; height: 58%; top: 17%; left: 12%; border-radius: 44% 56% 61% 39% / 48% 36% 64% 52%; transform: rotate(-8deg); }
.portal-shape-two { width: 36%; aspect-ratio: 1; right: -4%; bottom: 2%; border-radius: 50%; background: rgba(91,151,239,.18); }
.portal-dashboard { position: absolute; top: 29%; left: 11%; width: 73%; aspect-ratio: 1.48; overflow: hidden; border: 2px solid rgba(25,95,165,.72); border-radius: 14px; background: rgba(255,255,255,.88); box-shadow: 0 28px 70px rgba(32,91,154,.2); transform: rotate(-1deg); }
.dashboard-top { height: 42px; display: flex; align-items: center; gap: 7px; padding: 0 15px; border-bottom: 1px solid #c7daf0; }
.dashboard-top i { width: 7px; height: 7px; border-radius: 50%; background: #9ec2ed; }
.dashboard-top span { margin-left: auto; color: #527aa3; font-size: .52rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.dashboard-body { height: calc(100% - 42px); display: grid; grid-template-columns: 19% 1fr; }
.dashboard-sidebar { display: flex; align-items: center; flex-direction: column; gap: 17px; padding-top: 27px; background: linear-gradient(180deg, #397fca, #1d63ad); }
.dashboard-sidebar b { width: 26px; height: 6px; border-radius: 5px; background: rgba(255,255,255,.52); }
.dashboard-sidebar b:first-child { width: 32px; height: 32px; margin-bottom: 5px; border-radius: 50%; }
.dashboard-main { display: grid; grid-template: auto auto 1fr auto / 1fr; gap: 13px; padding: 22px; }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; }
.dashboard-heading span { width: 36%; height: 9px; border-radius: 5px; background: #5b94d3; }
.dashboard-heading small { width: 20%; height: 7px; border-radius: 4px; background: #c4d9f0; }
.dashboard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.dashboard-stats i { height: 43px; border-radius: 7px; background: linear-gradient(135deg, #e2edfa, #c3daf3); }
.dashboard-chart { min-height: 108px; display: flex; align-items: end; gap: 8px; padding: 18px 16px 0; border-radius: 8px; background: #f0f6fd; }
.dashboard-chart span { width: 13%; height: 35%; border-radius: 4px 4px 0 0; background: #8bb6e8; }
.dashboard-chart span:nth-child(2) { height: 58%; }.dashboard-chart span:nth-child(3) { height: 46%; }.dashboard-chart span:nth-child(4) { height: 78%; }.dashboard-chart span:nth-child(5) { height: 64%; }.dashboard-chart span:nth-child(6) { height: 92%; background: #367fce; }
.dashboard-lines { display: grid; gap: 7px; }
.dashboard-lines i { width: 100%; height: 6px; border-radius: 3px; background: #d8e6f5; }.dashboard-lines i:nth-child(2) { width: 78%; }.dashboard-lines i:nth-child(3) { width: 55%; }
.portal-float-card { position: absolute; z-index: 3; min-width: 178px; display: grid; grid-template-columns: 1fr auto; gap: 3px 18px; padding: 16px 17px; border: 1px solid rgba(28,105,181,.38); border-radius: 10px; background: rgba(255,255,255,.9); box-shadow: 0 16px 35px rgba(31,94,158,.16); backdrop-filter: blur(8px); }
.portal-float-card span { color: #6590bb; font-size: .52rem; letter-spacing: .08em; text-transform: uppercase; }.portal-float-card strong { color: #174d7f; font-size: .66rem; font-weight: 600; }.portal-float-card i { grid-column: 2; grid-row: 1 / 3; align-self: center; color: #3385d9; font-size: 1.45rem; font-style: normal; font-weight: 600; }
.portal-float-sites { top: 23%; right: 2%; }.portal-float-enquiries { left: 1%; bottom: 15%; }
.portal-visual-caption { position: absolute; top: 4%; left: 5%; }
.portal-visual-caption p { margin: 0 0 8px; color: #4382c2; font-size: .58rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.portal-visual-caption h2 { margin: 0; color: #124d83; font: 600 clamp(2rem, 3.5vw, 3.65rem)/1.02 "Poppins", Arial, sans-serif; font-size: clamp(2rem, 3.5vw, 3.65rem) !important; letter-spacing: -.055em; }
.auth-security { z-index: 6; grid-column: 1; grid-row: 3; display: flex; align-items: center; gap: 9px; margin: 0; padding: 0 clamp(66px, 7vw, 118px) clamp(48px, 5vw, 76px); color: #67819a; font-size: .59rem; letter-spacing: .04em; }
.admin-primary-button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 11px 18px; border: 1px solid #000; border-radius: 0; background: #000; color: #fff; font-size: .78rem; font-weight: 600; text-decoration: none; cursor: pointer; }
.admin-primary-button:hover { background: #fff; color: #000; }
.admin-secondary-button, .admin-delete-button { min-height: 44px; padding: 10px 15px; border: 1px solid #111; border-radius: 0; background: #fff; color: #111; font-size: .72rem; font-weight: 600; cursor: pointer; }
.admin-secondary-button:hover, .admin-secondary-button[aria-pressed="true"] { background: #111; color: #fff; }
.admin-delete-button { border-color: #aaa; color: #555; }
.admin-delete-button:hover { border-color: #000; color: #000; }
.admin-shell button { transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms ease; }
.admin-shell button:hover { -webkit-text-fill-color: currentColor; }
.admin-secondary-button:disabled, .admin-delete-button:disabled { cursor: wait; opacity: .45; }
.admin-shell .back-link { display: inline-block; margin-top: 24px; color: #52789d; font-size: .67rem; text-underline-offset: 4px; }

.admin-auth-pending .admin-page { background: #fbfaf7; }
.admin-auth-pending [data-auth-view],
.admin-auth-pending [data-portal-view] { opacity: 0; visibility: hidden; }
.enquiries-portal { width: 100%; min-height: 100vh; background: #fff; }
.portal-header { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 0 clamp(22px, 5vw, 72px); border-bottom: 1px solid #dedede; }
.portal-identity { display: flex; align-items: center; gap: clamp(20px, 3vw, 42px); }
.portal-brand { color: #111; }
.portal-brand span { width: 31px; height: 31px; }
.portal-site-context { display: grid; gap: 1px; padding-left: clamp(20px, 3vw, 42px); border-left: 1px solid #ddd; }
.portal-site-context small { color: #999; font-size: .53rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.portal-site-context strong { color: #222; font-size: .7rem; font-weight: 500; }
.portal-site-context span { color: #999; font-size: .56rem; text-transform: capitalize; }
.portal-nav { display: flex; align-items: stretch; gap: 4px; align-self: stretch; }
.portal-nav a, .portal-nav button { min-width: 92px; display: grid; place-items: center; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: #777; font-size: .72rem; font-weight: 500; text-decoration: none; cursor: pointer; }
.portal-nav a:hover, .portal-nav button:hover, .portal-nav a[aria-current="page"] { color: #000; }
.portal-nav a[aria-current="page"] { border-bottom-color: #000; }

.portal-content { width: min(1120px, calc(100% - 44px)); margin-inline: auto; padding: clamp(54px, 7vw, 90px) 0 80px; }
.portal-title-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.portal-kicker { margin: 0 0 8px; color: #777; font-size: .65rem; font-weight: 600; letter-spacing: .13em; text-transform: uppercase; }
.portal-title-row h1 { margin: 0; color: #000; font: 500 clamp(2.5rem, 6vw, 4.6rem)/.95 "Poppins", Arial, sans-serif; letter-spacing: -.06em; }
.enquiry-count { margin: 0 0 5px; color: #777; font-size: .72rem; }

.enquiry-search { min-height: 52px; display: flex; align-items: center; gap: 13px; margin-bottom: 28px; border-bottom: 1px solid #111; }
.enquiry-search svg { width: 18px; height: 18px; fill: none; stroke: #111; stroke-width: 1.6; }
.enquiry-search input { width: 100%; height: 50px; padding: 0; border: 0; outline: 0; background: #fff; color: #111; font-size: .88rem; }
.enquiry-search input::placeholder { color: #999; }

.enquiry-list { border-top: 1px solid #111; }
.enquiry-row { width: 100%; min-height: 106px; display: grid; grid-template-columns: minmax(170px, .8fr) minmax(280px, 1.7fr) 84px; align-items: center; gap: 34px; padding: 20px 4px; border: 0; border-bottom: 1px solid #ddd; background: #fff; color: #111; text-align: left; cursor: pointer; }
.enquiry-row:hover { background: #f7f7f7; }
.enquiry-row.is-new { box-shadow: inset 3px 0 #000; }
.enquiry-identity, .enquiry-preview { min-width: 0; display: grid; gap: 5px; }
.enquiry-name { overflow: hidden; font-size: .85rem; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.enquiry-name-line { min-width: 0; display: flex; align-items: center; gap: 9px; }
.enquiry-important-label { flex: none; padding: 2px 6px; border: 1px solid #111; color: #111; font-size: .55rem; font-weight: 600; letter-spacing: .05em; line-height: 1.35; text-transform: uppercase; }
.enquiry-email { overflow: hidden; color: #777; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.enquiry-project { color: #777; font-size: .65rem; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.enquiry-preview strong { overflow: hidden; font-size: .8rem; font-weight: 700; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.enquiry-date { justify-self: end; color: #777; font-size: .68rem; white-space: nowrap; }
.enquiry-empty { margin: 0; padding: 48px 4px; border-bottom: 1px solid #ddd; color: #777; font-size: .8rem; }

.enquiry-modal { width: min(720px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; overflow: auto; border: 1px solid #111; border-radius: 0; background: #fff; color: #111; box-shadow: 0 24px 80px rgba(0,0,0,.22); }
.enquiry-modal::backdrop { background: rgba(255,255,255,.82); backdrop-filter: blur(3px); }
.enquiry-modal article { padding: clamp(26px, 5vw, 52px); }
.enquiry-modal-header { display: flex; align-items: start; justify-content: space-between; gap: 30px; padding-bottom: 25px; border-bottom: 1px solid #111; }
.enquiry-modal-header p { margin: 0 0 8px; color: #777; font-size: .68rem; }
.enquiry-modal-header h2 { margin: 0; color: #111; font: 600 clamp(1.55rem, 4vw, 2.3rem)/1.15 "Poppins", Arial, sans-serif; letter-spacing: -.035em; }
.enquiry-modal-header button { width: 38px; height: 38px; flex: none; padding: 0; border: 1px solid #111; background: #fff; color: #111; font-size: 1.4rem; cursor: pointer; }
.enquiry-modal-header button:hover { background: #111; color: #fff; }
.enquiry-meta { display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 22px 0; border-bottom: 1px solid #ddd; }
.enquiry-meta div { display: grid; grid-template-columns: 70px 1fr; gap: 8px; padding: 6px 18px 6px 0; }
.enquiry-meta dt { color: #777; font-size: .66rem; text-transform: uppercase; }
.enquiry-meta dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-size: .76rem; }
.enquiry-meta a { color: #111; }
.enquiry-message { min-height: 170px; padding: 34px 0; white-space: pre-wrap; color: #222; font-size: .92rem; line-height: 1.8; }
.enquiry-modal footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding-top: 22px; border-top: 1px solid #ddd; }
.enquiry-modal-actions { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 900px) {
  .auth-portal { grid-template: auto auto minmax(430px, 1fr) auto / minmax(0, 1fr); }
  .auth-portal::before { inset: 18px; border-width: 2px; border-radius: 24px; }
  .auth-portal-header { grid-column: 1; grid-row: 1; padding: 42px 48px 10px; }
  .auth-form-panel { min-width: 0; grid-column: 1; grid-row: 2; padding: 58px 48px 46px; }
  .auth-form-heading, .auth-form-panel form, .auth-form-panel .back-link { width: min(100%, 520px); margin-inline: auto; }
  .auth-portal-visual { min-width: 0; grid-column: 1; grid-row: 3; min-height: 430px; margin: 0 48px 58px; }
  .portal-dashboard { top: 28%; left: 17%; width: 66%; }
  .portal-float-sites { right: 8%; }
  .portal-float-enquiries { left: 8%; bottom: 9%; }
  .portal-visual-caption { left: 10%; }
  .auth-security { grid-column: 1; grid-row: 4; padding: 0 48px 42px; }
}

@media (max-width: 700px) {
  .admin-shell { width: 100%; max-width: 100vw; overflow-x: hidden; }
  .admin-shell .admin-page { width: 100%; max-width: 100vw; display: block; padding: 0; overflow: hidden; background: #edf5ff; }
  .auth-portal { width: 100%; max-width: 100%; min-width: 0; min-height: 100vh; grid-template-rows: auto auto minmax(350px, auto) auto; }
  .auth-portal::before { position: absolute; inset: 10px; border-radius: 19px; }
  .auth-portal-header { width: 100%; max-width: 100%; padding: 28px 30px 6px; }
  .auth-portal-header > p { display: none; }
  .auth-form-panel { width: 100%; max-width: 100%; padding: 46px 30px 42px; }
  .auth-form-heading, .auth-form-panel form, .auth-form-panel .back-link { width: 100%; max-width: 100%; }
  .auth-form-panel .field input { width: 100% !important; }
  .auth-form-panel .admin-primary-button { width: 100%; }
  .auth-portal-visual { min-height: 350px; margin: 0 24px 44px; }
  .portal-visual-caption { top: 0; left: 5%; }
  .portal-visual-caption h2 { font-size: clamp(1.9rem, 10vw, 2.65rem) !important; }
  .portal-dashboard { top: 31%; left: 7%; width: 86%; }
  .portal-float-card { min-width: 142px; padding: 12px; transform: scale(.83); }
  .portal-float-sites { top: 25%; right: -5%; transform-origin: right center; }
  .portal-float-enquiries { left: -3%; bottom: 0; transform-origin: left center; }
  .dashboard-main { gap: 8px; padding: 14px; }
  .dashboard-chart { min-height: 72px; padding-top: 12px; }
  .auth-security { padding: 0 30px 30px; }
  .portal-header { align-items: start; flex-direction: column; padding: 20px 22px 0; }
  .portal-identity { width: 100%; justify-content: space-between; }
  .portal-site-context { max-width: 52%; }
  .portal-nav { width: 100%; min-height: 50px; }
  .portal-nav a, .portal-nav button { flex: 1; min-width: 0; padding-inline: 8px; }
  .portal-content { width: min(100% - 32px, 1120px); padding-top: 48px; }
  .enquiry-row { grid-template-columns: 1fr auto; gap: 13px 18px; padding: 20px 3px; }
  .enquiry-identity { grid-column: 1; }
  .enquiry-preview { grid-column: 1 / -1; grid-row: 2; }
  .enquiry-date { grid-column: 2; grid-row: 1; }
  .enquiry-meta { grid-template-columns: 1fr; }
  .enquiry-modal article { padding: 24px; }
  .enquiry-modal footer { align-items: stretch; flex-direction: column-reverse; }
  .enquiry-modal footer .admin-primary-button { width: 100%; }
  .enquiry-modal-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

/* Simplified coral authentication layout */
.admin-shell { background: #f6f1e9; color: #332b27; }
.admin-shell .admin-page { background: #f6f1e9; }
.auth-portal { width: 100%; max-width: none; min-height: 100vh; grid-template: auto minmax(0, 1fr) auto / minmax(390px, 48%) minmax(0, 52%); overflow: hidden; background: #f6f1e9; }
.auth-portal::before { display: none; }
.auth-portal-header { z-index: 4; grid-column: 1 / -1; grid-row: 1; padding: clamp(34px, 4vw, 58px) clamp(42px, 5vw, 78px) 10px; }
.auth-portal-brand { color: #3b312c; }
.auth-portal-brand span { border-color: #e36e60; color: #d65e51; }
.auth-portal-header > p { color: #5a3d37; }
.auth-portal-header > p span, .auth-security span { background: #e36e60; box-shadow: 0 0 0 5px rgba(227,110,96,.13); }
.auth-form-panel { z-index: 2; grid-column: 1; grid-row: 2; width: auto; max-width: none; padding: clamp(48px, 6vw, 92px) clamp(58px, 8vw, 132px); background: #f6f1e9; }
.auth-form-heading, .auth-form-panel form, .auth-form-panel .back-link { width: min(100%, 410px); margin-inline: 0; }
.auth-form-heading { margin-bottom: 34px; }
.auth-eyebrow { color: #d76053; }
.auth-form-heading h1 { color: #332b27; font-size: clamp(2.25rem, 3.4vw, 3.4rem); }
.auth-form-heading > p:last-child { color: #80726b; }
.auth-form-panel .field label { color: #51433d; }
.auth-form-panel .field input { width: 100%; border-bottom-color: #c8bbb2; background: rgba(255,255,255,.24); color: #332b27; }
.auth-form-panel .field input:hover { border-color: #a9958b; }
.auth-form-panel .field input:focus { border-color: #e36e60; outline-color: rgba(227,110,96,.17); background: rgba(255,255,255,.55); }
.auth-form-panel .admin-primary-button { width: min(195px, 100%); border-color: #e36e60; background: #e36e60; box-shadow: 0 9px 25px rgba(185,76,64,.18); }
.auth-form-panel .admin-primary-button:hover { border-color: #bd5146; background: #bd5146; }
.auth-form-panel .form-status { color: #80635d; }
.admin-shell .back-link { color: #80655f; }
.auth-portal-visual { position: relative; z-index: 1; grid-column: 2; grid-row: 1 / 4; min-height: 100vh; margin: 0; overflow: hidden; background: #e97868; color: #fff8ef; }
.auth-portal-visual::before { position: absolute; width: clamp(300px, 36vw, 620px); aspect-ratio: 1; right: -13%; bottom: -22%; border: 1px solid rgba(255,248,239,.32); border-radius: 50%; content: ""; }
.auth-portal-visual::after { position: absolute; width: 46%; height: 1px; right: 9%; top: 18%; background: rgba(255,248,239,.32); content: ""; }
.portal-minimal-mark { position: absolute; top: clamp(70px, 10vh, 110px); right: clamp(52px, 7vw, 110px); width: clamp(150px, 15vw, 240px); aspect-ratio: 1; display: grid; place-items: center; border: 1px solid rgba(255,248,239,.34); border-radius: 50%; color: rgba(255,248,239,.22); font-size: clamp(2.8rem, 5vw, 5.6rem); font-weight: 600; letter-spacing: -.07em; }
.portal-visual-caption { position: absolute; top: auto; right: clamp(54px, 8vw, 130px); bottom: clamp(70px, 11vh, 120px); left: clamp(54px, 8vw, 130px); }
.portal-visual-caption p { margin: 0 0 15px; color: rgba(255,248,239,.72); }
.portal-visual-caption h2 { max-width: 660px; margin: 0 0 26px; color: #fff8ef; font-size: clamp(3rem, 5vw, 6rem) !important; line-height: .98; }
.portal-visual-caption span { display: inline-block; padding-top: 18px; border-top: 1px solid rgba(255,248,239,.42); color: rgba(255,248,239,.76); font-size: .68rem; font-weight: 500; letter-spacing: .07em; }
.auth-security { z-index: 3; grid-column: 1; grid-row: 3; padding: 0 clamp(58px, 8vw, 132px) clamp(36px, 5vw, 64px); color: #8a746b; }

@media (max-width: 800px) {
  .auth-portal { grid-template: auto auto minmax(340px, 48vh) auto / minmax(0, 1fr); }
  .auth-portal-header { grid-column: 1; grid-row: 1; width: 100%; padding: 28px 28px 4px; }
  .auth-portal-header > p { display: none; }
  .auth-form-panel { grid-column: 1; grid-row: 2; width: 100%; padding: 48px 28px 58px; }
  .auth-form-heading, .auth-form-panel form, .auth-form-panel .back-link { width: min(100%, 520px); margin-inline: auto; }
  .auth-form-panel .admin-primary-button { width: 100%; }
  .auth-portal-visual { grid-column: 1; grid-row: 3; min-height: 340px; }
  .portal-minimal-mark { top: 34px; right: 28px; width: 118px; }
  .portal-visual-caption { right: 28px; bottom: 42px; left: 28px; }
  .portal-visual-caption h2 { max-width: 460px; font-size: clamp(2.5rem, 11vw, 4rem) !important; }
  .auth-security { grid-column: 1; grid-row: 4; padding: 28px; background: #f6f1e9; }
}

/* Minimal email-style enquiries inbox */
.enquiries-portal { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); background: #fbfaf7; color: #332b27; }
.portal-header { position: sticky; top: 0; width: 250px; height: 100vh; min-height: 640px; display: flex; align-items: stretch; justify-content: flex-start; flex-direction: column; gap: 30px; padding: 28px 20px 22px; border-right: 1px solid #ded7d0; border-bottom: 0; background: #f2ede7; }
.portal-identity { display: grid; gap: 24px; }
.portal-brand { color: #3b312c; }
.portal-brand span { border-color: #e36e60; color: #d65e51; }
.portal-site-context { gap: 3px; padding: 20px 0 0; border-top: 1px solid #ddd3cb; border-left: 0; }
.portal-site-context small { color: #9b8980; }
.portal-site-context strong { color: #4a3e38; font-size: .69rem; line-height: 1.45; }
.portal-nav { min-height: 0; display: flex; align-items: stretch; flex: 1; flex-direction: column; gap: 5px; align-self: auto; }
.portal-nav-label { margin: 0 12px 7px; color: #a08d84; font-size: .56rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.portal-cms-label { display: flex; align-items: center; justify-content: space-between; margin-top: 20px; }
.portal-cms-label span { padding: 3px 6px; border: 1px solid #d8ccc4; border-radius: 999px; font-size: .48rem; letter-spacing: .06em; }
.portal-nav a.is-locked { color: #b8ada6; cursor: not-allowed; opacity: .58; pointer-events: none; }
.portal-nav a.is-locked:hover { background: transparent; color: #b8ada6; }
.portal-nav a.is-locked .portal-nav-count { background: #eee8e3; color: #b8ada6; }
.portal-nav a, .portal-nav button { width: 100%; min-width: 0; min-height: 42px; display: flex; align-items: center; justify-content: flex-start; gap: 10px; padding: 10px 12px; border: 0; border-radius: 6px; background: transparent; color: #6d5e57; font-size: .7rem; font-weight: 500; }
.portal-nav a:hover, .portal-nav button:hover { background: #e9e1da; color: #332b27; }
.portal-nav a[aria-current="page"] { border: 0; background: #e97868; color: #fff; }
.portal-nav a[aria-current="page"] span { width: 7px; height: 7px; border: 2px solid rgba(255,255,255,.72); border-radius: 50%; background: #fff; }
.portal-nav .portal-nav-count { min-width: 24px; height: 22px; display: inline-grid; place-items: center; margin-left: auto; padding: 0 7px; border-radius: 999px; background: #e5dcd5; color: #6d5e57; font-size: .66rem; font-weight: 600; line-height: 1; }
.portal-nav a[aria-current="page"] .portal-nav-count { width: auto; height: 22px; border: 0; background: rgba(255,255,255,.22); color: #fff; }
.portal-nav-count[hidden] { display: none; }
.portal-nav .portal-site-return { margin-top: auto; border: 1px solid #dfd4cd; background: rgba(255,255,255,.58); color: #6b5951; }
.portal-nav .portal-site-return:hover { border-color: #e36e60; background: #fff1ee; color: #a7453b; }
.portal-nav button { margin-top: 0; color: #8a7770; }
.portal-content { width: 100%; max-width: 1440px; margin: 0; padding: clamp(34px, 4vw, 62px) clamp(30px, 5vw, 76px) 70px; }
.portal-title-row.inbox-heading { align-items: center; margin-bottom: 28px; }
.portal-kicker { margin-bottom: 5px; color: #c75b50; font-size: .58rem; }
.portal-title-row h1 { color: #332b27; font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.08; letter-spacing: -.045em; }
.enquiry-count { margin: 0; padding: 6px 10px; border: 1px solid #ded5cd; border-radius: 999px; background: #fff; color: #806f67; font-size: .62rem; }
.inbox-toolbar { min-height: 48px; display: flex; align-items: center; gap: 18px; margin-bottom: 16px; padding: 0 15px; border: 1px solid #ded8d2; border-radius: 8px; background: #fff; }
.enquiry-search { min-width: 0; min-height: 46px; display: flex; align-items: center; flex: 1; gap: 11px; margin: 0; border: 0; }
.enquiry-search svg { width: 16px; height: 16px; flex: none; stroke: #846f66; }
.enquiry-search input { height: 46px; background: transparent; color: #3e3530; font-size: .75rem; }
.enquiry-search input::placeholder { color: #aa9a92; }
.inbox-sort { flex: none; padding-left: 18px; border-left: 1px solid #e5dfda; color: #95837a; font-size: .61rem; }
.inbox-column-labels { display: grid; grid-template-columns: 10px minmax(155px, .72fr) minmax(260px, 1.8fr) 76px; gap: 14px; padding: 0 18px 8px; color: #a08e85; font-size: .54rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.enquiry-list { overflow: hidden; border: 1px solid #ded8d2; border-radius: 8px; background: #fff; }
.enquiry-row { width: 100%; min-height: 76px; grid-template-columns: 10px minmax(155px, .72fr) minmax(260px, 1.8fr) 76px; gap: 14px; padding: 13px 18px; border-bottom: 1px solid #ece7e2; background: #fff; color: #3a312d; }
.enquiry-row:last-child { border-bottom: 0; }
.enquiry-row::before { width: 7px; height: 7px; align-self: center; border-radius: 50%; background: transparent; content: ""; }
.enquiry-row:hover { background: #fff8f5; }
.enquiry-row.is-new { background: #fffbf8; box-shadow: none; }
.enquiry-row.is-new::before { background: #e36e60; box-shadow: 0 0 0 4px rgba(227,110,96,.11); }
.enquiry-identity { gap: 3px; }
.enquiry-name { color: #3b312c; font-size: .76rem; font-weight: 500; }
.enquiry-row.is-new .enquiry-name { font-weight: 700; }
.enquiry-name-line { gap: 7px; }
.enquiry-important-label { padding: 2px 5px; border-color: #efb4ac; border-radius: 3px; background: #fff2ef; color: #bd5146; font-size: .48rem; }
.enquiry-email { color: #99877e; font-size: .61rem; }
.enquiry-preview { display: grid; gap: 4px; }
.enquiry-project { color: #b45c52; font-size: .53rem; letter-spacing: .06em; }
.enquiry-preview strong { color: #4a403b; font-size: .7rem; font-weight: 600; line-height: 1.45; }
.enquiry-row:not(.is-new) .enquiry-preview strong { color: #776a63; font-weight: 500; }
.enquiry-date { color: #9b8980; font-size: .6rem; }
.enquiry-empty { padding: 46px 20px; border: 0; color: #927f76; text-align: center; }
.enquiry-modal { border-color: #d5ccc5; border-radius: 12px; color: #3a312d; }
.enquiry-modal::backdrop { background: rgba(51,43,39,.32); }
.enquiry-modal-header { border-bottom-color: #ded6cf; }
.enquiry-modal-header h2 { color: #332b27; }
.enquiry-modal-header button { border-color: #d7cec7; border-radius: 50%; color: #6e5e56; }

@media (max-width: 820px) {
  .enquiries-portal { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); align-content: start; }
  .portal-header { position: static; width: 100%; height: auto; min-height: 0; gap: 18px; padding: 20px 20px 0; border-right: 0; border-bottom: 1px solid #ded7d0; }
  .portal-identity { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
  .portal-site-context { max-width: 50%; padding: 0 0 0 18px; border-top: 0; border-left: 1px solid #ddd3cb; }
  .portal-nav { min-height: 48px; flex-direction: row; gap: 3px; }
  .portal-nav-label { display: none; }
  .portal-nav [data-cms-tool], .portal-business-switcher { display: none; }
  .portal-nav .portal-site-return { margin-top: 0; }
  .portal-nav a, .portal-nav button { justify-content: center; margin: 0; border-radius: 6px 6px 0 0; }
  .portal-content { padding: 34px 18px 54px; }
  .inbox-column-labels { display: none; }
  .enquiry-row { grid-template-columns: 9px minmax(0, 1fr) auto; gap: 10px 12px; padding: 15px 14px; }
  .enquiry-row::before { grid-column: 1; grid-row: 1; }
  .enquiry-identity { grid-column: 2; grid-row: 1; }
  .enquiry-preview { grid-column: 2 / -1; grid-row: 2; }
  .enquiry-date { grid-column: 3; grid-row: 1; }
}

@media (max-width: 520px) {
  .portal-header { padding-top: 0; }
  .portal-identity { display: none; }
  .portal-nav a, .portal-nav button { padding-inline: 7px; font-size: .64rem; }
  .inbox-toolbar { gap: 8px; padding-inline: 12px; }
  .inbox-sort { display: none; }
}

/* Unified mailbox header and routed enquiry page */
.inbox-topbar { min-height: 58px; display: grid; grid-template-columns: auto minmax(260px, 1fr); align-items: center; gap: 18px; margin-bottom: 16px; }
.inbox-title-lockup { display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.inbox-title-lockup h1 { margin: 0; color: #332b27; font: 600 1.45rem/1.1 "Poppins", Arial, sans-serif; letter-spacing: -.04em; }
.inbox-title-lockup .enquiry-count { margin: 0; white-space: nowrap; }
.inbox-topbar .enquiry-search { min-height: 44px; padding: 0 13px; border: 1px solid #ded8d2; border-radius: 8px; background: #fff; }
.inbox-topbar .enquiry-search input { height: 42px; }
.inbox-topbar .inbox-sort { display: grid; gap: 1px; padding: 0 0 0 18px; border: 0; border-left: 1px solid #e3dcd6; white-space: nowrap; }
.inbox-topbar .inbox-sort small { color: #aa9990; font-size: .49rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.inbox-topbar .inbox-sort strong { color: #6f6058; font-size: .61rem; font-weight: 500; }
.enquiry-filters { min-height: 46px; display: flex; align-items: center; gap: 5px; margin-bottom: 14px; padding: 5px; border: 1px solid #ded8d2; border-radius: 9px; background: #fff; }
.enquiry-filters button { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 0; border-radius: 6px; background: transparent; color: #786860; font: 600 .66rem/1 "Poppins", Arial, sans-serif; cursor: pointer; }
.enquiry-filters button:hover { background: #f7f1ed; color: #433833; }
.enquiry-filters button[aria-pressed="true"] { background: #e97868; color: #fff; }
.enquiry-filters button span { min-width: 21px; height: 20px; display: inline-grid; place-items: center; padding: 0 6px; border-radius: 999px; background: #eee7e1; color: #725f56; font-size: .61rem; }
.enquiry-filters button[aria-pressed="true"] span { background: rgba(255,255,255,.23); color: #fff; }
.enquiry-filters .inbox-sort { display: grid; gap: 1px; margin-left: auto; padding: 0 11px 0 17px; border-left: 1px solid #e5dfda; white-space: nowrap; }
.enquiry-filters .inbox-sort small { color: #aa9990; font-size: .49rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.enquiry-filters .inbox-sort strong { color: #6f6058; font-size: .61rem; font-weight: 500; }
.enquiry-page { width: min(100%, 1020px); }
.enquiry-page-toolbar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid #ddd5ce; }
.enquiry-page-toolbar > a { color: #806c63; font-size: .68rem; font-weight: 500; text-decoration: none; }
.enquiry-page-toolbar > a:hover { color: #bd5146; }
.enquiry-page-actions { display: flex; gap: 8px; }
.enquiry-page .admin-secondary-button, .enquiry-page .admin-delete-button { min-height: 38px; padding: 8px 13px; border-color: #d5cbc4; border-radius: 6px; background: #fff; color: #695a53; font-size: .62rem; }
.enquiry-page .admin-secondary-button:hover, .enquiry-page .admin-secondary-button[aria-pressed="true"] { border-color: #e36e60; background: #fff1ee; color: #bd5146; }
.enquiry-page .admin-delete-button:hover { border-color: #c75b50; color: #a8443a; }
.enquiry-page-subject { padding: clamp(36px, 5vw, 62px) 0 28px; }
.enquiry-page-subject p { margin: 0 0 9px; color: #9b877e; font-size: .63rem; }
.enquiry-page-subject h1 { max-width: 850px; margin: 0; color: #332b27; font: 600 clamp(2rem, 4vw, 3.25rem)/1.08 "Poppins", Arial, sans-serif; letter-spacing: -.055em; }
.enquiry-page-sender { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 20px 0; border-top: 1px solid #e1dad4; border-bottom: 1px solid #e1dad4; }
.enquiry-page-sender > div { min-width: 0; display: grid; grid-template-columns: auto auto; align-items: baseline; justify-content: start; gap: 2px 10px; }
.enquiry-page-sender span { grid-column: 1; grid-row: 1 / 3; align-self: center; color: #a08d84; font-size: .55rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.enquiry-page-sender strong { color: #3e3430; font-size: .77rem; font-weight: 600; }
.enquiry-page-sender > div a { color: #8d7a71; font-size: .63rem; }
.enquiry-page-sender .admin-primary-button { min-height: 38px; flex: none; padding: 8px 14px; border-color: #e36e60; border-radius: 6px; background: #e36e60; font-size: .64rem; }
.enquiry-page-sender .admin-primary-button:hover { border-color: #bd5146; background: #bd5146; color: #fff; }
.enquiry-page .enquiry-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 18px 0; border-bottom: 1px solid #e1dad4; }
.enquiry-page .enquiry-meta div { display: grid; grid-template-columns: auto 1fr; gap: 8px; padding: 4px 20px 4px 0; }
.enquiry-page .enquiry-meta dt { color: #a08d84; font-size: .55rem; font-weight: 600; letter-spacing: .06em; }
.enquiry-page .enquiry-meta dd { color: #62544e; font-size: .68rem; }
.enquiry-page .enquiry-message { min-height: 280px; padding: clamp(30px, 5vw, 56px) 0 70px; color: #443a35; font-size: .88rem; line-height: 1.9; }

@media (max-width: 980px) {
  .inbox-topbar { grid-template-columns: auto minmax(180px, 1fr); gap: 10px; }
  .inbox-title-lockup { gap: 7px; }
}

@media (max-width: 700px) {
  .inbox-topbar { grid-template-columns: minmax(0, 1fr); }
  .inbox-title-lockup { grid-column: 1; }
  .inbox-topbar .enquiry-search { grid-column: 1 / -1; grid-row: 2; }
  .enquiry-filters { overflow-x: auto; }
  .enquiry-filters .inbox-sort { display: none; }
  .enquiry-page-toolbar { align-items: flex-start; }
  .enquiry-page-actions { flex-wrap: wrap; justify-content: flex-end; }
  .enquiry-page-sender { align-items: flex-start; flex-direction: column; }
  .enquiry-page-sender .admin-primary-button { width: 100%; }
  .enquiry-page .enquiry-meta { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .inbox-topbar { grid-template-columns: minmax(0, 1fr); }
  .enquiry-filters button { padding-inline: 9px; }
}

/* Client CRM workspace */
.clients-view, .client-page { width: min(100%, 1180px); }
.clients-topbar { grid-template-columns: auto minmax(280px, 1fr) auto; }
.client-filter { display: grid; gap: 3px; padding-left: 18px; border-left: 1px solid #e3dcd6; }
.client-filter span { color: #aa9990; font-size: .49rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.client-filter select { min-width: 115px; padding: 0; border: 0; background: transparent; color: #6f6058; font: 500 .61rem "Poppins", sans-serif; }
.client-list { overflow: hidden; border: 1px solid #ded8d2; border-radius: 9px; background: #fff; }
.client-row { width: 100%; min-height: 84px; display: grid; grid-template-columns: 42px minmax(170px,.9fr) minmax(240px,1.4fr) minmax(110px,.55fr) 18px; align-items: center; gap: 16px; padding: 15px 18px; border: 0; border-bottom: 1px solid #ece7e2; background: #fff; color: #3a312d; text-align: left; cursor: pointer; }
.client-row:last-child { border-bottom: 0; }
.client-row:hover { background: #fff8f5; }
.client-avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #f8ded8; color: #bd5146; font-size: .65rem; font-weight: 700; }
.client-row-identity, .client-row-work, .client-row-state { min-width: 0; display: grid; gap: 4px; }
.client-row strong { overflow: hidden; color: #3b312c; font-size: .72rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.client-row small { overflow: hidden; color: #9a8880; font-size: .59rem; text-overflow: ellipsis; white-space: nowrap; }
.client-row-state strong { width: max-content; padding: 4px 8px; border-radius: 999px; background: #f3ede8; color: #765f56; font-size: .55rem; }
.client-row-arrow { color: #c58479; font-size: .85rem; }

.client-page-toolbar { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 18px; border-bottom: 1px solid #ddd5ce; }
.client-page-toolbar > a { color: #806c63; font-size: .68rem; font-weight: 500; text-decoration: none; }
.client-page-actions { display: flex; gap: 8px; }
.client-page .admin-secondary-button, .client-page .admin-delete-button { min-height: 36px; padding: 8px 12px; border: 1px solid #d5cbc4; border-radius: 6px; background: #fff; color: #695a53; font: 500 .6rem "Poppins", sans-serif; cursor: pointer; }
.client-page .admin-delete-button { color: #a64e44; }
.client-hero { display: flex; align-items: end; justify-content: space-between; gap: 28px; padding: clamp(34px,5vw,58px) 0 30px; }
.client-eyebrow { margin: 0 0 7px; color: #c75b50; font-size: .55rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.client-hero h1 { margin: 0; color: #332b27; font: 600 clamp(2rem,4vw,3.2rem)/1.05 "Poppins",sans-serif; letter-spacing: -.055em; }
.client-hero > div:first-child > p:last-child { margin: 9px 0 0; color: #8b7970; font-size: .67rem; }
.client-hero-controls { display: flex; gap: 10px; }
.client-hero-controls label { display: grid; gap: 5px; color: #9a877e; font-size: .52rem; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.client-hero-controls select { min-width: 145px; height: 38px; padding: 0 32px 0 11px; border: 1px solid #d9d0c9; border-radius: 6px; background: #fff; color: #4d403a; font: 500 .62rem "Poppins",sans-serif; }
.client-workspace { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(290px,.85fr); align-items: start; gap: 18px; }
.client-main-column, .client-side-column { display: grid; gap: 18px; }
.crm-card { padding: 23px; border: 1px solid #ded8d2; border-radius: 9px; background: #fff; }
.crm-card > header { display: flex; align-items: start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.crm-card > header p { margin: 0 0 3px; color: #c75b50; font-size: .49rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.crm-card > header h2 { margin: 0; color: #3a312d; font: 600 .92rem/1.3 "Poppins",sans-serif; }
.text-button { padding: 3px 0; border: 0; border-bottom: 1px solid #d7b0a9; background: transparent; color: #b65a4f; font: 500 .58rem "Poppins",sans-serif; cursor: pointer; }
.client-details-form { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.client-details-form label, .crm-compact-form { color: #89766d; font-size: .55rem; font-weight: 500; }
.client-details-form label { display: grid; gap: 6px; }
.client-details-form input, .client-details-form textarea, .crm-compact-form input, .crm-compact-form textarea, .crm-compact-form select { width: 100%; min-height: 39px; padding: 9px 10px; border: 1px solid #ddd4cd; border-radius: 5px; background: #fffdfb; color: #3d332e; font: 400 .65rem/1.5 "Poppins",sans-serif; }
.client-details-form textarea, .crm-compact-form textarea { resize: vertical; }
.client-details-form input:disabled, .client-details-form textarea:disabled { padding-inline: 0; border-color: transparent; background: transparent; color: #4c403a; opacity: 1; }
.client-full-field { grid-column: 1 / -1; }
.client-form-actions { display: none; gap: 8px; }
.client-details-form.is-editing .client-form-actions { display: flex; }
.crm-card .admin-primary-button { min-height: 37px; padding: 8px 13px; border: 1px solid #e36e60; border-radius: 6px; background: #e36e60; color: #fff; font: 500 .6rem "Poppins",sans-serif; cursor: pointer; }
.crm-card .admin-secondary-button { min-height: 37px; padding: 8px 13px; border: 1px solid #d8cec7; border-radius: 6px; background: #fff; color: #695a53; font: 500 .6rem "Poppins",sans-serif; cursor: pointer; }
.crm-card .admin-primary-button:hover { border-color: #bd5146; background: #bd5146; color: #fff; }
.crm-card .admin-secondary-button:hover { border-color: #695a53; background: #695a53; color: #fff; }
.crm-compact-form { display: grid; gap: 9px; margin-top: 16px; padding-top: 16px; border-top: 1px solid #eee8e3; }
.crm-compact-form .admin-primary-button, .crm-compact-form .admin-secondary-button { justify-self: start; }
.timeline-form { grid-template-columns: 130px minmax(0,1fr) auto; align-items: center; margin: 0 0 22px; padding: 0 0 18px; border-top: 0; border-bottom: 1px solid #eee8e3; }
.crm-item-list { display: grid; gap: 0; }
.crm-item { position: relative; min-height: 48px; display: flex; align-items: center; gap: 11px; padding: 10px 0; border-bottom: 1px solid #eee9e5; }
.crm-item:last-child { border-bottom: 0; }
.crm-item > div { min-width: 0; display: grid; flex: 1; gap: 3px; }
.crm-item strong, .linked-enquiry strong { color: #4b3f39; font-size: .64rem; font-weight: 600; }
.crm-item p { margin: 0; color: #8d7b72; font-size: .58rem; line-height: 1.55; }
.crm-item small, .linked-enquiry small { color: #9d8b82; font-size: .52rem; }
.item-status { max-width: 105px; height: 31px; border: 1px solid #ddd4ce; border-radius: 5px; background: #fff; color: #675951; font: 500 .54rem "Poppins",sans-serif; }
.crm-item-delete { padding: 4px; border: 0; background: transparent; color: #ae6b62; font: 500 .5rem "Poppins",sans-serif; cursor: pointer; }
.reminder-item input { accent-color: #e36e60; }
.reminder-item.is-complete strong { color: #aa9b94; text-decoration: line-through; }
.note-item { position: relative; padding: 13px 28px 13px 0; border-bottom: 1px solid #eee8e3; }
.note-item p { margin: 0 0 6px; color: #51443e; font-size: .62rem; line-height: 1.65; white-space: pre-wrap; }
.note-item small { color: #9d8b82; font-size: .49rem; }
.note-item .crm-item-delete { position: absolute; top: 11px; right: 0; }
.timeline-list { display: grid; }
.timeline-item { position: relative; display: grid; grid-template-columns: 14px auto 1fr; gap: 1px 8px; padding: 0 0 22px; }
.timeline-item::before { position: absolute; top: 13px; bottom: 0; left: 4px; width: 1px; background: #eadfd9; content: ""; }
.timeline-item:last-child::before { display: none; }
.timeline-dot { z-index: 1; grid-row: 1 / 3; width: 9px; height: 9px; margin-top: 4px; border: 2px solid #fff; border-radius: 50%; background: #e36e60; box-shadow: 0 0 0 1px #e7a49b; }
.timeline-item strong { color: #4d403a; font-size: .62rem; }
.timeline-item time { justify-self: end; color: #a28f86; font-size: .49rem; }
.timeline-item p { grid-column: 2 / -1; margin: 4px 0 0; color: #7d6c64; font-size: .59rem; line-height: 1.6; }
.crm-empty { margin: 0; padding: 13px 0; color: #aa9990; font-size: .57rem; }
.file-upload { display: grid; gap: 3px; padding: 14px; border: 1px dashed #d9c9c1; border-radius: 6px; background: #fffaf7; cursor: pointer; }
.file-upload input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
.file-upload span { color: #b5574c; font-size: .61rem; font-weight: 600; }
.file-upload small { color: #9e8b82; font-size: .49rem; }
.upload-status { margin: 7px 0 0; color: #9d5a50; font-size: .52rem; }
.file-link, .linked-enquiry { padding: 0; border: 0; background: transparent; color: #4b3f39; font: 600 .62rem "Poppins",sans-serif; text-align: left; cursor: pointer; }
.file-link:hover, .linked-enquiry:hover strong { color: #bd5146; }
.linked-enquiry { width: 100%; display: grid; gap: 3px; padding: 10px 0; border-bottom: 1px solid #eee8e3; }

@media (max-width: 1000px) {
  .client-workspace { grid-template-columns: 1fr; }
  .client-side-column { grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; }
  .client-row { grid-template-columns: 38px minmax(150px,1fr) minmax(200px,1.3fr) 100px 14px; gap: 11px; }
}

@media (max-width: 700px) {
  .clients-topbar { grid-template-columns: minmax(0,1fr) auto; }
  .clients-topbar .enquiry-search { grid-column: 1 / -1; grid-row: 2; }
  .client-filter { grid-column: 2; grid-row: 1; }
  .client-row { grid-template-columns: 38px minmax(0,1fr) 14px; }
  .client-row-work { grid-column: 2; }
  .client-row-state { grid-column: 2; display: flex; gap: 8px; }
  .client-row-arrow { grid-column: 3; grid-row: 1; }
  .client-hero { align-items: stretch; flex-direction: column; }
  .client-hero-controls { display: grid; grid-template-columns: 1fr 1fr; }
  .client-hero-controls select { width: 100%; min-width: 0; }
  .client-side-column { grid-template-columns: 1fr; }
  .timeline-form { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .client-filter { padding-left: 8px; }
  .client-page-toolbar { align-items: flex-start; flex-direction: column; }
  .client-page-actions { width: 100%; flex-wrap: wrap; }
  .client-details-form { grid-template-columns: 1fr; }
  .client-full-field { grid-column: 1; }
  .client-hero-controls { grid-template-columns: 1fr; }
}

/* Consistent portal typography — isolates the admin UI from site display styles */
.enquiries-portal { font-size: 16px; }
.portal-brand { font-size: .78rem; }
.portal-site-context small, .portal-nav-label { font-size: .62rem; }
.portal-site-context strong { font-size: .75rem; }
.portal-nav a, .portal-nav button { font-size: .78rem; }

.client-page-toolbar > a { font-size: .75rem; }
.client-page .admin-secondary-button,
.client-page .admin-delete-button { min-height: 38px; padding: 9px 14px; font-size: .72rem; }
.client-hero { padding-block: 38px 28px; }
.client-eyebrow { margin-bottom: 8px; font-size: .66rem; }
.client-hero h1 { font-size: clamp(2rem, 3vw, 2.65rem); line-height: 1.08; }
.client-hero > div:first-child > p:last-child { font-size: .78rem; line-height: 1.6; }
.client-hero-controls label { font-size: .62rem; }
.client-hero-controls select { height: 40px; font-size: .75rem; }

.crm-card { padding: 24px; }
.crm-card > header { margin-bottom: 18px; }
.crm-card > header p { margin-bottom: 5px; font-size: .62rem; }
.crm-card > header h2 { font-family: "Poppins", Arial, sans-serif; font-size: 1.18rem !important; font-weight: 600; line-height: 1.3; letter-spacing: -.025em; }
.text-button { font-size: .72rem; }
.client-details-form { gap: 18px 20px; }
.client-details-form label { gap: 7px; font-size: .7rem; }
.client-details-form input,
.client-details-form textarea,
.crm-compact-form input,
.crm-compact-form textarea,
.crm-compact-form select { min-height: 42px; padding: 10px 12px; font-size: .78rem; }
.client-details-form textarea,
.crm-compact-form textarea { line-height: 1.6; }
.client-details-form input:disabled,
.client-details-form textarea:disabled { min-height: 34px; font-size: .78rem; }
.client-details-form textarea:disabled { min-height: 54px; }
.crm-card .admin-primary-button,
.crm-card .admin-secondary-button { min-height: 39px; padding: 9px 14px; font-size: .72rem; }

.crm-item { min-height: 54px; padding-block: 12px; }
.crm-item strong,
.linked-enquiry strong { font-size: .76rem; }
.crm-item p { font-size: .7rem; }
.crm-item small,
.linked-enquiry small { font-size: .65rem; }
.item-status { height: 34px; font-size: .66rem; }
.crm-item-delete { font-size: .64rem; }
.crm-empty { padding-block: 14px; font-size: .7rem; line-height: 1.55; }
.note-item p { font-size: .74rem; }
.note-item small { font-size: .62rem; }
.timeline-item strong { font-size: .74rem; }
.timeline-item time { font-size: .61rem; }
.timeline-item p { font-size: .72rem; }
.file-upload span { font-size: .74rem; }
.file-upload small, .upload-status { font-size: .62rem; }
.file-link, .linked-enquiry { font-size: .74rem; }

.client-filter span { font-size: .59rem; }
.client-filter select { font-size: .72rem; }
.client-row strong { font-size: .78rem; }
.client-row small { font-size: .68rem; }
.client-row-state strong { font-size: .65rem; }

@media (max-width: 700px) {
  .client-hero h1 { font-size: 2rem; }
  .crm-card { padding: 20px; }
}

/* Simplified client record */
.client-page { max-width: 1040px; }
.client-page-toolbar { min-height: 40px; padding-bottom: 14px; }
.client-actions-menu { position: relative; }
.client-actions-menu > summary { min-height: 36px; display: flex; align-items: center; padding: 7px 11px; border: 1px solid #d5cbc4; border-radius: 6px; background: #fff; color: #695a53; font-size: .7rem; font-weight: 500; cursor: pointer; list-style: none; }
.client-actions-menu > summary::-webkit-details-marker { display: none; }
.client-actions-menu[open] > summary { border-color: #c9bbb2; }
.client-actions-menu .client-page-actions { position: absolute; z-index: 4; top: calc(100% + 7px); right: 0; width: 170px; display: grid; gap: 3px; padding: 6px; border: 1px solid #d8d0c9; border-radius: 7px; background: #fff; box-shadow: 0 14px 36px rgba(57,43,36,.12); }
.client-actions-menu .admin-secondary-button,
.client-actions-menu .admin-delete-button { width: 100%; justify-content: flex-start; border-color: transparent; text-align: left; }
.client-actions-menu .admin-secondary-button:hover,
.client-actions-menu .admin-delete-button:hover { background: #faf5f1; }
.client-hero { align-items: center; padding: 28px 0 24px; border-bottom: 1px solid #e2dad4; }
.client-hero h1 { font-size: clamp(1.8rem,3vw,2.35rem); }
.client-hero > div:first-child > p:last-child { margin-top: 6px; }
.client-hero-controls select { min-width: 132px; }
.client-workspace { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; padding-top: 18px; }
.client-contact-card { padding: 20px 22px; }
.client-contact-card > header { align-items: center; margin-bottom: 14px; }
.client-contact-card > header h2,
.client-essential-grid .crm-card > header h2 { font-size: 1rem !important; }
.client-essential-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: 14px; }
.client-essential-grid .crm-card { padding: 20px 22px; }
.client-essential-grid .crm-card > header { margin-bottom: 12px; }
.client-secondary-sections { border-top: 1px solid #ddd5ce; }
.client-disclosure { border-bottom: 1px solid #ddd5ce; }
.client-disclosure > summary { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 4px; color: #4a3e38; font-size: .82rem; font-weight: 600; cursor: pointer; list-style: none; }
.client-disclosure > summary::-webkit-details-marker { display: none; }
.client-disclosure > summary::after { color: #b35b50; font-size: 1.1rem; font-weight: 400; content: "+"; }
.client-disclosure[open] > summary::after { content: "−"; }
.client-disclosure-body { padding: 2px 4px 24px; }
.client-disclosure-body .crm-compact-form:first-child { margin-top: 0; }

@media (max-width: 760px) {
  .client-hero { align-items: stretch; }
  .client-essential-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .client-page-toolbar { align-items: center; flex-direction: row; }
  .client-hero { padding-block: 22px 20px; }
  .client-contact-card,
  .client-essential-grid .crm-card { padding: 18px; }
  .client-actions-menu .client-page-actions { width: 160px; }
}

/* General-purpose business workspace */
.business-view { width: min(100%, 1180px); color: #332b27; }
.business-page-heading { min-height: 82px; display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 26px; padding-bottom: 22px; border-bottom: 1px solid #ddd5ce; }
.business-page-heading > div > p, .business-panel header p, .business-document-form header p { margin: 0 0 5px; color: #c75b50; font-size: .63rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.business-page-heading h1 { margin: 0; color: #332b27; font: 600 2rem/1.1 "Poppins",Arial,sans-serif; letter-spacing: -.045em; }
.business-page-heading > div > span { display: block; margin-top: 7px; color: #89776e; font-size: .76rem; }
.business-view > .business-page-heading .admin-primary-button, .mail-heading-actions .admin-primary-button, .mail-heading-actions .admin-secondary-button, .gmail-connect-panel .admin-primary-button, .business-create-bar .admin-primary-button, .business-document-form .admin-primary-button, .mail-compose .admin-primary-button { min-height: 40px; padding: 9px 15px; border: 1px solid #e36e60; border-radius: 6px; background: #e36e60; color: #fff; font: 500 .73rem "Poppins",sans-serif; cursor: pointer; }
.mail-heading-actions .admin-secondary-button { border-color: #d7cec7; background: #fff; color: #685a53; }
.business-search { min-width: 250px; display: grid; gap: 5px; color: #9a877e; font-size: .61rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.business-search input { width: 100%; height: 40px; padding: 0 12px; border: 1px solid #d9d0c9; border-radius: 6px; background: #fff; color: #443832; font: 400 .75rem "Poppins",sans-serif; }
.business-empty { margin: 0; padding: 28px 16px; color: #9d8b82; font-size: .73rem; line-height: 1.6; text-align: center; }

.metric-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.metric-grid article { min-height: 132px; display: grid; align-content: space-between; padding: 20px; border: 1px solid #ded8d2; border-radius: 9px; background: #fff; }
.metric-grid span { color: #8f7c73; font-size: .68rem; font-weight: 500; }
.metric-grid strong { color: #332b27; font: 600 1.8rem/1 "Poppins",sans-serif; letter-spacing: -.045em; }
.metric-grid small { color: #a08f87; font-size: .62rem; }
.business-dashboard-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; }
.business-panel { min-height: 250px; padding: 22px; border: 1px solid #ded8d2; border-radius: 9px; background: #fff; }
.business-panel-wide { grid-column: 1 / -1; }
.business-panel > header { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.business-panel h2, .business-document-form h2, .gmail-connect-panel h2, .mail-reader h2, .work-card h2 { margin: 0; color: #3a312d; font-family: "Poppins",Arial,sans-serif; font-size: 1.08rem !important; font-weight: 600; line-height: 1.3; letter-spacing: -.025em; }
.business-panel header a { color: #b75b50; font-size: .67rem; text-decoration: none; }
.dashboard-line { width: 100%; min-height: 47px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 10px 0; border: 0; border-bottom: 1px solid #eee8e3; background: transparent; color: #4f423c; font: 500 .72rem "Poppins",sans-serif; text-align: left; cursor: pointer; }
.dashboard-line time { flex: none; color: #9e8c84; font-size: .64rem; }
.activity-line { min-height: 48px; display: grid; grid-template-columns: 12px 120px minmax(0,1fr) auto; align-items: center; gap: 11px; border-bottom: 1px solid #eee8e3; }
.activity-line-dot { width: 7px; height: 7px; border-radius: 50%; background: #e36e60; }
.activity-line strong { font-size: .69rem; }
.activity-line p { margin: 0; overflow: hidden; color: #776860; font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.activity-line time { color: #a08f87; font-size: .61rem; }

.business-filter-row { display: flex; gap: 6px; margin-bottom: 14px; }
.business-filter-row button { min-height: 34px; padding: 7px 12px; border: 1px solid #ddd4ce; border-radius: 999px; background: #fff; color: #7b6960; font: 500 .66rem "Poppins",sans-serif; cursor: pointer; }
.business-filter-row button.is-active { border-color: #e36e60; background: #fff0ed; color: #b94f44; }
.business-filter-row button:hover { border-color: #e36e60; background: #fff0ed; color: #9f443a; }
.work-board { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.work-card { min-height: 210px; display: flex; flex-direction: column; padding: 20px; border: 1px solid #ded8d2; border-radius: 9px; background: #fff; }
.work-card header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.work-card header small { display: block; margin-bottom: 6px; color: #c75b50; font-size: .6rem; }
.work-card p { margin: 20px 0; color: #786960; font-size: .7rem; line-height: 1.65; }
.work-card footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 13px; border-top: 1px solid #eee8e3; color: #9b8980; font-size: .59rem; }
.business-badge { display: inline-grid; place-items: center; width: max-content; min-height: 23px; padding: 3px 8px; border-radius: 999px; background: #f0eae5; color: #715f56; font-size: .59rem; font-weight: 600; white-space: nowrap; }
.business-badge.danger { background: #fff0ed; color: #b84e43; }
.business-badge.success { background: #eaf4ed; color: #397149; }
.business-small-button { padding: 5px 7px; border: 0; border-bottom: 1px solid #d8b6af; background: transparent; color: #ad5b51; font: 500 .62rem "Poppins",sans-serif; cursor: pointer; }

.business-create-bar { display: grid; grid-template-columns: minmax(220px,1.4fr) minmax(140px,.8fr) 135px 135px 100px auto; gap: 8px; margin-bottom: 18px; padding: 14px; border: 1px solid #ded8d2; border-radius: 9px; background: #fff; }
.business-create-bar input, .business-create-bar select { min-width: 0; height: 40px; padding: 0 10px; border: 1px solid #ddd4cd; border-radius: 5px; background: #fffdfb; color: #4d403a; font: 400 .7rem "Poppins",sans-serif; }
.task-list, .finance-list, .global-file-list { overflow: hidden; border: 1px solid #ded8d2; border-radius: 9px; background: #fff; }
.business-list-row { min-height: 70px; display: flex; align-items: center; gap: 14px; padding: 13px 16px; border-bottom: 1px solid #eee8e3; }
.business-list-row:last-child { border-bottom: 0; }
.business-row-main { min-width: 0; display: grid; flex: 1; gap: 4px; }
.business-row-main strong { overflow: hidden; color: #493d37; font-size: .75rem; text-overflow: ellipsis; white-space: nowrap; }
.business-row-main small { overflow: hidden; color: #94827a; font-size: .65rem; text-overflow: ellipsis; white-space: nowrap; }
.business-row-meta { display: flex; align-items: center; gap: 12px; }
.business-row-meta time { min-width: 80px; color: #8f7d75; font-size: .64rem; text-align: right; }
.task-row > input { width: 17px; height: 17px; accent-color: #e36e60; }
.task-row.is-complete .business-row-main { opacity: .55; text-decoration: line-through; }
.task-row.is-overdue { border-left: 3px solid #df685b; }

.finance-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; }
.finance-summary article { display: grid; gap: 8px; padding: 18px 20px; border: 1px solid #ded8d2; border-radius: 9px; background: #fff; }
.finance-summary span { color: #8d7b72; font-size: .65rem; }
.finance-summary strong { color: #443832; font-size: 1.1rem; }
.business-document-form { margin-bottom: 18px; padding: 22px; border: 1px solid #ddcfc8; border-radius: 9px; background: #fffaf7; }
.business-document-form > header { display: flex; align-items: start; justify-content: space-between; margin-bottom: 18px; }
.business-document-form > header button { border: 0; background: transparent; color: #a85a50; font-size: .66rem; cursor: pointer; }
.document-form-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; margin-bottom: 14px; }
.document-form-grid label { display: grid; gap: 6px; color: #88756c; font-size: .64rem; }
.document-form-grid input, .document-form-grid select, .document-form-grid textarea { width: 100%; min-height: 40px; padding: 9px 10px; border: 1px solid #ddd1ca; border-radius: 5px; background: #fff; color: #433732; font: .72rem "Poppins",sans-serif; }
.document-wide { grid-column: 1 / -1; }
.finance-row { display: grid; grid-template-columns: 42px minmax(200px,1fr) 150px auto; }
.document-type span, .global-file-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 6px; background: #f7ddd7; color: #b95045; font-size: .61rem; font-weight: 700; }
.finance-row-value { display: grid; justify-items: end; gap: 4px; }
.finance-row-value > strong { font-size: .78rem; }
.business-status-select { height: 29px; padding: 0 8px; border: 1px solid #ddd4ce; border-radius: 999px; background: #fff; color: #6f5e56; font: 600 .59rem "Poppins",sans-serif; }
.row-actions { display: flex; gap: 5px; }
.global-file-row { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; }

.mail-heading-actions { display: flex; gap: 8px; }
.gmail-connect-panel { min-height: 170px; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 28px; border: 1px solid #ded8d2; border-radius: 10px; background: #fff; }
.gmail-connect-panel > div { display: flex; align-items: center; gap: 18px; }
.gmail-connect-panel p { max-width: 620px; margin: 6px 0 0; color: #7f6e66; font-size: .72rem; line-height: 1.6; }
.gmail-connect-panel > p { max-width: 250px; color: #a06c63; font-size: .62rem; }
.gmail-mark { width: 52px; height: 52px; display: grid; place-items: center; flex: none; border: 1px solid #efb7af; border-radius: 10px; color: #d85c50; font-size: 1.25rem; font-weight: 700; }
.mail-compose { width: min(680px,100%); margin: 0 0 20px auto; overflow: hidden; border: 1px solid #d8cec7; border-radius: 10px; background: #fff; box-shadow: 0 18px 55px rgba(71,50,42,.12); }
.mail-compose > header { display: flex; align-items: center; justify-content: space-between; padding: 14px 17px; background: #f2ece7; color: #4c403a; font-size: .72rem; }
.mail-compose > header button { border: 0; background: transparent; color: #79675f; font-size: 1.1rem; cursor: pointer; }
.mail-compose > label { display: grid; grid-template-columns: 72px 1fr; align-items: center; padding: 0 16px; border-bottom: 1px solid #eee8e3; color: #917e75; font-size: .66rem; }
.mail-compose input, .mail-compose select, .mail-compose textarea { width: 100%; padding: 11px 0; border: 0; background: #fff; color: #40342f; font: .74rem/1.6 "Poppins",sans-serif; outline: 0; }
.mail-compose textarea { resize: vertical; }
.mail-attachment span { padding: 10px 0; color: #76655d; }
.mail-compose > footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px 16px; }
.mail-compose > footer p { margin: 0; color: #9e6158; font-size: .65rem; }
.mail-layout { min-height: 600px; display: grid; grid-template-columns: 360px minmax(0,1fr); overflow: hidden; border: 1px solid #ded8d2; border-radius: 10px; background: #fff; }
.mail-layout > aside { border-right: 1px solid #ded8d2; }
.mail-layout .business-search { min-width: 0; padding: 14px; border-bottom: 1px solid #e6dfd9; }
.mail-list { max-height: 720px; overflow-y: auto; }
.mail-row { width: 100%; display: grid; gap: 5px; padding: 14px 16px; border: 0; border-bottom: 1px solid #eee8e3; background: #fff; color: #4b3f39; text-align: left; cursor: pointer; }
.mail-row:hover { background: #fff8f5; }
.mail-row.is-unread { border-left: 3px solid #e36e60; background: #fffbf9; }
.mail-row > span { display: flex; justify-content: space-between; gap: 10px; }
.mail-row strong, .mail-row b { overflow: hidden; font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }
.mail-row time, .mail-row small { color: #9b8980; font-size: .61rem; }
.mail-row small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-reader { min-width: 0; padding: 28px; }
.mail-reader-header { display: flex; align-items: start; justify-content: space-between; gap: 22px; padding-bottom: 22px; border-bottom: 1px solid #e5ddd7; }
.mail-reader-header small, .mail-reader-header p { color: #917f76; font-size: .65rem; }
.mail-reader-header h2 { margin-block: 8px !important; font-size: 1.3rem !important; }
.mail-reader-header p { margin: 0; }
.mail-reader-header > div:last-child { display: flex; gap: 6px; }
.mail-reader-body { padding: 28px 0; color: #4d403a; font-size: .78rem; line-height: 1.8; white-space: pre-wrap; }

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .work-board { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .business-create-bar { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .finance-row { grid-template-columns: 42px minmax(180px,1fr) 130px; }
  .finance-row .row-actions { grid-column: 2 / -1; }
}

@media (max-width: 820px) {
  .portal-nav { overflow-x: auto; overflow-y: hidden; }
  .portal-nav a, .portal-nav button { min-width: 82px; flex: 0 0 auto; }
  .portal-nav .portal-nav-count { margin-left: 4px; }
  .business-page-heading { align-items: stretch; flex-direction: column; }
  .business-page-heading .business-search { min-width: 0; }
  .business-dashboard-grid { grid-template-columns: 1fr; }
  .business-panel-wide { grid-column: 1; }
  .mail-layout { grid-template-columns: 1fr; }
  .mail-layout > aside { border-right: 0; border-bottom: 1px solid #ded8d2; }
  .mail-list { max-height: 420px; }
}

@media (max-width: 650px) {
  .metric-grid, .work-board, .finance-summary, .document-form-grid { grid-template-columns: 1fr; }
  .business-create-bar { grid-template-columns: 1fr; }
  .activity-line { grid-template-columns: 12px 1fr auto; padding-block: 10px; }
  .activity-line p { grid-column: 2 / -1; }
  .finance-row { grid-template-columns: 42px minmax(0,1fr); }
  .finance-row-value, .finance-row .row-actions { grid-column: 2; justify-items: start; }
  .gmail-connect-panel { align-items: stretch; flex-direction: column; }
  .gmail-connect-panel > div { align-items: flex-start; }
  .mail-reader-header { flex-direction: column; }
}

/* Keep the mobile portal focused on the working enquiries mailbox. */
@media (max-width: 820px) {
  .portal-nav [data-cms-tool],
  .portal-site-editor,
  .portal-cms-label { display: none !important; }
  .portal-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }
  .portal-nav a,
  .portal-nav button { width: auto; min-width: 0; min-height: 48px; }
  .portal-content { min-width: 0; }
}

@media (max-width: 520px) {
  .portal-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-bottom: 8px; }
  .portal-nav a,
  .portal-nav button { border-radius: 6px; }
  .enquiry-page-toolbar { align-items: stretch; flex-direction: column; }
  .enquiry-page-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
  .enquiry-page-actions .admin-primary-button { grid-column: 1 / -1; }
}
