/* Estilos compartilhados para botão de login / perfil */
:root{
    --purple-dark: #4a1a8a;
    --purple: #6b2fa0;
    --pink: #c0306a;
    --orange: #f7931e;
    --gray-bg: #f5f5f7;
    --radius-sm: 8px;
    --shadow-hover: 0 16px 48px rgba(0,0,0,0.2);
}

.btn-entrar{
    display: inline-block;
    background: linear-gradient(135deg,var(--purple),var(--pink));
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease !important;
    box-shadow: 0 4px 16px rgba(107,47,160,0.35);
    border: none;
    cursor: pointer;
}

.btn-entrar:hover{
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 24px rgba(107,47,160,0.5) !important;
    color: #fff !important;
    opacity: 1;
}

.btn-entrar::after{ display: none !important; }

.profile-menu{ position: relative; display: inline-block; }

.avatar{
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg,var(--purple),var(--pink));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    box-shadow: 0 4px 12px rgba(107,47,160,0.25);
    transition: transform 0.2s, box-shadow 0.2s;
}

.avatar:hover{ transform: translateY(-2px); box-shadow: 0 6px 16px rgba(107,47,160,0.4); }

.dropdown-menu{
    position: absolute;
    top: 55px;
    right: 0;
    background: #fff;
    min-width: 180px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-hover);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1001;
    border: 1px solid #f0f0f0;
}

.dropdown-menu.show{ display:flex; animation: fadeInDown 0.2s ease; }

@keyframes fadeInDown{
    from{ opacity:0; transform: translateY(-10px); }
    to{ opacity:1; transform: translateY(0); }
}

.dropdown-header{ padding:14px 16px; background:var(--gray-bg); font-size:0.85rem; font-weight:600; color:var(--purple-dark); border-bottom:1px solid #eee; }

.dropdown-menu a{ padding:12px 16px; font-size:0.85rem; color:#444; transition: background 0.2s, color 0.2s; }
.dropdown-menu a::after{ display:none; }
.dropdown-menu a:hover{ background:#f9f9f9; color:var(--purple); }
.dropdown-menu hr{ border:none; border-top:1px solid #eee; margin:0; }
/* ─── Reset & Base ─────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #333;
    background: #fff;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

/* ─── CSS Variables ─────────────────────────────────────── */
:root {
    --purple-dark: #4a1a8a;
    --purple: #6b2fa0;
    --purple-mid: #8b3fc0;
    --pink: #c0306a;
    --orange: #f7931e;
    --orange-light: #ffb347;
    --blue: #1565c0;
    --blue-mid: #1e88e5;
    --blue-light: #42a5f5;
    --white: #ffffff;
    --gray-bg: #f5f5f7;
    --text-dark: #1a1a2e;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 16px 48px rgba(0, 0, 0, 0.2);
}

/* ─── Header ────────────────────────────────────────────── */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding: 0 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.8;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--purple), var(--orange));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-icon svg {
    width: 26px;
    height: 26px;
}

.logo-text {
    line-height: 1.1;
}

.logo-text span:first-child {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: var(--purple-dark);
    letter-spacing: -0.3px;
}

.logo-text span:last-child {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--orange);
    letter-spacing: 2px;
    text-transform: uppercase;
}

nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #444;
    position: relative;
    padding-bottom: 3px;
    transition: color 0.2s;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--purple);
    transition: width 0.3s;
}

nav a:hover {
    color: var(--purple);
}

nav a:hover::after {
    width: 100%;
}

.btn-home {
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: #fff !important;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s !important;
    box-shadow: 0 4px 16px rgba(107, 47, 160, 0.35);
}

.btn-home:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(107, 47, 160, 0.5) !important;
}

.btn-home::after {
    display: none !important;
}

/* ─── Page Layout ───────────────────────────────────────── */
.page-wrapper {
    min-height: 100vh;
    padding-top: 70px;
    display: flex;
    align-items: stretch;
}

.auth-panel-left {
    flex: 1;
    background: linear-gradient(145deg, var(--purple-dark) 0%, var(--purple) 40%, var(--pink) 80%, var(--orange) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}

.auth-panel-left::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    top: -120px;
    left: -120px;
}

.auth-panel-left::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    bottom: -80px;
    right: -80px;
}

.panel-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    max-width: 380px;
}

.panel-icon {
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.panel-icon svg {
    width: 48px;
    height: 48px;
}

.panel-content h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.panel-content h2 span {
    color: var(--orange-light);
}

.panel-content p {
    font-size: 0.95rem;
    opacity: 0.85;
    line-height: 1.7;
    margin-bottom: 36px;
}

.panel-features {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.panel-feat {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.1);
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.panel-feat-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-feat-icon svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.panel-feat span {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.auth-panel-right {
    flex: 0 0 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 48px;
    background: #fff;
    overflow-y: auto;
}

/* ─── Auth Card ─────────────────────────────────────────── */
.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-tabs {
    display: flex;
    gap: 0;
    border-radius: var(--radius-md);
    background: var(--gray-bg);
    padding: 5px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 80px;
    padding: 10px 0;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    color: #888;
    transition: all 0.25s;
    border: none;
    background: transparent;
    font-family: 'Poppins', sans-serif;
}

.tab-btn.active {
    background: #fff;
    color: var(--purple-dark);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.tab-btn.admin-tab {
    color: var(--pink);
    font-weight: 700;
}

.tab-btn.admin-tab.active {
    color: #fff;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    box-shadow: 0 4px 16px rgba(107, 47, 160, 0.3);
}

/* ─── Form ──────────────────────────────────────────────── */
.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.form-subtitle {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 28px;
}

.admin-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: #fff;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 8px;
}

.form-group {
    margin-bottom: 18px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 7px;
}

.form-label span.required {
    color: var(--pink);
    margin-left: 2px;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.input-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}

.form-input {
    width: 100%;
    padding: 13px 14px 13px 42px;
    border: 2px solid #e8e8f0;
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 0.88rem;
    color: #333;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    outline: none;
}

.form-input:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 4px rgba(107, 47, 160, 0.1);
    background: #fff;
}

.form-input.error {
    border-color: var(--pink);
    box-shadow: 0 0 0 4px rgba(192, 48, 106, 0.1);
}

.form-input.success {
    border-color: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.1);
}

.form-error-msg {
    font-size: 0.75rem;
    color: var(--pink);
    margin-top: 5px;
    display: none;
    align-items: center;
    gap: 4px;
}

.form-error-msg.show {
    display: flex;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--purple), var(--pink));
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(107, 47, 160, 0.35);
    transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    margin-bottom: 20px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(107, 47, 160, 0.5);
}

.btn-submit:active {
    transform: scale(0.98);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 20px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
    accent-color: var(--purple);
    cursor: pointer;
}

.checkbox-group label {
    font-size: 0.78rem;
    color: #777;
    line-height: 1.5;
    cursor: pointer;
}

.checkbox-group label a {
    color: var(--purple);
    font-weight: 600;
}

.switch-form {
    text-align: center;
    font-size: 0.83rem;
    color: #888;
}

.switch-form a {
    color: var(--purple);
    font-weight: 600;
    cursor: pointer;
}

.switch-form a:hover {
    color: var(--pink);
}

.success-message {
    background: #f0fdf4;
    border: 2px solid #22c55e;
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 20px;
    text-align: center;
}

.success-message h3 {
    color: #22c55e;
    font-size: 1rem;
    margin-bottom: 8px;
}

.success-message p {
    color: #16a34a;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* ─── Toast Notification ────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    background: #1a1a2e;
    color: #fff;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 340px;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: #22c55e;
}

.toast.error .toast-icon {
    color: var(--pink);
}

.toast-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ─── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
    .auth-panel-left {
        display: none;
    }

    .auth-panel-right {
        flex: 1;
    }
}

@media (max-width: 600px) {
    .auth-panel-right {
        padding: 32px 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    nav {
        gap: 16px;
    }

    nav a {
        font-size: 0.78rem;
    }

    .tab-btn {
        font-size: 0.75rem;
        padding: 8px 0;
    }
}

/* ─── Password Toggle ───────────────────────────────── */
.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: #aaa;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--purple);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.input-wrapper {
    position: relative;
}

.input-wrapper.has-toggle .form-input {
    padding-right: 42px;
}

/* ─── Password Strength ─────────────────────────────── */
.password-strength {
    margin-top: 12px;
    display: none;
}

.password-strength.show {
    display: block;
}

.strength-bar {
    height: 6px;
    background: #e8e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}

.strength-bar-fill {
    height: 100%;
    width: 0;
    border-radius: 3px;
    transition: width 0.3s, background-color 0.3s;
    background-color: #e74c3c;
}

.strength-bar-fill.weak {
    width: 25%;
    background-color: #e74c3c;
}

.strength-bar-fill.fair {
    width: 50%;
    background-color: #f39c12;
}

.strength-bar-fill.good {
    width: 75%;
    background-color: #f1c40f;
}

.strength-bar-fill.strong {
    width: 100%;
    background-color: #27ae60;
}

.strength-text {
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.strength-text.weak {
    color: #e74c3c;
}

.strength-text.fair {
    color: #f39c12;
}

.strength-text.good {
    color: #f1c40f;
}

.strength-text.strong {
    color: #27ae60;
}

.strength-icon {
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.strength-requirements {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
    font-size: 0.75rem;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #999;
    transition: color 0.2s;
}

.requirement.met {
    color: #27ae60;
}

.requirement-check {
    width: 14px;
    height: 14px;
    border: 1.5px solid currentColor;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    flex-shrink: 0;
}

.requirement.met .requirement-check {
    background-color: #27ae60;
    border-color: #27ae60;
}

.requirement.met .requirement-check::after {
    content: '✓';
    color: white;
    font-weight: bold;
}

.logo-img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    /* Garante que a imagem não fique esticada */
    border-radius: 12px;
    /* Mantém as bordas arredondadas do design original */
    flex-shrink: 0;
}