:root {
  --bg: #090d16;
  --panel: rgba(255, 255, 255, .08);
  --panel-strong: rgba(255, 255, 255, .13);
  --text: #f7f7fb;
  --muted: rgba(247, 247, 251, .68);
  --line: rgba(255, 255, 255, .13);
  --blue: #2d42ff;
  --blue-2: #6474ff;
  --cream: #f3eee4;
  --gold: #d7bb83;
  --danger: #ff6b6b;
  --shadow: 0 24px 80px rgba(0, 0, 0, .35);
  --radius: 28px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at top left, rgba(45,66,255,.32), transparent 28rem), linear-gradient(135deg, #080b12 0%, #111827 56%, #0a0d16 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
a { color: inherit; text-decoration: none; }
.bg-orb { position: fixed; z-index: -1; border-radius: 999px; filter: blur(55px); opacity: .45; }
.bg-orb-1 { width: 360px; height: 360px; background: #2d42ff; top: 120px; left: -140px; }
.bg-orb-2 { width: 300px; height: 300px; background: #d7bb83; right: -120px; bottom: 70px; opacity: .18; }
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 18px clamp(18px, 4vw, 52px);
  backdrop-filter: blur(16px);
  background: rgba(9, 13, 22, .72);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; }
.brand img { width: 132px; height: auto; }
.brand span { color: var(--muted); }
.nav { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 14px; }
.page { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 70px; }
.hero-grid { display: grid; grid-template-columns: 1.4fr .9fr; gap: 24px; align-items: stretch; margin-bottom: 24px; }
.hero-copy, .hero-card, .panel, .login-card {
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.06));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
}
.hero-copy { padding: clamp(28px, 5vw, 56px); }
.eyebrow { margin: 0 0 10px; color: var(--gold); text-transform: uppercase; letter-spacing: .16em; font-size: 12px; font-weight: 800; }
h1, h2, h3 { margin: 0; letter-spacing: -.045em; line-height: 1.02; }
h1 { font-size: clamp(38px, 6vw, 72px); max-width: 820px; }
h2 { font-size: clamp(28px, 4vw, 42px); }
h3 { font-size: clamp(22px, 3vw, 30px); }
.lead { color: var(--muted); font-size: clamp(17px, 2vw, 21px); line-height: 1.55; max-width: 760px; }
.muted { color: var(--muted); line-height: 1.55; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }
.button {
  border: 0;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 18px; border-radius: 999px;
  color: #fff; background: linear-gradient(135deg, var(--blue), var(--blue-2));
  font-weight: 800; cursor: pointer; box-shadow: 0 16px 38px rgba(45,66,255,.28);
}
.button.small { min-height: 34px; padding: 0 14px; font-size: 13px; }
.button.ghost { background: rgba(255,255,255,.08); box-shadow: none; border: 1px solid var(--line); }
.hero-card { padding: 24px; }
.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; color: var(--muted); }
.card-top strong { color: #fff; font-size: 40px; }
.status-row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); color: var(--muted); }
.status-row b { color: var(--text); }
.panel { padding: clamp(18px, 3vw, 30px); margin-top: 24px; }
.panel.narrow { max-width: 920px; margin-left: auto; margin-right: auto; }
.panel-head, .order-head { display: flex; justify-content: space-between; gap: 18px; align-items: flex-start; margin-bottom: 22px; }
.search { display: grid; grid-template-columns: 1fr 260px auto; gap: 12px; margin-bottom: 18px; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 17px; background: rgba(255,255,255,.08); color: var(--text);
  padding: 14px 15px; outline: none; font: inherit;
}
select option { background: #111827; color: #fff; }
input:focus, select:focus, textarea:focus { border-color: rgba(100,116,255,.9); box-shadow: 0 0 0 4px rgba(45,66,255,.16); }
.table-wrap { overflow-x: auto; border-radius: 22px; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; min-width: 860px; background: rgba(7,10,17,.35); }
th, td { padding: 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
tbody tr { cursor: pointer; transition: background .18s ease; }
tbody tr:hover { background: rgba(255,255,255,.07); }
small { color: var(--muted); }
.pill { display: inline-flex; padding: 7px 10px; border-radius: 999px; background: rgba(45,66,255,.16); border: 1px solid rgba(100,116,255,.35); font-size: 13px; }
.empty { text-align: center; color: var(--muted); }
.form { display: grid; gap: 14px; }
.form.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form label { display: grid; gap: 8px; color: var(--muted); font-weight: 650; }
.form label input, .form label select, .form label textarea { margin-top: 2px; color: var(--text); font-weight: 500; }
.wide, .section-title, .form-actions { grid-column: 1 / -1; }
.section-title { margin-top: 14px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--gold); font-weight: 850; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.login-shell { min-height: calc(100vh - 170px); display: grid; place-items: center; }
.login-card { max-width: 560px; padding: clamp(24px, 5vw, 42px); }
.alert { padding: 13px 15px; border-radius: 16px; margin: 16px 0; background: rgba(255,255,255,.08); }
.alert.error { border: 1px solid rgba(255,107,107,.45); color: #ffdede; }
.order-head { margin: 8px 0 24px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.details { display: grid; grid-template-columns: 160px 1fr; gap: 11px 18px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }
.message-preview { white-space: pre-wrap; background: rgba(0,0,0,.24); border: 1px solid var(--line); padding: 16px; border-radius: 18px; line-height: 1.55; color: var(--cream); }
.timeline-item { border-left: 2px solid rgba(100,116,255,.55); padding: 4px 0 12px 14px; margin: 0 0 12px; }
.timeline-item.bad { border-color: rgba(255,107,107,.75); }
.timeline-item b { display: block; }
.timeline-item p { margin: 6px 0 0; color: var(--muted); }
@media (max-width: 840px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .nav { width: 100%; overflow-x: auto; padding-bottom: 4px; }
  .hero-grid, .cards, .split, .two-cols, .form.grid, .search { grid-template-columns: 1fr; }
  .panel-head, .order-head { flex-direction: column; }
  .brand img { width: 116px; }
  .page { width: min(100% - 20px, 1180px); padding-top: 18px; }
  .details { grid-template-columns: 1fr; }
}

/* Login page fixes */
.login-shell {
  min-height: calc(100vh - 145px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
}

.login-card {
  width: min(100%, 560px);
  max-width: 560px;
  overflow: hidden;
  padding: clamp(22px, 4vw, 38px);
}

.login-card h1 {
  max-width: 100%;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

.login-card .muted {
  max-width: 100%;
  font-size: 15.5px;
}

.login-card .form {
  width: 100%;
  margin-top: 18px;
}

.login-card label {
  min-width: 0;
}

.login-card input {
  width: 100%;
  max-width: 100%;
}

.login-card .button {
  width: 100%;
  margin-top: 4px;
}

.topbar .brand img {
  width: 158px;
  max-width: 48vw;
}

.topbar .brand span {
  display: none;
}

@media (max-width: 520px) {
  .page {
    width: min(100% - 18px, 1180px);
  }

  .login-shell {
    min-height: calc(100vh - 120px);
    padding: 10px 0 28px;
  }

  .login-card {
    border-radius: 22px;
    padding: 22px 18px;
  }

  .login-card h1 {
    font-size: clamp(27px, 8.5vw, 36px);
    line-height: 1.06;
  }

  .eyebrow {
    font-size: 11px;
    letter-spacing: .12em;
  }

  .topbar {
    padding: 14px 16px;
  }

  .topbar .brand img {
    width: 142px;
  }
}

/* Project brand logo */
.topbar .brand img,
.login-brand img,
.brand img,
img.site-logo {
  height: auto;
  width: 170px;
  max-width: 100%;
  display: block;
  object-fit: contain;
}

@media (max-width: 640px) {
  .topbar .brand img,
  .login-brand img,
  .brand img,
  img.site-logo {
    width: 138px;
  }
}
