:root {
  color-scheme: light;
  --blue: #2563eb;
  --indigo: #4f46e5;
  --green: #16a34a;
  --ink: #172033;
  --muted: #687386;
  --line: #d9deea;
  --surface: #ffffff;
  --soft: #f5f7fb;
  --danger: #dc2626;
  --shadow: 0 18px 48px rgba(24, 34, 58, 0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Tahoma, Arial, sans-serif;
  color: var(--ink);
  background: #eef1f6;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.login-body {
  background: linear-gradient(135deg, #5b5ff0 0%, #2f82ec 58%, #18a957 100%);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
}

.login-visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 54px;
  color: #fff;
  background:
    linear-gradient(rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.55)),
    url("https://images.unsplash.com/photo-1554224155-6726b3ff858f?auto=format&fit=crop&w=1400&q=80") center/cover;
}

.login-visual h1 {
  margin: 8px 0 14px;
  font-size: 48px;
}

.login-visual p {
  max-width: 36ch;
  line-height: 1.8;
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 34px;
}

.login-card,
.message-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.login-card {
  width: min(540px, 100%);
  padding: 32px;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #eef4ff;
  color: var(--blue);
  font-weight: 800;
}

.login-card h2,
.login-card p {
  text-align: center;
}

.eyebrow {
  margin: 0;
  color: currentColor;
  opacity: 0.68;
  font-size: 13px;
  font-weight: 800;
}

label {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #cfd6e4;
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.primary-button,
.logout-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--indigo), var(--blue));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

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

.sidebar {
  position: fixed;
  inset-block: 0;
  inset-inline-start: 0;
  width: 245px;
  padding: 24px 18px;
  background: #111827;
  color: #fff;
}

.sidebar-brand {
  margin-bottom: 24px;
  font-size: 22px;
  font-weight: 800;
}

.sidebar a,
.logout-form button {
  width: 100%;
  margin-bottom: 8px;
  padding: 12px 14px;
  border-radius: 6px;
  text-align: right;
}

.sidebar a {
  display: block;
  color: #cbd5e1;
}

.sidebar a.active,
.sidebar a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.logout-form {
  margin-top: 22px;
}

.logout-form button {
  background: #273449;
}

.workspace {
  margin-inline-start: 245px;
  padding: 34px;
}

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

.topbar h1 {
  margin: 4px 0 0;
}

.user-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 6px;
  background: #ecfdf5;
  color: #047857;
  font-weight: 800;
}

.alert.error {
  background: #fef2f2;
  color: var(--danger);
}

.stats-grid,
.report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stats-grid article,
.report-grid div {
  min-height: 112px;
  padding: 20px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.stats-grid span,
.report-grid span {
  display: block;
  color: var(--muted);
  font-weight: 700;
}

.stats-grid strong,
.report-grid strong {
  display: block;
  margin-top: 10px;
  font-size: 28px;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 22px;
  overflow: auto;
}

.panel h2 {
  margin: 0 0 16px;
}

.form-grid .primary-button {
  margin-top: 18px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 13px;
}

.activity-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-list li {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.activity-list time {
  color: var(--muted);
}

.plain-body {
  display: grid;
  place-items: center;
  padding: 30px;
}

.message-card {
  width: min(560px, 100%);
  padding: 28px;
}

@media (max-width: 900px) {
  .login-shell,
  .split-grid,
  .stats-grid,
  .report-grid {
    grid-template-columns: 1fr;
  }

  .login-visual {
    min-height: 260px;
  }

  .sidebar {
    position: static;
    width: auto;
  }

  .workspace {
    margin-inline-start: 0;
    padding: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}
