:root{
  --bg:#f4f6f8;
  --card:#ffffff;
  --text:#1f2937;
  --muted:#6b7280;
  --line:#e5e7eb;
  --primary:#0f3d5e;
  --primary2:#145f8f;
}

*{
  box-sizing:border-box;
}

body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
}

.topbar{
  background:linear-gradient(135deg,var(--primary),var(--primary2));
  color:white;
  padding:14px 26px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:24px;
  box-shadow:0 4px 18px rgba(0,0,0,.15);
}

.brand a{
  display:flex;
  align-items:center;
  gap:10px;
  color:white;
  text-decoration:none;
  font-weight:800;
}

.brand-mark{
  background:white;
  color:var(--primary);
  padding:6px 9px;
  border-radius:8px;
  font-size:14px;
}

.brand-text{
  font-size:20px;
}

.nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.nav a{
  color:white;
  text-decoration:none;
  padding:8px 12px;
  border-radius:8px;
}

.nav a:hover{
  background:rgba(255,255,255,.12);
}

.layout{
  max-width:1280px;
  margin:0 auto;
  padding:28px;
}

.card{
  background:white;
  border-radius:14px;
  padding:20px;
  margin-bottom:18px;
  border:1px solid var(--line);
  box-shadow:0 8px 24px rgba(15,23,42,.06);
}

.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
  gap:18px;
}

.page-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  margin-bottom:18px;
}

h1{
  margin-top:0;
  font-size:30px;
}

h2{
  margin-top:0;
}

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

button,.button-link{
  background:var(--primary);
  color:white;
  border:0;
  border-radius:9px;
  padding:10px 14px;
  cursor:pointer;
  text-decoration:none;
  display:inline-block;
}

button:hover,.button-link:hover{
  background:var(--primary2);
}

input,textarea,select{
  width:100%;
  padding:10px;
  border:1px solid #cbd5e1;
  border-radius:9px;
  margin:6px 0 14px;
  background:white;
}

table{
  width:100%;
  border-collapse:collapse;
}

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

tr:hover td{
  background:#f9fafb;
}

details summary{
  cursor:pointer;
  font-weight:700;
  color:var(--primary);
}

.login{
  max-width:430px;
  margin:70px auto;
  background:white;
  padding:28px;
  border-radius:16px;
  box-shadow:0 12px 32px rgba(0,0,0,.12);
}

@media(max-width:760px){
  .topbar{
    flex-direction:column;
    align-items:flex-start;
  }

  .layout{
    padding:18px;
  }
}
