/* ===================================
   password/password.css
   DESIGN SYSTEM - NORTIS PARCERIAS
   Password Recovery Pages
   =================================== */

/* Paleta de Cores */
:root {
    --primary: #606B57;
    --primary-dark: #4a5240;
    --primary-light: #7a8a6e;
    --primary-rgb: 96, 107, 87;

    --dark: #1a1a1a;
    --darker: #0d0d0d;
    --card-bg: rgba(26, 26, 26, 0.95);

    --text: #ffffff;
    --text-muted: #999999;
    --text-light: #cccccc;

    --success: #27ae60;
    --success-bg: rgba(39, 174, 96, 0.15);
    --error: #e74c3c;
    --error-bg: rgba(231, 76, 60, 0.15);

    --border: rgba(96, 107, 87, 0.3);
    --border-light: rgba(255, 255, 255, 0.1);

    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.4);

    --radius: 10px;
    --radius-lg: 14px;
    --radius-sm: 6px;

    --transition: all 0.3s ease;
}

/* Reset e Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* FIX: Removido height: 100% — causava clipping do card no mobile
   quando o conteúdo excedia a altura da viewport */
html {
    min-height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text);
    background-color: #606B57;
    background-image: url('../img/bgcomlogo.png');
    background-repeat: repeat;
    background-position: center;
    background-attachment: fixed;
    display: grid;
    place-items: center;
    padding: 24px;
    min-height: 100vh;
}

/* FIX: iOS Safari não suporta background-attachment: fixed */
@supports (-webkit-touch-callout: none) {
    body {
        background-attachment: scroll;
    }
}

/* Card Principal */
.card {
    width: 100%;
    max-width: 460px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px); /* FIX: prefixo webkit para Safari */
    box-shadow: var(--shadow-lg);
    padding: 36px 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
}

/* Brand/Logo */
.brand {
    text-align: center;
    margin-bottom: 24px;
}

.brand img {
    width: 200px;
    max-width: 100%;
    height: auto;
    filter: brightness(0) invert(1);
}

/* Título */
.title {
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
    letter-spacing: 0.02em;
}

/* Subtítulo/Descrição */
.subtitle {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.6;
}

/* Mensagens de Erro */
.errors {
    background: var(--error-bg);
    border: 1px solid var(--error);
    border-left: 3px solid var(--error);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.6;
    animation: fadeIn 0.3s ease;
}

/* Mensagens de Sucesso */
.success {
    background: var(--success-bg);
    border: 1px solid var(--success);
    border-left: 3px solid var(--success);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 20px;
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.6;
    animation: fadeIn 0.3s ease;
}

.success .success-icon {
    display: block;
    text-align: center;
    font-size: 40px;
    margin-bottom: 10px;
}

.success-box {
    text-align: center;
    padding: 20px 0;
}

.success-box .success-icon {
    font-size: 50px;
    margin-bottom: 16px;
    display: block;
}

.success-box .success-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--success);
    margin-bottom: 12px;
}

.success-box .success-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form */
form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Inputs */
.input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    outline: none;
    transition: var(--transition);
}

.input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

.input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.input:hover {
    border-color: rgba(var(--primary-rgb), 0.4);
}

/* Password wrapper com toggle */
.password-wrapper {
    position: relative;
}

.password-wrapper .input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    transition: var(--transition);
    line-height: 1;
}

.toggle-password:hover {
    color: var(--primary);
}

/* Indicador de força da senha */
.password-strength {
    margin-top: 8px;
}

.strength-bar {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}

.strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
    width: 0%;
}

.strength-fill.weak   { width: 25%;  background: var(--error); }
.strength-fill.fair   { width: 50%;  background: #f39c12; }
.strength-fill.good   { width: 75%;  background: #3498db; }
.strength-fill.strong { width: 100%; background: var(--success); }

.strength-text {
    font-size: 10px;
    color: var(--text-muted);
    text-align: right;
}

/* Button */
.btn {
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 10px rgba(var(--primary-rgb), 0.2);
    margin-top: 6px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Alt Links */
.alt {
    margin-top: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alt a {
    color: var(--primary-light);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
    display: block;
}

.alt a:hover {
    color: var(--primary-light);
    text-decoration: underline;
    filter: brightness(1.2);
}

.alt a:first-child {
    font-size: 14px;
    font-weight: 600;
}

/* Loading Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================
   RESPONSIVE — Tablet (≤ 520px)
   ============================================ */
@media (max-width: 520px) {
    body {
        padding: 16px;
    }

    .card {
        padding: 28px 24px;
    }

    .brand img {
        width: 170px;
    }

    .title {
        font-size: 20px;
    }

    /* FIX: iOS Safari faz zoom automático em inputs com font-size < 16px */
    .input {
        font-size: 16px;
    }
}

/* ============================================
   RESPONSIVE — Mobile (≤ 380px)
   ============================================ */
@media (max-width: 380px) {
    body {
        padding: 12px;
    }

    .card {
        padding: 24px 16px;
    }

    .brand img {
        width: 150px;
    }

    .title {
        font-size: 18px;
    }

    .btn {
        font-size: 13px;
        letter-spacing: 0.5px;
    }
}
