:root {
  --accent: #2a2d7c;
  --paper: #f5f2ec;
  --paper-2: #ebe7de;
  --ink: #1c1d3a;
  --ink-soft: #4a4c67;
  --dark: #15162c;
  --white: #ffffff;
  --line: rgba(28, 29, 58, 0.15);
  --line-strong: rgba(28, 29, 58, 0.28);
  --shadow: 0 22px 54px rgba(16, 17, 36, 0.14);
  --max: 1440px;
  --pad: clamp(22px, 5vw, 80px);
  color-scheme: light;
  font-family: "Barlow", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Barlow", ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.55;
  margin: 0;
  min-width: 320px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

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

button {
  border: 0;
  cursor: pointer;
}

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

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

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

::selection {
  background: var(--accent);
  color: var(--white);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1.04;
}

.eyebrow {
  color: var(--accent);
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.27em;
  line-height: 1.3;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.button,
.portal-account button,
.intro-actions a {
  align-items: center;
  display: inline-flex;
  font-size: 11.5px;
  font-weight: 500;
  justify-content: center;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
  transition:
    background 0.35s ease,
    border-color 0.35s ease,
    color 0.35s ease,
    transform 0.35s ease;
}

.button {
  min-height: 46px;
  padding: 13px 24px;
}

.button.primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--white);
}

.button.primary:hover {
  background: transparent;
  color: var(--accent);
}

.button.secondary {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
}

.button.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.button.light-solid {
  background: var(--white);
  border: 1px solid var(--white);
  color: var(--ink);
}

.button.light-solid:hover {
  background: transparent;
  color: var(--white);
}

.button.light-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.62);
  color: var(--white);
}

.button.light-outline:hover {
  background: var(--white);
  border-color: var(--white);
  color: var(--ink);
}

.login-screen {
  background:
    linear-gradient(108deg, rgba(16, 17, 36, 0.88) 0%, rgba(16, 17, 36, 0.5) 48%, rgba(16, 17, 36, 0.84) 100%),
    url("./assets/haro-login-home.jpg") center / cover no-repeat;
  color: var(--white);
  min-height: 100vh;
  padding: clamp(24px, 4vw, 52px);
}

.login-top {
  align-items: center;
  display: flex;
  gap: 18px;
}

.login-top img {
  height: 31px;
  width: auto;
}

.login-top span {
  border-left: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  padding-left: 18px;
  text-transform: uppercase;
}

.login-layout {
  align-items: end;
  display: grid;
  gap: clamp(28px, 7vw, 110px);
  grid-template-columns: minmax(0, 1fr) minmax(330px, 430px);
  margin: 0 auto;
  max-width: var(--max);
  min-height: calc(100vh - 96px);
  padding: clamp(70px, 11vh, 150px) 0 20px;
}

.login-copy {
  max-width: 820px;
}

.login-copy .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

.login-copy h1 {
  font-size: clamp(54px, 9vw, 122px);
  max-width: 11ch;
}

.login-copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(18px, 1.8vw, 23px);
  line-height: 1.55;
  margin-top: 28px;
  max-width: 44ch;
}

.login-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 38px;
}

.login-proof span {
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  color: rgba(255, 255, 255, 0.88);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  padding-bottom: 9px;
  text-transform: uppercase;
}

.login-panel {
  background: rgba(245, 242, 236, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow: var(--shadow);
  color: var(--ink);
  display: grid;
  gap: 17px;
  padding: clamp(24px, 3.4vw, 38px);
}

.login-panel h2,
.modal h2 {
  font-size: clamp(34px, 4vw, 52px);
}

.login-panel .eyebrow {
  margin-bottom: 0;
}

.fine-print {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
}

label {
  color: var(--ink-soft);
  display: grid;
  font-size: 12px;
  font-weight: 500;
  gap: 8px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

input,
select,
textarea {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  min-height: 46px;
  padding: 10px 12px;
  text-transform: none;
  width: 100%;
}

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

.partner-shell {
  background:
    linear-gradient(180deg, rgba(235, 231, 222, 0.68) 0%, rgba(245, 242, 236, 0) 360px),
    var(--paper);
  min-height: 100vh;
}

.portal-header {
  align-items: center;
  background: var(--dark);
  color: var(--white);
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(190px, 1fr) auto;
  padding: 15px var(--pad);
  position: sticky;
  top: 0;
  z-index: 20;
}

.portal-brand {
  align-items: center;
  display: inline-flex;
  gap: 14px;
  justify-self: start;
}

.portal-brand img {
  height: 27px;
  width: auto;
}

.portal-brand span,
.portal-account span {
  color: rgba(255, 255, 255, 0.72);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.portal-account button:hover {
  color: var(--white);
}

.portal-account {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: end;
  min-width: 0;
}

.portal-account span {
  letter-spacing: 0;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.portal-account button {
  background: transparent;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  color: rgba(255, 255, 255, 0.82);
  padding: 0 0 6px;
  white-space: nowrap;
}

.portal-main {
  margin: 0 auto;
  max-width: var(--max);
  padding: clamp(26px, 4.4vw, 50px) var(--pad) clamp(50px, 7vw, 86px);
}

.portal-intro-panel {
  align-items: stretch;
  display: grid;
  gap: clamp(16px, 2.8vw, 28px);
  grid-template-columns: minmax(0, 1fr) minmax(300px, 390px);
}

.intro-copy {
  background:
    linear-gradient(105deg, rgba(21, 22, 44, 0.92), rgba(21, 22, 44, 0.58)),
    url("./assets/haro-login-home.jpg") center / cover no-repeat;
  color: var(--white);
  min-height: 285px;
  padding: clamp(28px, 4.6vw, 48px);
}

.intro-copy .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.intro-copy h1 {
  font-size: clamp(44px, 6vw, 76px);
  max-width: 13ch;
}

.intro-copy p:not(.eyebrow) {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(17px, 1.6vw, 21px);
  margin-top: 18px;
  max-width: 42ch;
}

.intro-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin-top: clamp(22px, 3.4vw, 34px);
}

.intro-actions a {
  border-bottom: 1px solid rgba(255, 255, 255, 0.58);
  color: rgba(255, 255, 255, 0.86);
  padding-bottom: 8px;
}

.intro-actions a:hover {
  color: var(--white);
}

.account-panel {
  background: var(--dark);
  color: var(--white);
  display: grid;
  align-content: end;
  padding: clamp(20px, 2.8vw, 28px);
}

.account-panel .eyebrow {
  color: rgba(255, 255, 255, 0.68);
}

.account-panel dl {
  display: grid;
  gap: 0;
  margin: auto 0 0;
  width: 100%;
}

.account-panel div {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  padding: 16px 0;
}

dt {
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.account-panel dt,
.rail-panel:first-child dt {
  color: rgba(255, 255, 255, 0.58);
}

dd {
  color: inherit;
  font-size: 16px;
  font-weight: 400;
  margin: 5px 0 0;
}

.work-surface {
  align-items: start;
  display: grid;
  gap: clamp(18px, 3vw, 34px);
  grid-template-columns: minmax(0, 1fr) minmax(310px, 380px);
  margin-top: clamp(20px, 3.4vw, 36px);
}

.work-main,
.side-rail {
  min-width: 0;
}

.compact-head {
  align-items: end;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 18px;
}

.compact-head h2 {
  font-size: clamp(34px, 4.2vw, 56px);
}

.order-list,
.side-rail,
.update-list,
.history-list {
  display: grid;
  gap: 12px;
}

.order-card,
.rail-panel,
.history-item,
.empty-state,
.modal {
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid var(--line);
}

.order-card {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 2.4vw, 28px);
}

.order-card-top {
  align-items: start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.order-card-top .eyebrow {
  margin-bottom: 7px;
}

.order-card h3 {
  font-size: clamp(30px, 3.3vw, 46px);
  max-width: 18ch;
}

.order-state {
  border: 1px solid var(--line-strong);
  color: var(--ink-soft);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.13em;
  padding: 6px 9px;
  text-transform: uppercase;
  white-space: nowrap;
}

.order-state.ordered {
  border-color: rgba(42, 45, 124, 0.45);
  color: var(--accent);
}

.order-state.quote,
.order-state.sample,
.order-state.review {
  background: rgba(235, 231, 222, 0.58);
}

.order-details {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 1px;
  grid-template-columns: repeat(auto-fit, minmax(126px, 1fr));
  margin: 0;
  padding-top: 13px;
}

.order-details div {
  min-width: 0;
  padding-right: 14px;
}

.order-details dd {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.order-progress {
  display: grid;
  gap: 7px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.order-progress span {
  border-top: 3px solid var(--line);
  color: var(--ink-soft);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  padding-top: 8px;
  text-transform: uppercase;
}

.order-progress span.active {
  border-color: var(--accent);
  color: var(--ink);
}

.order-notes {
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 14px;
  padding-top: 13px;
}

.order-notes strong {
  color: var(--ink);
  font-weight: 500;
}

.side-rail {
  position: sticky;
  top: 88px;
}

.rail-panel {
  padding: clamp(18px, 2.4vw, 26px);
}

.rail-panel:first-child {
  background: var(--dark);
  color: var(--white);
}

.rail-panel:first-child .eyebrow {
  color: rgba(255, 255, 255, 0.68);
}

.rail-panel h3 {
  font-size: clamp(28px, 2.7vw, 38px);
}

.update-list,
.history-list {
  margin-top: 18px;
}

.update-item {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: grid;
  gap: 4px;
  padding-top: 12px;
}

.update-item time,
.update-item span,
.history-item time {
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.update-item strong,
.history-item strong {
  font-weight: 500;
}

.update-item p {
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.history-item {
  background: transparent;
  border: 0;
  display: grid;
  gap: 6px;
  padding: 13px 0 0;
}

.history-item + .history-item {
  border-top: 1px solid var(--line);
}

.history-item span {
  color: var(--accent);
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  margin-bottom: 3px;
}

.history-item p {
  color: var(--ink-soft);
  font-size: 14px;
}

.history-item time {
  color: var(--ink-soft);
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 18px;
}

.empty-state strong {
  font-weight: 500;
}

.empty-state p {
  color: var(--ink-soft);
  font-size: 14px;
}

.rail-panel .empty-state {
  background: transparent;
  border: 0;
  padding: 0;
}

.rail-panel:first-child .empty-state p {
  color: rgba(255, 255, 255, 0.68);
}

.hidden-field {
  display: none;
}

.modal-backdrop {
  background: rgba(16, 17, 36, 0.62);
  inset: 0;
  position: fixed;
  z-index: 50;
}

.modal {
  background: var(--paper);
  box-shadow: var(--shadow);
  left: 50%;
  max-height: min(760px, calc(100vh - 32px));
  max-width: 720px;
  overflow: auto;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(720px, calc(100vw - 28px));
  z-index: 60;
}

.modal-head {
  align-items: start;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 20px;
  justify-content: space-between;
  padding: clamp(20px, 2.8vw, 30px);
}

.modal-head .eyebrow {
  margin-bottom: 10px;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 18px;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.modal-body {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 2.8vw, 30px);
}

.request-tabs {
  border: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

.request-helper {
  color: var(--ink-soft);
  font-size: 14px;
  margin-top: -4px;
}

.tab {
  background: transparent;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.18em;
  min-height: 44px;
  text-transform: uppercase;
}

.tab.active {
  background: var(--dark);
  color: var(--white);
}

.form-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.wide {
  grid-column: 1 / -1;
}

.modal-body[data-mode="samples"] .quote-field {
  display: none;
}

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

#request-status {
  color: var(--ink-soft);
  flex: 1 1 220px;
  font-size: 13px;
  line-height: 1.4;
  margin-left: auto;
}

#request-status.success {
  color: var(--accent);
}

#request-status.warning {
  color: #795a18;
}

@media (max-width: 1120px) {
  .portal-header,
  .portal-intro-panel,
  .work-surface {
    grid-template-columns: 1fr;
  }

  .portal-brand,
  .portal-account {
    justify-self: start;
  }

  .account-panel dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .account-panel div {
    padding-right: 18px;
  }

  .side-rail {
    position: static;
  }
}

@media (max-width: 840px) {
  .login-layout,
  .order-details {
    grid-template-columns: 1fr;
  }

  .account-panel dl,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .compact-head,
  .order-card-top {
    align-items: start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  .login-screen,
  .portal-main {
    padding-left: 20px;
    padding-right: 20px;
  }

  .login-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .login-top span {
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    padding-left: 0;
    padding-top: 12px;
  }

  .portal-header {
    padding: 14px 20px;
  }

  .portal-account {
    align-items: start;
    flex-direction: column;
    gap: 8px;
  }

  .intro-copy {
    min-height: 260px;
    padding: 26px;
  }

  .order-progress {
    grid-template-columns: 1fr 1fr;
  }

  .button {
    width: 100%;
  }

  .modal-actions .button {
    width: auto;
  }
}
