:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7eef3;
  color: #17151d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(247, 238, 243, 0.92)),
    #f7eef3;
}

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

button,
input,
select {
  font: inherit;
}

.customer-shell {
  width: min(100% - 32px, 980px);
  margin: 0 auto;
  padding: 22px 0 56px;
}

.customer-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.customer-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 900;
}

.customer-logo img {
  width: 116px;
  height: auto;
  display: block;
}

.topbar-link {
  color: #7b2586;
  font-weight: 800;
}

.account-nav {
  display: flex;
  align-items: center;
  gap: 14px;
}

.link-button {
  border: 0;
  background: transparent;
  color: #7b2586;
  font-weight: 900;
  cursor: pointer;
}

.danger-text {
  color: #b42318;
}

.customer-panel {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(33, 27, 37, 0.08);
  border-radius: 24px;
  box-shadow: 0 22px 70px rgba(60, 25, 48, 0.12);
}

.login-card {
  max-width: 560px;
  margin: 42px auto 0;
  padding: clamp(24px, 5vw, 44px);
}

.eyebrow {
  margin: 0 0 8px;
  color: #9a2ca4;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 0.95;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 14px;
  font-size: 28px;
}

.muted {
  color: #69616f;
}

.login-form,
.profile-form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.field-grid {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
}

label {
  display: grid;
  gap: 7px;
  color: #4b4552;
  font-size: 13px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  border: 1px solid rgba(33, 27, 37, 0.12);
  border-radius: 16px;
  background: #fff;
  color: #17151d;
  padding: 14px 15px;
  outline: none;
}

input:focus,
select:focus {
  border-color: #b936c5;
  box-shadow: 0 0 0 4px rgba(185, 54, 197, 0.12);
}

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

.btn {
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 900;
  cursor: pointer;
}

.btn.primary {
  background: #161316;
  color: #fff;
}

.btn.secondary {
  background: #f1eef2;
  color: #161316;
}

.btn.danger {
  background: #ffe8e8;
  color: #a31717;
}

.btn:disabled {
  cursor: wait;
  opacity: 0.58;
}

.message {
  min-height: 22px;
  color: #69616f;
  font-weight: 750;
}

.message.error {
  color: #b42318;
}

.message.success {
  color: #087443;
}

.local-code {
  display: none;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #fff8df;
  color: #6f4b00;
  font-weight: 850;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
}

.account-card,
.side-card {
  padding: 24px;
}

.account-section {
  margin-top: 20px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.section-head h2,
.section-head p {
  margin: 0;
}

.section-head p {
  margin-top: 4px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.stat {
  border-radius: 18px;
  background: #f8f5f8;
  padding: 16px;
}

.stat span {
  display: block;
  color: #69616f;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.order-list {
  display: grid;
  gap: 10px;
}

.order-card {
  padding: 15px;
  border: 1px solid rgba(33, 27, 37, 0.09);
  border-radius: 18px;
  background: #fff;
}

.order-main {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.order-card strong,
.order-main strong {
  display: block;
}

.order-card small,
.order-main small {
  display: block;
  margin-top: 4px;
  color: #69616f;
}

.order-status {
  justify-self: end;
  border-radius: 999px;
  background: #f1eef2;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.order-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 13px;
  padding-top: 13px;
  border-top: 1px solid rgba(33, 27, 37, 0.08);
}

.mini-btn {
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
}

.invoice-status {
  font-size: 13px;
  font-weight: 900;
}

.invoice-pending,
.invoice-approved {
  color: #92400e;
}

.invoice-sent {
  color: #087443;
}

.invoice-rejected {
  color: #b42318;
}

.empty-state {
  border: 1px dashed rgba(33, 27, 37, 0.16);
  border-radius: 18px;
  padding: 18px;
  color: #69616f;
}

.legal-footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 18px;
  padding: 28px 18px;
  color: #69616f;
  font-size: 13px;
}

.legal-footer a {
  color: #69616f;
}

.account-dialog {
  width: min(720px, calc(100% - 24px));
  max-height: 88vh;
  overflow: auto;
  border: 0;
  border-radius: 24px;
  padding: 24px;
  color: #17151d;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.3);
}

.account-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
}

.dialog-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #f1eef2;
  color: #17151d;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

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

.account-form h2 {
  margin-right: 44px;
}

.account-form [hidden] {
  display: none !important;
}

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

.order-detail-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  padding-right: 46px;
}

.order-detail-heading small {
  color: #69616f;
}

.order-detail-heading h2 {
  margin: 3px 0 0;
}

.order-detail-heading > strong {
  font-size: 24px;
}

.order-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 20px 0;
  padding: 14px;
  border-radius: 16px;
  background: #f8f5f8;
}

.order-detail-meta span {
  display: grid;
  gap: 3px;
  color: #69616f;
  font-size: 13px;
}

.order-detail-meta b {
  color: #17151d;
}

.order-detail-items {
  border-top: 1px solid rgba(33, 27, 37, 0.1);
}

.order-detail-item {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(33, 27, 37, 0.1);
}

.order-detail-item p,
.order-item-options {
  margin: 6px 0 0;
  color: #69616f;
  font-size: 13px;
}

.order-item-options {
  padding-left: 18px;
}

.order-note {
  margin-top: 16px;
  padding: 13px;
  border-radius: 14px;
  background: #fff7ed;
}

.order-note p {
  margin: 5px 0 0;
}

.order-detail-totals {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.order-detail-totals span {
  display: flex;
  justify-content: space-between;
}

.order-detail-total {
  padding-top: 10px;
  border-top: 2px solid #17151d;
  font-size: 19px;
}

.detail-actions {
  margin-top: 18px;
}

@media (max-width: 760px) {
  .customer-shell {
    width: min(100% - 22px, 980px);
    padding-top: 14px;
  }

  .field-grid,
  .account-layout,
  .stats,
  .account-form,
  .order-detail-meta {
    grid-template-columns: 1fr;
  }

  .login-card {
    margin-top: 18px;
  }

  .customer-logo img {
    width: 96px;
  }

  .section-head,
  .order-detail-heading,
  .order-detail-item {
    align-items: flex-start;
  }

  .section-head,
  .order-detail-item {
    flex-direction: column;
  }

  .form-wide {
    grid-column: auto;
  }
}
