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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
}


.header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.header-left .logo-link {
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.header-left .logo-link:hover {
    opacity: 0.8;
}

.header-left .logo {
    color: #6366f1;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0;
}

.header-center .page-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.back-btn {
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background: #4f46e5;
}


.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: relative;
}

.user-menu:hover {
    background: #f1f5f9;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #6366f1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.user-name {
    font-size: 15px;
    font-weight: 500;
    color: #374151;
}

.dropdown-icon {
    font-size: 12px;
    color: #64748b;
}


.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    min-width: 160px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    color: #1e293b;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border-radius: 6px;
    margin: 4px;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
}

.dropdown-item:hover {
    background-color: #f1f5f9;
}

.dropdown-item.logout:hover {
    color: #dc2626;
}

.dropdown-icon-item {
    font-size: 16px;
}

.dropdown-divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 8px 0;
}


.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 80px);
}

.profile-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    padding: 32px 28px;
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #6366f1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.profile-title {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.025em;
}


.profile-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.info-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.info-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.info-value {
    font-size: 16px;
    font-weight: 500;
    color: #1e293b;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
}

.info-value:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}


.edit-btn span,
.delete-account-btn span {
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .main-content {
        padding: 16px;
    }

    .header {
        padding: 12px 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    .header-center .page-title {
        font-size: 18px;
    }

    .profile-container {
        padding: 24px 20px;
        max-height: calc(100vh - 100px);
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 16px;
        margin-bottom: 20px;
    }

    .profile-avatar {
        width: 64px;
        height: 64px;
        font-size: 24px;
    }

    .profile-title {
        font-size: 24px;
    }

    .profile-info {
        gap: 16px;
    }
}

@media (max-width: 576px) {
    .header-right {
        gap: 8px;
    }

    .back-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .user-menu {
        padding: 6px 8px;
    }

    .user-name {
        display: none;
    }

    .profile-container {
        padding: 24px 20px;
    }

    .profile-avatar {
        width: 56px;
        height: 56px;
        font-size: 20px;
    }

    .profile-title {
        font-size: 20px;
    }

    .info-value {
        padding: 14px 16px;
        font-size: 15px;
    }

    .edit-btn,
    .delete-account-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

.edit-btn {
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.edit-btn:hover {
    background: #5856eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 41, 59, 0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-box {
    background: white;
    padding: 24px;
    border-radius: 12px;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    animation: slideDown 0.3s ease;
}

.modal-box p {
    font-size: 16px;
    margin-bottom: 16px;
}

.modal-box.success p {
    color: #065f46;
}

.modal-box.error p {
    color: #000000;
}

.modal-box.success button {
    flex: 0;
    min-width: 100px;
    padding: 10px 16px;
    background: #6366f1;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.modal-box.error button {
    flex: 0;
    min-width: 100px;
    padding: 10px 16px;
    background: #c20000;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

/* Estilos para modales de tipo warning con botones diferenciados */
.modal-box.warning .modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.modal-box.warning button:first-child {
    background: #ef4444; /* Rojo para acción destructiva */
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.modal-box.warning button:last-child {
    background: white; /* Blanco para cancelar */
    color: #374151;
    border: 1px solid #d1d5db; /* Borde gris */
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 100px;
}

.modal-box.warning button:first-child:hover {
    background: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.modal-box.warning button:last-child:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-box button {
    flex: 0;
    min-width: 100px;
    padding: 10px 16px;
    background: #c20000;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.modal-box.success button:hover {
    background: #5856eb;
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-box.error button:hover {
    background: #940000;
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-box button:hover {
    background: #940000;
}

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

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 12px;
}


.delete-account-container {
    text-align: center;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.delete-account-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
    min-width: 180px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.delete-account-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}