:root {
  --brand: #0093D1;
  --brand-dark: #007bb3;
  --ink: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f1f5f9;
  --card: #fff;
  --sidebar: #0b2533;
  --radius: 12px;
  --font: "Inter", ui-sans-serif, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body.bo-body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
}

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

.bo-sidebar {
  width: 260px;
  background: linear-gradient(180deg, #0b2533 0%, #0f3447 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.bo-sidebar-brand {
  padding: 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.bo-sidebar-brand img {
  height: 32px;
  width: auto;
}

.bo-sidebar-brand span {
  font-weight: 700;
  font-size: .92rem;
  line-height: 1.3;
}

.bo-nav {
  padding: 12px 10px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bo-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-weight: 500;
  font-size: .92rem;
  transition: background .15s;
}

.bo-nav-link:hover,
.bo-nav-link.active {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.bo-sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.1);
  font-size: .85rem;
}

.bo-user {
  display: block;
  margin-bottom: 6px;
  opacity: .8;
}

.bo-logout {
  color: #fff;
  text-decoration: none;
}

.bo-main {
  flex: 1;
  min-width: 0;
}

.bo-topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 18px 24px;
}

.bo-topbar h1 {
  margin: 0;
  font-size: 1.35rem;
  color: var(--brand-dark);
}

.bo-content {
  padding: 24px;
}

.bo-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.bo-stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 2px 8px rgba(15,23,42,.06);
  border: 1px solid var(--border);
}

.bo-stat-label {
  display: block;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.bo-stat-value {
  display: block;
  font-size: 2rem;
  line-height: 1;
  color: var(--brand);
}

.bo-stat-card small {
  color: var(--muted);
  font-size: .8rem;
}

.bo-panels {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 960px) {
  .bo-panels { grid-template-columns: 1fr; }
  .bo-sidebar { width: 100%; }
  .bo-layout { flex-direction: column; }
}

.bo-panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 2px 8px rgba(15,23,42,.06);
  border: 1px solid var(--border);
  margin-bottom: 16px;
}

.bo-panel h2 {
  margin: 0 0 14px;
  font-size: 1.05rem;
}

.bo-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

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

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

.bo-table th {
  color: var(--muted);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
}

.bo-table code {
  font-size: .85rem;
  background: #f8fafc;
  padding: 2px 6px;
  border-radius: 4px;
}

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

.bo-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  background: #e0f2fe;
  color: #075985;
}

.bo-badge-ok { background: #dcfce7; color: #166534; }
.bo-badge-off { background: #f1f5f9; color: #64748b; }

.bo-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
  cursor: pointer;
}

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

.bo-btn-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

.bo-actions a {
  color: var(--brand);
  margin-right: 8px;
  text-decoration: none;
}

.bo-actions a.bo-danger { color: #dc2626; }

.bo-alert {
  padding: 10px 14px;
  border-radius: 8px;
  margin-bottom: 14px;
}

.bo-alert-success { background: #dcfce7; color: #166534; }
.bo-alert-error, .bo-alert-error { background: #fee2e2; color: #991b1b; }
.bo-alert-info { background: #e0f2fe; color: #075985; }

.bo-hint {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: .9rem;
}

.bo-form-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}

.bo-form-section h2 {
  margin: 0 0 14px;
  font-size: 1rem;
  color: var(--brand-dark);
}

.bo-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.bo-field-full { grid-column: 1 / -1; }

.bo-field label {
  display: block;
  font-weight: 600;
  font-size: .85rem;
  margin-bottom: 6px;
}

.bo-field input[type="text"],
.bo-field input[type="date"],
.bo-field input[type="file"],
.bo-field textarea,
.bo-field select,
.form-control {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.bo-sidebar-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
  margin-bottom: 10px;
}

.bo-form-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bo-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.bo-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.bo-improvements ul {
  margin: 0;
  padding-left: 1.2rem;
  line-height: 1.7;
  color: var(--muted);
}

.bo-improvements li { margin-bottom: 8px; }

/* Login */
.bo-login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0b2533, #0093D1);
  font-family: var(--font);
}

.bo-login-card {
  background: #fff;
  border-radius: 16px;
  padding: 32px 28px;
  width: min(400px, 92vw);
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  text-align: center;
}

.bo-login-logo {
  height: 48px;
  margin-bottom: 12px;
  filter: brightness(0) saturate(100%) invert(27%) sepia(98%) saturate(1200%) hue-rotate(170deg);
}

.bo-login-card h1 {
  margin: 0 0 4px;
  font-size: 1.4rem;
  color: var(--ink);
}

.bo-login-sub {
  color: var(--muted);
  margin: 0 0 20px;
  font-size: .9rem;
}

.bo-login-form {
  text-align: left;
}

.bo-login-form label {
  display: block;
  font-weight: 600;
  font-size: .85rem;
  margin: 10px 0 6px;
}

.bo-login-form input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
}

.bo-login-form button {
  width: 100%;
  margin-top: 18px;
  padding: 11px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.bo-login-back {
  display: inline-block;
  margin-top: 16px;
  color: var(--brand);
  text-decoration: none;
  font-size: .9rem;
}

@media (max-width: 640px) {
  .bo-form-grid,
  .bo-sidebar-row { grid-template-columns: 1fr; }
}
