:root {
  --bg: #f4f7f5;
  --panel: #ffffff;
  --text: #14211c;
  --muted: #4d665d;
  --line: #d4e2dc;
  --primary: #0f8f63;
  --primary-strong: #0b6d4b;
  --warn: #de3d29;
  --warn-strong: #b52917;
  --ok: #18895f;
  --card-shadow: 0 10px 30px rgba(18, 47, 39, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 12%, #d4f4e8 0%, transparent 30%),
    radial-gradient(circle at 84% 6%, #fbe8cf 0%, transparent 34%),
    var(--bg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

.bg-shape {
  position: fixed;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(46px);
  z-index: 0;
  opacity: 0.35;
  pointer-events: none;
}

.bg-shape-a {
  background: #41c89a;
  top: -120px;
  left: -140px;
}

.bg-shape-b {
  background: #f2a55f;
  right: -150px;
  bottom: -100px;
}

.page {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 32px auto;
  padding: 0 16px 20px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
  padding: 18px;
}

.auth-panel {
  max-width: 420px;
  margin: 60px auto;
}

.auth-panel h1 {
  font-family: "Archivo Black", sans-serif;
  margin: 0;
  letter-spacing: 0.5px;
}

.auth-panel p {
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form input {
  width: 100%;
}

.hidden {
  display: none;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.topbar h2,
h3 {
  margin: 0;
}

.actions {
  display: flex;
  gap: 10px;
}

.btn {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.primary:hover {
  background: var(--primary-strong);
}

.btn.secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--text);
}

.btn.warning {
  background: var(--warn);
  color: #fff;
}

.btn.warning:hover {
  background: var(--warn-strong);
}

input,
select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font-size: 14px;
  font-family: inherit;
}

.grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.inline-form {
  display: flex;
  gap: 8px;
  margin: 10px 0 14px;
}

.inline-form input {
  flex: 1;
}

.rows-list,
.computer-list,
.alerts {
  display: grid;
  gap: 10px;
}

.row-item,
.computer-card,
.alert-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fdfefe;
  padding: 12px;
}

.row-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.row-boards {
  display: grid;
  gap: 14px;
}

.row-board {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
  background: #fcfffe;
}

.row-board h4 {
  margin: 0 0 10px;
}

.row-computers {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.computer-card {
  border-left: 6px solid var(--ok);
}

.computer-card.offline {
  border-left-color: #83918b;
  opacity: 0.85;
}

.computer-card.alert {
  border-left-color: var(--warn);
  background: #ffeceb;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
}

.badge.on {
  background: #d3f7e8;
  color: #0a6c4a;
}

.badge.off {
  background: #dfe6e3;
  color: #476057;
}

.badge.alert {
  background: #ffd6d1;
  color: #9e1808;
}

.comp-actions {
  margin-top: 10px;
  display: flex;
  gap: 6px;
}

.error {
  color: var(--warn);
  min-height: 18px;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 900px) {
  .grid-two {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .actions {
    width: 100%;
    flex-wrap: wrap;
  }
}
