:root {
  --bg: #6e5648;
  --bg-soft: #8b7364;
  --surface: rgba(255, 250, 245, 0.92);
  --surface-strong: #fffdfb;
  --surface-dark: #43352d;
  --surface-dark-soft: #5c4b41;
  --paper: #f7f2ec;
  --paper-deep: #efe5db;
  --cream: #fbf8f4;
  --sand: #dbcabc;
  --rose: #b88d7a;
  --gold: #b49a85;
  --gold-bright: #d8c1af;
  --text: #2f2620;
  --text-soft: #6f6258;
  --text-inverse: #faf5f0;
  --line: rgba(110, 86, 72, 0.16);
  --line-strong: rgba(110, 86, 72, 0.28);
  --success: #46c779;
  --danger: #f05b57;
  --warning: #f2a45e;
  --call: #4e95ff;
  --shadow-soft: 0 18px 48px rgba(61, 42, 31, 0.08);
  --shadow-strong: 0 24px 64px rgba(45, 30, 22, 0.16);
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 16px;
  --display: "Cormorant Garamond", Georgia, serif;
  --ui: "Manrope", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--ui);
  color: var(--text);
  background:
    radial-gradient(circle at top, rgba(184, 141, 122, 0.08), transparent 24%),
    linear-gradient(180deg, var(--cream) 0%, var(--paper) 100%);
}

body.portal-page,
body.client-page {
  background:
    radial-gradient(circle at top, rgba(184, 141, 122, 0.12), transparent 24%),
    linear-gradient(180deg, #f8f3ee 0%, #f0e7df 100%);
}

body.invoice-page {
  background: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(110, 86, 72, 0.16);
  border-radius: 16px;
  background: rgba(255, 252, 249, 0.94);
  color: var(--text);
  padding: 0.92rem 1rem;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

input::placeholder,
textarea::placeholder {
  color: rgba(111, 98, 88, 0.8);
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(110, 86, 72, 0.4);
  box-shadow: 0 0 0 4px rgba(184, 141, 122, 0.14);
}

textarea {
  min-height: 120px;
  resize: vertical;
}

.container {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
}

.veil-shell {
  width: min(1320px, calc(100% - 52px));
  margin: 0 auto;
}

.btn,
.veil-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.88rem 1.35rem;
  border: 1px solid transparent;
  border-radius: 14px;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.btn:hover,
.btn:focus-visible,
.veil-button:hover,
.veil-button:focus-visible,
.mini-button:hover,
.mini-button:focus-visible {
  transform: translateY(-2px);
}

.btn-primary {
  background: linear-gradient(180deg, #a88772 0%, #735b4d 100%);
  color: var(--text-inverse);
  box-shadow: 0 16px 34px rgba(115, 91, 77, 0.22);
}

.btn-outline,
.veil-button-outline {
  border-color: rgba(255, 244, 236, 0.72);
  background: rgba(255, 255, 255, 0.04);
  color: #fff7f0;
}

.portal-page .btn-outline,
.client-page .btn-outline,
.invoice-page .btn-outline {
  border-color: rgba(110, 86, 72, 0.2);
  background: rgba(255, 255, 255, 0.8);
  color: var(--bg);
}

.btn-ghost {
  border-color: rgba(110, 86, 72, 0.18);
  background: transparent;
  color: var(--text-soft);
}

.btn-success {
  background: linear-gradient(180deg, #78e5a1 0%, var(--success) 100%);
  color: #0c2315;
  box-shadow: 0 14px 30px rgba(70, 199, 121, 0.18);
}

.btn-danger {
  background: linear-gradient(180deg, #ff8e8b 0%, var(--danger) 100%);
  color: #360d0c;
  box-shadow: 0 14px 30px rgba(240, 91, 87, 0.18);
}

.btn-warning {
  background: linear-gradient(180deg, #ffbf88 0%, var(--warning) 100%);
  color: #3b1d09;
  box-shadow: 0 14px 30px rgba(242, 164, 94, 0.18);
}

.btn-call {
  background: linear-gradient(180deg, #91bdff 0%, var(--call) 100%);
  color: #091d3e;
  box-shadow: 0 14px 30px rgba(78, 149, 255, 0.18);
}

.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.72rem 0.95rem;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease,
    border-color 160ms ease;
}

.mini-button.is-warning {
  background: linear-gradient(180deg, #ffbf88 0%, var(--warning) 100%);
  color: #3b1d09;
}

.mini-button.is-success {
  background: linear-gradient(180deg, #78e5a1 0%, var(--success) 100%);
  color: #0c2315;
}

.mini-button.is-danger {
  background: linear-gradient(180deg, #ff8e8b 0%, var(--danger) 100%);
  color: #360d0c;
}

.mini-button.is-call {
  background: linear-gradient(180deg, #91bdff 0%, var(--call) 100%);
  color: #091d3e;
}

.mini-kicker,
.veil-section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text-soft);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.mini-kicker::after,
.veil-section-label::after {
  content: "";
  width: 32px;
  height: 1px;
  background: rgba(110, 86, 72, 0.24);
}

.status-line,
.page-lead,
.surface-card p,
.portal-footer-card p,
.veil-footer p {
  color: var(--text-soft);
  line-height: 1.72;
}

.status-line {
  margin: 0;
}

.card-meta,
.form-actions,
.portal-footer-actions,
.action-row,
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.tool-chip,
.session-chip,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(110, 86, 72, 0.16);
  background: rgba(255, 252, 249, 0.7);
  color: var(--text);
  padding: 0.5rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-badge.is-new {
  background: rgba(216, 193, 175, 0.3);
}

.status-badge.is-warn {
  background: rgba(242, 164, 94, 0.18);
}

.status-badge.is-done {
  background: rgba(70, 199, 121, 0.16);
}

.status-badge.is-call {
  background: rgba(78, 149, 255, 0.16);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}

.section-head h1,
.section-head h2,
.surface-card h1,
.surface-card h2,
.surface-card h3,
.metric-card h3,
.module-card h3,
.list-card h3,
.customer-card h3,
.invoice-card h3,
.history-card h3 {
  margin: 0;
}

.surface-card h1,
.surface-card h2,
.surface-card h3,
.metric-card h3,
.module-card h3,
.list-card h3,
.customer-card h3,
.invoice-card h3,
.history-card h3 {
  color: var(--text);
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.surface-card h1 {
  font-size: clamp(2.5rem, 4vw, 4rem);
  line-height: 0.96;
}

.surface-card h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1;
}

.surface-card h3,
.metric-card h3,
.module-card h3,
.list-card h3,
.customer-card h3,
.invoice-card h3,
.history-card h3 {
  font-size: 1.5rem;
  line-height: 1.02;
}

.portal-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid rgba(110, 86, 72, 0.12);
  background: rgba(248, 243, 238, 0.92);
  backdrop-filter: blur(20px);
}

.portal-nav {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-port {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
}

.brand-mark {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
}

.brand-copy {
  display: grid;
  gap: 0.1rem;
}

.brand-arabic {
  color: rgba(111, 98, 88, 0.86);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand-english {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.brand-sub {
  color: rgba(111, 98, 88, 0.88);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.portal-nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.72rem;
}

.portal-nav-links a {
  color: rgba(47, 38, 32, 0.88);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.portal-nav-links a:hover,
.portal-nav-links a:focus-visible,
.portal-nav-links a.is-active {
  color: var(--bg);
}

.portal-main {
  padding: 2rem 0 3rem;
}

.portal-grid {
  display: grid;
  gap: 1rem;
}

.page-hero,
.dual-grid,
.three-grid,
.four-grid,
.stats-grid,
.module-grid,
.client-shell,
.invoice-grid,
.history-grid {
  display: grid;
  gap: 1rem;
}

.page-hero,
.dual-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-grid,
.stats-grid,
.module-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

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

.surface-card,
.metric-card,
.module-card,
.list-card,
.customer-card,
.history-card,
.invoice-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 252, 249, 0.96), rgba(248, 242, 236, 0.96));
  box-shadow: var(--shadow-soft);
}

.padded,
.metric-card,
.module-card,
.list-card,
.customer-card,
.history-card,
.invoice-card {
  padding: 1.45rem;
}

.metric-card .value,
.invoice-card .value,
.print-brand,
[data-payroll-net] {
  margin-top: 0.6rem;
  color: var(--bg);
  font-family: var(--display);
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 0.95;
}

.module-card,
.customer-card,
.history-card,
.invoice-card,
.list-card {
  display: grid;
  gap: 0.8rem;
}

.list-grid,
.customer-grid,
.schedule-board {
  display: grid;
  gap: 1rem;
}

.field-label {
  display: grid;
  gap: 0.55rem;
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.form-stack {
  display: grid;
  gap: 1rem;
}

.split-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.meta-item,
.field-help {
  color: var(--text-soft);
  font-size: 0.92rem;
  line-height: 1.6;
}

.customer-grid .customer-card,
.schedule-board .list-card {
  position: relative;
}

.schedule-board .list-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--rose), var(--bg));
}

.time-display {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.2rem;
}

.timer-value {
  color: var(--bg);
  font-family: var(--display);
  font-size: clamp(2.8rem, 4vw, 4.2rem);
  line-height: 0.9;
}

.map-shell {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  min-height: 520px;
  border: 1px solid var(--line);
}

.map-shell iframe {
  width: 100%;
  height: 100%;
  min-height: 520px;
  border: 0;
  filter: saturate(0.8) sepia(0.08);
}

.tracking-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.tracking-pin {
  position: absolute;
  min-width: 148px;
  padding: 0.75rem 0.85rem;
  border-radius: 18px;
  background: rgba(255, 252, 249, 0.94);
  border: 1px solid rgba(110, 86, 72, 0.18);
  box-shadow: 0 16px 32px rgba(58, 41, 31, 0.14);
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.35;
  transform: translate(-50%, -50%);
}

.tracking-pin strong {
  display: block;
  margin-bottom: 0.15rem;
}

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

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

th,
td {
  padding: 0.88rem;
  border-bottom: 1px solid rgba(110, 86, 72, 0.12);
  text-align: left;
}

th {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.actions-cell {
  min-width: 220px;
}

.month-row {
  display: grid;
  gap: 0.65rem;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(110, 86, 72, 0.12);
}

.month-row:last-child {
  border-bottom: 0;
}

.month-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--text);
  font-weight: 800;
}

.bar-stack {
  display: grid;
  gap: 0.35rem;
}

.bar-track {
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(110, 86, 72, 0.08);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
}

.bar-fill.sales {
  background: linear-gradient(90deg, var(--rose), var(--bg));
}

.bar-fill.delivery {
  background: linear-gradient(90deg, #9ac1ff, var(--call));
}

.bar-fill.payroll {
  background: linear-gradient(90deg, #ffcb99, var(--warning));
}

.client-shell {
  gap: 1rem;
}

.client-sticky-nav {
  position: sticky;
  top: 100px;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 252, 249, 0.94);
  box-shadow: var(--shadow-soft);
}

.client-sticky-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.78rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(110, 86, 72, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.client-sticky-nav a:hover,
.client-sticky-nav a:focus-visible {
  border-color: rgba(110, 86, 72, 0.32);
  color: var(--bg);
}

.client-section {
  scroll-margin-top: 170px;
}

.gateway-hero {
  min-height: calc(100vh - 90px);
  display: grid;
  place-items: center;
  padding: 2rem 0 3rem;
}

.gateway-card {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  padding: 2rem;
}

.portal-footer {
  padding-bottom: 2rem;
}

.portal-footer-card {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
  padding: 1.45rem;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 252, 249, 0.98), rgba(245, 238, 230, 0.98));
  box-shadow: var(--shadow-soft);
}

.portal-footer-card h2 {
  margin: 0 0 0.35rem;
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(2rem, 3vw, 2.8rem);
}

.print-shell {
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.print-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.print-invoice-card {
  border: 1px solid rgba(110, 86, 72, 0.12);
  box-shadow: 0 16px 40px rgba(20, 26, 36, 0.08);
  padding: 2rem;
  background: #ffffff;
}

.print-invoice-head,
.print-dual {
  display: flex;
  justify-content: space-between;
  gap: 1.2rem;
}

.print-brand {
  margin: 0 0 0.25rem;
  text-transform: uppercase;
}

.print-meta,
.print-note {
  color: #5f554d;
  line-height: 1.6;
}

.print-badge {
  min-width: 140px;
  align-self: flex-start;
  border: 1px solid rgba(110, 86, 72, 0.18);
  padding: 0.8rem 1rem;
  color: var(--bg);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
}

.print-dual {
  margin-top: 1.6rem;
}

.print-dual h2 {
  margin: 0 0 0.7rem;
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.print-dual p {
  margin: 0 0 0.35rem;
}

.print-table {
  width: 100%;
  margin-top: 1.8rem;
  border-collapse: collapse;
}

.print-table th,
.print-table td {
  border: 1px solid rgba(110, 86, 72, 0.12);
  padding: 0.85rem;
  text-align: left;
}

.print-table th {
  background: #f6efe8;
}

.print-note {
  margin-top: 1.4rem;
}

.veil-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 40;
}

.veil-nav {
  min-height: 112px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.2rem;
}

.veil-brand,
.veil-footer-brand {
  display: grid;
  gap: 0.1rem;
}

.veil-wordmark {
  color: #fbf8f4;
  font-family: var(--display);
  font-size: 3.4rem;
  line-height: 0.88;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.veil-submark {
  color: rgba(251, 248, 244, 0.88);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
}

.veil-links,
.veil-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.veil-links {
  justify-content: center;
}

.veil-links a,
.veil-portal-link {
  color: rgba(251, 248, 244, 0.92);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.veil-actions {
  justify-content: flex-end;
}

.veil-portal-link {
  position: relative;
  padding-bottom: 0.2rem;
}

.veil-portal-link::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: rgba(255, 244, 236, 0.35);
}

.veil-hero {
  position: relative;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(88, 70, 61, 0.92) 0%, rgba(88, 70, 61, 0.82) 28%, rgba(88, 70, 61, 0.28) 56%, rgba(88, 70, 61, 0.05) 72%),
    url("https://images.unsplash.com/photo-1515377905703-c4788e51af15?q=80&w=2200&auto=format&fit=crop")
      center center / cover no-repeat;
  overflow: hidden;
}

.veil-hero::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 44%;
  background:
    linear-gradient(180deg, rgba(244, 237, 231, 0.14), rgba(244, 237, 231, 0.02)),
    linear-gradient(90deg, rgba(246, 240, 234, 0.3), rgba(246, 240, 234, 0.04));
  mix-blend-mode: screen;
}

.veil-hero-inner {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9rem 0 4rem;
}

.veil-hero-copy {
  max-width: 460px;
  color: #fff9f4;
}

.veil-hero-copy h1,
.veil-standard-copy h2,
.veil-services-copy h2,
.veil-kind-quote blockquote,
.veil-booking-copy h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.03em;
}

.veil-hero-copy h1 {
  font-size: clamp(5rem, 9vw, 8.6rem);
  line-height: 0.88;
}

.veil-hero-copy p {
  margin: 1.8rem 0 2.3rem;
  color: rgba(255, 249, 244, 0.88);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.85;
  text-transform: uppercase;
}

.veil-underlined-link {
  display: inline-flex;
  align-items: center;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid rgba(255, 244, 236, 0.58);
  color: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.veil-seal {
  width: 170px;
  height: 170px;
  margin-top: auto;
  border: 1px solid rgba(255, 244, 236, 0.72);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: rgba(255, 248, 242, 0.94);
  text-align: center;
}

.veil-seal strong,
.veil-footer-seal {
  font-family: var(--display);
  font-size: 4rem;
  line-height: 1;
}

.veil-seal span {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.veil-standard,
.veil-services-panel,
.veil-booking-band {
  background: linear-gradient(180deg, #fbf8f4 0%, #f2e9e0 100%);
}

.veil-standard {
  padding: 2rem 0 0;
}

.veil-standard-grid {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 3rem;
  align-items: center;
}

.veil-standard-copy {
  padding: 2rem 0 2rem 2rem;
}

.veil-standard-copy h2 {
  font-size: clamp(3.2rem, 5vw, 4.9rem);
  line-height: 0.98;
  color: var(--text);
  margin-top: 1.3rem;
}

.veil-standard-copy p {
  max-width: 430px;
  margin: 1.6rem 0 2rem;
  color: var(--text-soft);
  font-size: 1rem;
  line-height: 1.8;
}

.veil-standard .veil-underlined-link,
.veil-kind-side .veil-underlined-link,
.veil-booking-copy .veil-underlined-link {
  color: var(--text);
  border-bottom-color: rgba(110, 86, 72, 0.4);
}

.veil-arch-scene {
  padding: 1rem 0 0;
}

.veil-arch-frame {
  overflow: hidden;
  border-radius: 280px 280px 0 0;
  background: linear-gradient(180deg, #eadacd 0%, #dbc6b4 100%);
  min-height: 520px;
  display: grid;
  align-items: end;
}

.veil-arch-frame img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.veil-gallery-band {
  background: #f1e7de;
}

.veil-gallery-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
}

.veil-gallery-panel {
  min-height: 290px;
  overflow: hidden;
}

.veil-gallery-panel img {
  width: 100%;
  height: 100%;
  min-height: 290px;
  object-fit: cover;
}

.veil-gallery-logo {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, rgba(255, 248, 242, 0.72), transparent 55%),
    linear-gradient(180deg, #d9c7bb 0%, #baa494 100%);
}

.veil-gallery-logo .veil-wordmark {
  color: var(--text);
  font-size: 3rem;
}

.veil-gallery-logo .veil-submark {
  color: rgba(47, 38, 32, 0.88);
}

.veil-services-panel {
  position: relative;
  padding: 2rem 0 2.4rem;
  overflow: hidden;
}

.veil-services-panel::after {
  content: "";
  position: absolute;
  right: 10%;
  bottom: -40px;
  width: 430px;
  height: 280px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0) 66%),
    linear-gradient(180deg, rgba(220, 204, 193, 0.18), rgba(220, 204, 193, 0));
  border-radius: 50%;
  transform: rotate(-12deg);
}

.veil-services-grid {
  position: relative;
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 2rem;
}

.veil-services-copy {
  padding-top: 1.8rem;
}

.veil-services-copy h2 {
  max-width: 320px;
  margin-top: 1.2rem;
  font-size: clamp(3.2rem, 5vw, 4.8rem);
  line-height: 0.98;
}

.veil-service-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-left: 1px solid rgba(110, 86, 72, 0.14);
}

.veil-service-card {
  position: relative;
  padding: 1.4rem 1.3rem 2rem;
  border-right: 1px solid rgba(110, 86, 72, 0.14);
}

.veil-service-number {
  color: rgba(110, 86, 72, 0.56);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.veil-service-card h3 {
  margin: 1.5rem 0 0.8rem;
  font-family: var(--ui);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.veil-service-card p {
  margin: 0 0 1.4rem;
  color: var(--text-soft);
  line-height: 1.8;
}

.veil-service-card a {
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.veil-kind-words {
  display: grid;
  grid-template-columns: 1.1fr 1fr 0.7fr;
  align-items: stretch;
  background: linear-gradient(180deg, #f3e9df 0%, #fbf8f4 100%);
}

.veil-kind-image img {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
}

.veil-kind-quote,
.veil-kind-side {
  padding: 2.2rem 2rem;
}

.veil-kind-quote blockquote {
  margin: 1.3rem 0 1rem;
  color: var(--text);
  font-size: clamp(2.8rem, 4vw, 4rem);
  line-height: 1.04;
}

.veil-kind-quote p,
.veil-kind-side span {
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.veil-kind-side {
  display: grid;
  align-content: center;
  gap: 1rem;
}

.veil-kind-side p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.9;
}

.veil-booking-band {
  padding: 0 0 1.4rem;
}

.veil-booking-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(244, 235, 227, 0.92)),
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.82), transparent 44%);
}

.veil-booking-copy {
  display: grid;
  align-content: center;
  padding: 3rem 3rem 3rem 4rem;
}

.veil-booking-copy h2 {
  max-width: 520px;
  font-size: clamp(3rem, 4vw, 4.5rem);
  line-height: 1;
}

.veil-booking-copy .veil-underlined-link {
  width: fit-content;
  margin-top: 1.4rem;
}

.veil-booking-image img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.veil-footer {
  background: linear-gradient(180deg, #f8f3ee 0%, #f1e8de 100%);
  border-top: 1px solid rgba(110, 86, 72, 0.12);
}

.veil-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr 0.5fr;
  gap: 2rem;
  align-items: start;
  padding: 1.6rem 0 1.1rem;
}

.veil-footer-brand .veil-wordmark {
  color: var(--text);
  font-size: 2.8rem;
}

.veil-footer-brand .veil-submark {
  color: rgba(47, 38, 32, 0.84);
}

.veil-footer h3 {
  margin: 0 0 0.7rem;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.veil-footer p {
  margin: 0;
  font-size: 0.95rem;
}

.veil-socials {
  display: flex;
  gap: 0.7rem;
  margin-top: 0.8rem;
}

.veil-socials span,
.veil-footer-seal {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(110, 86, 72, 0.24);
  display: grid;
  place-items: center;
  color: var(--text);
}

.veil-footer-seal {
  width: 86px;
  height: 86px;
  margin-inline: auto;
  font-size: 2.8rem;
}

.veil-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 0 1.1rem;
  border-top: 1px solid rgba(110, 86, 72, 0.12);
  color: var(--text-soft);
  font-size: 0.82rem;
}

.veil-footer-bottom div {
  display: flex;
  gap: 1.4rem;
}

.aibiz-return-cta {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  z-index: 900;
  max-width: calc(100% - 2rem);
  min-height: 2.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(66, 245, 141, 0.75);
  border-radius: 16px;
  background: linear-gradient(135deg, #42f58d, #65e4ff);
  color: #03120a;
  padding: 0.78rem 1.05rem;
  box-shadow: 0 14px 36px rgba(66, 245, 141, 0.2);
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

@media (max-width: 1180px) {
  .veil-standard-grid,
  .veil-services-grid,
  .veil-booking-grid,
  .page-hero,
  .dual-grid,
  .portal-footer-card {
    grid-template-columns: 1fr;
  }

  .veil-kind-words,
  .veil-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .three-grid,
  .stats-grid,
  .module-grid,
  .four-grid,
  .invoice-grid,
  .history-grid,
  .veil-service-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .veil-gallery-row {
    grid-template-columns: 1fr;
  }

  .veil-gallery-panel {
    min-height: 240px;
  }
}

@media (max-width: 980px) {
  .portal-nav,
  .veil-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 0;
  }

  .portal-nav-links,
  .veil-links,
  .veil-actions {
    justify-content: flex-start;
  }

  .client-sticky-nav {
    top: 88px;
  }

  .veil-hero-inner {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 2rem;
  }

  .veil-seal {
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .container,
  .veil-shell {
    width: min(100% - 28px, 1320px);
  }

  .split-fields,
  .three-grid,
  .stats-grid,
  .module-grid,
  .four-grid,
  .invoice-grid,
  .history-grid,
  .veil-service-list,
  .veil-kind-words,
  .veil-footer-grid {
    grid-template-columns: 1fr;
  }

  .portal-footer-card,
  .veil-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .veil-hero {
    min-height: auto;
    background-position: 72% center;
  }

  .veil-hero::before {
    width: 100%;
  }

  .veil-hero-inner {
    min-height: auto;
    padding: 8rem 0 2rem;
  }

  .veil-hero-copy h1 {
    font-size: 4.3rem;
  }

  .veil-wordmark {
    font-size: 2.6rem;
  }

  .veil-standard-copy,
  .veil-booking-copy,
  .veil-kind-quote,
  .veil-kind-side {
    padding-inline: 0;
  }

  .veil-standard {
    padding-top: 1rem;
  }

  .veil-booking-copy {
    padding: 2rem 0;
  }

  .aibiz-return-cta {
    left: 0.7rem;
    right: 0.7rem;
    max-width: none;
    bottom: 0.7rem;
  }
}

@media print {
  .print-toolbar,
  .aibiz-return-cta {
    display: none !important;
  }

  .print-shell {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .print-invoice-card {
    border: 0;
    box-shadow: none;
    padding: 0;
  }
}
