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

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #020617;
  color: #e5e7eb;
}

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

.sidebar {
  width: 240px;
  background: #020617;
  border-right: 1px solid #1f2937;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sidebar-logo {
  font-weight: 700;
  font-size: 18px;
  color: #f97316;
  margin-bottom: 8px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-nav a {
  padding: 8px 10px;
  border-radius: 6px;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 14px;
}

.sidebar-nav a:hover {
  background: #111827;
}

.main {
  flex: 1;
  padding: 16px 20px;
}

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

.main-title {
  font-size: 20px;
  font-weight: 600;
}

.main-subtitle {
  font-size: 13px;
  color: #9ca3af;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Cards / Panels */

.panel {
  background: #020617;
  border-radius: 10px;
  border: 1px solid #1f2937;
  padding: 14px 16px;
}

.panel-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.panel-subtitle {
  font-size: 12px;
  color: #9ca3af;
}

.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.2fr);
  gap: 14px;
}

@media (max-width: 960px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; overflow-x:auto; }
  .main { padding: 12px; }
  .grid-two { grid-template-columns: minmax(0,1fr); }
}

/* Forms */

.form-group {
  margin-bottom: 8px;
}

.form-label {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 2px;
  display: block;
}

.form-control,
.form-select {
  width: 100%;
  padding: 7px 8px;
  border-radius: 6px;
  border: 1px solid #374151;
  background: #020617;
  color: #e5e7eb;
  font-size: 13px;
}

.form-row {
  display: flex;
  gap: 10px;
}

.form-row .form-group {
  flex: 1;
}

.form-description {
  font-size: 11px;
  color: #9ca3af;
}

/* Buttons */

.button-primary,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 6px;
  border: none;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
}

.button-primary {
  background: #f97316;
  color: #0f172a;
  font-weight: 600;
}

.button-primary:hover {
  background: #fb923c;
}

.button-secondary {
  background: #111827;
  color: #e5e7eb;
  border: 1px solid #1f2937;
}

.button-secondary:hover {
  background: #1f2937;
}

/* Table */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-top: 8px;
}

th, td {
  text-align: left;
  padding: 6px 8px;
}

thead tr {
  background: #020617;
}

tbody tr:nth-child(odd) {
  background: #020617;
}

tbody tr:nth-child(even) {
  background: #030712;
}

.status-pill {
  display:inline-flex;
  align-items:center;
  padding:2px 8px;
  border-radius:999px;
  font-size:11px;
}

.status-ativo {
  background: rgba(22,163,74,0.16);
  color:#bbf7d0;
}

.status-inativo {
  background: rgba(248,113,113,0.16);
  color:#fecaca;
}

.positivo { color:#4ade80; }
.negativo { color:#f87171; }

/* Modal */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
}

.modal-backdrop.open {
  display:flex;
}

.modal-box {
  background:#020617;
  border-radius:12px;
  border:1px solid #1f2937;
  padding:16px 18px;
  max-width:560px;
  width:100%;
  box-shadow:0 20px 40px rgba(0,0,0,0.75);
}

.modal-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
}

.modal-header h3 {
  margin:0;
  font-size:15px;
  font-weight:600;
}

.modal-close {
  border:none;
  background:transparent;
  color:#9ca3af;
  cursor:pointer;
  font-size:18px;
  line-height:1;
}

.main-header-right {
  display:flex;
  align-items:center;
  gap:8px;
}
