:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --ink: #18202a;
  --muted: #687385;
  --line: #d9dee7;
  --accent: #176b5f;
  --accent-dark: #0f4d44;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  color: #ffffff;
  background: var(--accent);
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

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

.login-panel {
  width: min(100%, 420px);
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(24, 32, 42, 0.12);
}

.login-panel img {
  width: 92px;
  height: 92px;
  object-fit: contain;
}

.login-panel h1,
.login-panel p {
  margin: 0;
}

.login-panel h1 {
  margin-top: 16px;
  font-size: 28px;
}

.login-panel > p {
  color: var(--muted);
}

.login-panel form {
  display: grid;
  gap: 14px;
  margin-top: 26px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--ink);
  background: #ffffff;
}

.error {
  min-height: 20px;
  color: #9f1d12;
  font-size: 14px;
}

.portal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.portal-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.portal-brand h1,
.portal-brand p {
  margin: 0;
}

.portal-brand h1 {
  font-size: 22px;
}

.portal-brand p {
  color: var(--muted);
}

.portal-main {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 32px 20px;
}

.portal-intro h2,
.portal-intro p {
  margin: 0;
}

.portal-intro h2 {
  font-size: 30px;
}

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

.module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.module-card {
  min-height: 170px;
  padding: 18px;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.module-card.active:hover {
  border-color: var(--accent);
}

.module-card.disabled {
  opacity: 0.62;
}

.module-card span,
.module-card strong,
.module-card p {
  display: block;
}

.module-card span {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.module-card strong {
  margin-top: 14px;
  font-size: 22px;
}

.module-card p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.4;
}

@media (max-width: 820px) {
  .portal-header {
    align-items: stretch;
    flex-direction: column;
  }

  .module-grid {
    grid-template-columns: 1fr;
  }
}
