/* ===== CSS VARIABLES ===== */
:root {
    --primary-green: #2e7b52;        
    --secondary-green: #4f9d69;    
    --highlight-yellow: #fff876;     
    --highlight-yellow-dark: #f9c74f;
    
    --bg-light: #e4e6e3;             
    --text-dark: #191919;
    --text-light: #404040;
    --text-price: #f11764;             
    --text-highlight: var(--primary-green);
    
    --card-bg: #98c58c;              
    --footer-bg: #469e6f;
    --border-color: #d2d6d2;
    
    --input-bg: #ffffff;
    --input-border: #c5cac5;
    --input-focus: var(--primary-green);
    
    --link-color: #cc9820;
    --link-hover: #da841b;
    
    --btn-primary-bg: var(--primary-green);
    --btn-primary-text: #fff;
    --btn-primary-hover: #5aa461;
    
    --btn-secondary-bg: var(--highlight-yellow);
    --btn-secondary-text: #2e2e2e;
    --btn-secondary-hover: var(--highlight-yellow-dark);
    
    --success: #90be6d;  
    --warning: #f9c74f;  
    --error: #f28482;
}

/* ===== DARK THEME ===== */
[data-theme="dark"] {
    --primary-green: #2e7b52;       
    --secondary-green: #4f9d69;     
    --highlight-yellow: #ffd670;     
    --highlight-yellow-dark: #f9c74f;
    
    --bg-light: #1c1c1c;          
    --text-dark: #ededed;
    --text-light: #c0c0c0;
    --text-highlight: var(--highlight-yellow);
    --card-bg: #262626;
    --footer-bg: rgb(59, 134, 82);
    --border-color: #3a3a3a;
    
    --input-bg: #2a2a2a;
    --input-border: #3a3a3a;
    --input-focus: var(--highlight-yellow);
    
    --link-color: #ffd670;
    --link-hover: #f9c74f;
    
    --btn-primary-bg: var(--primary-green);
    --btn-primary-text: #fff;
    --btn-primary-hover: #336a42;
    
    --btn-secondary-bg: var(--highlight-yellow);
    --btn-secondary-text: #1c1c1c;
    --btn-secondary-hover: var(--highlight-yellow-dark);
    
    --success: #4f9d69;   
    --warning: #ffd670;
    --error: #f28b82;
}

/* ===== GLOBAL STYLES ===== */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;600;700&display=swap');

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    transition: background-color 0.3s ease, color 0.3s ease;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
    position: relative;
    overflow-x: hidden;
}

/* Background decoration */
/* body::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(46, 123, 82, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
} */

/* body::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 248, 118, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
} */

/* ===== CONTAINER ===== */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 550px;
    position: relative;
    z-index: 1;
}

/* ===== FORM CARD ===== */
.form-card {
    background-color: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: slideIn 0.5s ease;
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255, 248, 118, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.form-card > * {
    position: relative;
    z-index: 1;
}

/* ===== HEADER ===== */
.form-card h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-highlight);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.form-card h1::before {
    content: '\f234';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary-green);
    font-size: 1.8rem;
}

/* ===== FORM ===== */
form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

/* ===== FORM GROUPS ===== */
form > div {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: left;
    margin-bottom: 0;
}

label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

label::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary-green);
    font-size: 0.9rem;
}

/* Icons for each label */
form > div:nth-of-type(1) label::before {
    content: '\f007';
}

form > div:nth-of-type(2) label::before {
    content: '\f0e0';
}

form > div:nth-of-type(3) label::before {
    content: '\f095';
}

.senhas .senha label::before {
    content: '\f023';
}

/* ===== INPUTS ===== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"] {
    width: 100%;
    padding: 1rem 1.2rem;
    font-size: 1rem;
    font-family: 'Nunito', sans-serif;
    background-color: var(--input-bg);
    color: var(--text-dark);
    border: 2px solid var(--input-border);
    border-radius: 12px;
    transition: all 0.3s ease;
    outline: none;
}

input::placeholder {
    color: var(--text-light);
    opacity: 0.7;
}

input:focus {
    border-color: var(--input-focus);
    box-shadow: 0 0 0 4px rgba(46, 123, 82, 0.1);
    transform: translateY(-2px);
}

[data-theme="dark"] input:focus {
    box-shadow: 0 0 0 4px rgba(255, 214, 112, 0.1);
}

/* ===== SENHAS CONTAINER ===== */
.senhas {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
}

.senha {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* ===== SUBMIT BUTTON ===== */
button[type="submit"] {
    width: 100%;
    padding: 1.1rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    background-color: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 4px 12px rgba(46, 123, 82, 0.2);
}

button[type="submit"]::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    transition: transform 0.3s ease;
}

button[type="submit"]:hover {
    background-color: var(--btn-primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(46, 123, 82, 0.3);
}

button[type="submit"]:hover::after {
    transform: scale(1.2);
}

button[type="submit"]:active {
    transform: translateY(-1px);
}

/* ===== LOGIN LINK ===== */
.login-link {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-dark);
}

.login-link a {
    color: var(--link-color);
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    position: relative;
}

.login-link a::before {
    content: '\f2f6';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.85rem;
}

.login-link a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--link-hover);
    transition: width 0.3s ease;
}

.login-link a:hover {
    color: var(--link-hover);
    transform: translateX(2px);
}

.login-link a:hover::after {
    width: 100%;
}

/* ===== PASSWORD STRENGTH INDICATOR (opcional) ===== */
.password-strength {
    height: 4px;
    background-color: var(--border-color);
    border-radius: 2px;
    margin-top: 0.3rem;
    overflow: hidden;
    display: none;
}

.password-strength-bar {
    height: 100%;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.password-strength.show {
    display: block;
}

.strength-weak {
    width: 33%;
    background-color: var(--error);
}

.strength-medium {
    width: 66%;
    background-color: var(--warning);
}

.strength-strong {
    width: 100%;
    background-color: var(--success);
}

/* ===== ERROR/SUCCESS MESSAGES ===== */
.message {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    animation: slideIn 0.3s ease;
}

.message.error {
    background-color: var(--error);
    color: #fff;
}

.message.success {
    background-color: var(--success);
    color: #fff;
}

.message.warning {
    background-color: var(--warning);
    color: var(--text-dark);
}

.message::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.2rem;
}

.message.error::before {
    content: '\f06a';
}

.message.success::before {
    content: '\f058';
}

.message.warning::before {
    content: '\f071';
}

/* ===== ANIMATIONS ===== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* ===== RESPONSIVE - MOBILE ===== */
@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }

    .form-card {
        padding: 2rem 1.5rem;
    }

    .form-card h1 {
        font-size: 1.6rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"] {
        font-size: 0.95rem;
        padding: 0.9rem 1rem;
    }

    button[type="submit"] {
        font-size: 1rem;
        padding: 1rem 1.2rem;
    }

    .senhas {
        gap: 1rem;
    }
}

/* ===== RESPONSIVE - TABLET (768px+) ===== */
@media (min-width: 768px) {
    .container {
        max-width: 600px;
    }

    .form-card {
        padding: 3rem 2.5rem;
    }

    .form-card h1 {
        font-size: 2.2rem;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="password"] {
        padding: 1.1rem 1.3rem;
        font-size: 1.05rem;
    }

    button[type="submit"] {
        padding: 1.2rem 1.5rem;
        font-size: 1.1rem;
    }

    .senhas {
        grid-template-columns: 1fr 1fr;
    }

    .login-link {
        font-size: 1rem;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    body::before,
    body::after {
        animation: none;
    }
}

*:focus-visible {
    outline: 3px solid var(--primary-green);
    outline-offset: 2px;
}

[data-theme="dark"] *:focus-visible {
    outline-color: var(--highlight-yellow);
}

/* ===== LOADING STATE ===== */
button[type="submit"].loading {
    pointer-events: none;
    opacity: 0.7;
}

button[type="submit"].loading::after {
    content: '\f110';
    animation: spin 1s linear infinite;
}

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