* {
  box-sizing: border-box;
}

body.portal-page {
  background: #f6f6f6;
  color: #333333;
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
}

a {
  color: #ce3232;
}

.portal-topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  padding: 18px 28px;
}

.portal-brand {
  color: #252525;
  font-size: 20px;
  font-weight: 700;
  text-decoration: none;
}

.portal-brand span {
  color: #ce3232;
}

.portal-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-nav a,
.button,
button {
  background: #ce3232;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  display: inline-block;
  font-size: 14px;
  font-weight: 700;
  padding: 11px 16px;
  text-decoration: none;
}

.portal-nav a.muted,
.button.muted {
  background: #292929;
}

.portal-wrap {
  margin: 0 auto;
  max-width: 1180px;
  padding: 34px 22px 60px;
}

.auth-card {
  background: #ffffff;
  border: 1px solid #e5e5e5;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.08);
  margin: 70px auto;
  max-width: 460px;
  padding: 34px;
}

.install-card {
  max-width: 760px;
}

h1,
h2,
h3 {
  color: #252525;
  margin-top: 0;
}

h1 {
  font-size: 28px;
}

h2 {
  font-size: 20px;
  margin-top: 26px;
}

label {
  color: #333333;
  display: block;
  font-size: 14px;
  font-weight: 700;
  margin: 14px 0 7px;
}

input,
select,
textarea {
  background: #ffffff;
  border: 1px solid #dddddd;
  color: #444444;
  font-size: 14px;
  min-height: 44px;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

.notice {
  border: 1px solid #dddddd;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 18px;
  padding: 12px 14px;
}

.notice.success {
  background: #eefaf1;
  border-color: #bde8c8;
  color: #1f7c35;
}

.notice.error {
  background: #fff2f2;
  border-color: #f0bcbc;
  color: #b42323;
}

.small {
  color: #777777;
  font-size: 13px;
  line-height: 1.5;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.products {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  background: #ffffff;
  border: 1px solid #e4e4e4;
  padding: 18px;
}

.product-card img {
  aspect-ratio: 4 / 3;
  background: #eeeeee;
  display: block;
  object-fit: cover;
  width: 100%;
}

.product-card h3 {
  font-size: 18px;
  margin: 14px 0 8px;
}

.price {
  color: #ce3232;
  font-size: 18px;
  font-weight: 700;
}

.quantity-input {
  max-width: 100px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  background: #ffffff;
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

th,
td {
  border: 1px solid #dddddd;
  padding: 12px;
  text-align: left;
  vertical-align: top;
}

th {
  background: #f3f3f3;
  color: #252525;
}

.status {
  color: #ffffff;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 9px;
  text-transform: uppercase;
}

.status-pending {
  background: #3759d7;
}

.status-accepted {
  background: #006d1e;
}

.status-preparing {
  background: #c8b700;
  color: #252525;
}

.status-shipped {
  background: #7c2ce0;
}

.status-cancelled {
  background: #555555;
}

.split {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.inline-form {
  display: inline;
}

.invoice-actions {
  align-items: center;
  display: flex;
  gap: 10px;
  margin: 14px 0 6px;
}

.icon-danger {
  background: #b42323;
  color: #ffffff;
  font-size: 20px;
  line-height: 1;
  min-height: 34px;
  padding: 6px 11px;
}

.icon-danger:hover,
.icon-danger:focus {
  background: #7a1616;
}

.copy-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.copy-row input {
  max-width: 240px;
}

@media (max-width: 760px) {
  .portal-topbar,
  .split {
    display: block;
  }

  .portal-nav {
    margin-top: 14px;
  }

  .auth-card {
    margin: 30px 12px;
    padding: 24px;
  }

  .portal-wrap {
    padding: 24px 12px 50px;
  }
}
