.admin-body { background: #f6f7fb; }
.admin-page { max-width: 1240px; }
.admin-mode-pill { display:inline-flex; align-items:center; gap:7px; padding:7px 10px; border:1px solid rgba(91,92,226,.12); border-radius:999px; color:var(--brand-dark); background:var(--brand-pale); font-size:11px; font-weight:850; }
.admin-mode-pill span { width:7px; height:7px; border-radius:50%; background:var(--accent); box-shadow:0 0 0 4px rgba(24,185,148,.12); }
.auth-card { max-width:600px; overflow:hidden; }
.auth-card-body { display:grid; gap:22px; padding:32px; }
.auth-card-body h2 { margin:0; font-size:25px; letter-spacing:-.04em; }
.auth-card-body .eyebrow { margin-bottom:8px; }
.auth-icon { display:grid; width:52px; height:52px; place-items:center; border-radius:16px; color:var(--brand); background:var(--brand-pale); }
.auth-icon svg { width:25px; height:25px; }
.admin-orders { display:grid; gap:18px; margin-top:24px; }
.order-card { overflow:hidden; border:1px solid var(--line); border-radius:23px; background:rgba(255,255,255,.95); box-shadow:var(--shadow-sm); transition:box-shadow .2s ease, transform .2s ease; }
.order-card:hover { transform:translateY(-2px); box-shadow:var(--shadow-md); }
.order-head { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; padding:21px 24px; border-bottom:1px solid var(--line); background:linear-gradient(180deg,#fff,#fdfdff); }
.order-head h2 { margin:0; font-size:18px; letter-spacing:-.025em; }
.order-head p { margin:5px 0 0; color:var(--muted); font-size:12px; }
.status-badge { display:inline-flex; align-items:center; gap:6px; padding:7px 10px; border:1px solid rgba(91,92,226,.12); border-radius:999px; color:var(--brand-dark); background:var(--brand-pale); font-size:11px; font-weight:850; white-space:nowrap; }
.status-badge::before { width:6px; height:6px; border-radius:50%; background:currentColor; content:""; }
.status-paid,.status-purchased,.status-shipped,.status-delivered { color:var(--accent-ink); border-color:rgba(24,185,148,.13); background:var(--accent-pale); }
.status-cancelled,.status-refunded,.status-payment_error,.status-payment_expired { color:var(--danger); border-color:rgba(201,54,79,.13); background:var(--danger-pale); }
.status-purchase_review { color:var(--warning); border-color:rgba(154,97,0,.13); background:var(--warning-pale); }
.order-body { display:grid; grid-template-columns:minmax(0,1.12fr) minmax(300px,.88fr); gap:28px; padding:24px; }
.order-section { min-width:0; }
.order-section h3 { margin:0 0 12px; color:var(--muted); font-size:10px; font-weight:900; text-transform:uppercase; letter-spacing:.12em; }
.order-section p { margin:5px 0; }
.admin-item { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px; padding:13px 0; border-bottom:1px dashed var(--line-strong); }
.admin-item:first-of-type { padding-top:2px; }
.admin-item:last-of-type { border-bottom:0; }
.admin-item strong { font-size:13px; }
.admin-item .meta { overflow-wrap:anywhere; }
.timeline { display:grid; gap:11px; margin:0; padding:2px 0 0; list-style:none; }
.timeline li { position:relative; display:grid; grid-template-columns:92px 1fr; gap:12px; padding-left:14px; font-size:11px; }
.timeline li::before { position:absolute; left:0; top:6px; width:6px; height:6px; border-radius:50%; background:var(--brand); box-shadow:0 0 0 4px var(--brand-pale); content:""; }
.timeline time { color:var(--muted); }
.timeline strong { font-size:12px; }
.order-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:13px; padding:22px 24px; border-top:1px solid var(--line); background:#f9f9fc; }
.order-actions .field.full { grid-column:1/-1; }
.admin-status-actions { grid-column:1/-1; display:flex; flex-wrap:wrap; gap:10px; justify-content:flex-end; }
.admin-status-actions button { min-width:170px; }
.admin-email { padding:0 24px 24px; }
.admin-email h3 { margin:0 0 12px; color:var(--muted); font-size:12px; }
.admin-email ul { display:grid; gap:10px; list-style:none; margin:0; padding:0; }
.admin-email li { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:11px 14px; border:1px solid var(--line); border-radius:12px; }
.admin-email li strong { display:block; margin-bottom:4px; font-size:13px; }
.admin-email li .meta { display:block; }
#admin-alert .notice { margin:18px 0; }

@media(max-width:820px){
  .admin-mode-pill{display:none}
  .order-body{grid-template-columns:1fr}
  .order-actions{grid-template-columns:1fr}
  .order-actions .field.full{grid-column:auto}
  .admin-status-actions{grid-column:auto}
  .admin-status-actions button{width:100%;justify-self:stretch}
  .order-head{flex-direction:column}
}
