:root {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: #18343b;
  background: #edf3f4;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 80% 10%, #d5e8e7 0, transparent 35%),
    #edf3f4;
}

.page {
  width: min(100% - 32px, 480px);
  margin: 0 auto;
  padding: 54px 0 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #103c48;
  color: white;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -1px;
}

.brand h1 {
  margin: 0;
  color: #103c48;
  font-size: 21px;
  letter-spacing: 1px;
}

.brand p {
  margin: 4px 0 0;
  color: #62777b;
  font-size: 12px;
}

.panel {
  background: white;
  border: 1px solid #dce7e8;
  border-radius: 18px;
  padding: 34px;
  box-shadow: 0 16px 45px rgba(22, 57, 64, .07);
}

.eyebrow {
  color: #168078;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
}

h2 {
  margin: 17px 0 8px;
  color: #103c48;
  font-size: 26px;
}

.intro {
  color: #687b80;
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 25px;
}

form { display: grid; gap: 11px; }

label {
  color: #29464c;
  font-size: 13px;
  font-weight: 650;
  margin-top: 8px;
}

input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #ccdadd;
  border-radius: 9px;
  font-size: 15px;
  color: #18343b;
  background: white;
  outline: none;
}

input:focus {
  border-color: #168078;
  box-shadow: 0 0 0 3px rgba(22, 128, 120, .12);
}

button {
  width: 100%;
  border: 0;
  border-radius: 9px;
  padding: 14px;
  margin-top: 16px;
  background: #126b68;
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

button:hover { background: #0e5755; }
button:disabled { opacity: .6; cursor: wait; }

button.secondary {
  color: #174b53;
  background: #eaf2f2;
}

#message {
  min-height: 22px;
  margin-top: 17px;
  font-size: 13px;
  line-height: 1.5;
}

#message.error { color: #b42318; }
#message.success { color: #13745a; }

.account-name {
  color: #126b68;
  font-weight: 700;
}

.notice {
  padding: 13px;
  border-radius: 9px;
  background: #eef5f4;
  color: #426166;
  font-size: 13px;
  line-height: 1.5;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  color: #819296;
  font-size: 11px;
}

[hidden] { display: none !important; }

@media (max-width: 520px) {
  .page { padding-top: 30px; }
  .panel { padding: 25px 21px; }
  footer { flex-direction: column; }
}

/* Authenticated dashboard */
.dashboard-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-heading h2 { margin-bottom: 5px; }

.logout-button {
  width: auto;
  margin: 0;
  padding: 10px 14px;
  white-space: nowrap;
}

.role-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}

.role-chip {
  display: inline-block;
  padding: 7px 10px;
  border-radius: 20px;
  background: #e8f2f1;
  color: #175e5b;
  font-size: 12px;
  font-weight: 700;
}

.section-title {
  margin: 26px 0 13px;
  color: #103c48;
  font-size: 16px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dce7e8;
  border-radius: 12px;
  background: #fbfdfd;
}

.metric-label {
  margin: 0;
  color: #62777b;
  font-size: 12px;
  line-height: 1.4;
}

.metric-value {
  margin: 9px 0 0;
  color: #103c48;
  font-size: 27px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.metric-detail {
  margin: 8px 0 0;
  color: #62777b;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.recent-list {
  display: grid;
  gap: 9px;
}

.recent-item {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid #dce7e8;
  border-radius: 10px;
}

.recent-item strong {
  color: #174b53;
  font-size: 13px;
}

.recent-item span {
  color: #687b80;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 520px) {
  .dashboard-heading { align-items: flex-start; }
  .metrics-grid { grid-template-columns: 1fr; }
}
