*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: system-ui, Segoe UI, Roboto, sans-serif;
  margin: 0;
  padding: 1.25rem;
  background: #f0f2f5;
  color: #1a1a1a;
  line-height: 1.45;
}

h1 {
  font-size: 1.35rem;
  margin: 0 0 1rem;
}

a {
  color: #1565c0;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
}

.card {
  background: #fff;
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.msg {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.msg.ok {
  background: #e8f5e9;
  color: #1b5e20;
}

.msg.err {
  background: #ffebee;
  color: #b71c1c;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

label {
  font-weight: 600;
  font-size: 0.9rem;
}

input[type="text"],
input[type="password"] {
  padding: 0.5rem 0.65rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  min-width: 200px;
  font-size: 1rem;
}

button,
.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 8px;
  background: #1565c0;
  color: #fff;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

button:hover,
.btn:hover {
  background: #0d47a1;
}

.btn-ghost {
  background: #eceff1;
  color: #37474f;
}

.btn-ghost:hover {
  background: #cfd8dc;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

th,
td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid #eee;
}

th {
  background: #fafafa;
  font-weight: 600;
}

tr:hover td {
  background: #fafcff;
}

.muted {
  color: #666;
  font-size: 0.85rem;
}

/* Interruptor */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  vertical-align: middle;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #ccc;
  border-radius: 24px;
  transition: 0.2s;
}

.slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}

input:checked + .slider {
  background: #2e7d32;
}

input:checked + .slider::before {
  transform: translateX(20px);
}

input:disabled + .slider {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-inline {
  display: inline;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
