:root {
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(12px, 1.333vw, 16px);
  color: #17202a;
  background: #f3f5f7;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

a {
  color: #861313;
}

.portal-button,
.small-button {
  display: inline-block;
  border: 1px solid #781010;
  border-radius: 7px;
  background: linear-gradient(#d92727, #a80f0f);
  box-shadow: 0 3px 0 #6e0909;
  color: #fff;
  text-decoration: none;
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  font-weight: 700;
  padding: 0.72rem 1rem;
  cursor: pointer;
}

.portal-button:active,
.small-button:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 #6e0909;
}

.portal-button.secondary,
.small-button {
  background: linear-gradient(#fff, #e8ebee);
  border-color: #7d858c;
  box-shadow: 0 3px 0 #737b82;
  color: #17202a;
}

.portal-button.light {
  background: linear-gradient(#fff, #eee);
  color: #8f1010;
}

.small-button {
  padding: 0.4rem 0.65rem;
}

.text-button {
  border: 0;
  background: none;
  color: #861313;
  text-decoration: underline;
  cursor: pointer;
}

.portal-header {
  min-height: 72px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 2rem;
  background: #fff;
  border-bottom: 4px solid #a41414;
}

.portal-header h1 {
  margin: 0;
  text-align: center;
}

.portal-header > a {
  text-align: right;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.5rem;
}

.header-stats {
  font-size: 0.95rem;
  text-align: center;
  line-height: 1.2;
}

.header-stats-month {
  color: #555;
}

.header-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(4.5rem, auto));
  column-gap: 0.75rem;
}

.header-stats-grid span {
  color: #555;
}

.portal-shell {
  width: min(1200px, 96vw);
  margin: 2rem auto;
}

.page-actions,
.dashboard-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.form-error {
  background: #ffe3e3;
  border: 1px solid #bd2323;
  color: #7d0808;
  padding: 0.7rem;
  border-radius: 5px;
}

.shipping-dialog {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 20px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Darkens background when modal is active */
.shipping-dialog::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.dialog-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dialog-actions {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}