:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel2: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --success: #16a34a;
  --warning: #d97706;
  --danger: #dc2626;
  --line: #e2e8f0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, Segoe UI, Roboto, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,0.35), transparent 34rem),
    linear-gradient(135deg, #0f172a, #1e293b);
  min-height: 100vh;
  color: var(--text);
}

.nav {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7vw;
  color: white;
}

.brand {
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.25rem;
}

.links { display: flex; gap: 1rem; align-items: center; }
.links a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 600;
}
.links a:hover { color: white; }

.button-small {
  background: white;
  color: var(--primary) !important;
  padding: .55rem .9rem;
  border-radius: 999px;
}

main { padding: 2rem 7vw 5rem; }

.hero {
  display: grid;
  place-items: center;
  min-height: calc(100vh - 160px);
}

.hero-card {
  width: min(900px, 100%);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  padding: clamp(2rem, 5vw, 5rem);
  border-radius: 32px;
  box-shadow: 0 30px 90px rgba(0,0,0,.28);
}

.eyebrow {
  color: var(--primary);
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: .12em;
  font-size: .8rem;
}

h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: .95;
  letter-spacing: -0.06em;
  margin: .7rem 0 1.2rem;
}

h2 { margin-top: 0; font-size: 2rem; letter-spacing: -0.04em; }

p { line-height: 1.65; }

.actions { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }

.primary, .secondary, button, .primary-button, .secondary-button {
  border: 0;
  border-radius: 14px;
  padding: .9rem 1.2rem;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.primary, button, .primary-button {
  background: var(--primary);
  color: white;
}

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

.secondary, .secondary-button {
  background: #e2e8f0;
  color: #0f172a;
}

.card {
  width: min(760px, 100%);
  margin: 2rem auto;
  background: white;
  padding: 2rem;
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0,0,0,.25);
}

.card.narrow { width: min(480px, 100%); }
.card.wide { width: min(1180px, 100%); }

label {
  display: block;
  margin: 1rem 0 .4rem;
  color: #334155;
  font-weight: 700;
}

input {
  width: 100%;
  padding: .95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 1rem;
}

input:focus {
  outline: 3px solid rgba(37,99,235,.18);
  border-color: var(--primary);
}

form button { margin-top: 1rem; }

.muted { color: var(--muted); }

.flash-wrap { width: min(760px, 100%); margin: 0 auto; }
.flash {
  padding: 1rem 1.2rem;
  border-radius: 14px;
  margin: .7rem 0;
  background: white;
  border-left: 5px solid var(--primary);
}
.flash.error { border-color: var(--danger); }
.flash.success { border-color: var(--success); }

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.info-grid div {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
}

.info-grid strong {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  margin-bottom: .35rem;
}

.info-grid span { font-weight: 800; }

.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .92rem;
}

th, td {
  padding: .85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

th { color: #475569; font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; }

.status {
  display: inline-block;
  padding: .25rem .55rem;
  border-radius: 999px;
  color: white;
  font-weight: 800;
  font-size: .76rem;
}
.status.pending { background: var(--warning); }
.status.approved { background: var(--success); }
.status.rejected { background: var(--danger); }

.actions-cell { display: flex; gap: .4rem; flex-wrap: wrap; }
.mini { padding: .45rem .65rem; border-radius: 10px; margin: 0; font-size: .78rem; }
.mini.approve { background: var(--success); }
.mini.reject, .mini.delete { background: var(--danger); }

@media (max-width: 680px) {
  .nav { padding: 0 1rem; }
  .links { gap: .6rem; font-size: .9rem; }
  main { padding: 1rem; }
  .card { padding: 1.3rem; }
}
.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.lab-tile {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.5rem;
  background: #f8fafc;
}

.tile-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: .5rem;
}

.tile-header h3 {
  margin: 0;
  font-size: 1.35rem;
}
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: rgba(15, 23, 42, 0.96);
  color: white;
  padding: 2rem 1.25rem;
  box-shadow: 12px 0 40px rgba(0,0,0,.25);
  z-index: 10;
}

.sidebar .brand {
  font-size: 1.35rem;
  margin-bottom: 2rem;
}

.side-links {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.side-links a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 700;
  padding: .85rem 1rem;
  border-radius: 14px;
}

.side-links a:hover {
  background: rgba(255,255,255,.10);
  color: white;
}

.side-links .button-small {
  background: white;
  color: var(--primary) !important;
  text-align: center;
  margin-top: .5rem;
}

.content {
  margin-left: 260px;
  padding: 2rem 7vw 5rem;
}

.nav {
  display: none;
}

main {
  padding: 0;
}

@media (max-width: 780px) {
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    padding: 1rem;
  }

  .sidebar .brand {
    margin-bottom: 1rem;
  }

  .side-links {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .side-links a {
    padding: .65rem .8rem;
  }

  .content {
    margin-left: 0;
    padding: 1rem;
  }
}

.lab-control-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #eff6ff;
}

.lab-control-panel h3 {
  margin: 0 0 .4rem 0;
}

.lab-control-panel form {
  margin: 0;
}

@media (max-width: 780px) {
  .lab-control-panel {
    flex-direction: column;
    align-items: stretch;
  }
}
