/* ===== RESET E VARIÁVEIS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #17a2b8;
    --primary-dark: #138496;
    --primary-light: #5dade2;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #ddd;
    --bg-light: #f9f9f9;
    --bg-gradient-start: #0E5C63;
    --bg-gradient-mid: #0E5C63;
    --bg-gradient-end: #0E5C63;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* ===== BODY E CONTAINER ===== */
html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: #0E5C63;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
}

.container-main {
    width: 100%;
    max-width: 100%;
    padding: 20px;
}

/* ===== FORM CONTAINER ===== */
.form-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.form-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 40px;
    width: 100%;
    max-width: 500px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== FORM LOGO ===== */
.form-logo {
    text-align: center;
    margin-bottom: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 15px 0;
}

.form-logo img {
    max-width: 120px;
    width: 120px;
    height: auto;
    display: block;
    object-fit: contain;
    margin: 0 auto;
}

/* ===== FORM HEADER ===== */
.form-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
}

.form-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    line-height: 1.4;
}

.form-header p {
    font-size: 14px;
    color: var(--text-light);
    font-weight: 400;
    line-height: 1.6;
}

/* ===== FORM GROUP ===== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== INPUT WRAPPER ===== */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 12px;
    width: 20px;
    height: 20px;
    color: var(--primary-color);
    pointer-events: none;
    flex-shrink: 0;
}

.form-input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 2px solid #ff9999;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.1);
}

.form-input:valid {
    border-color: var(--success-color);
}

.form-input.error {
    border-color: var(--error-color);
}

/* ===== ERROR MESSAGE ===== */
.error-message {
    font-size: 12px;
    color: var(--error-color);
    margin-top: -4px;
    display: none;
}

.error-message.show {
    display: block;
}

/* ===== BUTTON ===== */
.btn-submit {
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ===== SPINNER ===== */
.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== STATUS MESSAGE ===== */
.status-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 15px;
    text-align: center;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.status-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===== FORM FOOTER ===== */
.form-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.form-footer p {
    font-size: 14px;
    color: var(--text-light);
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ===== SUCCESS PAGE ===== */
.success-card {
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: #d4edda;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.success-icon svg {
    width: 48px;
    height: 48px;
    color: var(--success-color);
    stroke-width: 2;
}

.success-card h1 {
    color: var(--success-color);
    margin-bottom: 10px;
    font-size: 24px;
}

.success-card p {
    color: var(--text-light);
    margin-bottom: 10px;
    line-height: 1.6;
}

.btn-back {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 20px;
    transition: all 0.3s ease;
}

.btn-back:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* ===== ERROR PAGE ===== */
.error-card {
    text-align: center;
}

.error-icon {
    width: 80px;
    height: 80px;
    background-color: #f8d7da;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.error-icon svg {
    width: 48px;
    height: 48px;
    color: var(--error-color);
    stroke-width: 2;
}

.error-card h1 {
    color: var(--error-color);
    margin-bottom: 10px;
    font-size: 24px;
}

.error-card p {
    color: var(--text-light);
    margin-bottom: 10px;
    line-height: 1.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .form-card {
        padding: 30px 20px;
    }

    .form-logo img {
        max-width: 110px;
        width: 110px;
    }

    .form-header h1 {
        font-size: 20px;
    }

    .form-header p {
        font-size: 14px;
    }

    .form-input {
        font-size: 16px; /* Previne zoom em iOS */
    }

    .btn-submit {
        padding: 12px 20px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 10px;
    }

    .form-card {
        padding: 20px;
        border-radius: 12px;
    }

    .form-logo {
        margin-bottom: 25px;
        padding: 10px 0;
    }

    .form-logo img {
        max-width: 100px;
        width: 100px;
    }

    .form-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }

    .form-header h1 {
        font-size: 18px;
    }

    .form-header p {
        font-size: 13px;
    }

    .form-field label {
        font-size: 12px;
    }

    .form-input {
        padding: 10px 10px 10px 36px;
        font-size: 16px;
    }

    .input-icon {
        width: 18px;
        height: 18px;
        left: 10px;
    }

    .btn-submit {
        padding: 10px 16px;
        font-size: 14px;
    }

    .success-icon,
    .error-icon {
        width: 60px;
        height: 60px;
    }

    .success-icon svg,
    .error-icon svg {
        width: 36px;
        height: 36px;
    }

    .success-card h1,
    .error-card h1 {
        font-size: 20px;
    }
}
