:root {
  --primary: #0757c8;
  --primary-dark: #0646a3;
  --background: #f4f7fc;
  --white: #ffffff;
  --text: #172b4d;
  --muted: #718096;
  --border: #e5eaf2;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  background: var(--background);
  color: var(--text);
}

[hidden] {
  display: none !important;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-container {
  width: 100%;
  max-width: 430px;
  text-align: center;
}

.brand {
  margin-bottom: 30px;
}

.brand-logo {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: white;
  font-weight: bold;
  border-radius: 12px;
}

.brand .brand-logo {
  margin: auto auto 12px;
}

.brand h1 {
  font-size: 25px;
}

.brand p, .login-card > p {
  color: var(--muted);
  margin-top: 8px;
}

.login-card {
  background: white;
  padding: 30px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 10px 35px rgba(20, 50, 90, .06);
}

.login-card h2 {
  font-size: 23px;
}

.login-card label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  margin: 22px 0 8px;
}

.login-card input {
  width: 100%;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline-color: var(--primary);
}

button {
  cursor: pointer;
}

.login-card button {
  width: 100%;
  margin-top: 22px;
  padding: 14px;
  background: var(--primary);
  border: 0;
  border-radius: 8px;
  color: white;
  font-weight: bold;
}

button:disabled {
  opacity: .6;
  cursor: wait;
}

.login-container footer {
  color: var(--muted);
  font-size: 12px;
  margin-top: 25px;
}

.error-message {
  color: #c62828;
  font-size: 13px;
  margin-top: 12px;
}

.dashboard-layout {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: 255px;
  background: white;
  border-right: 1px solid var(--border);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 25px;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.sidebar nav {
  flex: 1;
  padding-top: 18px;
}

.nav-heading {
  font-size: 10px;
  font-weight: bold;
  color: var(--muted);
  margin: 20px 8px 9px;
}

.sidebar nav a {
  display: block;
  text-decoration: none;
  color: #52627a;
  padding: 11px 12px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 3px;
}

.sidebar nav a:hover,
.sidebar nav a.active {
  background: #eaf2ff;
  color: var(--primary);
}

.logout-button {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: #c62828;
}

.main-content {
  min-width: 0;
  flex: 1;
}

.topbar {
  min-height: 75px;
  padding: 15px 25px;
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar > div:nth-child(2) {
  flex: 1;
}

.topbar p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.topbar button {
  border: 0;
  background: transparent;
  font-size: 23px;
}

.user-info {
  text-align: right;
  font-size: 13px;
}

.user-info small {
  display: block;
  color: var(--primary);
  margin-top: 4px;
}

.page-content {
  padding: 30px;
}

.welcome h1 {
  font-size: 25px;
}

.welcome p {
  color: var(--muted);
  margin-top: 8px;
}

.dashboard-placeholder {
  margin-top: 28px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px;
}

.dashboard-placeholder p {
  color: var(--muted);
  margin-top: 10px;
}

.loading-screen {
  padding: 40px;
  text-align: center;
  color: var(--muted);
}

@media (max-width: 800px) {
  .sidebar {
    position: fixed;
    z-index: 10;
    inset: 0 auto 0 0;
    transform: translateX(-100%);
    transition: transform .25s ease;
    overflow-y: auto;
  }

  .sidebar.sidebar-open {
    transform: translateX(0);
  }

  .page-content {
    padding: 20px 15px;
  }

  .topbar {
    padding: 15px;
  }

  .user-info {
    max-width: 150px;
    overflow-wrap: anywhere;
  }
}

.module-container {
  min-height: 100vh;
  background: var(--background);
}

.module-header {
  min-height: 75px;
  padding: 18px 5%;
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.module-header a {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
}

.module-header span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 5px;
}

.module-content {
  max-width: 1200px;
  margin: auto;
  padding: 40px 25px;
}

.module-label {
  color: var(--primary);
  font-size: 11px;
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.module-content h1 {
  font-size: 28px;
}

.module-content > p:not(.module-label) {
  color: var(--muted);
  margin-top: 10px;
}

@media (max-width: 600px) {
  .module-content {
    padding: 25px 16px;
  }

  .module-content h1 {
    font-size: 23px;
  }
}
