/* Sistema Me Attende - Estilo Login */

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

:root {
    /* Cores do Sistema Me Attende */
    --bg-primary: #ffffff;
    --bg-secondary: #ffffff;
    --text-primary: #333333;
    --text-secondary: #6c757d;
    --link-primary: #0094BA;
    --accent-color: #0094BA;
    --accent-secondary: #009B94;
    --accent-hover: #007a98;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --border-color: #dee2e6;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    --gradient: linear-gradient(135deg, #0094BA, #009B94);
    --table-bg: #f8f9fa;
    --table-hover: #f8f9fa;
    --input-bg: #ffffff;
}

/* Tema Escuro para Login */
[data-theme="dark"] {
    --bg-primary: #0f0f0f;
    --bg-secondary: #1e1e1e;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --accent-color: #00b4d8;
    --accent-secondary: #00cfc1;
    --accent-hover: #0096b8;
    --success-color: #48c78e;
    --danger-color: #f14668;
    --border-color: #3a3a3a;
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    --gradient: linear-gradient(135deg, #001a21, #001f1c);
    --table-bg: #2a2a2a;
    --table-hover: #363636;
    --input-bg: #2a2a2a;
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--gradient);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
}

.login-box {
    background: var(--bg-secondary);
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
}

.logo {
    margin-bottom: 30px;
    /* centraliza o conteúdo do bloco (imagem + texto) */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-placeholder {
    background: var(--gradient);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 15px;
}

.logo-placeholder h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.logo-placeholder p {
    font-size: 12px;
    opacity: 0.8;
    margin: 0;
}

.logo-image {
    max-width: 250px;
    max-height: 80px;
    width: auto;
    height: auto;
    margin: 0 auto 15px; /* centra a imagem quando for display:block */
    filter: none !important; /* garantir que não receba filtros de tema */
}

/* Link de login */
.login-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    margin-top: 20px;
    display: block;
}

.login-link a {
    color: var(--link-primary);
    text-decoration: none;
    font-weight: 600;
}

.login-link a:hover {
    text-decoration: underline;
}

.logo h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.logo p {
    color: var(--text-secondary);
    font-size: 14px;
}

.login-form {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.form-group label i {
    margin-right: 8px;
    color: var(--accent-color);
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 148, 186, 0.1);
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 38px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 16px;
    padding: 4px;
}

.toggle-password:hover {
    color: var(--accent-color);
}

.login-btn {
    width: 100%;
    background: var(--gradient);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.login-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.login-btn i {
    margin-right: 8px;
}

.links {
    text-align: center;
}

.links a {
    color: var(--accent-color);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.links a:hover {
    text-decoration: underline;
}

.register-link {
    color: var(--success-color) !important;
    font-weight: 500;
}

.register-link:hover {
    color: #16a085 !important;
}

.user-types {
    border-top: 1px solid var(--border-color);
    padding-top: 20px;
    text-align: left;
}

.user-types h3 {
    color: var(--text-primary);
    font-size: 16px;
    margin-bottom: 15px;
    text-align: center;
}

.user-type-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.user-type {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
}

.user-type i {
    margin-right: 10px;
    color: var(--accent-color);
    width: 20px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: var(--bg-secondary);
    margin: 15% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
}

.close:hover {
    color: var(--text-primary);
}

.modal h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    text-align: center;
}

/* Responsividade */
@media (max-width: 480px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .user-type-list {
        gap: 8px;
    }
    
    .user-type {
        font-size: 12px;
        padding: 8px;
    }
}

/* Loading state */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .login-btn {
    background: var(--text-secondary);
}

/* Animações */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-box {
    animation: fadeIn 0.5s ease-out;
}

/* Estilos específicos para modo escuro no login */
[data-theme="dark"] .form-group input {
    background-color: var(--input-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .form-group input::placeholder {
    color: var(--text-secondary) !important;
    opacity: 0.8;
}

[data-theme="dark"] .form-group input:focus {
    background-color: var(--input-bg) !important;
    color: var(--text-primary) !important;
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.2) !important;
}