/* Estilos de Autenticação */
.auth-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background: #A41666;
    background: linear-gradient(149deg, rgba(164, 22, 102, 1) 0%, #2f265d 37%, #213f7b 100%);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    color: white;
}

.auth-container img {
    display: block;
    margin: 0 auto 20px -30px;
    max-width: 200px;
    height: auto;
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 20px;
    color: white;
}

.auth-form .form-group {
    margin-bottom: 20px;
}

.auth-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.auth-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

.auth-form button {
    width: 100%;
    padding: 12px;
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.auth-form button:hover {
    background-color: var(--secondary);
}

.auth-switch {
    text-align: center;
    margin-top: 20px;
}

.auth-switch a {
    color: var(--accent);
    text-decoration: none;
    cursor: pointer;
}

.auth-switch a:hover {
    text-decoration: underline;
}

#auth-screen {
    min-height: 100vh;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(52, 152, 219, 0.18), transparent 30%),
        linear-gradient(135deg, #edf4fb 0%, #f7fafc 42%, #e7eef7 100%);
}

.auth-shell {
    width: min(1400px, 100%);
    min-height: calc(100vh - 48px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
    border-radius: 28px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(202, 215, 230, 0.85);
    box-shadow: 0 28px 65px rgba(31, 50, 87, 0.18);
}

.auth-side-panel {
    padding: 36px 32px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(246, 249, 253, 0.97));
    border-right: 1px solid rgba(214, 226, 239, 0.95);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.auth-side-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-kicker,
.auth-brand-label,
.auth-showcase-eyebrow,
.auth-note-tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-kicker,
.auth-brand-label {
    background: rgba(52, 152, 219, 0.1);
    color: #2f5d84;
}

.auth-side-header h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.05;
    color: #1f3551;
}

.auth-side-header p {
    margin: 0;
    color: #5b6c7d;
    line-height: 1.6;
    font-size: 14px;
}

.auth-container {
    max-width: none;
    margin: 0;
    padding: 28px;
    background: #ffffff;
    border-radius: 22px;
    border: 1px solid #dce6f2;
    box-shadow: 0 16px 35px rgba(42, 70, 116, 0.08);
    color: #24384d;
}

.auth-brand-lockup {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.auth-brand-lockup img {
    width: 116px;
    height: auto;
    object-fit: contain;
    margin: 0;
    flex-shrink: 0;
}

.auth-brand-lockup-compact {
    margin-bottom: 18px;
}

.auth-brand-lockup h2 {
    margin: 8px 0 0;
    text-align: left;
    font-size: 28px;
    color: #1f3551;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-form label {
    margin-bottom: 8px;
    font-weight: 700;
    color: #31475e;
}

.auth-form input,
.auth-form select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #d5e0eb;
    border-radius: 12px;
    font-size: 15px;
    background: #f8fbfe;
    color: #1f2937;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-form input:focus,
.auth-form select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.14);
    background: #ffffff;
}

.auth-form button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #1f4f8d, #3498db);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-form button:hover {
    background: linear-gradient(135deg, #1a4477, #2d89ca);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(52, 152, 219, 0.24);
}

.auth-switch {
    text-align: center;
    margin-top: 18px;
    color: #607181;
    font-size: 14px;
    line-height: 1.6;
}

.auth-switch a {
    color: #1f67b0;
    font-weight: 700;
}

.auth-inline-link {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #3498db;
    cursor: pointer;
}

.error-message {
    min-height: 20px;
    margin-top: 16px;
    color: #c0392b;
    font-size: 13px;
    font-weight: 600;
}

.auth-showcase-panel {
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(140deg, rgba(20, 40, 67, 0.88), rgba(28, 89, 144, 0.76)),
        radial-gradient(circle at top right, rgba(112, 214, 255, 0.35), transparent 22%),
        radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.16), transparent 24%);
}

.auth-showcase-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%),
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.28) 0 2px, transparent 3px),
        radial-gradient(circle at 30% 38%, rgba(255, 255, 255, 0.22) 0 2px, transparent 3px),
        radial-gradient(circle at 48% 16%, rgba(255, 255, 255, 0.2) 0 2px, transparent 3px),
        radial-gradient(circle at 58% 44%, rgba(255, 255, 255, 0.22) 0 2px, transparent 3px),
        radial-gradient(circle at 74% 26%, rgba(255, 255, 255, 0.24) 0 2px, transparent 3px),
        radial-gradient(circle at 82% 58%, rgba(255, 255, 255, 0.24) 0 2px, transparent 3px);
    opacity: 0.7;
}

.auth-showcase-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(10, 22, 39, 0.48), rgba(10, 22, 39, 0.1)),
        linear-gradient(0deg, rgba(5, 14, 24, 0.24), transparent 45%);
}

.auth-showcase-content {
    position: relative;
    z-index: 1;
    min-height: 100%;
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    color: #f8fbff;
}

.auth-showcase-brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.auth-showcase-brand img {
    width: 124px;
    max-width: 28%;
    object-fit: contain;
    filter: drop-shadow(0 12px 20px rgba(9, 20, 38, 0.28));
}

.auth-showcase-eyebrow,
.auth-note-tag {
    background: rgba(255, 255, 255, 0.14);
    color: #dff4ff;
}

.auth-showcase-brand h2 {
    margin: 10px 0 0;
    font-size: 34px;
    line-height: 1.08;
    max-width: 620px;
}

.auth-showcase-note {
    width: min(720px, 100%);
    padding: 24px 26px;
    border-radius: 24px;
    background: rgba(11, 27, 48, 0.34);
    border: 1px solid rgba(214, 235, 255, 0.14);
    box-shadow: 0 20px 36px rgba(7, 17, 29, 0.16);
}

.auth-showcase-note h3,
.auth-showcase-card h3 {
    margin: 12px 0 10px;
    font-size: 24px;
    line-height: 1.15;
}

.auth-showcase-note p,
.auth-showcase-card p,
.auth-showcase-card li {
    margin: 0;
    color: rgba(235, 244, 255, 0.9);
    line-height: 1.65;
    font-size: 14px;
}

.auth-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.auth-showcase-card {
    padding: 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
}

.auth-showcase-card-list ul {
    padding-left: 18px;
    margin: 0;
}

@media (max-width: 1120px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-side-panel {
        border-right: none;
        border-bottom: 1px solid rgba(214, 226, 239, 0.95);
    }

    .auth-showcase-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    #auth-screen {
        padding: 12px;
    }

    .auth-shell {
        min-height: auto;
        border-radius: 22px;
    }

    .auth-side-panel,
    .auth-showcase-content {
        padding: 24px 20px;
    }

    .auth-brand-lockup {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-brand-lockup img,
    .auth-showcase-brand img {
        width: 100px;
        max-width: none;
    }

    .auth-showcase-brand {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-showcase-brand h2 {
        font-size: 28px;
    }

    .auth-showcase-note h3,
    .auth-showcase-card h3 {
        font-size: 20px;
    }
}

/* Ajuste final da tela de login para hero simplificado */
.auth-showcase-panel {
    background: #eef3f8;
}

.auth-showcase-panel::before,
.auth-showcase-overlay,
.auth-showcase-content {
    display: none;
}

.auth-showcase-image {
    display: block;
    width: 100%;
    height: 100%;
    min-height: calc(100vh - 48px);
    object-fit: cover;
    object-position: center;
}

@media (max-width: 1120px) {
    .auth-showcase-image {
        min-height: 360px;
    }
}

@media (max-width: 640px) {
    .auth-showcase-image {
        min-height: 240px;
    }
}

/* Header com informações do usuário */
.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 20px;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    font-weight: bold;
    color: white;
    overflow: hidden;
    position: relative;
}

.user-avatar span,
.profile-summary-avatar span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.user-avatar-photo,
.profile-summary-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar-photo.hidden,
.profile-summary-photo.hidden {
    display: none;
}

.profile-btn,
.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.profile-btn:hover,
.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.profile-modal.hidden {
    display: none;
}

.profile-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.profile-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 27, 45, 0.5);
    backdrop-filter: blur(3px);
}

.profile-modal-card {
    position: relative;
    width: min(760px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    margin: 24px auto;
    background: white;
    border-radius: 18px;
    box-shadow: 0 24px 70px rgba(19, 27, 52, 0.28);
    padding: 28px;
}

.profile-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 24px;
}

.profile-modal-header h2 {
    margin: 0 0 6px 0;
    color: var(--primary);
}

.profile-modal-header p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.profile-close-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--primary);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}

.profile-summary {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(164, 22, 102, 0.08), rgba(33, 63, 123, 0.08));
    margin-bottom: 24px;
}

.profile-summary-avatar {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    overflow: hidden;
    position: relative;
}

.profile-summary-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-summary-text strong {
    color: var(--primary);
    font-size: 18px;
}

.profile-summary-text span {
    color: #475569;
    font-size: 14px;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.profile-photo-actions {
    display: flex;
    gap: 10px;
    margin: -6px 0 20px;
}

.profile-photo-btn {
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 14px;
    cursor: pointer;
}

.profile-photo-btn.secondary {
    background: #e2e8f0;
    color: #334155;
}

.profile-field {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
}

.profile-field label {
    display: block;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-field div {
    color: #1e293b;
    font-size: 15px;
    line-height: 1.5;
    word-break: break-word;
}

.profile-field input {
    width: 100%;
    padding: 12px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: white;
    color: #1e293b;
    font-size: 14px;
}

.profile-field textarea {
    width: 100%;
    min-height: 96px;
    padding: 12px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: white;
    color: #1e293b;
    font-size: 14px;
    resize: vertical;
}

.profile-field-full {
    grid-column: 1 / -1;
}

.profile-field input[readonly] {
    background: #eef2f7;
    color: #475569;
}

.profile-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 22px;
}

.profile-save-status {
    min-height: 20px;
    color: #475569;
    font-size: 13px;
}

.profile-save-status.is-success {
    color: #15803d;
}

.profile-save-status.is-error {
    color: #b91c1c;
}

.profile-save-btn {
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 18px;
    cursor: pointer;
    white-space: nowrap;
}

.profile-save-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

@media (max-width: 720px) {
    .user-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .user-actions {
        width: 100%;
    }

    .profile-btn,
    .logout-btn {
        flex: 1;
    }

    .profile-modal-card {
        padding: 22px 18px;
    }

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

    .profile-photo-actions {
        flex-direction: column;
    }

    .profile-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .profile-save-btn {
        width: 100%;
    }
}
