﻿:root {
  --bg: #f8f9ff;
  --card: #ffffff;
  --text: #0d1c2e;
  --muted: #5f6b7a;
  --primary: #006d2f;
  --primary-2: #25d366;
  --border: #d5e3fc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, #e8fff0, var(--bg) 45%);
}

.shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background: #f2f7ff;
  border-right: 1px solid var(--border);
  padding: 24px 16px;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  overflow-y: auto;
}

.main {
  margin-left: 250px;
  width: calc(100% - 250px);
}

.topbar {
  height: 64px;
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.content {
  padding: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

h1,h2,h3 {
  margin: 0 0 8px;
}

input, select, textarea, button {
  font: inherit;
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

button, .btn {
  background: linear-gradient(120deg, var(--primary), var(--primary-2));
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-muted {
  background: #e9f0ff;
  color: #244;
}

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

.table th,
.table td {
  border-bottom: 1px solid var(--border);
  padding: 10px;
  text-align: left;
  font-size: 14px;
}

.nav-link {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #334;
  text-decoration: none;
  margin-bottom: 6px;
}

.nav-link.active {
  background: #d9f9e5;
  color: var(--primary);
  font-weight: 600;
}

.flash {
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 16px;
}

.flash-success {
  background: #ddffea;
  color: #0f6;
}

.flash-error {
  background: #ffe6e6;
  color: #b00;
}

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

.badge-ok { background: #ddffea; color: #006d2f; }
.badge-off { background: #ffe6e6; color: #aa0011; }

@media (max-width: 980px) {
  .sidebar {
    position: static;
    width: 100%;
    height: auto;
  }

  .main {
    margin-left: 0;
    width: 100%;
  }

  .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
}
