:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --line: #d9e1ec;
  --text: #141a24;
  --muted: #68758a;
  --primary: #1f6bff;
  --primary-dark: #174db8;
  --danger: #d92d20;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
}

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

.portal-shell {
  display: block;
}

.login-panel,
.portal-panel {
  width: min(100%, 420px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
  box-shadow: 0 16px 45px rgba(26, 37, 58, 0.08);
}

.portal-panel {
  width: min(100%, 880px);
  margin: 48px auto;
}

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

h1 {
  margin: 0 0 8px;
  font-size: 28px;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

label {
  display: block;
  margin: 18px 0 8px;
  font-size: 14px;
  font-weight: 700;
  color: #2d3748;
}

input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  font-size: 15px;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

button:hover,
.button:hover {
  background: var(--primary-dark);
}

.ghost {
  background: #eef3fb;
  color: #2d3748;
}

.ghost:hover {
  background: #e2eaf5;
}

.error {
  margin-top: 16px;
  color: var(--danger);
  font-weight: 700;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.service-card {
  display: block;
  min-height: 130px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  text-decoration: none;
  background: #fbfdff;
}

.service-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 18px;
}

.service-card.active {
  border-color: rgba(31, 107, 255, 0.55);
  background: #f1f6ff;
}
