:root {
  --orders-bg: #f4f7fb;
  --orders-surface: #ffffff;
  --orders-border: #e4eaf2;
  --orders-text: #163447;
  --orders-muted: #5c7485;
  --orders-accent: #e83c66;
  --orders-accent-soft: #ffe8ef;
  --orders-dark-btn: #113247;
  --orders-shadow-soft: 0 18px 44px rgba(16, 44, 67, 0.08);
  --orders-shadow-card: 0 18px 36px rgba(15, 40, 58, 0.08);
  --orders-select-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8' fill='none'%3E%3Cpath d='M1 1.25L7 6.25L13 1.25' stroke='%235a7385' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --orders-search-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18' fill='none'%3E%3Ccircle cx='8' cy='8' r='5.25' stroke='%23819aaa' stroke-width='1.5'/%3E%3Cpath d='M12 12L15.25 15.25' stroke='%23819aaa' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--orders-bg);
  color: var(--orders-text);
  font-family: "Open Sans", sans-serif;
}

.orders-main {
  min-height: 0;
  padding: 24px 16px 40px;
}

.orders-main > .container {
  margin: 0 auto;
  width: min(1200px, 100%);
}

.orders-hero {
  align-items: center;
  background: #0b1e28;
  border: 0;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 20px;
  min-height: 288px;
  padding: 48px 120px;
  text-align: center;
}

.orders-hero-badge {
  align-items: center;
  background: #fcc031;
  border-radius: 24px;
  color: #2b2108;
  display: inline-flex;
  font-size: 14px;
  font-weight: 400;
  gap: 8px;
  line-height: 20px;
  min-height: 32px;
  padding: 6px 12px;
}

.orders-hero h1 {
  color: #ffffff;
  font-size: clamp(38px, 5vw, 52px);
  font-weight: 600;
  letter-spacing: -1.04px;
  line-height: 1.08;
  margin: 24px 0 0;
}

.orders-hero p {
  color: #ffffff;
  font-size: 18px;
  line-height: 28px;
  margin: 24px 0 0;
  max-width: 760px;
}

.orders-hero-user {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  display: inline-flex;
  font-size: 14px;
  gap: 6px;
  line-height: 20px;
  margin-top: 24px;
  min-height: 44px;
  padding: 11px 18px;
}

.orders-hero-user strong {
  color: #ffffff;
}

.orders-summary {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 16px;
}

.orders-summary-card {
  background: var(--orders-surface);
  border: 1px solid var(--orders-border);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(16, 44, 67, 0.05);
  display: grid;
  gap: 8px;
  min-height: 98px;
  overflow: hidden;
  padding: 18px 16px;
  position: relative;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.orders-summary-card::before {
  content: "";
  height: 4px;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
}

.orders-summary-card:nth-child(1)::before {
  background: linear-gradient(90deg, #163447, #5f87a6);
}

.orders-summary-card:nth-child(2)::before {
  background: linear-gradient(90deg, #1c8f58, #58c487);
}

.orders-summary-card:nth-child(3)::before {
  background: linear-gradient(90deg, #d69a17, #f1c65e);
}

.orders-summary-card:nth-child(4)::before {
  background: linear-gradient(90deg, #c93a60, #f17a98);
}

.orders-summary-card:hover {
  border-color: #d5e0ea;
  box-shadow: 0 14px 30px rgba(16, 44, 67, 0.08);
  transform: translateY(-2px);
}

.orders-summary-card span {
  color: #6b8292;
  font-size: 12px;
  line-height: 17px;
}

.orders-summary-card strong {
  color: #10283a;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 34px;
}

.orders-level-result {
  align-items: center;
  background:
    radial-gradient(circle at 12% 10%, rgba(252, 192, 49, 0.2), rgba(252, 192, 49, 0) 34%),
    linear-gradient(135deg, #ffffff 0%, #fff4f7 100%);
  border: 1px solid #f4d4df;
  border-radius: 22px;
  box-shadow: var(--orders-shadow-card);
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.9fr) auto;
  margin: 0 0 18px;
  padding: 22px;
}

.orders-level-kicker {
  color: var(--orders-accent);
  display: block;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 18px;
  text-transform: uppercase;
}

.orders-level-copy h2 {
  align-items: baseline;
  color: #10283a;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 28px;
  font-weight: 800;
  line-height: 34px;
  margin: 8px 0 0;
}

.orders-level-copy h2 strong {
  color: var(--orders-accent);
  font-size: 42px;
  font-style: italic;
  font-weight: 900;
  letter-spacing: -0.06em;
  line-height: 1;
}

.orders-level-copy p {
  color: #526b7d;
  font-size: 14px;
  line-height: 22px;
  margin: 8px 0 0;
  max-width: 620px;
}

.orders-level-meta {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.orders-level-meta div {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #f0d7df;
  border-radius: 15px;
  min-height: 74px;
  padding: 12px;
}

.orders-level-meta span {
  color: #7a8e9c;
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 16px;
  text-transform: uppercase;
}

.orders-level-meta strong {
  color: #142f42;
  display: block;
  font-size: 17px;
  font-weight: 800;
  line-height: 22px;
  margin-top: 8px;
}

.orders-level-link {
  align-items: center;
  align-self: center;
  background: var(--orders-accent);
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(232, 60, 102, 0.2);
  color: #ffffff;
  display: inline-flex;
  font-size: 15px;
  font-weight: 800;
  justify-content: center;
  line-height: 20px;
  min-height: 48px;
  padding: 12px 20px;
  text-decoration: none;
  white-space: nowrap;
}

.orders-feedback {
  background: var(--orders-surface);
  border: 1px solid var(--orders-border);
  border-radius: 18px;
  box-shadow: 0 10px 24px rgba(16, 44, 67, 0.03);
  color: #445d6e;
  font-size: 15px;
  line-height: 22px;
  min-height: 64px;
  padding: 22px;
}

.orders-feedback-subtle {
  background: #f8fbff;
  border-color: #dfe9f3;
  color: #5c7384;
}

.orders-feedback-loading {
  background:
    linear-gradient(90deg, #f5f8fc 0%, #ffffff 50%, #f5f8fc 100%);
  background-size: 260% 100%;
  color: #537285;
  animation: ordersLoadingPulse 1.4s linear infinite;
}

@keyframes ordersLoadingPulse {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: -140% 0;
  }
}

.orders-feedback-error {
  background: #fff2f6;
  border-color: #f3cad7;
  color: #9f2248;
}

.orders-result-meta {
  color: #5e7688;
  font-size: 13px;
  line-height: 18px;
  margin-bottom: 12px;
}

.orders-result-meta span {
  color: #13364b;
  font-weight: 700;
}

.orders-auth,
.orders-empty {
  background: var(--orders-surface);
  border: 1px solid var(--orders-border);
  border-radius: 22px;
  box-shadow: 0 16px 36px rgba(16, 44, 67, 0.05);
  padding: 28px 26px;
  position: relative;
  overflow: hidden;
}

.orders-auth::before,
.orders-empty::before {
  background: radial-gradient(circle at center, rgba(232, 60, 102, 0.12) 0%, rgba(232, 60, 102, 0) 72%);
  content: "";
  height: 200px;
  position: absolute;
  right: -80px;
  top: -80px;
  width: 200px;
}

.orders-auth h2,
.orders-empty h2 {
  color: #112739;
  font-size: 24px;
  font-weight: 700;
  line-height: 30px;
  margin: 0;
}

.orders-auth p,
.orders-empty p {
  color: #4d6676;
  font-size: 15px;
  line-height: 24px;
  margin: 10px 0 0;
  max-width: 720px;
}

.orders-auth-btn,
.orders-empty-btn {
  align-items: center;
  border-radius: 14px;
  box-shadow: 0 14px 28px rgba(16, 44, 67, 0.12);
  color: #ffffff;
  display: inline-flex;
  font-size: 15px;
  font-weight: 700;
  justify-content: center;
  margin-top: 18px;
  min-height: 44px;
  min-width: 138px;
  padding: 10px 18px;
  text-decoration: none;
}

.orders-auth-btn {
  background: var(--orders-accent);
}

.orders-empty-btn {
  background: var(--orders-dark-btn);
}

.orders-list {
  display: grid;
  gap: 18px;
}

.orders-card {
  background: var(--orders-surface);
  border: 1px solid var(--orders-border);
  border-radius: 22px;
  box-shadow: var(--orders-shadow-card);
  overflow: hidden;
  padding: 18px;
  position: relative;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.orders-card-summary {
  border-radius: 18px;
  cursor: pointer;
  transition: background 180ms ease, box-shadow 180ms ease;
}

.orders-card-summary:hover,
.orders-card-summary.is-open {
  background: #f8fbff;
}

.orders-card-summary:focus-visible {
  box-shadow: 0 0 0 3px rgba(232, 60, 102, 0.18);
  outline: none;
}

.orders-card::before {
  background: linear-gradient(180deg, rgba(232, 60, 102, 0.95), rgba(232, 60, 102, 0.16));
  content: "";
  left: 0;
  position: absolute;
  top: 0;
  bottom: 0;
  width: 4px;
}

.orders-card:hover {
  border-color: #d7e2ed;
  box-shadow: 0 22px 42px rgba(15, 40, 58, 0.1);
  transform: translateY(-2px);
}

.orders-card-head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.orders-card-title h2 {
  color: #132d40;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 28px;
  margin: 0;
}

.orders-card-title p {
  color: #6a8394;
  font-size: 13px;
  line-height: 19px;
  margin: 6px 0 0;
}

.orders-card-badges {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.orders-badge {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 18px;
  min-height: 32px;
  padding: 6px 12px;
}

.orders-badge-success {
  background: #e7f8ee;
  color: #236f49;
}

.orders-badge-warning {
  background: #fff4dd;
  color: #8a6210;
}

.orders-badge-danger {
  background: #ffe8ee;
  color: #9f2645;
}

.orders-badge-frozen {
  background: #e8f1ff;
  color: #1f5f9b;
}

.orders-badge-neutral {
  background: #edf2f7;
  color: #3f5768;
}

.orders-card-meta-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.orders-card-meta {
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 100%);
  border: 1px solid #e5edf5;
  border-radius: 12px;
  min-height: 72px;
  padding: 12px;
}

.orders-card-meta span {
  color: #6a8495;
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 17px;
  text-transform: uppercase;
}

.orders-card-meta strong {
  color: #18384c;
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  margin-top: 7px;
}

.orders-items {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.orders-item {
  align-items: center;
  background: linear-gradient(180deg, #fbfcfe 0%, #f5f8fc 100%);
  border: 1px solid #e7edf3;
  border-radius: 14px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 50px;
  padding: 12px;
}

.orders-item-title {
  color: #254255;
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
}

.orders-item-variant {
  color: #5f788a;
  display: block;
  font-size: 12px;
  line-height: 17px;
  margin-top: 2px;
}

.orders-item-total {
  color: #102839;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  min-width: 124px;
  text-align: right;
}

.orders-item-qty {
  color: #6a8393;
  display: block;
  font-size: 12px;
  line-height: 17px;
}

.orders-item-more {
  background: #f6f9fc;
  border: 1px dashed #d6e1ec;
  border-radius: 12px;
  color: #5d7485;
  font-size: 13px;
  line-height: 18px;
  min-height: 42px;
  padding: 11px 12px;
}

.orders-card-foot {
  align-items: center;
  border-top: 1px solid #e7edf4;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 14px;
}

.orders-card-summary + .orders-card-foot {
  margin-top: 12px;
}

.orders-toggle-btn {
  align-items: center;
  background: linear-gradient(180deg, #f5f9fd 0%, #edf3f9 100%);
  border: 1px solid #d9e4ef;
  border-radius: 12px;
  color: #2a4a5d;
  cursor: pointer;
  display: inline-flex;
  font-family: "Open Sans", sans-serif;
  font-size: 13px;
  font-weight: 700;
  justify-content: center;
  min-height: 42px;
  min-width: 168px;
  padding: 9px 13px;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.orders-toggle-btn:hover {
  background: linear-gradient(180deg, #eef5fc 0%, #e5eef7 100%);
  border-color: #cad8e6;
  transform: translateY(-1px);
}

.orders-toggle-btn.is-open {
  background: #e7f0fa;
  border-color: #bfd1e4;
}

.orders-total {
  align-items: center;
  color: #4a6474;
  display: inline-flex;
  font-size: 14px;
  gap: 8px;
  line-height: 22px;
}

.orders-total strong {
  color: #0f2232;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 26px;
}

.orders-actions {
  align-items: center;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.orders-link {
  align-items: center;
  background: linear-gradient(180deg, #163447 0%, #0f2c3f 100%);
  border-radius: 12px;
  box-shadow: 0 12px 26px rgba(16, 49, 71, 0.2);
  color: #ffffff;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  justify-content: center;
  min-height: 42px;
  min-width: 132px;
  padding: 10px 15px;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.orders-link:hover {
  background: linear-gradient(180deg, #123145 0%, #0c2738 100%);
  box-shadow: 0 16px 30px rgba(16, 49, 71, 0.24);
  transform: translateY(-1px);
}

.orders-link-secondary {
  background: linear-gradient(180deg, #f5f9fd 0%, #edf3f9 100%);
  border: 1px solid #d9e4ef;
  box-shadow: none;
  color: #2a4a5d;
}

.orders-link-secondary:hover {
  background: linear-gradient(180deg, #eef5fc 0%, #e5eef7 100%);
  box-shadow: none;
}

.orders-link-pending {
  background: #f4f7fb;
  border: 1px dashed #d7e1eb;
  box-shadow: none;
  color: #7b8f9f;
  cursor: default;
}

.orders-card-details {
  background: linear-gradient(180deg, #fcfdff 0%, #f7fafe 100%);
  border: 1px solid #dfe9f4;
  border-radius: 16px;
  margin-top: 14px;
  padding: 16px;
}

.orders-card-details h3 {
  color: #16384b;
  font-size: 15px;
  font-weight: 700;
  line-height: 22px;
  margin: 0 0 8px;
}

.orders-detail-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.orders-detail-item {
  background: #ffffff;
  border: 1px solid #e5edf5;
  border-radius: 12px;
  min-height: 48px;
  padding: 12px;
}

.orders-detail-item-title {
  color: #1e4155;
  display: block;
  font-size: 14px;
  line-height: 20px;
}

.orders-detail-item-meta {
  color: #5e7688;
  display: block;
  font-size: 12px;
  line-height: 17px;
  margin-top: 3px;
}

.orders-item-download {
  align-items: center;
  background: #103147;
  border-radius: 10px;
  color: #ffffff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  justify-content: center;
  margin-top: 8px;
  min-height: 34px;
  padding: 7px 11px;
  text-decoration: none;
}

.orders-item-download:hover {
  background: #0d2636;
}

.orders-item-download.is-disabled {
  background: #ebf0f5;
  color: #7891a3;
  cursor: not-allowed;
}

.orders-detail-summary {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.orders-detail-summary div {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.orders-detail-summary span {
  color: #5f7789;
  font-size: 13px;
  line-height: 18px;
}

.orders-detail-summary strong {
  color: #203f52;
  font-size: 13px;
  font-weight: 700;
  line-height: 18px;
}

.orders-detail-summary-total {
  border-top: 1px solid #e0e8f0;
  margin-top: 6px;
  padding-top: 10px;
}

.orders-detail-summary-total span,
.orders-detail-summary-total strong {
  color: #102839;
  font-size: 14px;
  font-weight: 700;
}

@media (max-width: 992px) {
  .orders-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .orders-level-result {
    grid-template-columns: 1fr;
  }

  .orders-level-link {
    justify-self: flex-start;
  }

  .orders-card-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .orders-main {
    padding-top: 28px;
  }

  .orders-hero {
    min-height: 0;
    padding: 28px 20px;
  }

  .orders-hero h1 {
    font-size: 38px;
    line-height: 42px;
  }

  .orders-hero p {
    font-size: 16px;
    line-height: 24px;
  }

  .orders-hero-user {
    border-radius: 16px;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .orders-summary,
  .orders-card-meta-grid,
  .orders-level-meta {
    grid-template-columns: 1fr;
  }

  .orders-level-result {
    padding: 18px;
  }

  .orders-level-copy h2 {
    font-size: 24px;
    line-height: 30px;
  }

  .orders-level-copy h2 strong {
    font-size: 38px;
  }

  .orders-level-link {
    width: 100%;
  }

  .orders-card {
    padding: 16px;
  }

  .orders-card-head {
    flex-direction: column;
  }

  .orders-card-badges {
    justify-content: flex-start;
  }

  .orders-card-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .orders-toggle-btn,
  .orders-actions,
  .orders-link {
    width: 100%;
  }

  .orders-actions {
    display: grid;
  }

  .orders-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .orders-item-total {
    min-width: 0;
    text-align: left;
  }
}
