/* Estilos específicos para as páginas de autenticação */
.bg-navy {
    background-color: #1e3a5f !important;
}

.text-cyan-custom {
    color: #00acc1 !important;
}

.bg-cyan-custom {
    background-color: #00acc1 !important;
}

/* Textos principais em branco para melhor contraste */
.text-white {
    color: #ffffff !important;
}

.text-gray-300 {
    color: #d1d5db !important;
}

/* Botões com texto branco */
.btn-primary {
    background: linear-gradient(135deg, #00acc1 0%, #00838f 100%);
    border: none;
    font-weight: 600;
    padding: 10px 16px;
    margin-top: 8px;
    border-radius: 6px;
    color: #ffffff !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00838f 0%, #006b75 100%);
    color: #ffffff !important;
}

.link-primary {
    color: #00acc1;
    font-weight: 500;
}

.link-primary:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Headers com texto branco */
.login-header h1,
.register-header h1,
.recovery-header h1 {
    color: #ffffff !important;
}

/* Subtítulos com cinza claro */
.login-header p,
.register-header p,
.recovery-header p {
    color: #d1d5db !important;
}

/* Links de ação com texto branco */
.action-link {
    color: #ffffff !important;
}

.action-link:hover {
    color: #00acc1 !important;
}

/* Animações suaves para os inputs */
input:focus {
    transition: all 0.2s ease-in-out;
}

.login-header {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.login-header .flex.items-center.justify-between {
    justify-content: space-between;
    width: 100%;
}

.login-header .flex.items-center.space-x-4 {
    margin-left: 0;
    padding-left: 0;
}

.login-header .text-cyan-custom.hover\:text-white {
    margin-right: 0;
    padding-right: 0;
}

/* Ajustes específicos para o footer da página de login */
.login-footer {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.login-footer .max-w-7xl.mx-auto {
    max-width: none !important;
    margin: 0 !important;
    width: 100%;
}

.login-footer .flex.items-center.justify-between {
    justify-content: space-between;
    width: 100%;
}

/* Remove margens automáticas do container principal em telas de login */
.min-h-screen.bg-gray-50 header .max-w-7xl.mx-auto {
    max-width: none !important;
    margin: 0 !important;
    width: 100%;
}

/* Estilo para campos obrigatórios */
.required::after {
    content: " *";
    color: #ef4444;
}

/* Hover effects para botões */
button {
    transition: all 0.2s ease-in-out;
}

/* Estilo para links */
a {
    transition: color 0.2s ease-in-out;
}

/* Responsividade para dispositivos móveis */
@media (max-width: 768px) {
    .grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .login-card {
        margin: 8px;
        padding: 16px !important;
    }

    .register-card {
        margin: 8px;
        padding: 16px !important;
    }
}

/* Estilo para validação de formulário */
.invalid {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 1px #ef4444 !important;
}

.valid {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 1px #10b981 !important;
}

/* Loading state para botões */
.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

.loading::after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Ajustes para o card de login */
.login-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 24px;
    margin: 12px auto;
    max-width: 420px;
}

/* Ajustes para o card de registro */
.register-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 20px;
    margin: 12px auto;
}

/* Ajustes nos cards para manter legibilidade */
.login-card,
.register-card,
.recovery-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Labels dentro dos cards mantêm cor escura para legibilidade */
.login-card label,
.register-card label,
.recovery-card label {
    color: #374151 !important;
}

/* Textos de ajuda dentro dos cards */
.login-card .text-gray-500,
.register-card .text-gray-500,
.recovery-card .text-gray-500 {
    color: #6b7280 !important;
}

/* Melhorias nos inputs */
.form-input {
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    transition: all 0.2s ease;
    padding: 8px 12px;
    margin-bottom: 4px;
}

.form-input:focus {
    border-color: #00acc1;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.1);
}

.checkbox-custom {
    accent-color: #00acc1;
}

/* Ajustes no container de login (removendo duplicação) */
form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Ajustes nas labels */
label {
    text-align: left;
    margin-bottom: 4px;
    color: #374151;
    font-weight: 500;
}

/* Ajustes nos inputs gerais */
input {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

input:focus {
    outline: none;
    border-color: #00acc1;
    box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.1);
}

/* Ajustes nos botões gerais */
button {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
    transition: background-color 0.2s ease;
}

button:hover {
    background-color: #00838f;
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Botões principais - versão com melhor contraste */
a.bg-cyan-custom, .btn-cyan {
    background-color: #00acc1;
    color: #ffffff;
    transition: background-color 0.3s ease;
}
a.bg-cyan-custom:hover, .btn-cyan:hover {
    background-color: #00838f;
}

/* Melhorias no card geral */
.card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    padding: 16px;
    margin: 8px 0;
}

/* Ajustes no foco dos inputs */
input.form-control:focus {
    border-color: #00acc1;
    box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.2);
}

/* Tipografia */
h1 {
    margin-bottom: 12px;
    line-height: 1.2;
}

h2, h5 {
    font-family: 'Inter', sans-serif;
    margin-bottom: 8px;
}

h3 {
    margin-bottom: 8px;
    margin-top: 12px;
}

/* Ajustes nos espaçamentos das seções */
.mb-4 {
    margin-bottom: 12px !important;
}

.mb-2 {
    margin-bottom: 6px !important;
}

.mt-4 {
    margin-top: 12px !important;
}

.mt-8 {
    margin-top: 16px !important;
}

.py-4 {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

.px-4 {
    padding-left: 12px !important;
    padding-right: 12px !important;
}

.py-8 {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
}

/* Ajustes no header */
header {
    padding: 12px 16px;
}

/* Ajustes no footer */
footer {
    padding: 12px 16px;
    margin-top: auto;
}

/* Espaçamento entre grid items */
.gap-x-6 {
    column-gap: 12px !important;
}

.gap-y-3 {
    row-gap: 8px !important;
}

/* Ajustes para mensagens de validação */
.text-red-500 {
    margin-top: 2px;
    font-size: 12px;
    display: block;
}

/* Melhorias no checkbox */
input[type="checkbox"] {
    margin-right: 6px;
}

/* Ajustes para telas menores */
@media (max-width: 640px) {
    .login-card, .register-card {
        padding: 16px;
        margin: 8px;
    }

    .w-full.max-w-md, .w-full.max-w-4xl {
        padding: 0 8px;
    }

    header, footer {
        padding: 8px;
    }
}

/* Melhorias no container principal */
.min-h-screen {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    padding: 16px 8px;
}

/* Ajustes nos links do footer */
footer a {
    padding: 2px 4px;
    border-radius: 4px;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #00acc1;
}

/* Estilo para o botão do Google */
button[value="Google"] {
    background-color: white;
    color: #5f6368;
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 1px 2px 0 rgba(0,0,0,0.05);
}

button[value="Google"]:hover {
    background-color: #f7f8f8;
    border-color: #d2d6dc;
    box-shadow: 0 1px 3px 0 rgba(0,0,0,0.1);
}

button[value="Google"]:active {
    background-color: #f1f3f4;
}

button[value="Google"] svg {
    width: 18px;
    height: 18px;
    margin-right: 8px;
}

/* Media Queries para Autenticação */
@media (max-width: 992px) {
    .login-card, .register-card {
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    .login-card, .register-card {
        padding: 1.5rem;
        margin: 1rem;
    }

    .grid-cols-1, .grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .flex.items-center.justify-between {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .text-sm {
        text-align: center;
    }
}

@media (max-width: 576px) {
    .login-card, .register-card {
        padding: 1.25rem;
        margin: 0.5rem;
        border-radius: 0.5rem;
    }

    h1, h2 {
        font-size: 1.5rem;
    }

    .form-input {
        padding: 0.875rem;
    }

    button[type="submit"], button[value="Google"] {
        padding: 0.875rem;
        font-size: 1rem;
    }

    .divider-text {
        font-size: 0.875rem;
    }

    .link-primary {
        display: block;
        text-align: center;
        margin-top: 0.5rem;
    }
}

/* Melhorias para dispositivos touch */
@media (hover: none) and (pointer: coarse) {
    .action-btn, .action-button, .btn, .menu-item {
        min-height: 44px;
        min-width: 44px;
    }

    .form-control, .form-control-quotation, .search-input,
    .filter-select, .form-input {
        font-size: 16px;
    }

    .pagination-button, .page-link {
        padding: 12px 16px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .action-btn:hover, .action-button:hover {
        opacity: 1;
        transform: scale(1);
    }

    .action-btn:active, .action-button:active {
        opacity: 0.8;
        transform: scale(0.97);
    }
}

/* Suporte para safe areas em dispositivos com notch */
@supports (padding: max(0px)) {
    .quotations-container, .container-quotation,
    .login-card, .register-card,
    .dashboard-content, .profile-content,
    .error-card {
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }

    header {
        padding-left: max(1.5rem, env(safe-area-inset-left));
        padding-right: max(1.5rem, env(safe-area-inset-right));
    }

    .modal-content {
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
    }
}

/* Classes auxiliares para textos */
.text-high-contrast {
    color: #ffffff;
}

.text-medium-contrast {
    color: #e5e7eb;
}

.text-soft-contrast {
    color: #d1d5db;
}

/* Hover states consistentes */
a.bg-cyan-custom:hover {
    background-color: #00838f !important;
}

.text-cyan-custom:hover {
    color: #00838f !important;
}

/* Estados de foco melhorados */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #00acc1;
    outline-offset: 2px;
}

input:focus-visible {
    outline: 2px solid #00acc1;
    outline-offset: 0;
}