:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #122a47;
  --text-muted: #5c6778;
  --border: #d8dee6;
  --primary: rgb(0, 108, 81);
  --primary-hover: rgb(0, 86, 64);
  --secondary: #122a47;
  --secondary-hover: #0c1d33;
  --accent: var(--primary);
  --accent-hover: var(--primary-hover);
  --shadow: 0 12px 32px rgba(18, 42, 71, 0.08);
  --radius: 12px;
  --font: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: linear-gradient(160deg, #eef2f7 0%, var(--bg) 45%, #e8edf5 100%);
  color: var(--text);
  line-height: 1.5;
}

.page {
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
}

.header-left {
  justify-self: start;
  display: flex;
  align-items: center;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
}

.brand-logo img {
  height: 32px;
  width: auto;
  display: block;
}

.brand {
  justify-self: center;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--secondary);
  text-align: center;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.main {
  flex: 1;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: stretch;
  padding: 2rem 1.5rem;
}

.card {
  width: min(100%, 560px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.card-centered {
  align-self: center;
  text-align: center;
}

.card h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 650;
}

.lead {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
}

.user-panel {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 4px);
  background: #fafbfc;
  margin-bottom: 1.5rem;
}

.avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 600;
}

.user-details {
  min-width: 0;
}

.user-name {
  margin: 0;
  font-weight: 600;
}

.user-email {
  margin: 0.15rem 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  word-break: break-all;
}

.badge {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: #e7f5e2;
  color: var(--primary-hover);
  font-size: 0.8rem;
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.resource-heading {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 650;
  color: var(--secondary);
}

.resource-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem 0.5rem;
  margin: 0 -0.5rem;
}

.resource-link {
  display: block;
  padding: 0.85rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fafbfc;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.resource-link:hover {
  border-color: var(--primary);
  background: #fff;
  color: var(--primary-hover);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}

.btn-secondary:hover {
  background: var(--secondary-hover);
  border-color: var(--secondary-hover);
}

.footer {
  padding: 1rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.login-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
}

.login-icon svg {
  width: 24px;
  height: 24px;
}
