﻿/* =====================================================
   RESET E BASE STYLES
   ===================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom, #057c94 0%, #0ea5c9 100%) !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    min-height: 100vh;
    color: #2c5f6f;
}

/* =====================================================
   VARIAVEIS CSS
   ===================================================== */
:root {
    --primary-color: #057c94;
    --secondary-color: #0ea5c9;
    --tertiary-color: #90e0ef;
    --text-primary: #2c5f6f;
    --text-secondary: #9ca3af;
    --background-white: rgba(255, 255, 255, 0.95);
    --border-light: #e9ecef;
    --border-hover: #0ea5c9;
    --success-color: #10b981;
    --error-color: #dc2626;
    --error-bg: #fee2e2;
    --error-border: #fecaca;
    --shadow-light: 0 4px 15px rgba(5, 124, 148, 0.3);
    --shadow-heavy: 0 25px 50px rgba(5, 124, 148, 0.3);
    --border-radius: 12px;
    --border-radius-large: 20px;
    --border-radius-xl: 25px;
    --transition: all 0.3s ease;
}

/* =====================================================
   CONTAINERS E LAYOUTS
   ===================================================== */
.form-control {
    border: 2px solid var(--secondary-color) !important; /* Cinza escuro */
    border-radius: 6px !important;
    transition: all 0.3s ease !important;
}

/* Container para p�ginas centradas (Login) */
.page-center {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Container principal para formularios */
/* Aplicar apenas aos containers que nao estao na navbar */
.container:not(.navbar .container) {
    max-width: 900px;
    margin: 10px auto;
    background: var(--background-white);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-heavy);
    overflow: hidden;
}

.navbar .container {
    background: transparent !important;
    backdrop-filter: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    max-width: 900px;
    margin: 0 auto;
    font-size: larger;
}

.footer .container {
    background: transparent !important;
    backdrop-filter: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
    max-width: 900px;
    margin: 10px;
    line-height: 10px !important;
}

/* =====================================================
   PAGINA DE LOGIN
   ===================================================== */

/* Wrapper para p�ginas de login centradas */
.login-page-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 190px); /* Altura total menos navbar e footer */
    padding: 40px 20px;
    position: relative;
}

/* Container especifico para login */
.login-container {
    background: var(--background-white);
    backdrop-filter: blur(15px);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-heavy);
    width: 100%;
    max-width: 450px;
    padding: 50px 40px;
    position: relative;
    z-index: 1;
    animation: slideUp 0.8s ease-out;
}

/* Override do container normal para nao afetar login */
.login-page-wrapper .container {
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    max-width: none !important;
}
/* =====================================================
   HEADERS E TITULOS
   ===================================================== */

/* Header principal do formulario */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 40px;
    margin-top: 10px;
    text-align: center;
    position: relative;
}

    .header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="rgba(255,255,255,0.1)"><polygon points="0,0 1000,0 1000,60 0,100"/></svg>');
        background-size: cover;
    }

    .header h1 {
        font-size: 2.5rem;
        font-weight: 700;
        margin-bottom: 10px;
        position: relative;
        z-index: 1;
    }

    .header p {
        font-size: 1.1rem;
        opacity: 0.9;
        position: relative;
        z-index: 1;
    }

/* Titulos de login */
.login-title {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.login-subtitle {
    color: var(--text-primary);
    font-size: 1rem;
    opacity: 0.8;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
}

/* =====================================================
   LOGO E IDENTIDADE CORPORATIVA
   ===================================================== */
.logo-container {
    text-align: center;
    margin-bottom: 40px;
}

.logo-simple {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .logo-simple .logo-image {
        width: 120px;
        height: 120px;
        object-fit: contain;
    }

.company-name {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.company-subtitle {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 400;
    opacity: 0.8;
}

/* =====================================================
   FORMULARIOS E INPUTS
   ===================================================== */
.form-container {
    padding: 40px 40px 40px 40px;
}

.section {
    margin-bottom: 40px;
    animation: fadeIn 0.6s ease-out;
}

    .section:first-child {
        margin-top: 30px;
    }

.section-title {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--tertiary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

    .section-title::before {
        content: '';
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--primary-color);
    }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--tertiary-color);
}

    .section-header .section-title {
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
        flex: 1;
    }

.back-btn {
    background: linear-gradient(135deg, #6b7280, #9ca3af);
    color: white;
    padding: 14px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
    display: inline-block;
}

    .back-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(5, 124, 148, 0.4);
        text-decoration: none;
        color: white;
    }

    .back-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        transition: left 0.5s;
    }

    .back-btn:hover::before {
        left: 100%;
    }

.section-header .back-btn {
    font-size: 0.9rem;
    padding: 8px 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

    .form-group.full-width {
        grid-column: 1 / -1;
    }

/* Labels */
label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
}

/* Inputs gerais */
input, select, textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
    color: var(--text-primary);
}

    input:focus, select:focus, textarea:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(5, 124, 148, 0.1);
        transform: translateY(-1px);
    }

    input:hover, select:hover, textarea:hover {
        border-color: var(--border-hover);
    }

    input::placeholder {
        color: var(--text-secondary);
    }

textarea {
    resize: vertical;
    min-height: 150px;
}

/* Inputs com icones (Login) */
.input-container {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-size: 1.1rem;
    z-index: 1;
}

.input-container input {
    padding-left: 45px;
}

/* =====================================================
   CHECKBOXES
   ===================================================== */
.checkbox-group {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

    .checkbox-item input[type="checkbox"] {
        width: auto;
        margin: 0;
        transform: scale(1.2);
        accent-color: var(--primary-color);
    }

/* =====================================================
   RADIO BUTTONS
   ===================================================== */
.radio-group {
    display: flex;
    gap: 60px;
    margin-top: 5px;
    flex-wrap: wrap;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 100px;
}

    .radio-item input[type="radio"] {
        margin: 0;
    }

    .radio-item label {
        cursor: pointer;
        user-select: none;
    }
/* =====================================================
   BOTOES
   ===================================================== */
.submit-btn, .login-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 16px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.login-btn {
    width: 100%;
    border-radius: var(--border-radius);
    margin-top: 10px;
}

    .submit-btn::before, .login-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
        transition: left 0.5s;
    }

    .submit-btn:hover::before, .login-btn:hover::before {
        left: 100%;
    }

    .submit-btn:hover, .login-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(5, 124, 148, 0.4);
    }

    .submit-btn:active, .login-btn:active {
        transform: translateY(0);
    }

    .login-btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

.submit-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    gap: 1rem;
}

.submit-btn {
    background-color: #007bff;
}

.cancel-btn {
    background-color: #dc3545;
    color: white;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: absolute;
    right: 0;
}

    .cancel-btn:hover {
        background-color: #c82333;
        color: white;
        text-decoration: none;
    }


/* =====================================================
   MENSAGENS DE ERRO
   ===================================================== */
.error-message {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-color);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: none;
    animation: shake 0.5s ease-in-out;
}

    .error-message.show {
        display: block !important;
        animation: slideInError 0.3s ease-out;
    }

/* Animação para mostrar erro */
@keyframes slideInError {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/* =====================================================
   TOOLTIPS
   ===================================================== */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    color: var(--primary-color);
    margin-left: 5px;
}

    .tooltip:hover::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: 125%;
        left: 50%;
        transform: translateX(-50%);
        padding: 8px 12px;
        background: var(--text-primary);
        color: white;
        border-radius: 6px;
        font-size: 0.85rem;
        white-space: nowrap;
        z-index: 1000;
        opacity: 1;
    }

.required {
    color: var(--error-color);
}

/* =====================================================
   ELEMENTOS DECORATIVOS
   ===================================================== */

/* Background patterns */
body.page-center::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000" opacity="0.1"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="white" stroke-width="2"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.floating-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

    .floating-circle:nth-child(1) {
        width: 80px;
        height: 80px;
        top: 20%;
        left: 10%;
        animation-delay: 0s;
    }

    .floating-circle:nth-child(2) {
        width: 120px;
        height: 120px;
        top: 60%;
        right: 10%;
        animation-delay: 2s;
    }

    .floating-circle:nth-child(3) {
        width: 60px;
        height: 60px;
        bottom: 20%;
        left: 20%;
        animation-delay: 4s;
    }


/* Estilos para as mensagens de alerta */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    animation: slideDown 0.3s ease-out;
}

.alert-error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}


.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

    .error-message.show {
        display: block;
    }

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =====================================================
   ANIMACOES
   ===================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    50% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }

    100% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }

    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .header h1 {
        font-size: 2rem;
    }

    .form-container {
        padding: 20px;
    }

    .checkbox-group {
        flex-direction: column;
        gap: 15px;
    }

    .login-container {
        padding: 40px 25px;
        margin: 10px;
    }

    .logo {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }

    .login-title {
        font-size: 1.7rem;
    }

    .company-name {
        font-size: 1.3rem;
    }

    .radio-group {
        gap: 40px;
    }

    .radio-item {
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .container {
        margin: 10px;
        border-radius: 15px;
    }

    .header {
        padding: 30px 20px;
    }

        .header h1 {
            font-size: 1.8rem;
        }

        .header p {
            font-size: 1rem;
        }
}
