  :root {
    --navy: #223a5e;
    --accent: #355982;
    --accent-hover: #223a5e;
    --blue-mid: #4d79a8;
    --blue-light: #9fc0e3;
    --blue-pale: #d0e1f2;
    --bg: #ffffff;
    --surface: #f3f8fd;
    --text: #223a5e;
    --text-muted: #4d79a8;
    --border: #d0e1f2;
    --radius: 20px;
    --radius-btn: 14px;
    --max-width: 1100px;
    --error: #c0392b;
  }

  * {
    box-sizing: border-box;
  }

  body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
      display: flex;
    flex-direction: column;
    min-height: 100vh;
  }

  main {
    width: 100%;
    padding: 24px clamp(16px, 4vw, 64px);
      flex: 1;
  }

  h1 {
    font-size: 2.5rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin: 0 0 16px;
  }

  a {
    color: var(--accent);
  }

  .card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
  }

  .btn {
    display: inline-block;
    padding: 14px 28px;
    background: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-btn);
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;

  }

  .btn:hover {
    background: var(--accent-hover);
  }

  .header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 16px clamp(16px, 4vw, 64px) 0;
    padding: 10px 12px 10px 24px;
    background: var(--surface);
    border-radius: 999px;
  }

  .logo {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--navy);
    text-decoration: none;
  }

  .nav {
    display: flex;
    gap: 24px;
  }

  .nav a {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
  }

  .nav a:hover {
    color: var(--accent);
  }

  .btn-small {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .footer {
    padding: 24px clamp(16px, 4vw, 64px);
    color: var(--text-muted);
    font-size: 0.9rem;
  }

  .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-bottom: 8px;
  }

  .footer-links a {
    color: var(--text-muted);
    text-decoration: none;
  }

  .footer-links a:hover {
    color: var(--accent);
  }

  @media (max-width: 600px) {
    .nav {
      display: none;
    }
  }

  .home {
    display: grid;
    gap: 24px;
    margin-top: 16px;
  }

  @media (min-width: 900px) {
    .home {
      grid-template-columns: 1.1fr 1fr;
      align-items: center;
      gap: 48px;
    }
  }

  .hero {
    padding: 24px 0;
  }

  .hero-text {
    max-width: 560px;
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-muted);
  }

  .field {
    margin-bottom: 20px;
  }

  .field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
  }

  .field input {
    width: 100%;
    padding: 14px 16px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-btn);
    outline: none;
  }

  .field input:focus {
    border-color: var(--blue-mid);
    box-shadow: 0 0 0 3px var(--blue-pale);
  }

  .field input.invalid {
    border-color: var(--error);
  }

  .field-error {
    min-height: 1.2em;
    margin-top: 6px;
    font-size: 0.875rem;
    color: var(--error);
  }

  .quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
  }

  .chip {
    padding: 8px 16px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 999px;
    cursor: pointer;
  }

  .chip:hover {
    background: var(--blue-pale);
    border-color: var(--blue-mid);
  }

  .price {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 16px 0;
    border-top: 1px solid var(--border);
  }

  .price-label {
    color: var(--text-muted);
  }

  .price-value {
    font-size: 1.75rem;
    font-weight: 800;
  }

  .btn-wide {
    width: 100%;
    text-align: center;
  }

  .narrow {
    max-width: 640px;
    margin: 24px auto;
  }

  .muted {
    color: var(--text-muted);
  }

  .order-info {
    margin: 16px 0 0;
  }

  .order-info div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  }

  .order-info dt {
    color: var(--text-muted);
  }

  .order-info dd {
    margin: 0;
    font-weight: 600;
    text-align: right;
    word-break: break-all;
  }

  .status {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    margin-bottom: 8px;
    border-radius: 999px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    background: var(--blue-pale);
    color: var(--navy);
  }

  .status-delivered {
    background: #d6f0de;
    color: #1d6b3a;
  }

  .status-delivery_failed {
    background: #f8dcd8;
    color: var(--error);
  }
  .input-prefix {
    position: relative;
  }

  .input-prefix .prefix {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
  }

  .field .input-prefix input {
    padding-left: 36px;
  }

  .status-hint {
    margin: 0 0 8px;
    color: var(--text-muted);
  }
  .stub-note {
  margin: 0 0 8px;
  padding: 10px 14px;
  background: #fff4d6;
  color: #7a5a00;
  border-radius: var(--radius-btn);
}

.pay-actions {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.btn-secondary {
  background: #ffffff;
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--blue-pale);
}

.order-info {
  margin: 16px 0 0;
}

.order-info div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.order-info dt {
  color: var(--text-muted);
}

.order-info dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-user form {
  margin: 0;
}

.user-name {
  font-weight: 600;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alert {
  grid-column: 1 / -1;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 15px;
}

.alert-error {
  background: #fdf0ef;
  border: 1px solid #e3b4b0;
  color: #8a2d26;
}

.orders-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.orders-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  color: inherit;
  text-decoration: none;
}

.orders-main,
.orders-side {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.orders-side {
  align-items: flex-end;
}

.orders-qty,
.orders-sum {
  font-weight: 600;
}

.orders-date {
  color: var(--text-muted);
  font-size: 14px;
}

.admin-search {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.admin-search input {
  flex: 1;
}

.admin-actions {
  display: flex;
  gap: 12px;
  padding-bottom: 14px;
}

.admin-actions form {
  margin: 0;
}

.info-page p {
  line-height: 1.6;
}