* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { min-height: 100%; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: #11161a; color: #f5f5f7; }
body { min-height: 100vh; }
button, a { font: inherit; }

.orders-top { position: relative; min-height: 106px; padding: 18px 30px 12px; display: grid; place-items: start center; border-bottom: 1px solid rgba(255,255,255,.06); }
.brand img { height: 66px; display: block; }
.back-link { position: absolute; top: 24px; right: 30px; min-height: 36px; display: grid; place-items: center; padding: 0 13px; border: 1px solid rgba(255,255,255,.08); border-radius: 6px; background: rgba(255,255,255,.07); color: #fff; text-decoration: none; font-size: 13px; font-weight: 800; transition: transform .18s ease, background .18s ease; }
.back-link:hover { transform: translateY(-2px); background: rgba(255,255,255,.12); }
.back-link:active { transform: scale(.97); }

.orders-layout { width: min(1220px, 100%); margin: 0 auto; padding: 38px 28px 72px; }
.orders-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 28px; }
.orders-eyebrow, .column-head span { color: #56e58a; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.orders-head h1 { margin-top: 4px; font-size: 30px; }
.orders-summary { display: flex; align-items: stretch; justify-content: flex-end; gap: 10px; }
.orders-summary span { min-width: 145px; padding: 11px 13px; display: grid; gap: 4px; border: 1px solid rgba(255,255,255,.08); border-radius: 7px; background: #1b2228; color: #95a2ac; font-size: 11px; text-align: right; }
.orders-summary strong, .orders-summary b { color: #fff; font-size: 15px; font-weight: 900; white-space: nowrap; }
.orders-summary b { color: #86efac; }
.orders-message { margin-bottom: 16px; padding: 11px 13px; border: 1px solid rgba(239,68,68,.2); border-radius: 6px; background: rgba(239,68,68,.1); color: #fca5a5; font-size: 13px; }

.orders-columns { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: 22px; align-items: start; }
.orders-column { min-width: 0; }
.column-head { min-height: 62px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-bottom: 13px; border-bottom: 1px solid rgba(255,255,255,.1); }
.column-head h2 { margin-top: 3px; font-size: 21px; }
.column-head small { max-width: 210px; color: #78858e; font-size: 11px; line-height: 1.5; text-align: right; }
.my-sites, .my-orders { display: grid; gap: 13px; margin-top: 14px; }

.site-card { padding: 16px; border: 1px solid rgba(255,255,255,.1); border-radius: 8px; background: #1b2228; box-shadow: 0 16px 36px rgba(0,0,0,.18); }
.site-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.site-identity { min-width: 0; display: flex; align-items: center; gap: 11px; }
.site-icon { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(34,197,94,.28); border-radius: 7px; background: #10351f; color: #86efac; font-size: 11px; font-weight: 900; }
.site-identity strong { display: block; overflow: hidden; color: #fff; font-size: 16px; text-overflow: ellipsis; white-space: nowrap; }
.site-url { display: block; margin-top: 4px; overflow: hidden; color: #8c9aa4; font: 11px/1.4 Consolas, monospace; text-overflow: ellipsis; white-space: nowrap; }
.status-badge { flex: 0 0 auto; padding: 5px 8px; border: 1px solid rgba(34,197,94,.25); border-radius: 5px; color: #86efac; background: rgba(34,197,94,.08); font-size: 11px; font-weight: 800; }
.status-badge.offline, .status-badge.pending { border-color: rgba(148,163,184,.22); color: #aab4bd; background: rgba(148,163,184,.07); }
.status-badge.suspended { border-color: rgba(239,68,68,.24); color: #fca5a5; background: rgba(239,68,68,.08); }

.site-meters { display: grid; gap: 13px; margin: 18px 0; }
.site-meter-head { display: flex; justify-content: space-between; gap: 12px; color: #8f9ca5; font-size: 11px; }
.site-meter-head strong { color: #e8edf0; font-weight: 700; }
.meter-track { height: 6px; margin-top: 7px; overflow: hidden; border-radius: 4px; background: #2b3339; }
.meter-track i { display: block; width: 0; height: 100%; background: #22c55e; }
.site-meta { padding: 11px 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-top: 1px solid rgba(255,255,255,.08); color: #84919a; font-size: 11px; }
.site-meta strong { color: #dbe3e7; }
.site-controls { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: 9px; }
.site-toggle, .manage-site { min-height: 42px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; color: #fff; background: #293139; font-weight: 900; text-decoration: none; cursor: pointer; transition: transform .18s ease, filter .18s ease, background .18s ease; }
.site-toggle.enabled { border-color: rgba(34,197,94,.52); background: #15803d; }
.site-toggle:hover, .manage-site:hover { transform: translateY(-2px); filter: brightness(1.08); }
.site-toggle:active, .manage-site:active { transform: scale(.97); }
.site-toggle:disabled, .manage-site.disabled { pointer-events: none; cursor: not-allowed; opacity: .42; }
.manage-site { border-color: rgba(59,130,246,.45); background: #2563eb; }
.site-toggle-hint { position: relative; margin-top: 10px; color: #77848d; font-size: 11px; line-height: 1.5; }

.my-order { padding: 15px; border: 1px solid rgba(255,255,255,.09); border-radius: 8px; background: #1b2228; }
.my-order-top { display: flex; align-items: start; justify-content: space-between; gap: 14px; padding-bottom: 11px; border-bottom: 1px solid rgba(255,255,255,.1); }
.my-order-top strong { display: block; font-size: 15px; }
.my-order-id { margin-top: 4px; color: #8c9aa4; font: 10px/1.4 Consolas, monospace; word-break: break-all; }
.my-order-total { color: #86efac; white-space: nowrap; }
.order-status { display: inline-flex; margin-top: 8px; padding: 4px 7px; border-radius: 4px; background: rgba(234,179,8,.1); color: #fde047; font-size: 10px; font-weight: 800; white-space: nowrap; }
.order-status.code_issued { background: rgba(245,158,11,.12); color: #fde68a; }
.order-status.expired { background: rgba(239,68,68,.12); color: #fca5a5; }
.order-status.paid, .order-status.processing { background: rgba(59,130,246,.12); color: #93c5fd; }
.order-status.completed { background: rgba(34,197,94,.12); color: #86efac; }
.my-order-items { display: grid; gap: 7px; margin: 12px 0; padding-left: 18px; color: #d5dde2; font-size: 13px; }
.my-order-costs { margin: 12px 0; padding: 10px 0; display: flex; flex-wrap: wrap; gap: 8px 16px; border-top: 1px solid rgba(255,255,255,.08); border-bottom: 1px solid rgba(255,255,255,.08); color: #8f9ca5; font-size: 11px; }
.my-order-costs span, .my-order-costs strong { white-space: nowrap; }
.my-order-costs b { color: #d9e1e6; }
.my-order-costs strong { margin-left: auto; color: #86efac; }
.order-item-details { display: block; margin-top: 5px; color: #c7d1d7; font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.order-channel-link { display: block; max-width: 100%; margin-top: 4px; overflow: hidden; color: #93c5fd; font-size: 11px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.order-channel-link:hover { color: #bfdbfe; text-decoration: underline; }
.my-order-meta { color: #84919a; font-size: 11px; }
.my-order-note { margin-top: 10px; padding: 9px 10px; border-left: 3px solid #22c55e; background: rgba(34,197,94,.07); color: #d8e7dc; font-size: 12px; line-height: 1.5; }
.empty-orders { padding: 46px 16px; border: 1px dashed rgba(255,255,255,.13); border-radius: 8px; color: #84919a; text-align: center; }

.order-process-link { display: flex; justify-content: flex-end; margin-top: 28px; }
.order-process-link a { color: #86efac; font-size: 13px; font-weight: 900; text-underline-offset: 4px; }
.legal-footer { padding: 20px 14px 28px; display: flex; justify-content: center; gap: 18px; }
.legal-footer a { color: #87939c; font-size: 12px; text-decoration: none; }
.legal-footer a:hover { color: #86efac; }

@media (max-width: 900px) {
    .orders-columns { grid-template-columns: 1fr; gap: 34px; }
}

@media (max-width: 620px) {
    .orders-top { min-height: 68px; padding: 12px 14px 0; }
    .brand img { height: 40px; }
    .back-link { top: 15px; right: 14px; min-height: 34px; padding: 0 10px; font-size: 12px; }
    .orders-layout { padding: 26px 14px 48px; }
    .orders-head { align-items: flex-start; flex-direction: column; }
    .orders-summary { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
    .orders-summary span { min-width: 0; text-align: left; }
    .column-head { align-items: flex-start; flex-direction: column; gap: 6px; }
    .column-head small { max-width: none; text-align: left; }
    .site-controls { grid-template-columns: 1fr; }
    .my-order-top { flex-direction: column; }
}

@media (max-width: 390px) {
    .orders-summary { grid-template-columns: 1fr; }
}
