:root {
  --bg: #f4f8fc;
  --panel: #ffffff;
  --ink: #0a1f44;
  --muted: #66758e;
  --line: #dce6f2;
  --primary: #0066ff;
  --primary-dark: #0048b8;
  --accent: #00c853;
  --nav: #06152f;
  --danger: #b42318;
  --ok: #00a845;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top right, rgba(0, 102, 255, .12), transparent 30%),
    linear-gradient(180deg, #f7fbff 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: Montserrat, Tahoma, Arial, sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
.sidebar {
  position: fixed;
  inset: 0 0 0 auto;
  width: 248px;
  background:
    linear-gradient(180deg, rgba(0, 102, 255, .16), transparent 30%),
    var(--nav);
  color: #eef6ff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  border-left: 1px solid rgba(255, 255, 255, .08);
}
.brand {
  display: grid;
  justify-items: start;
  gap: 4px;
}
.brand img {
  width: 82px;
  height: 82px;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 8px;
}
.brand strong { display: block; font-size: 18px; font-weight: 800; color: #fff; }
.brand small { color: #8fb7ff; letter-spacing: 0; }
nav { display: grid; gap: 8px; }
nav a {
  padding: 12px 14px;
  border-radius: 8px;
  color: #dbeaff;
}
nav a.active, nav a:hover {
  background: rgba(0, 102, 255, .20);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent);
}
.userbox {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 16px;
  color: #dbeaff;
}
.userbox a { display: block; margin-top: 8px; color: #73ff9a; }
.main {
  min-height: 100vh;
  padding: 28px;
  margin-right: 248px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
h1, h2, h3 { margin: 0 0 12px; line-height: 1.25; }
.muted { color: var(--muted); }
.grid { display: grid; gap: 16px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.card, .table-wrap, .form-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(10, 31, 68, .07);
}
.stat strong { display: block; font-size: 26px; margin-top: 4px; }
.stat small { color: var(--muted); }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 10px; text-align: right; vertical-align: top; }
th { color: var(--muted); font-weight: 700; background: #f7fbff; }
tr:last-child td { border-bottom: 0; }
.button, button {
  border: 0;
  background: var(--primary);
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.button:hover, button:hover { background: var(--primary-dark); }
.button.secondary { background: #eaf2ff; color: var(--ink); }
.button.danger { background: var(--danger); }
.full { width: 100%; }
.form { display: grid; gap: 12px; }
.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
label { display: grid; gap: 6px; font-weight: 700; color: #26342f; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
textarea { min-height: 84px; resize: vertical; }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  background: #eaf2ff;
  color: var(--primary-dark);
  font-size: 13px;
}
.error, .notice {
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 14px;
}
.error { background: #fff1f0; color: var(--danger); }
.notice { background: #edfced; color: var(--ok); }
.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center end;
  padding: 32px;
  background:
    linear-gradient(90deg, rgba(244, 248, 252, .10), rgba(244, 248, 252, .96) 58%, #ffffff 100%),
    url("login-business.jpg") left center / contain no-repeat,
    #ffffff;
}
.login-card {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .26);
}
.login-logo {
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.login-logo img {
  width: 112px;
  height: 112px;
  object-fit: contain;
}
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.split { display: grid; grid-template-columns: 1.3fr .7fr; gap: 16px; align-items: start; }
.positive { color: var(--ok); font-weight: 800; }
.negative { color: var(--danger); font-weight: 800; }

@media (max-width: 900px) {
  .sidebar { position: static; width: auto; }
  .main { margin-right: 0; padding: 18px; }
  .stats, .two, .three, .split { grid-template-columns: 1fr; }
  .topbar { align-items: stretch; flex-direction: column; }
  table { font-size: 14px; }
}
