:root {
  --bg: #f6f2ea;
  --panel: #fffdf8;
  --panel-alt: #f2ece1;
  --line: #d8cdbd;
  --ink: #1f2430;
  --muted: #68707f;
  --brand: #0f5dd7;
  --brand-2: #0b1b34;
  --success: #1e9b63;
  --warn: #d18a12;
  --danger: #d94c41;
  --shadow: 0 18px 40px rgba(22, 28, 45, 0.08);
  --radius: 20px;
  --radius-sm: 14px;
  --font: "Satoshi", "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(15, 93, 215, 0.08), transparent 24rem),
    linear-gradient(180deg, #fbf8f2 0%, var(--bg) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.auth-card {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  border: 1px solid rgba(15, 27, 52, 0.08);
  border-radius: 28px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-hero {
  padding: 40px;
  background:
    radial-gradient(circle at 10% 20%, rgba(15, 93, 215, 0.14), transparent 18rem),
    linear-gradient(180deg, #08172e 0%, #10284d 100%);
  color: white;
}

.auth-hero h1 {
  margin: 16px 0 12px;
  font-size: clamp(2rem, 3.2vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.auth-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  max-width: 30rem;
}

.auth-bullets {
  margin-top: 32px;
  display: grid;
  gap: 14px;
}

.auth-bullets div {
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-form {
  padding: 40px;
  display: grid;
  gap: 16px;
  align-content: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--brand) 0%, #00a6ff 100%);
  box-shadow: 0 10px 20px rgba(15, 93, 215, 0.2);
}

.auth-form h2 {
  margin: 8px 0 0;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.auth-form p {
  margin: 0;
  color: var(--muted);
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.94rem;
  font-weight: 700;
}

.field input,
.field select {
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
}

.field input:focus,
.field select:focus {
  outline: 2px solid rgba(15, 93, 215, 0.18);
  border-color: var(--brand);
}

.button {
  border: 0;
  border-radius: 14px;
  padding: 14px 18px;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--brand) 0%, #4e7ef2 100%);
  color: white;
  font-weight: 800;
}

.button-secondary {
  background: white;
  border: 1px solid var(--line);
  color: var(--ink);
}

.button-ghost {
  background: transparent;
  color: var(--muted);
}

.hint,
.error-box {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 0.92rem;
}

.hint {
  background: rgba(15, 93, 215, 0.08);
  color: var(--brand-2);
}

.error-box {
  background: rgba(217, 76, 65, 0.12);
  color: var(--danger);
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  background: linear-gradient(180deg, #08172e 0%, #10284d 100%);
  color: white;
  padding: 24px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 24px;
}

.sidebar .brand {
  font-size: 1.12rem;
}

.sidebar .brand-mark {
  width: 40px;
  height: 40px;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-link {
  padding: 12px 14px;
  border-radius: 14px;
  color: rgba(255, 255, 255, 0.82);
}

.sidebar-link.active,
.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar-note {
  align-self: end;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.92rem;
}

.content {
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.topbar h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: -0.05em;
}

.topbar p {
  margin: 8px 0 0;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 18px;
}

.grid.metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(15, 27, 52, 0.08);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.metric-value {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.05em;
}

.metric-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.split {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
}

.chart {
  display: flex;
  align-items: end;
  gap: 10px;
  min-height: 240px;
  padding-top: 20px;
}

.bar {
  flex: 1;
  min-width: 28px;
  border-radius: 14px 14px 6px 6px;
  background: linear-gradient(180deg, var(--brand) 0%, #6fb8ff 100%);
  position: relative;
}

.bar span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -26px;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.mini-list {
  display: grid;
  gap: 12px;
}

.mini-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--panel-alt);
}

.mini-row strong {
  display: block;
}

.toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.toolbar .field {
  min-width: 200px;
  flex: 1;
}

.table-wrap {
  overflow: auto;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid rgba(15, 27, 52, 0.08);
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(15, 27, 52, 0.08);
  text-align: left;
  white-space: nowrap;
}

th {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

tbody tr:hover {
  background: rgba(15, 93, 215, 0.04);
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.status.pending { background: rgba(209, 138, 18, 0.12); color: var(--warn); }
.status.in_transit { background: rgba(15, 93, 215, 0.12); color: var(--brand); }
.status.completed { background: rgba(30, 155, 99, 0.12); color: var(--success); }
.status.action_required { background: rgba(217, 76, 65, 0.12); color: var(--danger); }
.status.cancelled { background: rgba(104, 112, 127, 0.12); color: var(--muted); }
.status.unknown { background: rgba(15, 27, 52, 0.08); color: var(--brand-2); }

.order-cell {
  display: grid;
  gap: 4px;
}

.order-cell small {
  color: var(--muted);
}

.avatar-thumb {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(15, 27, 52, 0.1);
  background: var(--panel-alt);
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    grid-template-rows: auto auto auto;
  }

  .grid.metrics,
  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .auth-card {
    grid-template-columns: 1fr;
  }

  .content {
    padding: 18px;
  }

  .topbar {
    flex-direction: column;
  }
}
