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

.btn-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--color-text-muted, #888);
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}

.btn-logout:hover {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.btn-logout i {
style="color: #fff;
  font-size: 1.2rem;
}


:root {
  --blue-50: #E6F1FB;
  --blue-100: #B5D4F4;
  --blue-200: #85B7EB;
  --blue-400: #378ADD;
  --blue-600: #185FA5;
  --blue-800: #0C447C;
  --blue-900: #042C53;
  --bg: #F3F6FA;
  --surface: #ffffff;
  --border: rgba(0,0,0,0.10);
  --text: #1a1a1a;
  --text-muted: #6b7280;
  --radius: 10px;
  --radius-sm: 6px;
}

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); font-size: 15px; min-height: 100vh; }

/* ── Login ── */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--blue-900); }
.login-card { background: var(--surface); border-radius: var(--radius); padding: 2.5rem 2rem; width: 100%; max-width: 380px; box-shadow: 0 8px 32px rgba(4,44,83,0.3); }
.login-logo { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 600; color: var(--blue-800); margin-bottom: 6px; }
.login-logo i { font-size: 28px; color: var(--blue-600); }
.login-sub { font-size: 13px; color: var(--text-muted); margin-bottom: 1.5rem; }
.btn-block { width: 100%; justify-content: center; margin-top: 0.5rem; }

/* ── Layout ── */
.topbar { background: var(--blue-800); color: #fff; height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; position: sticky; top: 0; z-index: 30; }
.topbar-brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.topbar-brand i { font-size: 22px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-right span { font-size: 13px; color: var(--blue-100); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--blue-600); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.btn-logout { color: var(--blue-100); font-size: 20px; display: flex; align-items: center; transition: color 0.15s; text-decoration: none; }
.btn-logout:hover { color: #fff; }

.layout { display: flex; min-height: calc(100vh - 56px); }
.sidebar { width: 220px; background: var(--blue-900); flex-shrink: 0; padding: 1rem 0; display: flex; flex-direction: column; }
.nav-section { font-size: 11px; color: var(--blue-200); padding: 14px 1.25rem 4px; text-transform: uppercase; letter-spacing: 0.08em; opacity: 0.65; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 1.25rem; font-size: 14px; color: var(--blue-100); border-left: 3px solid transparent; text-decoration: none; transition: background 0.12s, color 0.12s; }
.nav-item:hover { background: rgba(255,255,255,0.07); color: #fff; }
.nav-item.active { background: rgba(55,138,221,0.22); color: #fff; border-left-color: var(--blue-400); }
.nav-item i { font-size: 18px; flex-shrink: 0; }

.main { flex: 1; padding: 1.75rem; min-width: 0; overflow-x: hidden; }
.page-title { font-size: 21px; font-weight: 600; color: var(--blue-900); margin-bottom: 1.25rem; }

/* ── Cards ── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1rem; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.card-title { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; color: var(--blue-800); }
.card-title i { font-size: 17px; }

/* ── Stats ── */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 1.5rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.stat-label { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 5px; margin-bottom: 6px; }
.stat-label i { font-size: 15px; color: var(--blue-400); }
.stat-value { font-size: 28px; font-weight: 700; color: var(--blue-800); }
.stat-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ── Tables ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 9px 12px; font-weight: 600; font-size: 11px; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; text-transform: uppercase; letter-spacing: 0.04em; }
td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--blue-50); }

/* ── Badges ── */
.badge { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge-blue   { background: var(--blue-50); color: var(--blue-800); }
.badge-green  { background: #EAF3DE; color: #27500A; }
.badge-amber  { background: #FAEEDA; color: #633806; }
.badge-red    { background: #FCEBEB; color: #501313; }
.badge-purple { background: #EEEDFE; color: #3C3489; }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; cursor: pointer; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; transition: background 0.12s; white-space: nowrap; }
.btn:hover { background: var(--blue-50); border-color: var(--blue-200); }
.btn-primary { background: var(--blue-600); color: #fff; border-color: var(--blue-600); }
.btn-primary:hover { background: var(--blue-800); border-color: var(--blue-800); }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ── Forms ── */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.form-group input,
.form-group select,
.form-group textarea { padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: var(--surface); color: var(--text); transition: border-color 0.15s; width: 100%; }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--blue-400); box-shadow: 0 0 0 3px rgba(55,138,221,0.12); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }

/* ── Alerts ── */
.alert { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; display: flex; align-items: center; gap: 8px; margin-bottom: 1rem; }
.alert-info    { background: var(--blue-50); color: var(--blue-800); border: 1px solid var(--blue-100); }
.alert-success { background: #EAF3DE; color: #27500A; border: 1px solid #C0DD97; }
.alert-danger  { background: #FCEBEB; color: #501313; border: 1px solid #F7C1C1; }

/* ── Rotas ── */
.rota-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 10px; }
.rota-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; gap: 12px; }
.rota-name { font-size: 15px; font-weight: 600; color: var(--blue-900); margin-bottom: 6px; }
.rota-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12px; color: var(--text-muted); }
.rota-meta span { display: flex; align-items: center; gap: 4px; }
.turno-list { display: flex; flex-wrap: wrap; gap: 6px; }
.turno-pill { background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: 20px; padding: 3px 12px; font-size: 12px; color: var(--blue-800); font-weight: 500; }

/* ── Search bar ── */
.search-bar { display: flex; gap: 8px; margin-bottom: 1rem; }
.search-bar input { flex: 1; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 13px; background: var(--surface); color: var(--text); }
.search-bar input:focus { outline: none; border-color: var(--blue-400); }

/* ── Mobile ── */
.hamburger { display: none; flex-direction: column; gap: 4px; cursor: pointer; padding: 4px; background: none; border: none; }
.hamburger span { display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 40; }

@media (max-width: 700px) {
  .hamburger { display: flex; }
  .sidebar { position: fixed; left: -220px; top: 0; bottom: 0; z-index: 50; transition: left 0.25s; padding-top: 56px; }
  .sidebar.open { left: 0; }
  .sidebar-overlay.open { display: block; }
  .main { padding: 1rem; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  table { font-size: 12px; }
  th, td { padding: 7px 8px; }
  .page-title { font-size: 18px; }
}
