body { min-height: 100vh; }

.app-header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.app-header h1 {
  font-size: 1.1rem;
  margin: 0;
}

.app-header .brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

#brand-icon {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: var(--header-text);
}

#app-logo {
  height: 28px;
  max-width: 140px;
  object-fit: contain;
  border-radius: 4px;
  flex-shrink: 0;
}

.app-header .actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.app-header select, .app-header button.secondary {
  border-color: rgba(255,255,255,0.5);
  color: var(--header-text);
}

nav.tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

nav.tabs button {
  background: transparent;
  border: none;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 600;
}

nav.tabs button.active {
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--border);
}

main {
  padding: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.toolbar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  align-items: center;
}

.toolbar input[type="search"] { flex: 1; }

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

table th, table td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

table th { color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; }

.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-box {
  width: 100%;
  max-width: 380px;
  padding: 2rem;
}

.login-box h1 { margin-top: 0; font-size: 1.3rem; }

.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: 0.3rem; font-size: 0.85rem; color: var(--text-muted); }
.field input { width: 100%; }

.error-msg { color: var(--danger); font-size: 0.9rem; margin-top: 0.5rem; min-height: 1.2rem; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.modal {
  width: 100%;
  max-width: 480px;
  padding: 1.5rem;
  max-height: 85vh;
  overflow: auto;
}

.modal h2 { margin-top: 0; font-size: 1.1rem; }
.modal .field { margin-bottom: 0.8rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }

.badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge.ativo, .badge.agendado { background: rgba(122,36,54,0.15); color: var(--accent); }
.badge.confirmado { background: rgba(122,36,54,0.25); color: var(--accent); }
.badge.cancelado, .badge.faltou, .badge.inativo { background: rgba(214,69,69,0.15); color: var(--danger); }
.badge.realizado { background: rgba(107,114,128,0.2); color: var(--text-muted); }
