body { margin: 0; background: var(--se-color-bg-gray-light, #f8f8f9); }
header {
  background: var(--se-color-bg-white, #fff);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
header img { height: 32px; }
header h1 { font-size: 1.1rem; margin: 0; flex: 1; }
header nav a { margin-left: 1rem; }
main { max-width: 960px; margin: 1.5rem auto; padding: 0 1rem; }
@media (min-width: 1100px) {
  main { max-width: 1400px; }
}
section.se-card {
  background: var(--se-color-bg-white, #fff);
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
section.se-card h2 { font-size: 1rem; margin: 0 0 1rem; }
/* Seedsin oletus on table-layout: fixed, joka pakottaa sarakkeet suunnilleen
   yhtä leveiksi content pituudesta riippumatta — sen takia pitkät nimet
   (esim. laitteiden nimet) rivittyvät turhaan moneen riviin. auto antaa
   sarakkeiden mukautua sisällön mukaan. */
table.se-table { min-width: 0; width: 100%; font-size: 0.85rem; table-layout: auto; }
table.se-table th, table.se-table td { white-space: normal; padding: 0.5em 0.75em; text-align: left; }
/* Toimintopainikkeet (Muokkaa/Tallenna/Peruuta ym.) viimeisessä sarakkeessa
   eivät saa rivittyä — rivittyminen siirtää napin hiiren alta pois eikä
   sitä silloin voi enää klikata. */
table.se-table td:last-child { white-space: nowrap; }
table.se-table td:last-child .se-btn { display: inline-block; margin: 2px 4px 2px 0; }
.table-scroll { overflow-x: auto; }
.new-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.new-form .se-input { width: 100%; box-sizing: border-box; }
.new-form .full { grid-column: 1 / -1; }
.se-btn { border: none; cursor: pointer; }
.status-pill {
  display: inline-block;
  padding: 0.15em 0.6em;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: bold;
}
.status-pill.ok { background: var(--se-color-positive-bg, #d9ecc5); color: var(--se-color-positive, #67b419); }
.status-pill.missing { background: var(--se-color-attention-bg, #fee384); color: #806100; }
#accessDenied, #unauthed { display: none; text-align: center; padding: 3rem 1rem; }
.search-box { margin-bottom: 1rem; }
.search-box input { width: 100%; box-sizing: border-box; }
.nav-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.nav-cards a {
  display: block;
  background: var(--se-color-bg-white, #fff);
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  padding: 1.5rem;
  text-align: center;
  text-decoration: none;
  color: var(--se-color-type-header, #202020);
  font-weight: bold;
}
