:root {
  /* Palette aligned with the Laboratorios SPDx marketing site */
  --brand: #05345d;       /* deep navy (topbar, headings) */
  --brand-dark: #042844;
  --accent: #0f77bd;      /* primary blue (site --blue) */
  --accent-deep: #005f9e; /* hover (site --blue-deep) */
  --bg: #f4f6f9;
  --card: #ffffff;
  --text: #1f2933;
  --muted: #677484;
  --border: #dfe5ec;
  --ok: #1c7c4a;
  --warn: #b06a00;
  --danger: #b3261e;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(16, 36, 64, 0.08), 0 4px 16px rgba(16, 36, 64, 0.06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Open Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--accent); }

.topbar {
  background: var(--brand);
  color: #fff;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}
.topbar .brand { display: flex; align-items: center; gap: 12px; font-weight: 600; font-size: 1.05rem; }
.topbar .brand img { height: 34px; width: auto; background: #fff; border-radius: 6px; padding: 3px; }
.topbar nav a { color: #d7e6f5; text-decoration: none; margin-left: 18px; font-size: .95rem; }
.topbar nav a:hover, .topbar nav a.active { color: #fff; text-decoration: underline; }
.topbar .who { font-size: .9rem; color: #cfe0f1; margin-left: 22px; padding-left: 18px; border-left: 1px solid rgba(255,255,255,.25); }

.container { max-width: 920px; margin: 28px auto; padding: 0 18px; }
.narrow { max-width: 420px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}

h1 { font-size: 1.5rem; margin: 0 0 6px; color: var(--brand-dark); }
h2 { font-size: 1.1rem; margin: 22px 0 10px; color: var(--brand-dark); }
.subtitle { color: var(--muted); margin: 0 0 22px; }

label { display: block; font-weight: 600; font-size: .9rem; margin: 14px 0 5px; }
input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=password], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

.row { display: flex; gap: 14px; }
.row > * { flex: 1; }

button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 11px 18px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 18px;
}
button:hover { background: var(--accent-deep); }
button:disabled { opacity: .6; cursor: not-allowed; }
button.secondary { background: #eef2f7; color: var(--brand-dark); }

.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-logo { text-align: center; margin-bottom: 18px; }
.login-logo img { height: 56px; }

/* Hidden until JS sets display:block with a message, so empty alerts never show. */
.alert { padding: 11px 14px; border-radius: 8px; margin: 14px 0; font-size: .92rem; display: none; }
.alert.error { background: #fbe9e8; color: var(--danger); }
.alert.success { background: #e7f4ec; color: var(--ok); }

/* Exam categories as tabs */
.test-tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--border); margin: 4px 0 14px; }
.test-tab {
  display: inline-flex; align-items: center;
  background: none; color: var(--muted); border: none;
  border-bottom: 2px solid transparent; border-radius: 0;
  padding: 9px 14px; margin: 0; width: auto;
  font-size: .9rem; font-weight: 600; cursor: pointer;
}
.test-tab:hover { background: #eef2f7; color: var(--brand-dark); }
.test-tab.active { color: var(--accent); border-bottom-color: var(--accent); background: none; }
.test-tab .tab-count { display: none; }
.test-tab .tab-count.on {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 7px;
  border-radius: 9px; background: var(--accent); color: #fff;
  font-size: .72rem; font-weight: 700;
}
.test-panel { border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; }
.test-panel.hidden { display: none; }
.test-item { display: flex; align-items: center; gap: 9px; padding: 5px 0; }
.test-item input { width: auto; }
.test-item label { margin: 0; font-weight: 400; }
.test-item .ta { color: var(--muted); font-size: .82rem; margin-left: auto; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--border); font-size: .92rem; vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge.pending { background: #fff2dc; color: var(--warn); }
.badge.imported { background: #e2ecfa; color: var(--accent); }
.badge.processing { background: #ede2fa; color: #6b3fa0; }
.badge.completed { background: #e7f4ec; color: var(--ok); }

.summary { background: #f7f9fc; border: 1px solid var(--border); border-radius: 8px; padding: 16px 18px; margin: 16px 0; }
.summary .big { font-size: 1.6rem; font-weight: 700; color: var(--brand-dark); }
.muted { color: var(--muted); }
.center { text-align: center; }
.hidden { display: none; }
.linkbtn { background: none; border: none; color: var(--accent); padding: 0; font-size: .9rem; cursor: pointer; text-decoration: underline; margin: 0; }
