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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Temas (cor do sistema) */
body.tema-default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
body.tema-azul {
    background: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
}
body.tema-verde {
    background: linear-gradient(135deg, #22c55e 0%, #15803d 100%);
}
body.tema-laranja {
    background: linear-gradient(135deg, #f97316 0%, #c2410c 100%);
}
body.tema-escuro {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.navbar-brand {
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.navbar-brand .navbar-logo {
    max-height: 2.25rem;
    width: auto;
    display: block;
    object-fit: contain;
}

/* Hamburger toggle (quando existe .navbar-toggler, o menu fica colapsável) */
.navbar-toggler {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: none;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    cursor: pointer;
    transition: background 0.2s;
}
.navbar-toggler:hover {
    background: rgba(255, 255, 255, 0.25);
}
.navbar-toggler-icon {
    display: block;
    width: 1.25rem;
    height: 2px;
    background: currentColor;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
}

/* Menu colapsável (dropdown do hamburger) */
.navbar:has(.navbar-toggler) .navbar-menu {
    display: none;
    width: 100%;
    order: 3;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}
.navbar:has(.navbar-toggler) .navbar-menu.is-open {
    display: block;
}
.navbar:has(.navbar-toggler) .navbar-menu .navbar-nav {
    flex-direction: column;
    gap: 0.25rem;
}
.navbar:has(.navbar-toggler) .navbar-menu .navbar-nav a {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
}

/* Dropdown "Cadastros" dentro do menu */
.navbar-dropdown {
    position: relative;
    list-style: none;
}
.navbar-dropdown-toggle {
    width: 100%;
    text-align: left;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.navbar-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}
.navbar-dropdown-menu {
    display: none;
    list-style: none;
    padding: 0.5rem 0 0 1rem;
    margin: 0;
    border-left: 2px solid rgba(255, 255, 255, 0.3);
}
.navbar-dropdown.is-open .navbar-dropdown-menu {
    display: block;
}
.navbar-dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-radius: 0.375rem;
    transition: background 0.2s;
}
.navbar-dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.navbar-nav {
    display: flex;
    gap: 1rem;
    list-style: none;
}

.navbar-nav a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: background 0.2s;
}

.navbar-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2.5rem;
    width: 100%;
}

.card-login {
    max-width: 560px;
}

.card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.card-header h1 {
    color: #1a1a2e;
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.card-header p {
    color: #6b7280;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    color: #374151;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.alert {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
}

.alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
}

.content-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 2rem;
    width: 100%;
}

.welcome-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.welcome-header h1 {
    color: #1a1a2e;
    font-size: 1.5rem;
}

.user-info {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-admin {
    background: #fef3c7;
    color: #d97706;
}

.badge-user {
    background: #dbeafe;
    color: #2563eb;
}

.badge-atendente {
    background: #d1fae5;
    color: #059669;
}

.badge-api {
    background: #c79bf0;
    color: #131416;
}

.badge-success {
    background: #d1fae5;
    color: #059669;
}

.badge-secondary {
    background: #e5e7eb;
    color: #6b7280;
}

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

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.data-table th {
    font-weight: 600;
    color: #374151;
    background: #f9fafb;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
    width: auto;
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: rgba(102, 126, 234, 0.1);
}
