/* Styles for authenticated app pages (login, change-password, dashboard).
   Brand palette: blue #144f92, jasper orange #f47c22 (spec §6). */
body.app {
  margin: 0;
  min-height: 100vh;
  background: #eef2f7;
  color: #1a2433;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: var(--brand-blue, #144f92);
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}
.app-header .brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.brand-logo { width: 34px; height: 34px; border-radius: 6px; }

.nav-right { display: flex; align-items: center; gap: 0.75rem; margin: 0; }
.nav-user { font-size: 0.9rem; opacity: 0.9; }

.app-main {
  max-width: 720px;
  margin: 2.5rem auto;
  padding: 0 1.25rem;
}

.card {
  background: #fff;
  border-radius: 14px;
  padding: 2rem;
  box-shadow: 0 8px 30px rgba(20, 79, 146, 0.08);
}
.auth-card { max-width: 420px; margin: 0 auto; }
.card h2 { margin-top: 0; color: var(--brand-blue, #144f92); }

form label {
  display: block;
  margin: 1rem 0 0.25rem;
  font-weight: 600;
  font-size: 0.9rem;
}
form input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid #cdd6e2;
  border-radius: 8px;
  font-size: 1rem;
  box-sizing: border-box;
}
form input:focus {
  outline: none;
  border-color: var(--brand-orange, #f47c22);
  box-shadow: 0 0 0 3px rgba(244, 124, 34, 0.18);
}

.btn {
  display: inline-block;
  margin-top: 1.25rem;
  padding: 0.7rem 1.4rem;
  border: none;
  border-radius: 9px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand-orange, #f47c22); color: #fff; width: 100%; }
.btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.6);
  margin-top: 0;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
}
.card .btn-ghost { color: var(--brand-blue, #144f92); border-color: #cdd6e2; }

.alert { padding: 0.7rem 0.9rem; border-radius: 8px; font-size: 0.9rem; }
.alert-error { background: #fdecea; color: #b3261e; border: 1px solid #f5c6c2; }

.hint { color: #5a6b80; font-size: 0.85rem; margin-top: 1rem; }
.meta { list-style: none; padding: 0; line-height: 1.9; }
.meta strong { color: var(--brand-blue, #144f92); }

/* nav links */
.nav-link {
  color: #fff; text-decoration: none; font-size: 0.9rem; opacity: 0.9;
  padding: 0.3rem 0.2rem; border-bottom: 2px solid transparent;
}
.nav-link:hover { border-bottom-color: var(--brand-orange, #f47c22); opacity: 1; }

/* layout helpers */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem 1.25rem; }
.grid label { margin-top: 0.6rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.5rem; }
.actions .btn { width: auto; margin-top: 0; }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }

/* toast */
.toast {
  padding: 0.8rem 1.1rem; border-radius: 10px; margin-bottom: 1.25rem; font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08); animation: toast-in 0.25s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; } }
.toast-success { background: #e6f4ea; color: #1e7e34; border: 1px solid #b7e1c4; }
.toast-info { background: #e7f0fb; color: #144f92; border: 1px solid #bcd5f2; }
.toast-error { background: #fdecea; color: #b3261e; border: 1px solid #f5c6c2; }

/* results table */
table.results { width: 100%; border-collapse: collapse; margin-top: 0.75rem; font-size: 0.9rem; }
table.results th, table.results td { text-align: left; padding: 0.4rem 0.6rem; border-bottom: 1px solid #eef2f7; }
table.results tr.ok td { color: #1e7e34; }
table.results tr.skip td { color: #8a6d3b; }

/* personal standing mini-stats */
.stat-row { display: flex; flex-wrap: wrap; gap: 1rem; }
.mini-stat {
  flex: 1; min-width: 110px; text-align: center; padding: 0.9rem 0.6rem;
  background: #f6f9fd; border: 1px solid #e6eef7; border-radius: 12px;
}
.mini-num { display: block; font-size: 1.5rem; font-weight: 800; color: var(--brand-blue, #144f92); }
.mini-lbl { display: block; font-size: 0.72rem; color: #6b7a90; text-transform: uppercase; letter-spacing: 0.04em; }
